Skip to content

Commit 707d133

Browse files
authored
Merge pull request #1734 from arc53/fix-thought-param
fix: thought param in /api/answer
2 parents bea89b9 + f6c88da commit 707d133

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

application/api/answer/routes.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,7 @@ def post(self):
611611
source_log_docs = []
612612
tool_calls = []
613613
stream_ended = False
614+
thought = ""
614615

615616
for line in complete_stream(
616617
question=question,
@@ -633,6 +634,8 @@ def post(self):
633634
source_log_docs = event["source"]
634635
elif event["type"] == "tool_calls":
635636
tool_calls = event["tool_calls"]
637+
elif event["type"] == "thought":
638+
thought = event["thought"]
636639
elif event["type"] == "error":
637640
logger.error(f"Error from stream: {event['error']}")
638641
return bad_request(500, event["error"])
@@ -664,6 +667,7 @@ def post(self):
664667
conversation_id,
665668
question,
666669
response_full,
670+
thought,
667671
source_log_docs,
668672
tool_calls,
669673
llm,

0 commit comments

Comments
 (0)