igbot-base 0.0.7__py3-none-any.whl → 0.0.9__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/llm.py +1 -1
- igbot_base/retriever.py +14 -1
- {igbot_base-0.0.7.dist-info → igbot_base-0.0.9.dist-info}/METADATA +1 -1
- {igbot_base-0.0.7.dist-info → igbot_base-0.0.9.dist-info}/RECORD +6 -6
- {igbot_base-0.0.7.dist-info → igbot_base-0.0.9.dist-info}/WHEEL +0 -0
- {igbot_base-0.0.7.dist-info → igbot_base-0.0.9.dist-info}/top_level.txt +0 -0
igbot_base/llm.py
CHANGED
@@ -30,7 +30,7 @@ class Llm(ABC):
|
|
30
30
|
history.revert_to_snapshot()
|
31
31
|
|
32
32
|
def call(self, user_query: str, history: LlmMemory, params: dict) -> str:
|
33
|
-
|
33
|
+
history.set_snapshot()
|
34
34
|
try:
|
35
35
|
return self._call(user_query, history, params)
|
36
36
|
except Exception as e:
|
igbot_base/retriever.py
CHANGED
@@ -1,11 +1,24 @@
|
|
1
1
|
from abc import ABC, abstractmethod
|
2
2
|
|
3
3
|
|
4
|
+
class RetrieverResponse:
|
5
|
+
|
6
|
+
def __init__(self, documents):
|
7
|
+
self.documents = documents
|
8
|
+
|
9
|
+
def get_content_list(self):
|
10
|
+
return [doc.page_content for doc in self.documents]
|
11
|
+
|
12
|
+
def get_content_string(self, delimiter: str):
|
13
|
+
contents = self.get_content_list()
|
14
|
+
return delimiter.join(contents)
|
15
|
+
|
16
|
+
|
4
17
|
class Retriever(ABC):
|
5
18
|
|
6
19
|
def __init__(self):
|
7
20
|
pass
|
8
21
|
|
9
22
|
@abstractmethod
|
10
|
-
def get_relevant_data(self, query: str):
|
23
|
+
def get_relevant_data(self, query: str) -> RetrieverResponse:
|
11
24
|
pass
|
@@ -2,16 +2,16 @@ igbot_base/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
igbot_base/agent.py,sha256=186kf599wrK4z41RVddeh0dH_iJ-_fCTqxM7J00P8IE,188
|
3
3
|
igbot_base/agent_response.py,sha256=eAps47djL_aWYn8P_BMpVGkPwO6m8nhltWWyh8qSG6E,1042
|
4
4
|
igbot_base/exception_handler.py,sha256=BMzQpgP4jnnRuTcEItx0oMljTZmKgMRCHzpybHn88Ig,341
|
5
|
-
igbot_base/llm.py,sha256=
|
5
|
+
igbot_base/llm.py,sha256=XNd_HyR2jK_7XlDW-2rdSaSCmVjRLAl_fdVTC2sW0HU,1461
|
6
6
|
igbot_base/llmmemory.py,sha256=KslOeTSZwvHVyFglbFhPcb6_GCCXZOqHz5YBTzJ2mew,977
|
7
7
|
igbot_base/models.py,sha256=15bitUZy4Z4JhZbLd_SMx5pD7m8YuZiIq-wYGumf0ws,622
|
8
8
|
igbot_base/persistable_memory.py,sha256=867Z4l_awD23QSTFDK3uN9TEttKfDpxx9g19c7ULG1Y,167
|
9
9
|
igbot_base/prompt_template.py,sha256=YHJDbe-33Zs202DMh6gLY_lLDejcyqB9xmek6xnyE0Q,1106
|
10
10
|
igbot_base/response_formats.py,sha256=Sp679VfkcyxsR19ddFEHTOM7Ox0u2WBhdji_Y9pVc2M,94
|
11
|
-
igbot_base/retriever.py,sha256=
|
11
|
+
igbot_base/retriever.py,sha256=TeHWi6Sy5EvmmXOnNXuWLJO1Imlj0i6CEihv3WVN0SI,523
|
12
12
|
igbot_base/tool.py,sha256=8QwzQuokkVSITCjZuZJeEbCvJU-n2yh9D-QauQex4Ko,319
|
13
13
|
igbot_base/vectorstore.py,sha256=Q1ZRlsJ45ckgFZuPPQVMWuYl3W_L-HiX9VJIJ0wnjU8,842
|
14
|
-
igbot_base-0.0.
|
15
|
-
igbot_base-0.0.
|
16
|
-
igbot_base-0.0.
|
17
|
-
igbot_base-0.0.
|
14
|
+
igbot_base-0.0.9.dist-info/METADATA,sha256=Vp252wgk01DCuFYmC6KxzXzpu1_h0QRVDSXNVNsLZh8,210
|
15
|
+
igbot_base-0.0.9.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
16
|
+
igbot_base-0.0.9.dist-info/top_level.txt,sha256=RGpEN0pLsnfNLoLfpw1D_nLSyZwi3ggSaDq07o4ZEAI,11
|
17
|
+
igbot_base-0.0.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|