mirror of
https://github.com/langgenius/dify-docs-archived.git
synced 2026-07-25 05:25:44 -04:00
聊天助手怎么实现用户登录然后保存聊天历史? #80
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @J7503303 on GitHub (Mar 1, 2025).
类似ChatGPT或者OpenWebUI那样,支持用户登录,有聊天历史
@dosubot[bot] commented on GitHub (Mar 1, 2025):
@ganjiayi 你好!我是一个可以帮助您解决问题、回答疑问,并成为贡献者的机器人。在等待人类维护者的过程中,我会尽力帮助您。
在 dify-docs 代码库中,用户登录和聊天历史的实现如下:
用户登录:dify-docs 支持多种用户登录方法,包括电子邮件和密码(社区版和 Dify Premium)、GitHub 账号授权(云版本)、Google 账号授权(云版本)以及 SSO 登录(企业版)[1][2]。
聊天历史存储和检索:dify-docs 提供了 API 端点用于检索聊天历史。可以在“Logs & Ann.”页面查看所有对话记录。通过 API,可以与 AI 应用程序交互,并使用对话 ID 继续聊天或检索过去的消息。要开始新对话,请将
conversation_id字段留空,系统会生成一个新的conversation_id。对于持续的交互,请包含现有的conversation_id以保持对话的连续性[3][4]。这些功能使得 dify-docs 能够支持用户登录并保存聊天历史,类似于 ChatGPT 或 OpenWebUI。
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
@AllenWriter commented on GitHub (Mar 2, 2025):
Hi, the Dify main project doesn't support the function you mentioned. Welcome to contribute code!