record max_steps_per_run override in tasks table as well (#622)

This commit is contained in:
Shuchang Zheng
2024-07-18 17:00:00 -07:00
committed by GitHub
parent 9c0c4cbedf
commit 267335a0eb
3 changed files with 19 additions and 0 deletions

View File

@@ -376,6 +376,7 @@ class AgentDB:
extracted_information: dict[str, Any] | list | str | None = None,
failure_reason: str | None = None,
errors: list[dict[str, Any]] | None = None,
max_steps_per_run: int | None = None,
organization_id: str | None = None,
) -> Task:
if status is None and extracted_information is None and failure_reason is None and errors is None:
@@ -397,6 +398,8 @@ class AgentDB:
task.failure_reason = failure_reason
if errors is not None:
task.errors = errors
if max_steps_per_run is not None:
task.max_steps_per_run = max_steps_per_run
await session.commit()
updated_task = await self.get_task(task_id, organization_id=organization_id)
if not updated_task: