From a1078826720cea1f7f696a60009479b58cbc8215 Mon Sep 17 00:00:00 2001 From: yashbonde Date: Tue, 10 Oct 2023 20:11:40 +0530 Subject: [PATCH] [fix] jsonify only when not string --- server/chainfury_server/engines/fury.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/chainfury_server/engines/fury.py b/server/chainfury_server/engines/fury.py index 4d282d1..a806018 100644 --- a/server/chainfury_server/engines/fury.py +++ b/server/chainfury_server/engines/fury.py @@ -35,7 +35,7 @@ def run(self, chatbot: ChatBot, prompt: PromptBody, db: Session, start: float) - callback = FuryThoughts(db, prompt_row.id) mainline_out, full_ir = chain(prompt.new_message, thoughts_callback=callback, print_thoughts=False) result = CFPromptResult( - result=json.dumps(mainline_out), + result=json.dumps(mainline_out) if type(mainline_out) != str else mainline_out, thought=[{"engine": "fury", "ir_steps": callback.count, "thoughts": list(full_ir.keys())}], num_tokens=1, prompt=prompt_row,