LLMBase#
- class council.llm.LLMBase(token_counter: LLMessageTokenCounterBase | None = None)[source]#
Bases:
ABCAbstract base class representing a language model.
- post_chat_request(messages: List[LLMMessage], **kwargs: Any) LLMResult[source]#
Sends a chat request to the language model.
- Parameters:
messages (List[LLMMessage]) – A list of LLMMessage objects representing the chat messages.
**kwargs – Additional keyword arguments for the chat request.
- Returns:
The response from the language model.
- Return type:
LLMResult
- Raises:
LLMTokenLimitException – If messages exceed the maximum number of tokens.
Exception – If an error occurs during the execution of the chat request.