Skip to content

Commit b6a1158

Browse files
committed
feat(samples): add remote a2a samples
1 parent 6241720 commit b6a1158

1 file changed

Lines changed: 2 additions & 23 deletions

File tree

  • packages/uipath-google-adk/samples/multi-agent-remote

packages/uipath-google-adk/samples/multi-agent-remote/main.py

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -58,33 +58,12 @@ class ReportOutput(BaseModel):
5858
code_snippet: str = Field(description="A relevant Python code example")
5959

6060

61-
# --- Shared HTTP client with authorization ---
62-
#
63-
# UIPATH_ACCESS_TOKEN is used to authenticate requests to the remote A2A endpoints.
64-
# Set it in your .env file before running.
61+
# UIPATH_ACCESS_TOKEN is set automatically by `uipath auth`
6562
_access_token = os.environ.get("UIPATH_ACCESS_TOKEN", "")
6663

67-
68-
async def _log_request(request: httpx.Request):
69-
body = (request.content or b"")[:4000]
70-
print(
71-
f">>> {request.method} {request.url}\n body={body.decode(errors='replace')}",
72-
flush=True,
73-
)
74-
75-
76-
async def _log_response(response: httpx.Response):
77-
await response.aread()
78-
print(
79-
f"<<< {response.status_code} {response.request.url}\n body={response.text[:4000]}",
80-
flush=True,
81-
)
82-
83-
8464
_http_client = httpx.AsyncClient(
8565
headers={"Authorization": f"Bearer {_access_token}"},
86-
timeout=httpx.Timeout(120.0),
87-
event_hooks={"request": [_log_request], "response": [_log_response]},
66+
timeout=httpx.Timeout(300.0),
8867
)
8968

9069
_a2a_client_factory = A2AClientFactory(

0 commit comments

Comments
 (0)