Skip to content

https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4#

title: Token Splitter节点文档 description: 学习如何在n8n中使用Token Splitter节点。遵循技术文档将Token Splitter节点集成到您的工作流中。 contentType: [integration, reference] priority: medium


Token Splitter 节点#

Token Splitter 节点通过先将原始文本字符串转换为 BPE 令牌,然后将这些令牌分割成文本块,最后将单个文本块内的令牌转换回文本来实现文本分割。

本页将介绍 Token Splitter 节点的参数配置,并提供更多资源链接。

/// 注意 | 子节点中的参数解析 子节点在使用表达式处理多个项目时的行为与其他节点不同。

大多数节点(包括根节点)会接收任意数量的输入项,处理这些项目,然后输出结果。您可以使用表达式来引用输入项,节点会依次为每个项目解析表达式。例如,给定五个 name 值作为输入,表达式 {{ $json.name }} 会依次解析为每个名称。

而在子节点中,表达式总是解析为第一个项目。例如,给定五个 name 值作为输入,表达式 {{ $json.name }} 总是解析为第一个名称。 ///

节点参数#

  • 分块大小:输入每个文本块的字符数量
  • 分块重叠量:输入文本块之间的重叠量

模板与示例#

🤖 AI Powered RAG Chatbot for Your Docs + Google Drive + Gemini + Qdrant

by Joseph LePage

View template details
AI Voice Chatbot with ElevenLabs & OpenAI for Customer Service and Restaurants

by Davide

View template details
Complete business WhatsApp AI-Powered RAG Chatbot using OpenAI

by Davide

View template details
Browse Token 分割器 integration templates, or search all templates

相关资源#

更多关于该服务的信息,请参阅 LangChain 令牌文档LangChain 文本分割器文档

查看 n8n 的高级 AI 文档。

AI glossary#

  • completion: Completions are the responses generated by a model like GPT.
  • hallucinations: Hallucination in AI is when an LLM (large language model) mistakenly perceives patterns or objects that don't exist.
  • vector database: A vector database stores mathematical representations of information. Use with embeddings and retrievers to create a database that your AI can access when answering questions.
  • vector store: A vector store, or vector database, stores mathematical representations of information. Use with embeddings and retrievers to create a database that your AI can access when answering questions.