FastGPT icon

FastGPT

AI智能客服平台

知识库 → 创建一个知识库

AI-generated

Summary

Creates a FastGPT knowledge base or folder by sending a POST to /core/dataset/create with a name, optional intro and avatar, and optional model settings.

Inputs

  • 类型 (type) — Whether to create a regular knowledge base ('dataset', the default) or a folder ('folder'). Sent as type.
  • 名称 (knowledgeName) (required) — Name of the knowledge base or folder. Sent as name.
  • 简介 (knowledgeIntro) — Short description. Sent as intro.
  • 头像地址 (knowledgeAvatar) — URL of the avatar image. Sent as avatar.
  • 选项 > 父级知识库ID (parentId) — ID of the parent folder to create this item under. If you leave it empty, the request doesn't say where the item goes, and the source doesn't show how the API handles that.
  • 选项 > 向量模型 (vectorModel) — Embedding model name, e.g. text-embedding-ada-002. Leave empty to use the system default.
  • 选项 > 文本处理模型 (agentModel) — Text-processing model name, e.g. gpt-3.5-turbo-16k. Leave empty to use the system default.
  • 选项 > 图片理解模型 (vlmModel) — Image-understanding model name, e.g. gpt-4.1. Leave empty to use the system default.
  • Request Options — Node-level settings: batching (items per batch and interval), ignore SSL errors, proxy, and timeout (default 10000 ms).

Output shape

The parsed JSON response body from the FastGPT API, returned as the node's output item. The source doesn't show its fields. FastGPT normally returns the new item's ID in data, but that is not confirmed here.

The node throws a NodeApiError if the HTTP status is 4xx or 5xx, or if the response body has a code other than 200. The error message comes from the response's message. HTTP status errors are not suppressed by the request defaults. The request uses the base URL from the fastGPTApi credentials.

Examples

Example 1: Create a regular knowledge base with default models

类型=普通知识库, 名称='Product FAQ', 简介='Support answers'; leave Options empty.

Example 2: Create a folder to organize knowledge bases

类型=文件夹, 名称='Customer Support'.

Example 3: Create a knowledge base inside a folder with a specific embedding model

类型=普通知识库, 名称='Billing Docs', Options: 父级知识库ID=, 向量模型=text-embedding-ada-002.

Links

Discussion