11from typing import Any , Type , TypeVar
22
3+ from .job_route_builders import build_job_route , build_job_status_route
34from .response_utils import parse_response_model
45
56T = TypeVar ("T" )
@@ -14,7 +15,7 @@ def get_agent_task(
1415 operation_name : str ,
1516) -> T :
1617 response = client .transport .get (
17- client ._build_url (f" { route_prefix } / { job_id } " ),
18+ client ._build_url (build_job_route ( route_prefix , job_id ) ),
1819 )
1920 return parse_response_model (
2021 response .data ,
@@ -32,7 +33,7 @@ def get_agent_task_status(
3233 operation_name : str ,
3334) -> T :
3435 response = client .transport .get (
35- client ._build_url (f" { route_prefix } / { job_id } /status" ),
36+ client ._build_url (build_job_status_route ( route_prefix , job_id ) ),
3637 )
3738 return parse_response_model (
3839 response .data ,
@@ -50,7 +51,7 @@ async def get_agent_task_async(
5051 operation_name : str ,
5152) -> T :
5253 response = await client .transport .get (
53- client ._build_url (f" { route_prefix } / { job_id } " ),
54+ client ._build_url (build_job_route ( route_prefix , job_id ) ),
5455 )
5556 return parse_response_model (
5657 response .data ,
@@ -68,7 +69,7 @@ async def get_agent_task_status_async(
6869 operation_name : str ,
6970) -> T :
7071 response = await client .transport .get (
71- client ._build_url (f" { route_prefix } / { job_id } /status" ),
72+ client ._build_url (build_job_status_route ( route_prefix , job_id ) ),
7273 )
7374 return parse_response_model (
7475 response .data ,
0 commit comments