Skip to main content
The Ollama model provides access to open source models, both locally-hosted and via Ollama Cloud. Local Usage: Run models on your own hardware using the Ollama client. Perfect for development, privacy-sensitive workloads, and when you want full control over your infrastructure. Cloud Usage: Access cloud-hosted models via Ollama Cloud with an API key for scalable, production-ready deployments. No local setup required - simply set your OLLAMA_API_KEY and start using powerful models instantly.

Key Features

  • Dual Deployment Options: Choose between local hosting for privacy and control, or cloud hosting for scalability
  • Seamless Switching: Easy transition between local and cloud deployments with minimal code changes
  • Auto-configuration: When using an API key, the host automatically defaults to Ollama Cloud
  • Wide Model Support: Access to extensive library of open-source models including GPT-OSS, Llama, Qwen, DeepSeek, and Phi models

Parameters

ParameterTypeDefaultDescription
idstr"llama3.2"The name of the Ollama model to use
namestr"Ollama"The name of the model
providerstr"Ollama"The provider of the model
hoststr"http://localhost:11434"The host URL for the Ollama server
timeoutOptional[int]NoneRequest timeout in seconds
formatOptional[str]NoneThe format to return the response in (e.g., “json”)
optionsOptional[Dict[str, Any]]NoneAdditional model options (temperature, top_p, etc.)
keep_aliveOptional[Union[float, str]]NoneHow long to keep the model loaded (e.g., “5m”, 3600 seconds)
templateOptional[str]NoneThe prompt template to use
systemOptional[str]NoneSystem message to use
rawOptional[bool]NoneWhether to return raw response without formatting
streamboolTrueWhether to stream the response
I