04-02 python package.py

01 - Create a directory somewhere

create a file called package.py in that directory

copy or paste this script

import ollama

client = ollama.Client()
model = "llama3" # put your model name here
prompt = "What is Python?"

response = client.generate(model=model,prompt=prompt)
print("Response from Ollama:")
print(response.response)
                    

run this command

python3 package.py

make sure you are in the right directory,

pwd

and just use python3, b/c alias in .zshrc isn't working

python3 packagae.py