add model to Task and TaskV2; expose it to run_task endpoint; thread … (#2540)

This commit is contained in:
Shuchang Zheng
2025-05-30 20:07:12 -07:00
committed by GitHub
parent aee129a0a8
commit 2ed14f42e7
14 changed files with 103 additions and 5 deletions

View File

@@ -61,3 +61,7 @@ URL that serves TOTP/2FA/MFA codes for Skyvern to use during the workflow run. R
BROWSER_SESSION_ID_DOC_STRING = """
Run the task or workflow in the specific Skyvern browser session. Having a browser session can persist the real-time state of the browser, so that the next run can continue from where the previous run left off.
"""
MODEL_CONFIG = """
Optional model configuration.
"""

View File

@@ -21,6 +21,7 @@ from skyvern.schemas.docs.doc_strings import (
DATA_EXTRACTION_SCHEMA_DOC_STRING,
ERROR_CODE_MAPPING_DOC_STRING,
MAX_STEPS_DOC_STRING,
MODEL_CONFIG,
PROXY_LOCATION_DOC_STRING,
TASK_ENGINE_DOC_STRING,
TASK_PROMPT_DOC_STRING,
@@ -263,6 +264,12 @@ class TaskRunRequest(BaseModel):
description=BROWSER_SESSION_ID_DOC_STRING,
examples=BROWSER_SESSION_ID_EXAMPLES,
)
model: dict[str, Any] | None = Field(
default=None,
description=MODEL_CONFIG,
examples=None,
)
publish_workflow: bool = Field(
default=False,
description="Whether to publish this task as a reusable workflow. Only available for skyvern-2.0.",