make run_with and ai_fallback work in the public API (#3732)
This commit is contained in:
@@ -341,6 +341,8 @@ async def run_workflow(
|
|||||||
max_screenshot_scrolls=workflow_run_request.max_screenshot_scrolls,
|
max_screenshot_scrolls=workflow_run_request.max_screenshot_scrolls,
|
||||||
extra_http_headers=workflow_run_request.extra_http_headers,
|
extra_http_headers=workflow_run_request.extra_http_headers,
|
||||||
browser_address=workflow_run_request.browser_address,
|
browser_address=workflow_run_request.browser_address,
|
||||||
|
run_with=workflow_run_request.run_with,
|
||||||
|
ai_fallback=workflow_run_request.ai_fallback,
|
||||||
)
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -371,6 +373,8 @@ async def run_workflow(
|
|||||||
downloaded_files=None,
|
downloaded_files=None,
|
||||||
recording_url=None,
|
recording_url=None,
|
||||||
app_url=f"{settings.SKYVERN_APP_URL.rstrip('/')}/workflows/{workflow_run.workflow_permanent_id}/{workflow_run.workflow_run_id}",
|
app_url=f"{settings.SKYVERN_APP_URL.rstrip('/')}/workflows/{workflow_run.workflow_permanent_id}/{workflow_run.workflow_run_id}",
|
||||||
|
run_with=workflow_run.run_with,
|
||||||
|
ai_fallback=workflow_run.ai_fallback,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -502,6 +502,15 @@ class TaskRunResponse(BaseRunResponse):
|
|||||||
|
|
||||||
class WorkflowRunResponse(BaseRunResponse):
|
class WorkflowRunResponse(BaseRunResponse):
|
||||||
run_type: Literal[RunType.workflow_run] = Field(description="Type of run - always workflow_run for workflow runs")
|
run_type: Literal[RunType.workflow_run] = Field(description="Type of run - always workflow_run for workflow runs")
|
||||||
|
run_with: str | None = Field(
|
||||||
|
default=None,
|
||||||
|
description="Whether the workflow run was executed with agent or code",
|
||||||
|
examples=["agent", "code"],
|
||||||
|
)
|
||||||
|
ai_fallback: bool | None = Field(
|
||||||
|
default=None,
|
||||||
|
description="Whether to fallback to AI if code run fails.",
|
||||||
|
)
|
||||||
run_request: WorkflowRunRequest | None = Field(
|
run_request: WorkflowRunRequest | None = Field(
|
||||||
default=None, description="The original request parameters used to start this workflow run"
|
default=None, description="The original request parameters used to start this workflow run"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user