知识库管理
- Base URL:
https://stardust.ticos.cn - 提交:
POST /knowledge - 删除:
DELETE /knowledge/{id} - 认证:
Authorization: Bearer <token>
1. 提交知识库内容(POST /knowledge)
Section titled “1. 提交知识库内容(POST /knowledge)”支持 application/json 或 multipart/form-data。
id(可选):知识库条目唯一标识title(可选):标题content(必填):正文内容
JSON 示例
Section titled “JSON 示例”{ "id": "knowledge_idxxx", "title": "纸鹤与咖啡", "content": "故事概括:一个工作日的早晨..."}curl --location --request POST 'https://stardust.ticos.cn/knowledge' \--header 'Authorization: Bearer <API_KEY>' \--form 'id="knowledge_idxxx"' \--form 'title="纸鹤与咖啡"' \--form 'content="故事概括:一个工作日的早晨..."'2. 删除知识库内容(DELETE /knowledge/{id})
Section titled “2. 删除知识库内容(DELETE /knowledge/{id})”curl --location --request DELETE 'https://stardust.ticos.cn/knowledge/knowledge_idxxx' \--header 'Authorization: Bearer <API_KEY>'200 OK:成功400 Bad Request:请求参数错误401 Unauthorized:鉴权失败404 Not Found:指定 ID 不存在500 Internal Server Error:服务器错误