fix all dict.get fallbacks instances in create-from-prompt endpoint (#3708)
This commit is contained in:
@@ -774,8 +774,8 @@ class WorkflowService:
|
|||||||
organization_id=organization.organization_id,
|
organization_id=organization.organization_id,
|
||||||
)
|
)
|
||||||
|
|
||||||
block_label: str = metadata_response.get("block_label", DEFAULT_FIRST_BLOCK_LABEL)
|
block_label: str = metadata_response.get("block_label", None) or DEFAULT_FIRST_BLOCK_LABEL
|
||||||
title: str = metadata_response.get("title", DEFAULT_WORKFLOW_TITLE)
|
title: str = metadata_response.get("title", None) or DEFAULT_WORKFLOW_TITLE
|
||||||
|
|
||||||
if task_version == "v1":
|
if task_version == "v1":
|
||||||
task_prompt = prompt_engine.load_prompt(
|
task_prompt = prompt_engine.load_prompt(
|
||||||
@@ -790,8 +790,8 @@ class WorkflowService:
|
|||||||
)
|
)
|
||||||
|
|
||||||
data_extraction_goal: str | None = task_response.get("data_extraction_goal")
|
data_extraction_goal: str | None = task_response.get("data_extraction_goal")
|
||||||
navigation_goal: str = task_response.get("navigation_goal", user_prompt)
|
navigation_goal: str = task_response.get("navigation_goal", None) or user_prompt
|
||||||
url: str = task_response.get("url", "")
|
url: str = task_response.get("url", None) or ""
|
||||||
|
|
||||||
blocks = [
|
blocks = [
|
||||||
NavigationBlock(
|
NavigationBlock(
|
||||||
|
|||||||
Reference in New Issue
Block a user