distributed-a2a 0.1.5rc15__tar.gz → 0.1.5rc17__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.
Files changed (20) hide show
  1. {distributed_a2a-0.1.5rc15/distributed_a2a.egg-info → distributed_a2a-0.1.5rc17}/PKG-INFO +1 -1
  2. {distributed_a2a-0.1.5rc15 → distributed_a2a-0.1.5rc17}/distributed_a2a/executors.py +1 -1
  3. {distributed_a2a-0.1.5rc15 → distributed_a2a-0.1.5rc17}/distributed_a2a/model.py +7 -8
  4. {distributed_a2a-0.1.5rc15 → distributed_a2a-0.1.5rc17/distributed_a2a.egg-info}/PKG-INFO +1 -1
  5. {distributed_a2a-0.1.5rc15 → distributed_a2a-0.1.5rc17}/pyproject.toml +1 -1
  6. {distributed_a2a-0.1.5rc15 → distributed_a2a-0.1.5rc17}/LICENSE +0 -0
  7. {distributed_a2a-0.1.5rc15 → distributed_a2a-0.1.5rc17}/MANIFEST.in +0 -0
  8. {distributed_a2a-0.1.5rc15 → distributed_a2a-0.1.5rc17}/README.md +0 -0
  9. {distributed_a2a-0.1.5rc15 → distributed_a2a-0.1.5rc17}/distributed_a2a/__init__.py +0 -0
  10. {distributed_a2a-0.1.5rc15 → distributed_a2a-0.1.5rc17}/distributed_a2a/agent.py +0 -0
  11. {distributed_a2a-0.1.5rc15 → distributed_a2a-0.1.5rc17}/distributed_a2a/client.py +0 -0
  12. {distributed_a2a-0.1.5rc15 → distributed_a2a-0.1.5rc17}/distributed_a2a/registry.py +0 -0
  13. {distributed_a2a-0.1.5rc15 → distributed_a2a-0.1.5rc17}/distributed_a2a/server.py +0 -0
  14. {distributed_a2a-0.1.5rc15 → distributed_a2a-0.1.5rc17}/distributed_a2a.egg-info/SOURCES.txt +0 -0
  15. {distributed_a2a-0.1.5rc15 → distributed_a2a-0.1.5rc17}/distributed_a2a.egg-info/dependency_links.txt +0 -0
  16. {distributed_a2a-0.1.5rc15 → distributed_a2a-0.1.5rc17}/distributed_a2a.egg-info/requires.txt +0 -0
  17. {distributed_a2a-0.1.5rc15 → distributed_a2a-0.1.5rc17}/distributed_a2a.egg-info/top_level.txt +0 -0
  18. {distributed_a2a-0.1.5rc15 → distributed_a2a-0.1.5rc17}/requirements.txt +0 -0
  19. {distributed_a2a-0.1.5rc15 → distributed_a2a-0.1.5rc17}/setup.cfg +0 -0
  20. {distributed_a2a-0.1.5rc15 → distributed_a2a-0.1.5rc17}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: distributed_a2a
3
- Version: 0.1.5rc15
3
+ Version: 0.1.5rc17
4
4
  Summary: A library for building A2A agents with routing capabilities
5
5
  Home-page: https://github.com/Barra-Technologies/distributed-a2a
6
6
  Author: Fabian Bell
@@ -27,7 +27,7 @@ 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.get_system_prompt(),
30
+ system_prompt=agent_config.agent.system_prompt,
31
31
  name=agent_config.agent.card.name,
32
32
  api_key=api_key,
33
33
  is_routing=False,
@@ -1,7 +1,6 @@
1
1
  import os
2
- from typing import List
2
+ from typing import List, Any
3
3
 
4
- from anyio.functools import lru_cache
5
4
  from langchain_core.language_models import BaseChatModel
6
5
  from langchain_openai import ChatOpenAI
7
6
  from pydantic import BaseModel, Field
@@ -37,13 +36,13 @@ class AgentItem(BaseModel):
37
36
  llm: LLMConfig = Field(description="The LLM configuration node")
38
37
  system_prompt: str = Field(description="The system prompt to use for the LLM or a path to a file containing the system prompt")
39
38
 
40
- @lru_cache
41
- def get_system_prompt(self) -> str:
42
- if os.path.exists(self.system_prompt):
43
- with open(self.system_prompt, 'r', encoding='utf-8') as file:
44
- return file.read()
39
+ def __init__(self, /, **data: Any) -> None:
40
+ prompt_or_path= data['system_prompt']
41
+ if os.path.exists(prompt_or_path):
42
+ with open(prompt_or_path, "r", encoding="utf-8") as f:
43
+ data['system_prompt'] = f.read()
45
44
 
46
- return self.system_prompt
45
+ super().__init__(**data)
47
46
 
48
47
 
49
48
  class AgentConfig(BaseModel):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: distributed_a2a
3
- Version: 0.1.5rc15
3
+ Version: 0.1.5rc17
4
4
  Summary: A library for building A2A agents with routing capabilities
5
5
  Home-page: https://github.com/Barra-Technologies/distributed-a2a
6
6
  Author: Fabian Bell
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "distributed_a2a"
7
- version = "0.1.5rc15"
7
+ version = "0.1.5rc17"
8
8
  description = "A library for building A2A agents with routing capabilities"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"