File tree Expand file tree Collapse file tree 7 files changed +7
-7
lines changed Expand file tree Collapse file tree 7 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 3636# Define a callback to run when the user submits a message
3737@chat .on_user_submit
3838async def handle_user_input (user_input : str ):
39- response = chat_model .stream (user_input )
39+ response = await chat_model .stream_async (user_input )
4040 await chat .append_message_stream (response )
Original file line number Diff line number Diff line change 3737# Define a callback to run when the user submits a message
3838@chat .on_user_submit
3939async def handle_user_input (user_input : str ):
40- response = chat_model .stream (user_input )
40+ response = await chat_model .stream_async (user_input )
4141 await chat .append_message_stream (response )
Original file line number Diff line number Diff line change 3737# Generate a response when the user submits a message
3838@chat .on_user_submit
3939async def handle_user_input (user_input : str ):
40- response = chat_model .stream (user_input )
40+ response = await chat_model .stream_async (user_input )
4141 await chat .append_message_stream (response )
Original file line number Diff line number Diff line change 3333# Generate a response when the user submits a message
3434@chat .on_user_submit
3535async def handle_user_input (user_input : str ):
36- response = chat_model .stream (user_input )
36+ response = await chat_model .stream_async (user_input )
3737 await chat .append_message_stream (response )
Original file line number Diff line number Diff line change 3838# Define a callback to run when the user submits a message
3939@chat .on_user_submit
4040async def handle_user_input (user_input : str ):
41- response = chat_model .stream (user_input )
41+ response = await chat_model .stream_async (user_input )
4242 await chat .append_message_stream (response )
Original file line number Diff line number Diff line change 2929# Generate a response when the user submits a message
3030@chat .on_user_submit
3131async def handle_user_input (user_input : str ):
32- response = chat_model .stream (user_input )
32+ response = await chat_model .stream_async (user_input )
3333 await chat .append_message_stream (response )
Original file line number Diff line number Diff line change 3737# Generate a response when the user submits a message
3838@chat .on_user_submit
3939async def handle_user_input (user_input : str ):
40- response = chat_model .stream (user_input )
40+ response = await chat_model .stream_async (user_input )
4141 await chat .append_message_stream (response )
You can’t perform that action at this time.
0 commit comments