Fix issue with auto-generated model ID during model creation

This commit is contained in:
wizardchen
2025-08-09 21:35:32 +08:00
committed by lyingbug
parent 05270d6cae
commit 6eefe1c2a7
2 changed files with 54 additions and 4 deletions
+41 -4
View File
@@ -659,22 +659,59 @@ attachment
#### POST `/models` - 创建模型
请求体:
创建对话模型(KnowledgeQA)请求体:
```json
{
"name": "模型名称",
"type": "LLM",
"source": "OPENAI",
"type": "KnowledgeQA",
"source": "remote", # remote / local
"description": "模型描述",
"parameters": {
"model": "gpt-4",
"api_key": "sk-xxxxx",
"base_url": "https://api.openai.com"
"base_url": "xxx"
}
}
```
创建嵌入模型(Embedding)请求体:
```json
{
"name": "模型名称",
"type": "Embedding",
"source": "remote", # remote / local
"description": "模型描述",
"parameters": {
"model": "bge-m3",
"api_key": "sk-xxxxx",
"base_url": "xxx",
"embedding_parameters": {
"dimension": 768,
"truncate_prompt_tokens": 512
}
}
}
```
创建排序模型(Rerank)请求体:
```json
{
"name": "模型名称",
"type": "Rerank",
"source": "remote", # remote / local
"description": "模型描述",
"parameters": {
"model": "gte-reranker",
"api_key": "sk-xxxxx",
"base_url": "xxx"
}
}
```
响应:
```json