diff --git a/agents-api/agents_api/activities/task_steps/raise_complete_async.py b/agents-api/agents_api/activities/task_steps/raise_complete_async.py index a73df3f8d..54fd8a32c 100644 --- a/agents-api/agents_api/activities/task_steps/raise_complete_async.py +++ b/agents-api/agents_api/activities/task_steps/raise_complete_async.py @@ -1,4 +1,5 @@ import base64 + from temporalio import activity from ...autogen.openapi_model import CreateTransitionRequest @@ -11,10 +12,9 @@ @activity.defn async def raise_complete_async(context: StepContext, output: StepOutcome) -> None: - activity_info = activity.info() - captured_token = base64.b64encode(activity_info.task_token).decode('ascii') + captured_token = base64.b64encode(activity_info.task_token).decode("ascii") activity_id = activity_info.activity_id workflow_run_id = activity_info.workflow_run_id workflow_id = activity_info.workflow_id diff --git a/agents-api/agents_api/routers/jobs/routers.py b/agents-api/agents_api/routers/jobs/routers.py index fe1b25fa3..8bff6c7cc 100644 --- a/agents-api/agents_api/routers/jobs/routers.py +++ b/agents-api/agents_api/routers/jobs/routers.py @@ -50,7 +50,7 @@ async def get_job_status(job_id: UUID) -> JobStatus: state = map_job_status(job_description.status) return JobStatus( - name=handle.id, + name=job_description.workflow_type, reason=f"Execution status: {state}", created_at=job_description.start_time, updated_at=job_description.execution_time, diff --git a/agents-api/agents_api/routers/tasks/update_execution.py b/agents-api/agents_api/routers/tasks/update_execution.py index a5ca30aab..968b6bdfb 100644 --- a/agents-api/agents_api/routers/tasks/update_execution.py +++ b/agents-api/agents_api/routers/tasks/update_execution.py @@ -47,7 +47,9 @@ async def update_execution( workflow_id = token_data["metadata"].get("x-workflow-id", None) if activity_id is None or run_id is None or workflow_id is None: act_handle = temporal_client.get_async_activity_handle( - task_token=base64.b64decode(token_data["task_token"].encode('ascii')), + task_token=base64.b64decode( + token_data["task_token"].encode("ascii") + ), ) else: @@ -59,6 +61,8 @@ async def update_execution( try: await act_handle.complete(data.input) except Exception as e: - raise HTTPException(status_code=500, detail="Failed to resume execution") + raise HTTPException( + status_code=500, detail="Failed to resume execution" + ) case _: raise HTTPException(status_code=400, detail="Invalid request data") diff --git a/agents-api/notebooks/03-summarise.ipynb b/agents-api/notebooks/03-summarise.ipynb index a934fd1b9..98e6f5e0a 100644 --- a/agents-api/notebooks/03-summarise.ipynb +++ b/agents-api/notebooks/03-summarise.ipynb @@ -766,7 +766,9 @@ " messages.append(user(start_message))\n", "\n", " print(\"Starting chatml generation\")\n", - " trim_result = generate(messages, model=\"gpt-4-turbo\", temperature=0.1, stop=[\"