Class OllamaClient

java.lang.Object
com.tnsai.llm.providers.AbstractLLMClient
com.tnsai.llm.providers.OllamaClient
All Implemented Interfaces:
com.tnsai.llm.LLMClient

public class OllamaClient extends AbstractLLMClient
Ollama LLM client implementation for local and cloud deployments.

OllamaClient provides access to Ollama models running locally or on Ollama Cloud. It supports chat completion, streaming, and tool calling (function calling).

Environment Variables

  • OLLAMA_BASE_URL - Custom Ollama server URL (default: http://localhost:11434)
  • OLLAMA_API_KEY - API key for Ollama Cloud authentication (optional for local)
See Also: