mirror of
https://github.com/kharonsec/ollama-python
synced 2026-05-08 16:12:25 +02:00
13 lines
183 B
Python
13 lines
183 B
Python
from ollama import chat
|
|
|
|
|
|
messages = [
|
|
{
|
|
'role': 'user',
|
|
'content': 'Why is the sky blue?',
|
|
},
|
|
]
|
|
|
|
response = chat('mistral', messages=messages)
|
|
print(response['message'])
|