mirror of
https://github.com/kharonsec/ollama-python
synced 2026-05-09 16:42:13 +02:00
initial commit
This commit is contained in:
12
examples/simple-chat/main.py
Normal file
12
examples/simple-chat/main.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from ollama import chat
|
||||
|
||||
|
||||
messages = [
|
||||
{
|
||||
'role': 'user',
|
||||
'content': 'Why is the sky blue?',
|
||||
},
|
||||
]
|
||||
|
||||
response = chat('mistral', messages=messages)
|
||||
print(response['message'])
|
||||
Reference in New Issue
Block a user