Skip to content

OllamaClient

autogen.beta.config.ollama.ollama_client.OllamaClient #

OllamaClient(model, host=OLLAMA_DEFAULT_HOST, streaming=False, create_options=None)

Bases: LLMClient

Source code in autogen/beta/config/ollama/ollama_client.py
def __init__(
    self,
    model: str,
    host: str = OLLAMA_DEFAULT_HOST,
    streaming: bool = False,
    create_options: CreateOptions | None = None,
) -> None:
    self._model = model
    self._host = host
    self._streaming = streaming
    self._create_options = {k: v for k, v in (create_options or {}).items() if v is not None}
    self._client = AsyncClient(host=host)