workflow run block description generation (#1482)

This commit is contained in:
Shuchang Zheng
2025-01-03 15:55:57 -08:00
committed by GitHub
parent 60e051eeb5
commit 187c18d83c
7 changed files with 91 additions and 2 deletions

View File

@@ -2146,11 +2146,11 @@ class AgentDB:
async def update_workflow_run_block(
self,
workflow_run_block_id: str,
organization_id: str | None = None,
status: BlockStatus | None = None,
output: dict | list | str | None = None,
failure_reason: str | None = None,
task_id: str | None = None,
organization_id: str | None = None,
loop_values: list | None = None,
current_value: str | None = None,
current_index: int | None = None,
@@ -2160,6 +2160,7 @@ class AgentDB:
body: str | None = None,
prompt: str | None = None,
wait_sec: int | None = None,
description: str | None = None,
) -> WorkflowRunBlock:
async with self.Session() as session:
workflow_run_block = (
@@ -2196,6 +2197,8 @@ class AgentDB:
workflow_run_block.prompt = prompt
if wait_sec:
workflow_run_block.wait_sec = wait_sec
if description:
workflow_run_block.description = description
await session.commit()
await session.refresh(workflow_run_block)
else: