Base
MissingRawChatResponseError
Bases: Exception
Raised when a ChatResponse is missing the raw attribute.
RawMessageExtractionError
Bases: Exception
Raised when a message cannot be extracted from a ChatResponse raw attribute.
MissingResponseContentError
Bases: Exception
Raised when the LLM response message has no content.
EmptyResponseMessageError
Bases: Exception
Raised when the LLM response message is empty.
ReasoningExtractionError
Bases: Exception
Raised when reasoning cannot be extracted from the LLM response message.
EmptyReasoningError
Bases: Exception
Raised when the extracted reasoning is empty.
LLM
Bases: ABC
call_llm_chat_with_guided_decoding(messages, *, json_schema=None, **request_kwargs)
abstractmethod
Call a chat LLM with optional json schema for guided decoding.
Source code in src/kibad_llm/llms/base.py
52 53 54 55 56 57 58 59 60 61 | |
get_raw_message_from_chat_response(response)
Extract raw message from a chat response.
Source code in src/kibad_llm/llms/base.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
get_reasoning_from_chat_response(response)
Extract reasoning from a chat response.
Source code in src/kibad_llm/llms/base.py
78 79 80 81 82 | |
get_response_content_from_chat_response(response)
Extract content from chat response.
Source code in src/kibad_llm/llms/base.py
84 85 86 87 88 89 90 91 92 | |