class documentation

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_messages Convert string message to proper messages array
def __init__(self, context): (source)

Undocumented

def chat(self, messages, **kwargs): (source)

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

Undocumented

def _prepare_messages(self, messages): (source)

Convert string message to proper messages array