Skip to content
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

feat: Add custom prompt support for knowledge base #1757

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

Conversation

bfdyanshe
Copy link
Contributor

#1735 的修改。

image

@bfdyanshe bfdyanshe force-pushed the feature/promptConfig branch 3 times, most recently from 78b22ca to 6d89190 Compare February 16, 2025 07:08
@bfdyanshe bfdyanshe requested a review from kangfenmao February 17, 2025 05:41
@kangfenmao
Copy link
Collaborator

有代码冲突需要解决

@bfdyanshe
Copy link
Contributor Author

有代码冲突需要解决

看了下,最近的修改增加了多知识库查询的逻辑。那么如果在知识库层面自定义 prompt 不好选择了。还是改成在会话层面定义知识库查询的 prompt 吧,你觉得怎么样?

@bfdyanshe
Copy link
Contributor Author

有代码冲突需要解决

看了下,最近的修改增加了多知识库查询的逻辑。那么如果在知识库层面自定义 prompt 不好选择了。还是改成在会话层面定义知识库查询的 prompt 吧,你觉得怎么样?

或者在创建智能体的时候提供一个自定义知识库提示词模板的选项也可以

@kangfenmao
Copy link
Collaborator

可能需要在全局设置里面开辟一个板块专门设置知识库,提示词一次修改可以对所有知识库生效

@bfdyanshe
Copy link
Contributor Author

可能需要在全局设置里面开辟一个板块专门设置知识库,提示词一次修改可以对所有知识库生效

可以

@bfdyanshe bfdyanshe force-pushed the feature/promptConfig branch from 6d89190 to 17ea1d4 Compare February 17, 2025 13:38
@bfdyanshe
Copy link
Contributor Author

可能需要在全局设置里面开辟一个板块专门设置知识库,提示词一次修改可以对所有知识库生效

改好了。目前的逻辑是设置的模板不能为空,保存时如果没有设置好变量会提示。

image

image

image

@kangfenmao
Copy link
Collaborator

好的,下个版本合并

@kangfenmao
Copy link
Collaborator

我想把各种 prompt 全部集合到一个地方设置,等我加一个模块,把这个设置也放到一起

@bfdyanshe
Copy link
Contributor Author

我想把各种 prompt 全部集合到一个地方设置,等我加一个模块,把这个设置也放到一起

可以。另外我想我们要不要提供一个轻量的 prompt 管理功能。现在我日常用到很多重复的prompt都是通过剪贴板,不是很方便。

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

Successfully merging this pull request may close these issues.

2 participants