Skip to main content
POST
/
llm-application
/
open
/
knowledge
创建知识库
curl --request POST \
  --url https://open.bigmodel.cn/api/llm-application/open/knowledge \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "embedding_id": 3,
  "name": "<string>",
  "embedding_model": "Embedding-2",
  "contextual": 0,
  "description": "<string>",
  "background": "<string>",
  "icon": "<string>"
}
'
{
  "data": {
    "id": "<string>"
  },
  "code": 123,
  "message": "<string>",
  "timestamp": 123
}

Authorizations

Authorization
string
header
required

使用以下格式进行身份验证:Bearer

Body

application/json
embedding_id
enum<integer>
required

知识库绑定的向量化模型ID。可选值:

  • 3: Embedding-2
  • 11: Embedding-3
  • 12: Embedding-3-pro
Available options:
3,
11,
12
name
string
required

知识库名称

embedding_model
enum<string>

知识库绑定的向量化模型code。可选值:

  • Embedding-2
  • Embedding-3
  • Embedding-3-pro
Available options:
Embedding-2,
Embedding-3,
Embedding-3-pro
contextual
enum<integer>

是否开启上下文增强

Available options:
0,
1
description
string

知识库描述

background
string

背景颜色,可选:blue, red, orange, purple, sky, green, yellow,默认blue

icon
string

知识库图标,可选:question, book, seal, wrench, tag, horn, house,默认question

Response

业务处理成功

data
object
code
integer

响应码,200为成功

message
string

响应信息

timestamp
integer

响应时间戳