aixtools 0.2.7__py3-none-any.whl → 0.2.8__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 aixtools might be problematic. Click here for more details.
- aixtools/_version.py +2 -2
- aixtools/a2a/google_sdk/pydantic_ai_adapter/agent_executor.py +3 -3
- aixtools/a2a/google_sdk/utils.py +8 -0
- {aixtools-0.2.7.dist-info → aixtools-0.2.8.dist-info}/METADATA +1 -1
- {aixtools-0.2.7.dist-info → aixtools-0.2.8.dist-info}/RECORD +8 -9
- aixtools/a2a/google_sdk/card.py +0 -27
- {aixtools-0.2.7.dist-info → aixtools-0.2.8.dist-info}/WHEEL +0 -0
- {aixtools-0.2.7.dist-info → aixtools-0.2.8.dist-info}/entry_points.txt +0 -0
- {aixtools-0.2.7.dist-info → aixtools-0.2.8.dist-info}/top_level.txt +0 -0
aixtools/_version.py
CHANGED
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.2.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 2,
|
|
31
|
+
__version__ = version = '0.2.8'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 2, 8)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -158,7 +158,7 @@ class PydanticAgentExecutor(AgentExecutor):
|
|
|
158
158
|
return
|
|
159
159
|
|
|
160
160
|
for idx, artifact in enumerate(run_output.created_artifacts_paths):
|
|
161
|
-
|
|
161
|
+
artifact_file = FileWithUri(uri=str(artifact), name=f"art_{idx}")
|
|
162
162
|
await event_queue.enqueue_event(
|
|
163
163
|
TaskArtifactUpdateEvent(
|
|
164
164
|
append=False,
|
|
@@ -166,8 +166,8 @@ class PydanticAgentExecutor(AgentExecutor):
|
|
|
166
166
|
task_id=task.id,
|
|
167
167
|
last_chunk=True,
|
|
168
168
|
artifact=Artifact(
|
|
169
|
-
artifact_id=f"
|
|
170
|
-
parts=[Part(root=FilePart(file=
|
|
169
|
+
artifact_id=f"art_{idx}",
|
|
170
|
+
parts=[Part(root=FilePart(file=artifact_file))],
|
|
171
171
|
),
|
|
172
172
|
)
|
|
173
173
|
)
|
aixtools/a2a/google_sdk/utils.py
CHANGED
|
@@ -76,6 +76,14 @@ async def get_a2a_clients(
|
|
|
76
76
|
return await _AgentCardResolver(httpx_client).get_a2a_clients(agent_hosts)
|
|
77
77
|
|
|
78
78
|
|
|
79
|
+
def card2description(card: AgentCard) -> str:
|
|
80
|
+
"""Convert agent card to a description string."""
|
|
81
|
+
descr = f"{card.name}: {card.description}\n"
|
|
82
|
+
for skill in card.skills:
|
|
83
|
+
descr += f"\t - {skill.name}: {skill.description}\n"
|
|
84
|
+
return descr
|
|
85
|
+
|
|
86
|
+
|
|
79
87
|
def get_session_id_tuple(context: RequestContext) -> SessionIdTuple:
|
|
80
88
|
"""Get the user_id, session_id tuple from the request context."""
|
|
81
89
|
headers = context.call_context.state.get("headers", {})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
aixtools/__init__.py,sha256=9NGHm7LjsQmsvjTZvw6QFJexSvAU4bCoN_KBk9SCa00,260
|
|
2
|
-
aixtools/_version.py,sha256=
|
|
2
|
+
aixtools/_version.py,sha256=NCr4lkV1m1Jmisv_F-sazmV2gGdDIaVwqLyPwmjayqM,704
|
|
3
3
|
aixtools/app.py,sha256=JzQ0nrv_bjDQokllIlGHOV0HEb-V8N6k_nGQH-TEsVU,5227
|
|
4
4
|
aixtools/chainlit.md,sha256=yC37Ly57vjKyiIvK4oUvf4DYxZCwH7iocTlx7bLeGLU,761
|
|
5
5
|
aixtools/context.py,sha256=I_MD40ZnvRm5WPKAKqBUAdXIf8YaurkYUUHSVVy-QvU,598
|
|
@@ -20,10 +20,9 @@ aixtools/.chainlit/translations/zh-CN.json,sha256=EWxhT2_6CW9z0F6SI2llr3RsaL2omH
|
|
|
20
20
|
aixtools/a2a/app.py,sha256=p18G7fAInl9dcNYq6RStBjv1C3aD6oilQq3WXtBuk30,5069
|
|
21
21
|
aixtools/a2a/utils.py,sha256=EHr3IyyBJn23ni-JcfAf6i3VpQmPs0g1TSnAZazvY_8,4039
|
|
22
22
|
aixtools/a2a/google_sdk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
|
-
aixtools/a2a/google_sdk/card.py,sha256=P0L3bKbm28HaRkcIxIvjuSGUKOOc0ymyRAFHKm3a5GQ,996
|
|
24
23
|
aixtools/a2a/google_sdk/remote_agent_connection.py,sha256=oDCRSN3gfONY1Ibp8BrtysIVqfQQ-lWe5N7lr1ymHxY,2819
|
|
25
|
-
aixtools/a2a/google_sdk/utils.py,sha256=
|
|
26
|
-
aixtools/a2a/google_sdk/pydantic_ai_adapter/agent_executor.py,sha256=
|
|
24
|
+
aixtools/a2a/google_sdk/utils.py,sha256=7ru263peolaMnMLiWvCDWYimZs9aE9DFel2SyokCGjY,3501
|
|
25
|
+
aixtools/a2a/google_sdk/pydantic_ai_adapter/agent_executor.py,sha256=VRwPNi_T4ShCp3vfcvIbB57gPC-vumuLboPhlBiU3lc,7068
|
|
27
26
|
aixtools/a2a/google_sdk/pydantic_ai_adapter/storage.py,sha256=nGoVL7MPoZJW7iVR71laqpUYP308yFKZIifJtvUgpiU,878
|
|
28
27
|
aixtools/agents/__init__.py,sha256=MAW196S2_G7uGqv-VNjvlOETRfuV44WlU1leO7SiR0A,282
|
|
29
28
|
aixtools/agents/agent.py,sha256=tceQByn-RGBIhW8BOjKoP0yhNzZLwAa6CxwhPhRe3PU,7270
|
|
@@ -89,8 +88,8 @@ aixtools/utils/chainlit/cl_agent_show.py,sha256=vaRuowp4BRvhxEr5hw0zHEJ7iaSF_5bo
|
|
|
89
88
|
aixtools/utils/chainlit/cl_utils.py,sha256=fxaxdkcZg6uHdM8uztxdPowg3a2f7VR7B26VPY4t-3c,5738
|
|
90
89
|
aixtools/vault/__init__.py,sha256=fsr_NuX3GZ9WZ7dGfe0gp_5-z3URxAfwVRXw7Xyc0dU,141
|
|
91
90
|
aixtools/vault/vault.py,sha256=9dZLWdZQk9qN_Q9Djkofw9LUKnJqnrX5H0fGusVLBhA,6037
|
|
92
|
-
aixtools-0.2.
|
|
93
|
-
aixtools-0.2.
|
|
94
|
-
aixtools-0.2.
|
|
95
|
-
aixtools-0.2.
|
|
96
|
-
aixtools-0.2.
|
|
91
|
+
aixtools-0.2.8.dist-info/METADATA,sha256=Ev-Wdm53oRwRAXJrf7Kn47DoJ2_WeiWae2CSasDVs_o,27229
|
|
92
|
+
aixtools-0.2.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
93
|
+
aixtools-0.2.8.dist-info/entry_points.txt,sha256=q8412TG4T0S8K0SKeWp2vkVPIDYQs0jNoHqcQ7qxOiA,155
|
|
94
|
+
aixtools-0.2.8.dist-info/top_level.txt,sha256=wBn-rw9bCtxrR4AYEYgjilNCUVmKY0LWby9Zan2PRJM,9
|
|
95
|
+
aixtools-0.2.8.dist-info/RECORD,,
|
aixtools/a2a/google_sdk/card.py
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import httpx
|
|
2
|
-
from a2a.client import A2ACardResolver
|
|
3
|
-
from a2a.types import AgentCard
|
|
4
|
-
|
|
5
|
-
from aixtools.logging.logging_config import get_logger
|
|
6
|
-
|
|
7
|
-
logger = get_logger(__name__)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
async def get_agent_card(httpx_client: httpx.AsyncClient, agent_url: str) -> AgentCard:
|
|
11
|
-
resolver = A2ACardResolver(
|
|
12
|
-
httpx_client=httpx_client,
|
|
13
|
-
base_url=agent_url,
|
|
14
|
-
)
|
|
15
|
-
|
|
16
|
-
try:
|
|
17
|
-
_public_card = await resolver.get_agent_card() # Fetches from default public path
|
|
18
|
-
logger.info("Successfully fetched public agent card:")
|
|
19
|
-
logger.info(_public_card.model_dump_json(indent=2, exclude_none=True))
|
|
20
|
-
final_agent_card_to_use = _public_card
|
|
21
|
-
except Exception as e:
|
|
22
|
-
logger.error(f"Critical error fetching public agent card: {e}", exc_info=True)
|
|
23
|
-
raise RuntimeError("Failed to fetch the public agent card. Cannot continue.") from e
|
|
24
|
-
|
|
25
|
-
# Set the URL which is accessible from the container
|
|
26
|
-
final_agent_card_to_use.url = agent_url
|
|
27
|
-
return final_agent_card_to_use
|
|
File without changes
|
|
File without changes
|
|
File without changes
|