Run the examples in this directory with:
# Run example
python3 examples/<example>.pySee ollama/docs/api.md for full API documentation
- chat.py
- async-chat.py
- chat-stream.py - Streamed outputs
- chat-with-history.py - Chat with model and maintain history of the conversation
- generate.py
- async-generate.py
- generate-stream.py - Streamed outputs
- fill-in-middle.py - Given a prefix and suffix, fill in the middle
- tools.py - Simple example of Tools/Function Calling
- async-tools.py
- multi-tool.py - Using multiple tools, with thinking enabled
Requirement: pip install tqdm