---
title: "编辑知识库"
method: PUT
path: "/llm-application/open/knowledge/{id}"
tags: ["知识库 API"]
---

# 编辑知识库

`PUT /llm-application/open/knowledge/{id}`

用于编辑已经创建好的个人知识库，仅传入要修改的字段。点击 **Try it** 按钮可快速试用。

## Path parameters

- `id` string, required

## Request body

- KnowledgeEditRequest
  - `embedding_id` 3 | 11 | 12 — 知识库绑定的向量化模型ID。可选值： - 3: Embedding-2 - 11: Embedding-3 - 12: Embedding-3-pro
  - `embedding_model` 'Embedding-2' | 'Embedding-3' | 'Embedding-3-pro' — 知识库绑定的向量化模型code。可选值： - Embedding-2 - Embedding-3 - Embedding-3-pro
  - `contextual` 0 | 1 — 是否开启上下文增强
  - `name` string — 知识库名称
  - `description` string — 知识库描述
  - `background` string — 背景颜色，可选：blue, red, orange, purple, sky, green, yellow
  - `icon` string — 知识库图标，可选：question, book, seal, wrench, tag, horn, house
  - `callback_url` string — 回调地址（若修改向量模型，则需要重新构建知识，由客户决定是否单独配置回调）
  - `callback_header` object — 回调时header携带的k-v（若修改向量模型，则需要重新构建知识，由客户决定是否单独配置回调）

## Response `200`

业务处理成功

- KnowledgeEditResponse
  - `code` integer — 响应码，200为成功
  - `message` string — 响应信息
  - `timestamp` integer — 响应时间戳

## Other responses

- `default` — 请求失败。

---

[API](https://skmtc.net/bigmodel/apis/zhipu-ai-api.md) · [All operations](https://skmtc.net/bigmodel/apis/zhipu-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bigmodel/zhipu-ai-api/revisions/37de2d7b73de/schema)
