igbot-base 0.0.13__py3-none-any.whl → 0.0.15__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- igbot_base/exception_handler.py +3 -0
- igbot_base/llm.py +3 -0
- {igbot_base-0.0.13.dist-info → igbot_base-0.0.15.dist-info}/METADATA +1 -1
- {igbot_base-0.0.13.dist-info → igbot_base-0.0.15.dist-info}/RECORD +6 -6
- {igbot_base-0.0.13.dist-info → igbot_base-0.0.15.dist-info}/WHEEL +0 -0
- {igbot_base-0.0.13.dist-info → igbot_base-0.0.15.dist-info}/top_level.txt +0 -0
igbot_base/exception_handler.py
CHANGED
@@ -2,6 +2,8 @@ from abc import ABC, abstractmethod
|
|
2
2
|
|
3
3
|
from igbot_base.agent_response import AgentResponse
|
4
4
|
|
5
|
+
from igbot_base.igbot_base.exception.llm_exception import BaseLlmException
|
6
|
+
|
5
7
|
|
6
8
|
class ExceptionHandler(ABC):
|
7
9
|
|
@@ -26,3 +28,4 @@ class ReturnFailedResponseGracefully(ExceptionHandler):
|
|
26
28
|
|
27
29
|
def handle(self, e: Exception):
|
28
30
|
return AgentResponse.error(str(e), e)
|
31
|
+
|
igbot_base/llm.py
CHANGED
@@ -7,6 +7,8 @@ from igbot_base.llmmemory import LlmMemory
|
|
7
7
|
from igbot_base.models import Model
|
8
8
|
from igbot_base.logging_adapter import get_logger
|
9
9
|
|
10
|
+
from igbot_base.exception.llm_exception import BaseLlmException
|
11
|
+
|
10
12
|
logger = get_logger("application")
|
11
13
|
|
12
14
|
|
@@ -47,6 +49,7 @@ class Llm(ABC):
|
|
47
49
|
self._name, self._model.value.get_name(), e)
|
48
50
|
self._revert_memory(history)
|
49
51
|
self._exception_handler.handle(e)
|
52
|
+
raise BaseLlmException(f"Exception occurred while calling llm api", self, e)
|
50
53
|
|
51
54
|
def get_additional_llm_args(self):
|
52
55
|
args = {}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
igbot_base/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
igbot_base/agent.py,sha256=FwQ5nvk5rLm5F-QaxsghhqDZcus_at7AehXIWDIk8dw,932
|
3
3
|
igbot_base/agent_response.py,sha256=eAps47djL_aWYn8P_BMpVGkPwO6m8nhltWWyh8qSG6E,1042
|
4
|
-
igbot_base/exception_handler.py,sha256=
|
5
|
-
igbot_base/llm.py,sha256=
|
4
|
+
igbot_base/exception_handler.py,sha256=zTOXRCbGlb69VzSU74_5Yqcf1SqbSciSez-yOFwwdAg,612
|
5
|
+
igbot_base/llm.py,sha256=OcuX9M-Lnkx01YWRXSxeMOz44NQ8znQtwt-fhyRlSWs,2166
|
6
6
|
igbot_base/llmmemory.py,sha256=I6eSBPW1DK8UNiHhayon-DLbSbWSinO_EwM5S8C3tHA,1090
|
7
7
|
igbot_base/logging_adapter.py,sha256=kMuAaQPCba2luk0-WPxAbPNJaBL1yZsaff35ltKWgww,256
|
8
8
|
igbot_base/models.py,sha256=15bitUZy4Z4JhZbLd_SMx5pD7m8YuZiIq-wYGumf0ws,622
|
@@ -19,7 +19,7 @@ igbot_base/exception/memory_exception.py,sha256=ZGKw3dN2tMf9XHacYaVTXgvYpWi14z7u
|
|
19
19
|
igbot_base/exception/prompt_exception.py,sha256=_u-O9E2Z1DK_OT4StyOmIDLfr_Mmk4k0GLe67kIoQNc,413
|
20
20
|
igbot_base/exception/retriever_exception.py,sha256=A46sBV6_1N3jgBl-nFRw4KgEcz3oPb8d5Eb83YWDEPo,431
|
21
21
|
igbot_base/exception/tool_exception.py,sha256=1EX7R90MplT4Vqv1-zzPslFrNvDwcrh7wgEWun2Ba6k,386
|
22
|
-
igbot_base-0.0.
|
23
|
-
igbot_base-0.0.
|
24
|
-
igbot_base-0.0.
|
25
|
-
igbot_base-0.0.
|
22
|
+
igbot_base-0.0.15.dist-info/METADATA,sha256=FdW0xytwda1kwVpMwR6m0w73UX1xJZhjE23BmVBgA3M,211
|
23
|
+
igbot_base-0.0.15.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
24
|
+
igbot_base-0.0.15.dist-info/top_level.txt,sha256=RGpEN0pLsnfNLoLfpw1D_nLSyZwi3ggSaDq07o4ZEAI,11
|
25
|
+
igbot_base-0.0.15.dist-info/RECORD,,
|
File without changes
|
File without changes
|