From d9887f8895c1066f1bd86d89fc5fa474dcb968d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E6=BD=AE?= Date: Tue, 28 Oct 2025 11:48:44 +0800 Subject: [PATCH] modify readme --- README.md | 49 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 1b66ec7..0f9a9a2 100644 --- a/README.md +++ b/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 兼容) **端点**: `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?" - } - ], - "model": "qwen3-next", - "unique_id": "xxxx", - "stream": false - }' + "messages": [ + { + "role": "user", + "content": "1kg未満のノートPCを知りたいので表で出力してください" + } + ], + "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 +}' ``` ### 2. 异步文件处理队列 @@ -95,14 +108,16 @@ 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": { - "public/document.txt", - "public/data.zip", - "public/goods.xlsx" + "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" ``` **状态响应**: