lybic-guiagents 0.2.2__py3-none-any.whl → 0.2.3__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.
Potentially problematic release.
This version of lybic-guiagents might be problematic. Click here for more details.
- gui_agents/__init__.py +1 -1
- gui_agents/agents/Backend/LybicBackend.py +25 -19
- gui_agents/agents/agent_s.py +292 -97
- gui_agents/agents/grounding.py +43 -6
- gui_agents/agents/manager.py +113 -18
- gui_agents/agents/stream_manager.py +163 -0
- gui_agents/agents/worker.py +60 -35
- gui_agents/cli_app.py +16 -5
- gui_agents/core/knowledge.py +36 -5
- gui_agents/grpc_app.py +784 -0
- gui_agents/proto/__init__.py +3 -0
- gui_agents/proto/pb/__init__.py +4 -0
- gui_agents/tools/model.md +351 -0
- gui_agents/tools/tools.py +80 -39
- gui_agents/tools/tools_config.json +101 -0
- gui_agents/tools/tools_config_cn.json +101 -0
- gui_agents/tools/tools_config_en.json +101 -0
- {lybic_guiagents-0.2.2.dist-info → lybic_guiagents-0.2.3.dist-info}/METADATA +86 -8
- {lybic_guiagents-0.2.2.dist-info → lybic_guiagents-0.2.3.dist-info}/RECORD +23 -16
- lybic_guiagents-0.2.3.dist-info/entry_points.txt +3 -0
- gui_agents/lybic_client/__init__.py +0 -0
- gui_agents/lybic_client/lybic_client.py +0 -88
- {lybic_guiagents-0.2.2.dist-info → lybic_guiagents-0.2.3.dist-info}/WHEEL +0 -0
- {lybic_guiagents-0.2.2.dist-info → lybic_guiagents-0.2.3.dist-info}/licenses/LICENSE +0 -0
- {lybic_guiagents-0.2.2.dist-info → lybic_guiagents-0.2.3.dist-info}/top_level.txt +0 -0
gui_agents/core/knowledge.py
CHANGED
|
@@ -46,6 +46,16 @@ class KnowledgeBase:
|
|
|
46
46
|
Tools_dict: Dict,
|
|
47
47
|
save_knowledge: bool = True,
|
|
48
48
|
):
|
|
49
|
+
"""
|
|
50
|
+
Initialize the KnowledgeBase, configuring storage paths, embedding metadata, tool agents, and in-memory trajectory state.
|
|
51
|
+
|
|
52
|
+
Parameters:
|
|
53
|
+
embedding_engine (Tools): Embedding provider instance used to compute or retrieve embeddings.
|
|
54
|
+
local_kb_path (str): Root filesystem path where memory and embedding files are persisted.
|
|
55
|
+
platform (str): Platform identifier used to namespace stored files (subdirectory under local_kb_path).
|
|
56
|
+
Tools_dict (Dict): Configuration mapping for available tools; entries may include provider, model, and other tool-specific kwargs used to register agents.
|
|
57
|
+
save_knowledge (bool): Whether new episodic and narrative memories should be persisted to disk.
|
|
58
|
+
"""
|
|
49
59
|
self.platform = platform
|
|
50
60
|
|
|
51
61
|
self.local_kb_path = local_kb_path
|
|
@@ -75,17 +85,38 @@ class KnowledgeBase:
|
|
|
75
85
|
self.current_subtask_trajectory = ""
|
|
76
86
|
self.current_search_query = ""
|
|
77
87
|
|
|
88
|
+
def _register(tools_instance, tool_name):
|
|
89
|
+
"""
|
|
90
|
+
Register a tool on the given tools instance using the tool's configuration from Tools_dict.
|
|
91
|
+
|
|
92
|
+
Reads the configuration for `tool_name` from the module-level Tools_dict, extracts optional `provider` and `model` values if present, and registers the tool on `tools_instance`, forwarding any remaining configuration items as keyword arguments.
|
|
93
|
+
|
|
94
|
+
Parameters:
|
|
95
|
+
tools_instance: The Tools manager or registry object that exposes a `register_tool(name, provider, model, **kwargs)` method.
|
|
96
|
+
tool_name (str): The key identifying the tool in Tools_dict whose configuration will be used for registration.
|
|
97
|
+
"""
|
|
98
|
+
config = Tools_dict.get(tool_name, {}).copy()
|
|
99
|
+
provider = config.pop("provider", None)
|
|
100
|
+
model = config.pop("model", None)
|
|
101
|
+
auth_keys = ['api_key', 'base_url', 'endpoint_url', 'azure_endpoint', 'api_version']
|
|
102
|
+
auth_params = {}
|
|
103
|
+
for key in auth_keys:
|
|
104
|
+
if key in config:
|
|
105
|
+
auth_params[key] = config[key]
|
|
106
|
+
all_params = {**config, **auth_params}
|
|
107
|
+
tools_instance.register_tool(tool_name, provider, model, **all_params)
|
|
108
|
+
|
|
78
109
|
self.query_formulator = Tools()
|
|
79
|
-
self.query_formulator
|
|
80
|
-
|
|
110
|
+
_register(self.query_formulator, "query_formulator")
|
|
111
|
+
|
|
81
112
|
self.knowledge_fusion_agent = Tools()
|
|
82
|
-
self.knowledge_fusion_agent
|
|
113
|
+
_register(self.knowledge_fusion_agent, "context_fusion")
|
|
83
114
|
|
|
84
115
|
self.narrative_summarization_agent = Tools()
|
|
85
|
-
self.narrative_summarization_agent
|
|
116
|
+
_register(self.narrative_summarization_agent, "narrative_summarization")
|
|
86
117
|
|
|
87
118
|
self.episode_summarization_agent = Tools()
|
|
88
|
-
self.episode_summarization_agent
|
|
119
|
+
_register(self.episode_summarization_agent, "episode_summarization")
|
|
89
120
|
|
|
90
121
|
self.save_knowledge = save_knowledge
|
|
91
122
|
|