ollama-python/examples/README.md
Bryon Tjanaka c8392d6524
Some checks failed
test / test (push) Has been cancelled
test / lint (push) Has been cancelled
Fix link for thinking-levels.py (#567)
Resolves #554
2025-08-20 00:19:07 -07:00

2.4 KiB

Running Examples

Run the examples in this directory with:

# Run example
python3 examples/<example>.py

See ollama/docs/api.md for full API documentation

Chat - Chat with a model

Generate - Generate text with a model

Tools/Function Calling - Call a function with a model

gpt-oss

Multimodal with Images - Chat with a multimodal (image chat) model

Structured Outputs - Generate structured outputs with a model

Ollama List - List all downloaded models and their properties

Ollama Show - Display model properties and capabilities

Ollama ps - Show model status with CPU/GPU usage

Ollama Pull - Pull a model from Ollama

Requirement: pip install tqdm

Ollama Create - Create a model from a Modelfile

Ollama Embed - Generate embeddings with a model

Thinking - Enable thinking mode for a model

Thinking (generate) - Enable thinking mode for a model

Thinking (levels) - Choose the thinking level