TeanShow commited on
Commit
523b4b4
·
verified ·
1 Parent(s): 40af844

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -36,11 +36,12 @@ async def main_interface(user_text):
36
 
37
 
38
  async def respond(message, history):
39
- if history is None:
40
- history = []
41
 
42
  _, response_text = await main_interface(message)
43
- history.append((message, response_text))
 
 
44
 
45
  return "", history
46
 
 
36
 
37
 
38
  async def respond(message, history):
39
+ if history is None: history = []
 
40
 
41
  _, response_text = await main_interface(message)
42
+
43
+ history.append({"role": "user", "content": message})
44
+ history.append({"role": "assistant", "content": response_text})
45
 
46
  return "", history
47