feat: expose maxSteps config

This commit is contained in:
Simon
2026-01-19 20:11:53 +08:00
parent 6d53f4cb44
commit 80c93bd668
5 changed files with 24 additions and 12 deletions

View File

@@ -105,8 +105,8 @@ const result = await agent.execute('Fill in the form with test data')`}
type: 'string',
required: true,
description: isZh
? '模型名称(如 gpt-4o, claude-3.5-sonnet'
: 'Model name (e.g., gpt-4o, claude-3.5-sonnet)',
? '模型名称(如 gpt-5.2, anthropic/claude-4.5-haiku'
: 'Model name (e.g., gpt-5.2, anthropic/claude-4.5-haiku)',
},
{
name: 'temperature',
@@ -149,6 +149,12 @@ const result = await agent.execute('Fill in the form with test data')`}
defaultValue: "'en-US'",
description: isZh ? 'Agent 输出语言' : 'Agent output language',
},
{
name: 'maxSteps',
type: 'number',
defaultValue: '20',
description: isZh ? '每个任务的最大步骤数' : 'Maximum number of steps per task',
},
{
name: 'customTools',
type: 'Record<string, PageAgentTool | null>',

View File

@@ -53,7 +53,7 @@ const agent = new PageAgent({
// LLM Configuration (required)
baseURL: 'https://api.openai.com/v1',
apiKey: 'your-api-key',
model: 'gpt-4o',
model: 'gpt-5.2',
// Optional settings
language: 'en-US',