modify readme
This commit is contained in:
parent
70dcffbb7a
commit
d9887f8895
33
README.md
33
README.md
@ -60,24 +60,37 @@ 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 兼容)
|
### 1. 聊天接口 (OpenAI 兼容)
|
||||||
|
|
||||||
**端点**: `POST /api/v1/chat/completions`
|
**端点**: `POST /api/v1/chat/completions`
|
||||||
|
|
||||||
```bash
|
```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 "Content-Type: application/json" \
|
||||||
|
-H "Authorization: Bearer {api_key}"
|
||||||
-d '{
|
-d '{
|
||||||
"messages": [
|
"messages": [
|
||||||
{
|
{
|
||||||
"role": "user",
|
"role": "user",
|
||||||
"content": "HP Elite Mini 800 G9ってノートPC?"
|
"content": "1kg未満のノートPCを知りたいので表で出力してください"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"model": "qwen3-next",
|
"stream": true,
|
||||||
"unique_id": "xxxx",
|
"language": "ja",
|
||||||
"stream": false
|
"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
|
||||||
|
}'
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. 异步文件处理队列
|
### 2. 异步文件处理队列
|
||||||
@ -95,15 +108,17 @@ poetry run python fastapi_app.py
|
|||||||
#### 提交异步任务
|
#### 提交异步任务
|
||||||
|
|
||||||
```bash
|
```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" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{
|
-d '{
|
||||||
"unique_id": "my_project_123",
|
"unique_id": "1624be71-5432-40bf-9758-f4aecffd4e9c",
|
||||||
"files": {
|
"files": {
|
||||||
|
"group_name":{
|
||||||
"public/document.txt",
|
"public/document.txt",
|
||||||
"public/data.zip",
|
"public/data.zip",
|
||||||
"public/goods.xlsx"
|
"public/goods.xlsx"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}'
|
}'
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -145,7 +160,7 @@ projects/{unique_id}/
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 🎯 主要接口 - 只需要记住这一个
|
# 🎯 主要接口 - 只需要记住这一个
|
||||||
curl "http://localhost:8001/api/v1/task/abc-123-def/status"
|
curl "{host}/api/v1/task/{task_id}/status"
|
||||||
```
|
```
|
||||||
|
|
||||||
**状态响应**:
|
**状态响应**:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user