distributed-a2a 0.1.5rc9__tar.gz → 0.1.5rc12__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.
- {distributed_a2a-0.1.5rc9/distributed_a2a.egg-info → distributed_a2a-0.1.5rc12}/PKG-INFO +1 -1
- {distributed_a2a-0.1.5rc9 → distributed_a2a-0.1.5rc12}/distributed_a2a/executors.py +2 -2
- {distributed_a2a-0.1.5rc9 → distributed_a2a-0.1.5rc12}/distributed_a2a/model.py +11 -0
- {distributed_a2a-0.1.5rc9 → distributed_a2a-0.1.5rc12/distributed_a2a.egg-info}/PKG-INFO +1 -1
- {distributed_a2a-0.1.5rc9 → distributed_a2a-0.1.5rc12}/pyproject.toml +1 -1
- {distributed_a2a-0.1.5rc9 → distributed_a2a-0.1.5rc12}/LICENSE +0 -0
- {distributed_a2a-0.1.5rc9 → distributed_a2a-0.1.5rc12}/MANIFEST.in +0 -0
- {distributed_a2a-0.1.5rc9 → distributed_a2a-0.1.5rc12}/README.md +0 -0
- {distributed_a2a-0.1.5rc9 → distributed_a2a-0.1.5rc12}/distributed_a2a/__init__.py +0 -0
- {distributed_a2a-0.1.5rc9 → distributed_a2a-0.1.5rc12}/distributed_a2a/agent.py +0 -0
- {distributed_a2a-0.1.5rc9 → distributed_a2a-0.1.5rc12}/distributed_a2a/client.py +0 -0
- {distributed_a2a-0.1.5rc9 → distributed_a2a-0.1.5rc12}/distributed_a2a/registry.py +0 -0
- {distributed_a2a-0.1.5rc9 → distributed_a2a-0.1.5rc12}/distributed_a2a/server.py +0 -0
- {distributed_a2a-0.1.5rc9 → distributed_a2a-0.1.5rc12}/distributed_a2a.egg-info/SOURCES.txt +0 -0
- {distributed_a2a-0.1.5rc9 → distributed_a2a-0.1.5rc12}/distributed_a2a.egg-info/dependency_links.txt +0 -0
- {distributed_a2a-0.1.5rc9 → distributed_a2a-0.1.5rc12}/distributed_a2a.egg-info/requires.txt +0 -0
- {distributed_a2a-0.1.5rc9 → distributed_a2a-0.1.5rc12}/distributed_a2a.egg-info/top_level.txt +0 -0
- {distributed_a2a-0.1.5rc9 → distributed_a2a-0.1.5rc12}/requirements.txt +0 -0
- {distributed_a2a-0.1.5rc9 → distributed_a2a-0.1.5rc12}/setup.cfg +0 -0
- {distributed_a2a-0.1.5rc9 → distributed_a2a-0.1.5rc12}/setup.py +0 -0
|
@@ -27,8 +27,8 @@ class RoutingAgentExecutor(AgentExecutor):
|
|
|
27
27
|
api_key = os.environ.get(agent_config.agent.llm.api_key_env)
|
|
28
28
|
self.agent = StatusAgent[StringResponse](
|
|
29
29
|
llm_config=agent_config.agent.llm,
|
|
30
|
-
system_prompt=agent_config.agent.
|
|
31
|
-
name=
|
|
30
|
+
system_prompt=agent_config.agent.get_system_prompt(),
|
|
31
|
+
name=agent_config.agent.card.name,
|
|
32
32
|
api_key=api_key,
|
|
33
33
|
is_routing=False,
|
|
34
34
|
tools=[] if tools is None else tools,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import os
|
|
1
2
|
from typing import List
|
|
2
3
|
|
|
4
|
+
from anyio.functools import lru_cache
|
|
3
5
|
from langchain_core.language_models import BaseChatModel
|
|
4
6
|
from langchain_openai import ChatOpenAI
|
|
5
7
|
from pydantic import BaseModel, Field
|
|
@@ -34,6 +36,15 @@ class CardConfig(BaseModel):
|
|
|
34
36
|
class AgentItem(BaseModel):
|
|
35
37
|
card: CardConfig = Field(description="The agent card configuration node")
|
|
36
38
|
llm: LLMConfig = Field(description="The LLM configuration node")
|
|
39
|
+
_system_prompt: str = Field(description="The system prompt to use for the LLM or a path to a file containing the system prompt", alias="system_prompt")
|
|
40
|
+
|
|
41
|
+
@lru_cache
|
|
42
|
+
def get_system_prompt(self) -> str:
|
|
43
|
+
if os.path.exists(self._system_prompt):
|
|
44
|
+
with open(self._system_prompt, 'r', encoding='utf-8') as file:
|
|
45
|
+
return file.read()
|
|
46
|
+
|
|
47
|
+
return self._system_prompt
|
|
37
48
|
|
|
38
49
|
|
|
39
50
|
class AgentConfig(BaseModel):
|
|
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
|
{distributed_a2a-0.1.5rc9 → distributed_a2a-0.1.5rc12}/distributed_a2a.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{distributed_a2a-0.1.5rc9 → distributed_a2a-0.1.5rc12}/distributed_a2a.egg-info/requires.txt
RENAMED
|
File without changes
|
{distributed_a2a-0.1.5rc9 → distributed_a2a-0.1.5rc12}/distributed_a2a.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|