igbot-base 0.0.15__py3-none-any.whl → 0.0.17__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.
@@ -0,0 +1,86 @@
1
+ from igbot_base.agent import Agent
2
+ from igbot_base.llm import Llm
3
+ from igbot_base.llmmemory import LlmMemory
4
+ from igbot_base.prompt_template import Prompt
5
+ from igbot_base.retriever import Retriever
6
+ from igbot_base.tool import Tool
7
+
8
+
9
+ class IgBotBaseException(Exception):
10
+
11
+ def __init__(self, message, cause: Exception = None):
12
+ super().__init__(message)
13
+ self.cause = cause
14
+
15
+ def __str__(self):
16
+ result = self.args[0]
17
+ if self.cause:
18
+ result += f" Caused by: {self.cause}"
19
+
20
+ return result
21
+
22
+
23
+ class BaseAgentException(IgBotBaseException):
24
+
25
+ def __init__(self, message, agent: Agent, cause: Exception = None):
26
+ super().__init__(message, cause)
27
+ self.agent = agent
28
+
29
+ def __str__(self):
30
+ result = super().__str__()
31
+ result += f" at agent {self.agent}"
32
+
33
+
34
+ class BaseLlmException(IgBotBaseException):
35
+
36
+ def __init__(self, message, llm: Llm, cause: Exception = None):
37
+ super().__init__(message, cause)
38
+ self.llm = llm
39
+
40
+ def __str__(self):
41
+ result = super().__str__()
42
+ result += f" at llm {self.llm}"
43
+
44
+
45
+ class BaseMemoryException(IgBotBaseException):
46
+
47
+ def __init__(self, message, memory: LlmMemory, cause: Exception = None):
48
+ super().__init__(message, cause)
49
+ self.memory = memory
50
+
51
+ def __str__(self):
52
+ result = super().__str__()
53
+ result += f" at memory {self.memory}"
54
+
55
+
56
+ class BasePromptException(IgBotBaseException):
57
+
58
+ def __init__(self, message, prompt: Prompt, cause: Exception = None):
59
+ super().__init__(message, cause)
60
+ self.prompt = prompt
61
+
62
+ def __str__(self):
63
+ result = super().__str__()
64
+ result += f" at prompt {self.prompt}"
65
+
66
+
67
+ class BaseRetrieverException(IgBotBaseException):
68
+
69
+ def __init__(self, message, retriever: Retriever, cause: Exception = None):
70
+ super().__init__(message, cause)
71
+ self.retriever = retriever
72
+
73
+ def __str__(self):
74
+ result = super().__str__()
75
+ result += f" at retriever {self.retriever}"
76
+
77
+
78
+ class BaseToolException(IgBotBaseException):
79
+
80
+ def __init__(self, message, tool: Tool, cause: Exception = None):
81
+ super().__init__(message, cause)
82
+ self.tool = tool
83
+
84
+ def __str__(self):
85
+ result = super().__str__()
86
+ result += f" at tool {self.tool}"
@@ -2,8 +2,6 @@ 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
-
7
5
 
8
6
  class ExceptionHandler(ABC):
9
7
 
igbot_base/llm.py CHANGED
@@ -7,7 +7,7 @@ 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
10
+ from igbot_base.base_exception import BaseLlmException
11
11
 
12
12
  logger = get_logger("application")
13
13
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: igbot_base
3
- Version: 0.0.15
3
+ Version: 0.0.17
4
4
  Summary: Base classes for igbot
5
5
  Author-email: Igor Kopeć <igor.kopec95@gmail.com>
6
6
  License: LGPL-3.0-or-later
@@ -0,0 +1,19 @@
1
+ igbot_base/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ igbot_base/agent.py,sha256=FwQ5nvk5rLm5F-QaxsghhqDZcus_at7AehXIWDIk8dw,932
3
+ igbot_base/agent_response.py,sha256=eAps47djL_aWYn8P_BMpVGkPwO6m8nhltWWyh8qSG6E,1042
4
+ igbot_base/base_exception.py,sha256=utHwrIJsatw4FBzfxhOSvWn0omrRkur7Pq86EGFoe4s,2316
5
+ igbot_base/exception_handler.py,sha256=Er5LbNt2ga2-e0GSzkJw66E-NS1dN_2msTRyyac1qX8,536
6
+ igbot_base/llm.py,sha256=0zul2Q3aiCpdhcLbTcpdSPkLdX7Dvwhhiv2V_KH7YRo,2157
7
+ igbot_base/llmmemory.py,sha256=I6eSBPW1DK8UNiHhayon-DLbSbWSinO_EwM5S8C3tHA,1090
8
+ igbot_base/logging_adapter.py,sha256=kMuAaQPCba2luk0-WPxAbPNJaBL1yZsaff35ltKWgww,256
9
+ igbot_base/models.py,sha256=15bitUZy4Z4JhZbLd_SMx5pD7m8YuZiIq-wYGumf0ws,622
10
+ igbot_base/persistable_memory.py,sha256=867Z4l_awD23QSTFDK3uN9TEttKfDpxx9g19c7ULG1Y,167
11
+ igbot_base/prompt_template.py,sha256=q7bnU2Rp2Cvm4ixEmKHCyuolTPan6CHfYVAomT5kp10,1573
12
+ igbot_base/response_formats.py,sha256=Sp679VfkcyxsR19ddFEHTOM7Ox0u2WBhdji_Y9pVc2M,94
13
+ igbot_base/retriever.py,sha256=YHBHxiuPttsIAtjwwIz0fa9q2uFtsg0WoMRCorCt1PM,635
14
+ igbot_base/tool.py,sha256=ghjuU3cK_VElHGStUl3IYf9dlRDOGM_aQucUQNUH3mU,431
15
+ igbot_base/vectorstore.py,sha256=f-S9DmOuehC0rtVAPGz22Guo7ddb1jVw7BygzFJM624,928
16
+ igbot_base-0.0.17.dist-info/METADATA,sha256=jB2bu-GrnbLDfu2kd8ZQKEmALTUGvgsNrFeWpAvbaWA,211
17
+ igbot_base-0.0.17.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
18
+ igbot_base-0.0.17.dist-info/top_level.txt,sha256=RGpEN0pLsnfNLoLfpw1D_nLSyZwi3ggSaDq07o4ZEAI,11
19
+ igbot_base-0.0.17.dist-info/RECORD,,
@@ -1,14 +0,0 @@
1
- from igbot_base.agent import Agent
2
- from igbot_base.exception.base_exception import IgBotBaseException
3
-
4
-
5
- class BaseAgentException(IgBotBaseException):
6
-
7
- def __init__(self, message, agent: Agent, cause: Exception = None):
8
- super().__init__(message, cause)
9
- self.agent = agent
10
-
11
- def __str__(self):
12
- result = super().__str__()
13
- result += f" at agent {self.agent}"
14
-
@@ -1,12 +0,0 @@
1
- class IgBotBaseException(Exception):
2
-
3
- def __init__(self, message, cause: Exception = None):
4
- super().__init__(message)
5
- self.cause = cause
6
-
7
- def __str__(self):
8
- result = self.args[0]
9
- if self.cause:
10
- result += f" Caused by: {self.cause}"
11
-
12
- return result
@@ -1,13 +0,0 @@
1
- from igbot_base.exception.base_exception import IgBotBaseException
2
- from igbot_base.llm import Llm
3
-
4
-
5
- class BaseLlmException(IgBotBaseException):
6
-
7
- def __init__(self, message, llm: Llm, cause: Exception = None):
8
- super().__init__(message, cause)
9
- self.llm = llm
10
-
11
- def __str__(self):
12
- result = super().__str__()
13
- result += f" at llm {self.llm}"
@@ -1,14 +0,0 @@
1
- from igbot_base.exception.base_exception import IgBotBaseException
2
- from igbot_base.llmmemory import LlmMemory
3
-
4
-
5
- class BaseMemoryException(IgBotBaseException):
6
-
7
- def __init__(self, message, memory: LlmMemory, cause: Exception = None):
8
- super().__init__(message, cause)
9
- self.memory = memory
10
-
11
- def __str__(self):
12
- result = super().__str__()
13
- result += f" at memory {self.memory}"
14
-
@@ -1,14 +0,0 @@
1
- from igbot_base.exception.base_exception import IgBotBaseException
2
- from igbot_base.prompt_template import Prompt
3
-
4
-
5
- class BasePromptException(IgBotBaseException):
6
-
7
- def __init__(self, message, prompt: Prompt, cause: Exception = None):
8
- super().__init__(message, cause)
9
- self.prompt = prompt
10
-
11
- def __str__(self):
12
- result = super().__str__()
13
- result += f" at prompt {self.prompt}"
14
-
@@ -1,14 +0,0 @@
1
- from igbot_base.exception.base_exception import IgBotBaseException
2
- from igbot_base.retriever import Retriever
3
-
4
-
5
- class BaseRetrieverException(IgBotBaseException):
6
-
7
- def __init__(self, message, retriever: Retriever, cause: Exception = None):
8
- super().__init__(message, cause)
9
- self.retriever = retriever
10
-
11
- def __str__(self):
12
- result = super().__str__()
13
- result += f" at retriever {self.retriever}"
14
-
@@ -1,14 +0,0 @@
1
- from igbot_base.exception.base_exception import IgBotBaseException
2
- from igbot_base.tool import Tool
3
-
4
-
5
- class BaseToolException(IgBotBaseException):
6
-
7
- def __init__(self, message, tool: Tool, cause: Exception = None):
8
- super().__init__(message, cause)
9
- self.tool = tool
10
-
11
- def __str__(self):
12
- result = super().__str__()
13
- result += f" at tool {self.tool}"
14
-
@@ -1,25 +0,0 @@
1
- igbot_base/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- igbot_base/agent.py,sha256=FwQ5nvk5rLm5F-QaxsghhqDZcus_at7AehXIWDIk8dw,932
3
- igbot_base/agent_response.py,sha256=eAps47djL_aWYn8P_BMpVGkPwO6m8nhltWWyh8qSG6E,1042
4
- igbot_base/exception_handler.py,sha256=zTOXRCbGlb69VzSU74_5Yqcf1SqbSciSez-yOFwwdAg,612
5
- igbot_base/llm.py,sha256=OcuX9M-Lnkx01YWRXSxeMOz44NQ8znQtwt-fhyRlSWs,2166
6
- igbot_base/llmmemory.py,sha256=I6eSBPW1DK8UNiHhayon-DLbSbWSinO_EwM5S8C3tHA,1090
7
- igbot_base/logging_adapter.py,sha256=kMuAaQPCba2luk0-WPxAbPNJaBL1yZsaff35ltKWgww,256
8
- igbot_base/models.py,sha256=15bitUZy4Z4JhZbLd_SMx5pD7m8YuZiIq-wYGumf0ws,622
9
- igbot_base/persistable_memory.py,sha256=867Z4l_awD23QSTFDK3uN9TEttKfDpxx9g19c7ULG1Y,167
10
- igbot_base/prompt_template.py,sha256=q7bnU2Rp2Cvm4ixEmKHCyuolTPan6CHfYVAomT5kp10,1573
11
- igbot_base/response_formats.py,sha256=Sp679VfkcyxsR19ddFEHTOM7Ox0u2WBhdji_Y9pVc2M,94
12
- igbot_base/retriever.py,sha256=YHBHxiuPttsIAtjwwIz0fa9q2uFtsg0WoMRCorCt1PM,635
13
- igbot_base/tool.py,sha256=ghjuU3cK_VElHGStUl3IYf9dlRDOGM_aQucUQNUH3mU,431
14
- igbot_base/vectorstore.py,sha256=f-S9DmOuehC0rtVAPGz22Guo7ddb1jVw7BygzFJM624,928
15
- igbot_base/exception/agent_exception.py,sha256=qDnVYMpzaiwkhO4QI-zasySFewoA7T9ee2XIe-0E-DI,395
16
- igbot_base/exception/base_exception.py,sha256=Hlu_hNRW4Krx41CdUtYYaxI4VknKUw1Bs1stpm2XFTY,307
17
- igbot_base/exception/llm_exception.py,sha256=54oAekBvzjL6x_JckqbY34m54EAh3GKRAwJJQ8ZjkvQ,377
18
- igbot_base/exception/memory_exception.py,sha256=ZGKw3dN2tMf9XHacYaVTXgvYpWi14z7unJBFjrEUVyM,413
19
- igbot_base/exception/prompt_exception.py,sha256=_u-O9E2Z1DK_OT4StyOmIDLfr_Mmk4k0GLe67kIoQNc,413
20
- igbot_base/exception/retriever_exception.py,sha256=A46sBV6_1N3jgBl-nFRw4KgEcz3oPb8d5Eb83YWDEPo,431
21
- igbot_base/exception/tool_exception.py,sha256=1EX7R90MplT4Vqv1-zzPslFrNvDwcrh7wgEWun2Ba6k,386
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,,