Skip to content

Commit bfffbda

Browse files
authored
fix(a2a): message id and a2a version (#66)
* fix(a2a): message id * fix(a2a): version
1 parent 47f4775 commit bfffbda

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ authors = [
1212
]
1313
dependencies = [
1414
"pydantic-settings>=2.10.1", # Config management
15-
"a2a-sdk==0.3.1", # For Google Agent2Agent protocol
15+
"a2a-sdk>=0.3.0", # For Google Agent2Agent protocol
1616
"deprecated>=1.2.18",
17-
"google-adk==1.11.0", # For basic agent architecture
17+
"google-adk>=1.10.0", # For basic agent architecture
1818
"litellm>=1.74.3", # For model inference
1919
"loguru>=0.7.3", # For better logging
2020
"openinference-instrumentation-google-adk>=0.1.1", # For OpenInference instrumentation

veadk/cli/services/vefaas/template/deploy.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
from veadk.cloud.cloud_agent_engine import CloudAgentEngine
2020
from fastmcp.client import Client
21+
from veadk.cloud.cloud_app import get_message_id
2122

2223
SESSION_ID = "cloud_app_test_session"
2324
USER_ID = "cloud_app_test_user"
@@ -48,7 +49,7 @@ async def main():
4849
query_example, SESSION_ID, USER_ID
4950
)
5051
print(f"VeFaaS application ID: {cloud_app.vefaas_application_id}")
51-
print(f"Message ID: {response_message.message_id}")
52+
print(f"Message ID: {get_message_id(response_message)}")
5253
print(
5354
f"Response from {cloud_app.vefaas_endpoint}: {response_message.parts[0].root.text}"
5455
)

veadk/cloud/cloud_app.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,3 +189,12 @@ async def message_send(
189189
# TODO(floritange): show error log on VeFaaS function
190190
print(e)
191191
return None
192+
193+
194+
def get_message_id(message: Message):
195+
"""Get the messageId of the a2a message"""
196+
if getattr(message, "messageId", None):
197+
# Compatible with the messageId of the old version
198+
return message.messageId
199+
else:
200+
return message.message_id

0 commit comments

Comments
 (0)