class documentation
class LLMProvider: (source)
Known subclasses: zms.llmapi.OllamaProvider, zms.llmapi.OpenAIProvider, zms.llmapi.RAGProvider
Constructor: LLMProvider(context)
Abstract base class for LLM providers
| Method | __init__ |
Undocumented |
| Method | chat |
Send messages to the LLM and get a response. |
| Instance Variable | context |
Undocumented |
| Method | _prepare |
Convert string message to proper messages array |
Send messages to the LLM and get a response.
Args: messages (list|str): List of message dicts [{"role": "user", "content": "..."}] or a string for simple single-turn conversations **kwargs: Additional provider-specific parameters
Returns: dict: Response in OpenAI /v1/chat/completions format or error dict