mirror of
https://github.com/kharonsec/ollama-python
synced 2026-05-09 16:42:13 +02:00
Fix chat-with-history.py example (#337)
Fix chat-with-history.py example --------- Co-authored-by: Parth Sareen <parth.sareen@ollama.com>
This commit is contained in:
@@ -31,8 +31,8 @@ while True:
|
||||
)
|
||||
|
||||
# Add the response to the messages to maintain the history
|
||||
messages.append(
|
||||
messages += [
|
||||
{'role': 'user', 'content': user_input},
|
||||
{'role': 'assistant', 'content': response.message.content},
|
||||
)
|
||||
]
|
||||
print(response.message.content + '\n')
|
||||
|
||||
Reference in New Issue
Block a user