modify readme

This commit is contained in:
朱潮 2025-10-28 11:48:44 +08:00
parent 70dcffbb7a
commit d9887f8895

View File

@ -60,23 +60,36 @@ docker-compose up -d
## 📖 使用指南
公网:
dev: https://catalog-agent-dev.gbase.ai
prod: https://catalog-agent.gbase.ai
内网:
prod http://catalog-agent.default.svc.cluster.local
dev http://catalog-agent.gbase-dev.svc.cluster.local
### 1. 聊天接口 (OpenAI 兼容)
**端点**: `POST /api/v1/chat/completions`
```bash
curl -X POST "http://localhost:8001/api/v1/chat/completions" \
curl -X POST "{host}/api/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {api_key}"
-d '{
"messages": [
{
"role": "user",
"content": "HP Elite Mini 800 G9ってートPC"
"content": "1kg未満のートPCを知りたいので表で出力してください"
}
],
"model": "qwen3-next",
"unique_id": "xxxx",
"stream": false
"stream": true,
"language": "ja",
"robot_type": "catalog_agent",
"model": "gpt-4.1",
"model_server": "https://one-dev.felo.me/v1",
"unique_id": "1624be71-5432-40bf-9758-f4aecffd4e9c",
"tool_response": false
}'
```
@ -95,15 +108,17 @@ poetry run python fastapi_app.py
#### 提交异步任务
```bash
curl -X POST "http://localhost:8001/api/v1/files/process/async" \
curl -X POST "{host}/api/v1/files/process/async" \
-H "Content-Type: application/json" \
-d '{
"unique_id": "my_project_123",
"unique_id": "1624be71-5432-40bf-9758-f4aecffd4e9c",
"files": {
"group_name":{
"public/document.txt",
"public/data.zip",
"public/goods.xlsx"
}
}
}'
```
@ -145,7 +160,7 @@ projects/{unique_id}/
```bash
# 🎯 主要接口 - 只需要记住这一个
curl "http://localhost:8001/api/v1/task/abc-123-def/status"
curl "{host}/api/v1/task/{task_id}/status"
```
**状态响应**: