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 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
- #history.set_snapshot()
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: igbot_base
3
- Version: 0.0.7
3
+ Version: 0.0.9
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
@@ -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=vUw0IFz5Q5T4QhF5_7J0eNlDxw8L482KmclVmq4DkbY,1462
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=lwQhJbPtlWxiRMoRzqz2VI6WFv-60B8jPvKQc8hdeeY,177
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.7.dist-info/METADATA,sha256=W96JS19Y3KiRBHL3wHQYJtaMNjNccajqGsZjDkBmjx8,210
15
- igbot_base-0.0.7.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
16
- igbot_base-0.0.7.dist-info/top_level.txt,sha256=RGpEN0pLsnfNLoLfpw1D_nLSyZwi3ggSaDq07o4ZEAI,11
17
- igbot_base-0.0.7.dist-info/RECORD,,
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,,