SDK: docs and improvements (#4310)

This commit is contained in:
Stanislav Novosad
2025-12-17 14:11:39 -07:00
committed by GitHub
parent 0d6a070a80
commit 5d2bb07371
32 changed files with 1274 additions and 291 deletions

View File

@@ -214,7 +214,7 @@ async def run_sdk_action(
elif action.type == "prompt":
prompt_result = await page_ai.ai_prompt(
prompt=action.prompt,
schema=action.schema,
schema=action.response_schema,
model=action.model,
)
result = prompt_result

View File

@@ -172,7 +172,7 @@ class PromptAction(SdkActionBase):
type: Literal["prompt"] = "prompt"
prompt: str = Field(..., description="The prompt to send to the LLM")
schema: dict[str, Any] | None = Field(None, description="Optional JSON schema to structure the response")
response_schema: dict[str, Any] | None = Field(None, description="Optional JSON schema to structure the response")
model: dict[str, Any] | None = Field(None, description="Optional model configuration")
def get_navigation_goal(self) -> str | None: