Create(创建知识库)
POST
/302/kb/create_knowledge_base创建知识库
model_id:
35: text-embedding-3-large
36: text-embedding-3-small
37: text-embedding-ada-002
76: Baichuan-Text-Embedding
118: zhipu-embedding-2
163: jina-clip-v1
164: jina-embeddings-v2-base-en
165: jina-embeddings-v2-base-es
166: jina-embeddings-v2-base-de
167: jina-embeddings-v2-base-zh
168: jina-embeddings-v2-base-code
186: BAAI/bge-large-zh-v1.5
187: BAAI/bge-large-en-v1.5
208: netease-youdao/bce-embedding-base_v1
llm_model_id:
44: claude-3-haiku-20240307
112: deepseek-chat
115: qwen-long
117: glm-4-flash
159: gemini-1.5-flash-001
174: google/gemma-2-27b-it
176: gpt-4o-mini-2024-07-18
251: qwen2.5-72b-instruct
价格:免费
请求参数
Header 参数
Authorization
string
可选
示例值:
Bearer {{YOUR_API_KEY}}
Body 参数application/json
kb_name
string
知识库名称
知识库名称
kb_info
string
知识库描述
知识库描述
kb_type
string
知识库类别
chatchat或rag_nano chatchat是传统的向量知识库 rag_nano 是基于知识图谱的知识库
model_id
integer
embedding模型id
embedding数据处理模型,可不填
llm_model_id
integer
知识图谱化模型id
LLM模型,可不填
示例
{
"kb_name": "知识库标题",
"kb_info": "知识库描述",
"kb_type": "chatchat",
"model_id": 0,
"llm_model_id": 0
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: Rawtext/plain
示例
{
"code": 0,
"msg": "success",
"data": {
"llm_model": null,
"kb_name": "知识库-20240920-2",
"kb_info": "知识库-20240920-2",
"file_count": 0,
"create_time": "2024-09-20T07:24:11Z",
"id": 0,
"token_id": 0,
"type": null,
"uid": 0,
"embed_model": "jina-clip-v1",
"vs_type": "pg"
}
}
最后修改时间: 2 个月前