Code
cookbook/models/ollama/ollama_cloud.py
Usage
1
Create a virtual environment
Open the
Terminal
and create a python virtual environment.2
Set up Ollama Cloud API Key
Sign up at ollama.com and get your API key, then export it:
3
Install libraries
4
Run Agent
Key Features
- No local setup required: Access powerful models instantly without downloading or managing local installations
- Production-ready: Enterprise-grade infrastructure with reliable uptime and performance
- Wide model selection: Access to popular models like DeepSeek, Qwen, Phi, and more
- Automatic configuration: When
api_key
is provided, the host automatically defaults tohttps://ollama.com