mirror of
https://github.com/kharonsec/ollama-python
synced 2026-04-25 15:14:55 +02:00
* Examples and README updates --------- Co-authored-by: fujitatomoya <tomoya.fujita825@gmail.com> Co-authored-by: Michael Yang <mxyng@pm.me>
12 lines
194 B
Python
12 lines
194 B
Python
from ollama import chat
|
|
|
|
messages = [
|
|
{
|
|
'role': 'user',
|
|
'content': 'Why is the sky blue?',
|
|
},
|
|
]
|
|
|
|
response = chat('llama3.2', messages=messages)
|
|
print(response['message']['content'])
|