igbot-base 0.0.40__py3-none-any.whl → 0.0.41__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/tool.py +4 -0
- igbot_base/tool_pre_merger.py +16 -0
- igbot_base/tool_pre_merger_chain.py +14 -0
- {igbot_base-0.0.40.dist-info → igbot_base-0.0.41.dist-info}/METADATA +1 -1
- {igbot_base-0.0.40.dist-info → igbot_base-0.0.41.dist-info}/RECORD +7 -5
- {igbot_base-0.0.40.dist-info → igbot_base-0.0.41.dist-info}/WHEEL +0 -0
- {igbot_base-0.0.40.dist-info → igbot_base-0.0.41.dist-info}/top_level.txt +0 -0
igbot_base/tool.py
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
from abc import ABC, abstractmethod
|
2
|
+
|
3
|
+
from igbot_base.tool import ToolCall
|
4
|
+
|
5
|
+
|
6
|
+
class ToolPreMerger(ABC):
|
7
|
+
def __init__(self):
|
8
|
+
pass
|
9
|
+
|
10
|
+
@abstractmethod
|
11
|
+
def supports_tools(self) -> list[str]:
|
12
|
+
pass
|
13
|
+
|
14
|
+
@abstractmethod
|
15
|
+
def process_tool_results(self, tool_calls: list[ToolCall]):
|
16
|
+
pass
|
@@ -0,0 +1,14 @@
|
|
1
|
+
from igbot_base.tool_pre_merger import ToolPreMerger
|
2
|
+
from igbot_base.tool import ToolCall
|
3
|
+
|
4
|
+
|
5
|
+
class ToolPreMergerChain:
|
6
|
+
def __init__(self, mergers: list[ToolPreMerger]):
|
7
|
+
self.__mergers = mergers
|
8
|
+
|
9
|
+
def process(self, tool_responses: list[ToolCall]):
|
10
|
+
for merger in self.__mergers:
|
11
|
+
supported_tools = merger.supports_tools()
|
12
|
+
matching_responses = [r for r in tool_responses if r.tool_name in supported_tools]
|
13
|
+
if len(matching_responses) != 0:
|
14
|
+
merger.process_tool_results(matching_responses)
|
@@ -14,11 +14,13 @@ igbot_base/prompt_template.py,sha256=q7bnU2Rp2Cvm4ixEmKHCyuolTPan6CHfYVAomT5kp10
|
|
14
14
|
igbot_base/response_formats.py,sha256=Sp679VfkcyxsR19ddFEHTOM7Ox0u2WBhdji_Y9pVc2M,94
|
15
15
|
igbot_base/retriever.py,sha256=YHBHxiuPttsIAtjwwIz0fa9q2uFtsg0WoMRCorCt1PM,635
|
16
16
|
igbot_base/tokenizer.py,sha256=WSR0GFc1eoMmyL58RAxtpb2iWCrqu9vQ2Ui-hqs4plw,1032
|
17
|
-
igbot_base/tool.py,sha256=
|
17
|
+
igbot_base/tool.py,sha256=Nc491Dp78g2uQLKqjHjIlFV_gzbtr9k1FM36LaUE2f8,732
|
18
18
|
igbot_base/tool_merger.py,sha256=_skJwyz8yuYjJ6oIvIp8QQlcgjdId3HtofUGLZgp-6s,322
|
19
19
|
igbot_base/tool_merger_chain.py,sha256=Qhi0IUyb-TXv3tv3ZBMQb2-fAmCnHGBNKwWEzZSFjRY,552
|
20
|
+
igbot_base/tool_pre_merger.py,sha256=wgBy-Wny8cxsNJR5biaVdYjBjAC91C9owbLaGddKD7g,313
|
21
|
+
igbot_base/tool_pre_merger_chain.py,sha256=qNuQHRZp6r-5j8GA8FOucTsUJ7G6IqVisGW3TaqdAm4,557
|
20
22
|
igbot_base/vectorstore.py,sha256=f-S9DmOuehC0rtVAPGz22Guo7ddb1jVw7BygzFJM624,928
|
21
|
-
igbot_base-0.0.
|
22
|
-
igbot_base-0.0.
|
23
|
-
igbot_base-0.0.
|
24
|
-
igbot_base-0.0.
|
23
|
+
igbot_base-0.0.41.dist-info/METADATA,sha256=eoOCg_EsGPzNxUP_pzxN6vgnSrTNMZ_UYyMGzwOLQLE,235
|
24
|
+
igbot_base-0.0.41.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
25
|
+
igbot_base-0.0.41.dist-info/top_level.txt,sha256=RGpEN0pLsnfNLoLfpw1D_nLSyZwi3ggSaDq07o4ZEAI,11
|
26
|
+
igbot_base-0.0.41.dist-info/RECORD,,
|
File without changes
|
File without changes
|