Skip to content

feat:增加插件-知识库引用-自定义引用模板 #4689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shikaiwei1
Copy link
Contributor

该插件脱离AI 对话插件,独立整理知识库的引用输出格式。可用于多个知识库搜索节点并行搜索后,自定义组合每个知识库引用输出的提示词,并在最后的prompt部分拼接。

功能:

  • 知识库item的拼接模板定义(同AI对话节点中的知识库模板)
  • 前缀、后缀添加
  • tokens数量限制
  • 知识库未查询到内容时,输出空字符串(避免在无任何知识的情况下,前缀\后缀中的提示词对模型输出造成负面影响)

参数:

  • knowledges:知识库引用内容
  • template:item模板内容
  • prefix:前缀,增加在items内容的前端
  • suffix:后缀,增加在items内容后
  • maxTokens:最大引用Tokens数量。如果为-1则不限制,否则将引用到tokens超出限制的上一条item内容为止。

该插件脱离AI 对话插件,独立整理知识库的引用输出格式。可用于过个知识库搜索节点并行搜索后,自定义组合每个知识库引用输出的提示词,并在最后的prompt部分拼接。
功能:
- 知识库item的拼接模板定义(同AI对话节点中的知识库模板)
- 前缀、后缀添加
- tokens数量限制
- 知识库未查询到内容时,输出空字符串(避免在无任何知识的情况下,前缀\后缀中的提示词对模型输出造成负面影响)

参数:
- knowledges:知识库引用内容
- template:item模板内容
- prefix:前缀,增加在items内容的前端
- suffix:后缀,增加在items内容后
- maxTokens:最大引用Tokens数量。如果为-1则不限制,否则将引用到tokens超出限制的上一条item内容为止。
Copy link
Contributor

gru-agent bot commented Apr 28, 2025

TestGru Assignment

Summary

Link CommitId Status Reason
Detail 30878dd 🚫 Skipped No files need to be tested {"packages/plugins/src/knowledgeTemplate/template.json":"target file(packages/plugins/src/knowledgeTemplate/template.json) not in work scope \n include: projects/app/src//*.ts \n exclude: node_modules,/.test.ts,**/.test.tsx,/*.spec.ts,/.spec.tsx,**/.d.ts,/*.test.js,/*.spec.js"}

Tip

You can @gru-agent and leave your feedback. TestGru will make adjustments based on your input

Copy link

Preview mcp_server Image: ghcr.io/labring/fastgpt-pr:fatsgpt_mcp_server_30878dde299a1c1f88563f9cbbd7bf7070693277

Copy link

Preview sandbox Image: ghcr.io/labring/fastgpt-pr:fatsgpt_sandbox_30878dde299a1c1f88563f9cbbd7bf7070693277

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant