Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanFauble committed Jan 14, 2025
1 parent 3ff650d commit fd457a2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
3 changes: 2 additions & 1 deletion synapseclient/models/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ def fill_from_dict(self, synapse_response: Dict[str, str]) -> "AgentPrompt":
Returns:
The AgentPrompt object.
"""
self.id = synapse_response.get("sessionId", None)
self.id = synapse_response.get("jobId", None)
self.session_id = synapse_response.get("sessionId", None)
self.response = synapse_response.get("responseText", None)
return self

Expand Down
15 changes: 9 additions & 6 deletions synapseclient/models/mixins/asynchronous_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,15 @@ async def send_job_and_wait_async(
SynapseTimeoutError: If the job does not complete within the timeout.
"""
job_id = await send_job_async(request=request, synapse_client=synapse_client)
return await get_job_async(
job_id=job_id,
request_type=AGENT_CHAT_REQUEST,
synapse_client=synapse_client,
endpoint=endpoint,
)
return {
"jobId": job_id,
**await get_job_async(
job_id=job_id,
request_type=AGENT_CHAT_REQUEST,
synapse_client=synapse_client,
endpoint=endpoint,
),
}


async def send_job_async(
Expand Down

0 comments on commit fd457a2

Please sign in to comment.