ractogateway.adapters.ollama_kit
Ollama adapter — local model inference via the Ollama REST API.
Requires the ollama Python package:
pip install ractogateway[ollama]
The Ollama server must be running locally (default: http://localhost:11434).
Pull a model first:
ollama pull llama3.2
- class ractogateway.adapters.ollama_kit.OllamaLLMKit(model='llama3.2', *, base_url='http://localhost:11434', **kwargs)[source]
Bases:
BaseLLMAdapterLow-level adapter for the Ollama local-inference REST API.
- Parameters:
- provider: str = 'ollama'
- translate_tools(registry)[source]
Convert registry schemas to Ollama function-calling format.
- run(prompt, user_message, *, history=None, tools=None, temperature=0.0, max_tokens=4096, **kwargs)[source]
Execute a chat request synchronously.
- Return type:
- async arun(prompt, user_message, *, history=None, tools=None, temperature=0.0, max_tokens=4096, **kwargs)[source]
Execute a chat request asynchronously.
- Return type: