聊天助手怎么实现用户登录然后保存聊天历史? #80

Closed
opened 2026-02-16 11:19:42 -05:00 by yindo · 2 comments
Owner

Originally created by @J7503303 on GitHub (Mar 1, 2025).

类似ChatGPT或者OpenWebUI那样,支持用户登录,有聊天历史

Originally created by @J7503303 on GitHub (Mar 1, 2025). 类似ChatGPT或者OpenWebUI那样,支持用户登录,有聊天历史
yindo added the enhancement label 2026-02-16 11:19:42 -05:00
yindo closed this issue 2026-02-16 11:19:42 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 1, 2025):

@ganjiayi 你好!我是一个可以帮助您解决问题、回答疑问,并成为贡献者的机器人。在等待人类维护者的过程中,我会尽力帮助您。

在 dify-docs 代码库中,用户登录和聊天历史的实现如下:

  1. 用户登录:dify-docs 支持多种用户登录方法,包括电子邮件和密码(社区版和 Dify Premium)、GitHub 账号授权(云版本)、Google 账号授权(云版本)以及 SSO 登录(企业版)[1][2]

  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

@dosubot[bot] commented on GitHub (Mar 1, 2025): <!-- Greeting --> @ganjiayi 你好!我是一个可以帮助您解决问题、回答疑问,并成为贡献者的机器人。在等待人类维护者的过程中,我会尽力帮助您。 <!-- Answer --> 在 dify-docs 代码库中,用户登录和聊天历史的实现如下: 1. **用户登录**:dify-docs 支持多种用户登录方法,包括电子邮件和密码(社区版和 Dify Premium)、GitHub 账号授权(云版本)、Google 账号授权(云版本)以及 SSO 登录(企业版)<sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/en/guides/management/personal-account-management.md)</sup><sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/jp/guides/management/personal-account-management.md)</sup>。 2. **聊天历史存储和检索**:dify-docs 提供了 API 端点用于检索聊天历史。可以在“Logs & Ann.”页面查看所有对话记录。通过 API,可以与 AI 应用程序交互,并使用对话 ID 继续聊天或检索过去的消息。要开始新对话,请将 `conversation_id` 字段留空,系统会生成一个新的 `conversation_id`。对于持续的交互,请包含现有的 `conversation_id` 以保持对话的连续性<sup>[[3]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/learn-more/use-cases/build-an-notion-ai-assistant.md)</sup><sup>[[4]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/guides/application-publishing/developing-with-apis.md)</sup>。 这些功能使得 dify-docs 能够支持用户登录并保存聊天历史,类似于 ChatGPT 或 OpenWebUI。 <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/ba7a7e8d-22a7-4f1e-9ad1-60736d6f8c26?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/ba7a7e8d-22a7-4f1e-9ad1-60736d6f8c26?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/ba7a7e8d-22a7-4f1e-9ad1-60736d6f8c26?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/ba7a7e8d-22a7-4f1e-9ad1-60736d6f8c26?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/ba7a7e8d-22a7-4f1e-9ad1-60736d6f8c26?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/ba7a7e8d-22a7-4f1e-9ad1-60736d6f8c26?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/ba7a7e8d-22a7-4f1e-9ad1-60736d6f8c26?feedback_type=other)</sup>
Author
Owner

@AllenWriter commented on GitHub (Mar 2, 2025):

Hi, the Dify main project doesn't support the function you mentioned. Welcome to contribute code!

@AllenWriter commented on GitHub (Mar 2, 2025): Hi, the Dify main project doesn't support the function you mentioned. Welcome to contribute code!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-docs-archived#80