Skip to content

Instantly share code, notes, and snippets.

@ChrisSoto
Last active October 8, 2024 23:59
Show Gist options
  • Select an option

  • Save ChrisSoto/3fa15ef53913fde16f464fe7a14cce8f to your computer and use it in GitHub Desktop.

Select an option

Save ChrisSoto/3fa15ef53913fde16f464fe7a14cce8f to your computer and use it in GitHub Desktop.
terminal : ollama run llama3.2
# uses "base" python interpreter
import ollama
response = ollama.chat(model='llama3.2', messages=[
{
'role': 'user',
'content': 'Why is the sky blue?',
},
])
print(response['message']['content'])
terminal : python [filename].py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment