examples/ai/ai-starter-kit/notebooks/test_ollama.py

12 lines
253 B
Python

from ollama import Client
client = Client(
host='http://ai-starter-kit-ollama:11434',
headers={'x-some-header': 'some-value'}
)
response = client.chat(model='gemma3', messages=[
{
'role': 'user',
'content': 'Why is the sky blue?',
},
])