darsoarafa commited on
Commit
0913e86
·
verified ·
1 Parent(s): 7aee42c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -154,10 +154,10 @@ async def post_chat(
154
  ).encode('utf-8')
155
  + b'\n'
156
  )
157
- # get the chat history so far to pass as context to the agent
158
- messages = await database.get_messages()
159
- # run the agent with the user prompt and the chat history
160
- async with agent.run_stream(prompt, message_history=messages) as result:
161
  async for text in result.stream(debounce_by=0.01):
162
  # text here is a `str` and the frontend wants
163
  # JSON encoded ModelResponse, so we create one
 
154
  ).encode('utf-8')
155
  + b'\n'
156
  )
157
+ ## get the chat history so far to pass as context to the agent
158
+ #messages = await database.get_messages()
159
+ ## run the agent with the user prompt and the chat history
160
+ async with agent.run_stream(prompt) as result:
161
  async for text in result.stream(debounce_by=0.01):
162
  # text here is a `str` and the frontend wants
163
  # JSON encoded ModelResponse, so we create one