igbot-base 0.0.16__tar.gz → 0.0.17__tar.gz
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-0.0.16 → igbot_base-0.0.17}/PKG-INFO +1 -1
- igbot_base-0.0.17/igbot_base/base_exception.py +86 -0
- {igbot_base-0.0.16 → igbot_base-0.0.17}/igbot_base/llm.py +1 -1
- {igbot_base-0.0.16 → igbot_base-0.0.17}/igbot_base.egg-info/PKG-INFO +1 -1
- {igbot_base-0.0.16 → igbot_base-0.0.17}/igbot_base.egg-info/SOURCES.txt +2 -8
- {igbot_base-0.0.16 → igbot_base-0.0.17}/pyproject.toml +5 -1
- igbot_base-0.0.16/igbot_base/exception/agent_exception.py +0 -14
- igbot_base-0.0.16/igbot_base/exception/base_exception.py +0 -12
- igbot_base-0.0.16/igbot_base/exception/llm_exception.py +0 -13
- igbot_base-0.0.16/igbot_base/exception/memory_exception.py +0 -14
- igbot_base-0.0.16/igbot_base/exception/prompt_exception.py +0 -14
- igbot_base-0.0.16/igbot_base/exception/retriever_exception.py +0 -14
- igbot_base-0.0.16/igbot_base/exception/tool_exception.py +0 -14
- {igbot_base-0.0.16 → igbot_base-0.0.17}/igbot_base/__init__.py +0 -0
- {igbot_base-0.0.16 → igbot_base-0.0.17}/igbot_base/agent.py +0 -0
- {igbot_base-0.0.16 → igbot_base-0.0.17}/igbot_base/agent_response.py +0 -0
- {igbot_base-0.0.16 → igbot_base-0.0.17}/igbot_base/exception_handler.py +0 -0
- {igbot_base-0.0.16 → igbot_base-0.0.17}/igbot_base/llmmemory.py +0 -0
- {igbot_base-0.0.16 → igbot_base-0.0.17}/igbot_base/logging_adapter.py +0 -0
- {igbot_base-0.0.16 → igbot_base-0.0.17}/igbot_base/models.py +0 -0
- {igbot_base-0.0.16 → igbot_base-0.0.17}/igbot_base/persistable_memory.py +0 -0
- {igbot_base-0.0.16 → igbot_base-0.0.17}/igbot_base/prompt_template.py +0 -0
- {igbot_base-0.0.16 → igbot_base-0.0.17}/igbot_base/response_formats.py +0 -0
- {igbot_base-0.0.16 → igbot_base-0.0.17}/igbot_base/retriever.py +0 -0
- {igbot_base-0.0.16 → igbot_base-0.0.17}/igbot_base/tool.py +0 -0
- {igbot_base-0.0.16 → igbot_base-0.0.17}/igbot_base/vectorstore.py +0 -0
- {igbot_base-0.0.16 → igbot_base-0.0.17}/igbot_base.egg-info/dependency_links.txt +0 -0
- {igbot_base-0.0.16 → igbot_base-0.0.17}/igbot_base.egg-info/requires.txt +0 -0
- {igbot_base-0.0.16 → igbot_base-0.0.17}/igbot_base.egg-info/top_level.txt +0 -0
- {igbot_base-0.0.16 → igbot_base-0.0.17}/setup.cfg +0 -0
@@ -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}"
|
@@ -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.
|
10
|
+
from igbot_base.base_exception import BaseLlmException
|
11
11
|
|
12
12
|
logger = get_logger("application")
|
13
13
|
|
@@ -2,6 +2,7 @@ pyproject.toml
|
|
2
2
|
igbot_base/__init__.py
|
3
3
|
igbot_base/agent.py
|
4
4
|
igbot_base/agent_response.py
|
5
|
+
igbot_base/base_exception.py
|
5
6
|
igbot_base/exception_handler.py
|
6
7
|
igbot_base/llm.py
|
7
8
|
igbot_base/llmmemory.py
|
@@ -17,11 +18,4 @@ igbot_base.egg-info/PKG-INFO
|
|
17
18
|
igbot_base.egg-info/SOURCES.txt
|
18
19
|
igbot_base.egg-info/dependency_links.txt
|
19
20
|
igbot_base.egg-info/requires.txt
|
20
|
-
igbot_base.egg-info/top_level.txt
|
21
|
-
igbot_base/exception/agent_exception.py
|
22
|
-
igbot_base/exception/base_exception.py
|
23
|
-
igbot_base/exception/llm_exception.py
|
24
|
-
igbot_base/exception/memory_exception.py
|
25
|
-
igbot_base/exception/prompt_exception.py
|
26
|
-
igbot_base/exception/retriever_exception.py
|
27
|
-
igbot_base/exception/tool_exception.py
|
21
|
+
igbot_base.egg-info/top_level.txt
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "igbot_base"
|
7
|
-
version = "0.0.
|
7
|
+
version = "0.0.17"
|
8
8
|
description = "Base classes for igbot"
|
9
9
|
authors = [{name = "Igor Kopeć", email = "igor.kopec95@gmail.com"}]
|
10
10
|
license={text="LGPL-3.0-or-later"}
|
@@ -12,3 +12,7 @@ requires-python = ">=3.12"
|
|
12
12
|
dependencies = [
|
13
13
|
"openai"
|
14
14
|
]
|
15
|
+
|
16
|
+
[tool.setuptools.packages.find]
|
17
|
+
include = ["igbot_base*"]
|
18
|
+
exclude = ["tests*"]
|
@@ -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
|
-
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|