igbot-base 0.0.39__tar.gz → 0.0.40__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.39 → igbot_base-0.0.40}/PKG-INFO +1 -1
- {igbot_base-0.0.39 → igbot_base-0.0.40}/igbot_base/tool.py +1 -0
- igbot_base-0.0.40/igbot_base/tool_merger.py +16 -0
- igbot_base-0.0.40/igbot_base/tool_merger_chain.py +14 -0
- {igbot_base-0.0.39 → igbot_base-0.0.40}/igbot_base.egg-info/PKG-INFO +1 -1
- {igbot_base-0.0.39 → igbot_base-0.0.40}/igbot_base.egg-info/SOURCES.txt +2 -0
- {igbot_base-0.0.39 → igbot_base-0.0.40}/pyproject.toml +1 -1
- {igbot_base-0.0.39 → igbot_base-0.0.40}/igbot_base/__init__.py +0 -0
- {igbot_base-0.0.39 → igbot_base-0.0.40}/igbot_base/additional_data.py +0 -0
- {igbot_base-0.0.39 → igbot_base-0.0.40}/igbot_base/agent.py +0 -0
- {igbot_base-0.0.39 → igbot_base-0.0.40}/igbot_base/agent_response.py +0 -0
- {igbot_base-0.0.39 → igbot_base-0.0.40}/igbot_base/base_exception.py +0 -0
- {igbot_base-0.0.39 → igbot_base-0.0.40}/igbot_base/exception_handler.py +0 -0
- {igbot_base-0.0.39 → igbot_base-0.0.40}/igbot_base/llm.py +0 -0
- {igbot_base-0.0.39 → igbot_base-0.0.40}/igbot_base/llmmemory.py +0 -0
- {igbot_base-0.0.39 → igbot_base-0.0.40}/igbot_base/logging_adapter.py +0 -0
- {igbot_base-0.0.39 → igbot_base-0.0.40}/igbot_base/models.py +0 -0
- {igbot_base-0.0.39 → igbot_base-0.0.40}/igbot_base/notifier.py +0 -0
- {igbot_base-0.0.39 → igbot_base-0.0.40}/igbot_base/persistable_memory.py +0 -0
- {igbot_base-0.0.39 → igbot_base-0.0.40}/igbot_base/prompt_template.py +0 -0
- {igbot_base-0.0.39 → igbot_base-0.0.40}/igbot_base/response_formats.py +0 -0
- {igbot_base-0.0.39 → igbot_base-0.0.40}/igbot_base/retriever.py +0 -0
- {igbot_base-0.0.39 → igbot_base-0.0.40}/igbot_base/tokenizer.py +0 -0
- {igbot_base-0.0.39 → igbot_base-0.0.40}/igbot_base/vectorstore.py +0 -0
- {igbot_base-0.0.39 → igbot_base-0.0.40}/igbot_base.egg-info/dependency_links.txt +0 -0
- {igbot_base-0.0.39 → igbot_base-0.0.40}/igbot_base.egg-info/requires.txt +0 -0
- {igbot_base-0.0.39 → igbot_base-0.0.40}/igbot_base.egg-info/top_level.txt +0 -0
- {igbot_base-0.0.39 → igbot_base-0.0.40}/setup.cfg +0 -0
@@ -0,0 +1,16 @@
|
|
1
|
+
from abc import ABC, abstractmethod
|
2
|
+
|
3
|
+
from igbot_base.tool import ToolResponse
|
4
|
+
|
5
|
+
|
6
|
+
class ToolMerger(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_responses: list[ToolResponse]):
|
16
|
+
pass
|
@@ -0,0 +1,14 @@
|
|
1
|
+
from igbot_base.tool_merger import ToolMerger
|
2
|
+
from igbot_base.tool import ToolResponse
|
3
|
+
|
4
|
+
|
5
|
+
class ToolMergerChain:
|
6
|
+
def __init__(self, mergers: list[ToolMerger]):
|
7
|
+
self.__mergers = mergers
|
8
|
+
|
9
|
+
def process(self, tool_responses: list[ToolResponse]):
|
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)
|
@@ -16,6 +16,8 @@ igbot_base/response_formats.py
|
|
16
16
|
igbot_base/retriever.py
|
17
17
|
igbot_base/tokenizer.py
|
18
18
|
igbot_base/tool.py
|
19
|
+
igbot_base/tool_merger.py
|
20
|
+
igbot_base/tool_merger_chain.py
|
19
21
|
igbot_base/vectorstore.py
|
20
22
|
igbot_base.egg-info/PKG-INFO
|
21
23
|
igbot_base.egg-info/SOURCES.txt
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|