FastGPT icon

FastGPT

AI智能客服平台

集合 → 创建一个纯文本集合

AI-generated

Summary

Creates a FastGPT dataset collection from pasted plain text by POSTing to /core/dataset/collection/create/text; FastGPT splits the text into chunks or QA pairs for training.

Inputs

  • datasetParentId — Parent folder ID (copied from the FastGPT browser URL). Sent as parentId. It also filters the knowledge base dropdown.
  • datasetKnowledgeId — Target knowledge base, picked from a list loaded from /core/dataset/list. Sent as datasetId. The properties don't mark it required, but a collection needs a target dataset.
  • datasetName (required) — Collection name. The field's own hint suggests using the file name.
  • datasetTrainingType (required) — Either 'chunk' (split by text length, the default) or 'qa' (QA splitting). Sent as trainingType.
  • datasetChunkSize — Chunk length, default 3000. Shown only when the training type is chunk. Sent as chunkSize.
  • datasetChunkSplitter — Custom highest-priority split delimiter. Shown only when the training type is chunk. Sent as chunkSplitter.
  • datasetQAPrompt — Custom prompt for QA splitting. Shown only when the training type is qa. Sent as qaPrompt.
  • datasetText — The raw text content of the collection. Sent as text.
  • requestOptions — Node-level options: batching (items per batch, interval), ignore SSL issues, proxy, and timeout (default 10000 ms).

Output shape

The FastGPT API JSON response for the create-text call, returned as the item's output.

A non-2xx HTTP status, or a body code other than 200, raises a node error carrying the API message. The exact response fields aren't defined in the node, so the API result is passed through as-is. Requires the fastGPTApi credential, which supplies the base URL.

Examples

Example 1: Import a text snippet as a chunked collection in a knowledge base

Select the knowledge base, set the name to 'FAQ', set the training type to chunk, leave Chunk length at 3000, and map the text into 原文本.

Example 2: Generate QA pairs from meeting notes

Set the training type to QA拆分, optionally fill the QA custom prompt, and set 原文本 to {{$json.notes}}.

Links

Discussion