FastGPT icon

FastGPT

AI智能客服平台

集合 → 创建一个链接集合

AI-generated

Summary

Creates a FastGPT knowledge-base collection from a web URL by POSTing to /core/dataset/collection/create/link. FastGPT fetches the page, extracts its text and splits it into chunks or QA pairs for training.

Inputs

  • datasetParentId — Parent folder ID, copied from the FastGPT browser URL. Sent as body.parentId. Leave empty for the root.
  • datasetKnowledgeId — Target knowledge base, chosen from a dropdown loaded from /core/dataset/list (filtered to type 'dataset' using the parent ID). Sent as datasetId.
  • datasetLink — The web page URL to crawl. Sent as body.link. Not marked required in the UI, but the operation is pointless without it.
  • datasetWebPageSelector — CSS selector (e.g. .docs-content) limiting extraction to matching elements. Sent as metadata.webPageSelector.
  • datasetTrainingType (required) — 'chunk' (split by text length, default) or 'qa' (QA split). 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.
  • requestOptions — Request settings: batching (items per batch, interval), ignore SSL issues, proxy, and timeout (default 10000 ms).

Output shape

The parsed JSON response from FastGPT's create/link endpoint, one item per input item. It typically holds the new collection's details, but the exact fields are not defined in the node.

The node ignores HTTP status errors and then runs a post-receive check. It throws a NodeApiError if the HTTP status is 4xx/5xx or the response body's code is not 200, using the response message. Requires the fastGPTApi credential, which supplies the base URL.

Examples

Example 1: Index a documentation page into an existing knowledge base, using only its main content area.

Select the knowledge base; datasetLink=https://docs.example.com/guide; datasetWebPageSelector=.docs-content; trainingType=chunk; chunkSize=3000.

Example 2: Crawl a FAQ page and turn it into QA pairs inside a folder.

datasetParentId=; select the knowledge base; datasetLink=https://example.com/faq; trainingType=qa; optional datasetQAPrompt.

Links

Discussion