Skip to content

Commit

Permalink
[fix] jsonify only when not string
Browse files Browse the repository at this point in the history
  • Loading branch information
yashbonde committed Oct 10, 2023
1 parent a14f6dc commit a107882
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/chainfury_server/engines/fury.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a107882

Please sign in to comment.