From f619d05caebbbcae2b9bcfadebcf7d03a9c29124 Mon Sep 17 00:00:00 2001 From: Simon <10131203+gaomeng1900@users.noreply.github.com> Date: Tue, 21 Oct 2025 17:22:05 +0800 Subject: [PATCH] fix(docs): update README and quick start for testing --- README-zh.md | 22 ++++++++++++------- README.md | 22 ++++++++++++------- .../docs/features/model-integration/page.tsx | 10 ++++++++- pages/docs/introduction/quick-start/page.tsx | 18 ++++++++++++--- 4 files changed, 52 insertions(+), 20 deletions(-) diff --git a/README-zh.md b/README-zh.md index 9340837..ee055d3 100644 --- a/README-zh.md +++ b/README-zh.md @@ -1,6 +1,6 @@ # PageAgent 🤖🪄 -> Unfinished Project. See [**Roadmap**](./ROADMAP.md) +> ⚠️ See [**Roadmap**](./ROADMAP.md)  @@ -32,11 +32,9 @@ ### CDN 集成 -> **TODO**: CDN 地址待确定。 - ```html - - + + ``` ### NPM 安装 @@ -48,10 +46,18 @@ npm install page-agent ```javascript import { PageAgent } from 'page-agent' +// 测试接口 +// @note: 限流,限制 prompt 内容,限制来源,随时变更,请替换成你自己的 +// @note: 使用 DeepSeek-chat(3.2) 官方版本,使用协议和隐私策略见 DeepSeek 网站 +const DEMO_MODEL = 'PAGE-AGENT-FREE-TESTING-RANDOM' +const DEMO_BASE_URL = 'https://hwcxiuzfylggtcktqgij.supabase.co/functions/v1/llm-testing-proxy' +const DEMO_API_KEY = 'PAGE-AGENT-FREE-TESTING-RANDOM' + const agent = new PageAgent({ - modelName: 'gpt-4.1-mini', - baseURL: 'xxxx', - apiKey: 'xxxx' + modelName: DEMO_MODEL, + baseURL: DEMO_BASE_URL, + apiKey: DEMO_API_KEY, + language: 'zh-CN' }) await agent.execute("点击登录按钮") diff --git a/README.md b/README.md index 3b5577e..26eebb0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # PageAgent 🤖🪄 -> Unfinished Project. See [**Roadmap**](./ROADMAP.md) +> ⚠️ See [**Roadmap**](./ROADMAP.md)  @@ -32,11 +32,9 @@ An in-page UI agent in javascript. Control web interfaces with natural language. ### CDN Integration -> **TODO**: CDN endpoint to be determined. - ```html - - + + ``` ### NPM Installation @@ -48,10 +46,18 @@ npm install page-agent ```javascript import { PageAgent } from 'page-agent' +// test server +// @note: rate limit. prompt limit. Origin limit. May change anytime. Use your own llm! +// @note Using official DeepSeek-chat(3.2). Go to DeepSeek website for privacy policy. +const DEMO_MODEL = 'PAGE-AGENT-FREE-TESTING-RANDOM' +const DEMO_BASE_URL = 'https://hwcxiuzfylggtcktqgij.supabase.co/functions/v1/llm-testing-proxy' +const DEMO_API_KEY = 'PAGE-AGENT-FREE-TESTING-RANDOM' + const agent = new PageAgent({ - modelName: 'gpt-4.1-mini', - baseURL: 'xxxx', - apiKey: 'xxxx' + modelName: DEMO_MODEL, + baseURL: DEMO_BASE_URL, + apiKey: DEMO_API_KEY, + language: 'en-US' }) await agent.execute("Click the login button") diff --git a/pages/docs/features/model-integration/page.tsx b/pages/docs/features/model-integration/page.tsx index 49497e1..676b5bd 100644 --- a/pages/docs/features/model-integration/page.tsx +++ b/pages/docs/features/model-integration/page.tsx @@ -132,7 +132,15 @@ const pageAgent = new PageAgent({ baseURL: 'http://localhost:11434/v1', apiKey: 'N/A', // Ollama 通常使用任意值 model: 'qwen3:latest' -});`} +}); + +// 测试接口 +// @note: 限流,限制 prompt 内容,限制来源,随时变更,请替换成你自己的 +// @note: 使用 DeepSeek-chat(3.2) 官方版本,使用协议和隐私策略见 DeepSeek 网站 +const DEMO_MODEL = 'PAGE-AGENT-FREE-TESTING-RANDOM' +const DEMO_BASE_URL = 'https://hwcxiuzfylggtcktqgij.supabase.co/functions/v1/llm-testing-proxy' +const DEMO_API_KEY = 'PAGE-AGENT-FREE-TESTING-RANDOM' +`} /> ) diff --git a/pages/docs/introduction/quick-start/page.tsx b/pages/docs/introduction/quick-start/page.tsx index 8b3936d..dc0b73e 100644 --- a/pages/docs/introduction/quick-start/page.tsx +++ b/pages/docs/introduction/quick-start/page.tsx @@ -21,8 +21,8 @@ export default function QuickStart() {
CDN 引入