FastGPT icon

FastGPT

AI智能客服平台

Overview

This node integrates with the FastGPT AI customer service platform, specifically focusing on managing datasets (collections of files or knowledge). The "创建一个文件集合" (Create a File Collection) operation allows users to create a new file-based dataset collection within FastGPT. This is useful for organizing and training AI models on specific document sets such as PDFs, Word documents, markdown files, etc.

Typical use cases include:

  • Uploading and structuring company documents for AI-powered search or Q&A.
  • Creating collections of files for machine learning model training.
  • Organizing knowledge bases by grouping related files into collections.

For example, a user might create a file collection containing all product manuals in PDF format to enable an AI assistant to answer product-related questions.

Properties

Name Meaning
父级目录ID The ID of the parent folder in FastGPT where the new file collection will be created.
选择知识库 Selects the knowledge base under which the collection will be created. Options are dynamically loaded based on the parent directory ID.
文件字段名 The file type field name indicating the supported file formats for the collection. Supported types: pdf, docx, md, txt, html, csv. Required.
训练类型 Training type for processing the collection. Options: "按文本长度进行分割" (chunk - split by text length), "QA拆分" (qa - QA splitting). Required.
Chunk长度 The chunk size length used when the training type is "chunk". Default is 3000 characters.
QA拆分自定义提示词 Custom prompt used when the training type is "qa" (QA splitting).

Output

The node outputs JSON data representing the result of the file collection creation request. This typically includes metadata about the newly created dataset collection such as its ID, name, and status. The exact structure depends on the FastGPT API response but generally confirms successful creation or provides error details.

No binary data output is indicated for this operation.

Dependencies

  • Requires an API key credential for authenticating with the FastGPT platform.
  • The node sends HTTP POST requests to FastGPT endpoints, so network connectivity and correct base URL configuration are necessary.
  • Dynamic loading of knowledge base options depends on providing a valid parent directory ID.

Troubleshooting

  • Invalid Parent Directory ID: If the provided parent directory ID is incorrect or missing, the node may fail to load knowledge base options or create the collection. Verify the ID by opening the folder in FastGPT and copying the browser's ID.
  • Unsupported File Field Name: Only certain file types are supported (pdf, docx, md, txt, html, csv). Using unsupported types may cause errors.
  • Missing Required Fields: Ensure required properties like "文件字段名" and "训练类型" are set; otherwise, the request will be rejected.
  • API Authentication Errors: Check that the API key credential is correctly configured and has sufficient permissions.
  • Chunk Size Misconfiguration: When using "chunk" training type, ensure the chunk size is a positive number; otherwise, the server may reject the request.

Links and References

  • FastGPT Official Documentation (replace with actual URL)
  • FastGPT API reference for dataset management (not publicly included here)
  • n8n documentation on creating custom nodes and handling dynamic options

Discussion