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

api支持多轮对话吗,也就是记忆管理 #5152

Open
crazyegg111 opened this issue Dec 24, 2024 · 1 comment
Open

api支持多轮对话吗,也就是记忆管理 #5152

crazyegg111 opened this issue Dec 24, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@crazyegg111
Copy link

如果有的话,如何请求呢?

@crazyegg111 crazyegg111 added the bug Something isn't working label Dec 24, 2024
Copy link

dosubot bot commented Dec 24, 2024

Hey @crazyegg111! I'm here to help you with any issues or questions you have. Feel free to ask me anything!

Langchain-Chatchat 确实支持多轮对话的记忆管理。它通过 ConversationBufferDBMemory 类来管理对话历史。这个类会从数据库中获取消息,维护一个消息缓冲区,并在必要时修剪消息以保持在指定的 token 限制内 [1].

关于如何请求使用这个功能,虽然具体的 API 请求参数或头信息在文档中没有明确提到,但可以通过设置 --history_len 参数来调整对话历史的长度,从而支持多轮对话 [2].

如果需要进一步的实现细节或示例代码,可以查看 conversation_db_buffer_memory.py 文件中的实现 [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant