Base
EmptyReasoningError
Bases: Exception
Raised when the extracted reasoning is empty.
Source code in src/kibad_llm/llms/base.py
38 39 40 41 | |
EmptyResponseMessageError
Bases: Exception
Raised when the LLM response message is empty.
Source code in src/kibad_llm/llms/base.py
26 27 28 29 | |
LLM
Bases: ABC
Source code in src/kibad_llm/llms/base.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | |
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 | |
MissingRawChatResponseError
Bases: Exception
Raised when a ChatResponse is missing the raw attribute.
Source code in src/kibad_llm/llms/base.py
8 9 10 11 | |
MissingResponseContentError
Bases: Exception
Raised when the LLM response message has no content.
Source code in src/kibad_llm/llms/base.py
20 21 22 23 | |
RawMessageExtractionError
Bases: Exception
Raised when a message cannot be extracted from a ChatResponse raw attribute.
Source code in src/kibad_llm/llms/base.py
14 15 16 17 | |
ReasoningExtractionError
Bases: Exception
Raised when reasoning cannot be extracted from the LLM response message.
Source code in src/kibad_llm/llms/base.py
32 33 34 35 | |