Spaces:
Runtime error
Runtime error
Updated delta
Browse files
app.py
CHANGED
@@ -46,7 +46,7 @@ def model_chat(query: Optional[str], history: Optional[History]) -> Generator[Tu
|
|
46 |
messages.append({'role': 'assistant', 'content': ''})
|
47 |
for completion in gen:
|
48 |
print(completion)
|
49 |
-
text = completion.choices[0].content
|
50 |
messages[-1]['content'] += text
|
51 |
history = messages_to_history(messages)
|
52 |
yield '', history
|
|
|
46 |
messages.append({'role': 'assistant', 'content': ''})
|
47 |
for completion in gen:
|
48 |
print(completion)
|
49 |
+
text = completion.choices[0].delta.content
|
50 |
messages[-1]['content'] += text
|
51 |
history = messages_to_history(messages)
|
52 |
yield '', history
|