fix(docs): update README and quick start for testing
This commit is contained in:
22
README-zh.md
22
README-zh.md
@@ -1,6 +1,6 @@
|
|||||||
# PageAgent 🤖🪄
|
# PageAgent 🤖🪄
|
||||||
|
|
||||||
> Unfinished Project. See [**Roadmap**](./ROADMAP.md)
|
> ⚠️ See [**Roadmap**](./ROADMAP.md)
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -32,11 +32,9 @@
|
|||||||
|
|
||||||
### CDN 集成
|
### CDN 集成
|
||||||
|
|
||||||
> **TODO**: CDN 地址待确定。
|
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<!-- CDN 脚本标签 - URL 待更新 -->
|
<!-- 临时 CDN URL. 未来会变更 -->
|
||||||
<script src="TODO-CDN-URL"></script>
|
<script src="https://hwcxiuzfylggtcktqgij.supabase.co/storage/v1/object/public/demo-public/v0.0.1/page-agent.js" crossorigin="true" type="text/javascript"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
### NPM 安装
|
### NPM 安装
|
||||||
@@ -48,10 +46,18 @@ npm install page-agent
|
|||||||
```javascript
|
```javascript
|
||||||
import { PageAgent } from 'page-agent'
|
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({
|
const agent = new PageAgent({
|
||||||
modelName: 'gpt-4.1-mini',
|
modelName: DEMO_MODEL,
|
||||||
baseURL: 'xxxx',
|
baseURL: DEMO_BASE_URL,
|
||||||
apiKey: 'xxxx'
|
apiKey: DEMO_API_KEY,
|
||||||
|
language: 'zh-CN'
|
||||||
})
|
})
|
||||||
|
|
||||||
await agent.execute("点击登录按钮")
|
await agent.execute("点击登录按钮")
|
||||||
|
|||||||
22
README.md
22
README.md
@@ -1,6 +1,6 @@
|
|||||||
# PageAgent 🤖🪄
|
# 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
|
### CDN Integration
|
||||||
|
|
||||||
> **TODO**: CDN endpoint to be determined.
|
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<!-- CDN script tag - URL to be updated -->
|
<!-- temporary CDN URL. May change in the future -->
|
||||||
<script src="TODO-CDN-URL"></script>
|
<script src="https://hwcxiuzfylggtcktqgij.supabase.co/storage/v1/object/public/demo-public/v0.0.1/page-agent.js" crossorigin="true" type="text/javascript"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
### NPM Installation
|
### NPM Installation
|
||||||
@@ -48,10 +46,18 @@ npm install page-agent
|
|||||||
```javascript
|
```javascript
|
||||||
import { PageAgent } from 'page-agent'
|
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({
|
const agent = new PageAgent({
|
||||||
modelName: 'gpt-4.1-mini',
|
modelName: DEMO_MODEL,
|
||||||
baseURL: 'xxxx',
|
baseURL: DEMO_BASE_URL,
|
||||||
apiKey: 'xxxx'
|
apiKey: DEMO_API_KEY,
|
||||||
|
language: 'en-US'
|
||||||
})
|
})
|
||||||
|
|
||||||
await agent.execute("Click the login button")
|
await agent.execute("Click the login button")
|
||||||
|
|||||||
@@ -132,7 +132,15 @@ const pageAgent = new PageAgent({
|
|||||||
baseURL: 'http://localhost:11434/v1',
|
baseURL: 'http://localhost:11434/v1',
|
||||||
apiKey: 'N/A', // Ollama 通常使用任意值
|
apiKey: 'N/A', // Ollama 通常使用任意值
|
||||||
model: 'qwen3:latest'
|
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'
|
||||||
|
`}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ export default function QuickStart() {
|
|||||||
<div>
|
<div>
|
||||||
<p className="text-sm font-medium mb-2">CDN 引入</p>
|
<p className="text-sm font-medium mb-2">CDN 引入</p>
|
||||||
<CodeEditor
|
<CodeEditor
|
||||||
code={`// 仅供测试使用,生产环境联系 @西萌
|
code={`// 仅供测试使用
|
||||||
<script src="https://dev.g.alicdn.com/dt/page-use.js/0.0.1/lib/page-agent.umd.cjs"></script>`}
|
<script src="https://hwcxiuzfylggtcktqgij.supabase.co/storage/v1/object/public/demo-public/v0.0.1/page-agent.js" crossorigin="true" type="text/javascript"></script>`}
|
||||||
language="html"
|
language="html"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -43,7 +43,19 @@ import PageAgent from 'page-agent'`}
|
|||||||
</h3>
|
</h3>
|
||||||
<CodeEditor
|
<CodeEditor
|
||||||
code={`// 仅供测试使用,生产环境需要配置 LLM 接入点,本工具不提供 LLM 服务
|
code={`// 仅供测试使用,生产环境需要配置 LLM 接入点,本工具不提供 LLM 服务
|
||||||
const pageAgent = new PageAgent()`}
|
// 测试接口
|
||||||
|
// @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: DEMO_MODEL,
|
||||||
|
baseURL: DEMO_BASE_URL,
|
||||||
|
apiKey: DEMO_API_KEY,
|
||||||
|
language: 'zh-CN'
|
||||||
|
})`}
|
||||||
language="javascript"
|
language="javascript"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user