fix: use navigation_goal/data_extraction_goal for self-hosted Skyvern API
Cloud API uses 'prompt', self-hosted uses 'navigation_goal' and 'data_extraction_goal'. Pass them separately. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -42,20 +42,15 @@ async def execute_skyvern(config: dict, send_text=None, target_room: str = "", *
|
||||
if not url or not goal:
|
||||
raise ValueError("Skyvern step requires 'url' and 'goal' in config")
|
||||
|
||||
# Build prompt combining goal and extraction goal
|
||||
prompt = goal
|
||||
if data_extraction_goal:
|
||||
prompt += f"\n\nExtract the following: {data_extraction_goal}"
|
||||
|
||||
payload: dict = {
|
||||
"prompt": prompt,
|
||||
"url": url,
|
||||
"engine": "skyvern-v2",
|
||||
"navigation_goal": goal,
|
||||
"data_extraction_goal": data_extraction_goal or goal,
|
||||
}
|
||||
if extraction_schema:
|
||||
if isinstance(extraction_schema, str):
|
||||
extraction_schema = json.loads(extraction_schema)
|
||||
payload["data_extraction_schema"] = extraction_schema
|
||||
payload["extracted_information_schema"] = extraction_schema
|
||||
if credential_id:
|
||||
payload["credential_id"] = credential_id
|
||||
if totp_identifier:
|
||||
|
||||
Reference in New Issue
Block a user