chansung commited on
Commit
caf9a86
1 Parent(s): 7c54130

Update app/main.py

Browse files
Files changed (1) hide show
  1. app/main.py +3 -1
app/main.py CHANGED
@@ -44,7 +44,9 @@ async def echo(message, history):
44
  history.append([message, ""])
45
  full_resp = ""
46
 
47
- responses = client.chat.completions.create(model="tgi", messages=messages, **parameters)
 
 
48
 
49
  async for resp in responses:
50
  full_resp = full_resp + resp.choices[0].delta.content
 
44
  history.append([message, ""])
45
  full_resp = ""
46
 
47
+ responses = await client.chat.completions.create(
48
+ model="tgi", messages=messages, **parameters
49
+ )
50
 
51
  async for resp in responses:
52
  full_resp = full_resp + resp.choices[0].delta.content