We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66c03d3 commit 84df085Copy full SHA for 84df085
app/rag_system.py
@@ -148,12 +148,12 @@ def answer_query_stream(self, query):
148
)
149
150
collected_messages = []
151
- for chunk in stream:
152
- if chunk['choices'][0]['finish_reason'] is not None:
153
- break
+ for chunk in stream:
154
content = chunk['choices'][0]['delta'].get('content', '')
155
collected_messages.append(content)
156
yield content
+ if chunk['choices'][0].get('finish_reason') is not None:
+ break
157
158
if len(citations) > 0:
159
yield "\n\nReferences:\n" + "\n".join(citations)
0 commit comments