Skip to content

Commit 9cc2bc6

Browse files
committed
resolved comments
1 parent c83b3ea commit 9cc2bc6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/quartapp/chat.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,10 @@ async def get_result(thread_id: str, agent_id: str) -> AsyncGenerator[str, None]
130130
thread_id=thread_id, assistant_id=agent_id,
131131
event_handler=MyEventHandler()
132132
) as stream:
133-
async for _, _, to_be_yield in stream:
134-
if to_be_yield:
135-
yield to_be_yield
133+
# Iterate over the steam to trigger event functions
134+
async for _, _, event_func_return_val in stream:
135+
if event_func_return_val:
136+
yield event_func_return_val
136137

137138
@bp.route('/chat', methods=['POST'])
138139
async def chat():

0 commit comments

Comments
 (0)