From 7ff645899e4610b16574bdd22a4d154c93d5b830 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Sat, 22 Apr 2023 17:33:36 -0300 Subject: [PATCH] Fix bug in api extension --- extensions/api/script.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/api/script.py b/extensions/api/script.py index 64e58aab..e4c3a556 100644 --- a/extensions/api/script.py +++ b/extensions/api/script.py @@ -73,7 +73,7 @@ class Handler(BaseHTTPRequestHandler): response = json.dumps({ 'results': [{ - 'text': answer if shared.args.is_chat() else answer[len(prompt):] + 'text': answer if shared.is_chat() else answer[len(prompt):] }] }) self.wfile.write(response.encode('utf-8'))