FastGPT icon

FastGPT

AI智能客服平台

数据 → 推送数据到训练队列

AI-generated

Summary

Pushes a batch of up to 200 q/a records into a FastGPT knowledge-base collection's training queue for vectorization, via POST /core/dataset/data/pushData.

Inputs

  • 集合ID (dataCollectionId) (required) — ID of the target collection in the knowledge base; sent as body collectionId.
  • 训练类型 (dataPushTrainingType) (required) — Training mode: chunk (split by text length, default) or qa (QA splitting). Sent as trainingType.
  • QA拆分引导词 (dataPushPrompt) — Custom QA-splitting prompt, sent as prompt. Must follow the template strictly; ignored in chunk mode; the field description recommends leaving it empty.
  • 订单ID (dataPushBillId) — Training order/bill ID sent as billId, to aggregate this push into one order. Can be reused; obtain it from the knowledge resource's 创建训练订单 operation.
  • 数据列表 (dataPushData) (required) — JSON array of up to 200 items. Each has q (required), optional a, and optional indexes (array of {text}). Default is [{"q":"","a":""}]. If the value is a string it is parsed as JSON; if parsing fails, an empty array is sent.
  • Request Options — Standard n8n 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 pushData endpoint, returned as the node's output item(s).

The node throws a NodeApiError if the HTTP status is 4xx/5xx or the response body's code is not 200; the error message comes from the response's message. The exact fields of a successful response are not defined in the node source.

Examples

Example 1: Add FAQ pairs to an existing collection for chunk-based training.

集合ID=, 训练类型=chunk, 数据列表=[{"q":"你是谁?","a":"我是助手"}]

Example 2: Push records with QA splitting and group billing under one order.

训练类型=qa, 订单ID=<billId from 创建训练订单>, 数据列表=JSON array with q text

Example 3: Push data built from earlier workflow nodes.

数据列表 set as an expression, e.g. {{ JSON.stringify($json.records) }}, with at most 200 items per call

Links

Discussion