""" Ollama API schemas. Internal models for Ollama API communication. """ from typing import Any from src.core.models import CustomBaseModel class OllamaMessage(CustomBaseModel): """Message format for Ollama API.""" role: str content: str class OllamaChatRequest(CustomBaseModel): """Chat request to Ollama API.""" model: str messages: list[OllamaMessage] stream: bool = False options: dict[str, Any] | None = None class OllamaChatResponse(CustomBaseModel): """Chat response from Ollama API.""" model: str created_at: str message: OllamaMessage done: bool class OllamaModelInfo(CustomBaseModel): """Model information from Ollama.""" name: str modified_at: str size: int digest: str class OllamaModelsResponse(CustomBaseModel): """Response from Ollama models list endpoint.""" models: list[OllamaModelInfo]