From ee3c8a893ef2cc19e9e4b9df65eea7c2bc29b1e5 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Fri, 5 May 2023 19:04:50 -0300 Subject: [PATCH] Update Extensions.md --- docs/Extensions.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/Extensions.md b/docs/Extensions.md index bc78dd0d..8c58a776 100644 --- a/docs/Extensions.md +++ b/docs/Extensions.md @@ -110,6 +110,8 @@ python server.py --extensions translate enthusiasm # First apply translate, then Once defined in a `script.py`, this function is executed in place of the main generation functions. You can use it to connect the web UI to an external API, or to load a custom model that is not supported yet. +Note that in chat mode, this function must only return the new text, whereas in other modes it must return the original prompt + the new text. + ```python import datetime