use browser session id in taskv2 POST (#2744)
This commit is contained in:
@@ -1821,6 +1821,7 @@ async def run_task_v2(
|
|||||||
extracted_information_schema=data.extracted_information_schema,
|
extracted_information_schema=data.extracted_information_schema,
|
||||||
error_code_mapping=data.error_code_mapping,
|
error_code_mapping=data.error_code_mapping,
|
||||||
max_screenshot_scrolling_times=data.max_screenshot_scrolling_times,
|
max_screenshot_scrolling_times=data.max_screenshot_scrolling_times,
|
||||||
|
browser_session_id=data.browser_session_id,
|
||||||
)
|
)
|
||||||
except MissingBrowserAddressError as e:
|
except MissingBrowserAddressError as e:
|
||||||
raise HTTPException(status_code=400, detail=str(e)) from e
|
raise HTTPException(status_code=400, detail=str(e)) from e
|
||||||
|
|||||||
@@ -166,6 +166,7 @@ async def initialize_task_v2(
|
|||||||
create_task_run: bool = False,
|
create_task_run: bool = False,
|
||||||
model: dict[str, Any] | None = None,
|
model: dict[str, Any] | None = None,
|
||||||
max_screenshot_scrolling_times: int | None = None,
|
max_screenshot_scrolling_times: int | None = None,
|
||||||
|
browser_session_id: str | None = None,
|
||||||
) -> TaskV2:
|
) -> TaskV2:
|
||||||
task_v2 = await app.DATABASE.create_task_v2(
|
task_v2 = await app.DATABASE.create_task_v2(
|
||||||
prompt=user_prompt,
|
prompt=user_prompt,
|
||||||
@@ -226,6 +227,7 @@ async def initialize_task_v2(
|
|||||||
request_id=None,
|
request_id=None,
|
||||||
workflow_request=WorkflowRequestBody(
|
workflow_request=WorkflowRequestBody(
|
||||||
max_screenshot_scrolling_times=max_screenshot_scrolling_times,
|
max_screenshot_scrolling_times=max_screenshot_scrolling_times,
|
||||||
|
browser_session_id=browser_session_id,
|
||||||
),
|
),
|
||||||
workflow_permanent_id=new_workflow.workflow_permanent_id,
|
workflow_permanent_id=new_workflow.workflow_permanent_id,
|
||||||
organization=organization,
|
organization=organization,
|
||||||
|
|||||||
Reference in New Issue
Block a user