iframe嵌入到网站,能不能设置user属性,能不能会话列表一同展示 #70

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

Originally created by @zy0606 on GitHub (Feb 20, 2025).

我使用iframe方式嵌入到我的网站,能不能设置user属性,然后让会话历史列表一同展示???
就像应用的“预览”效果一样,左侧是会话历史列表,中间是对话框

Image

Originally created by @zy0606 on GitHub (Feb 20, 2025). 我使用iframe方式嵌入到我的网站,能不能设置user属性,然后让会话历史列表一同展示??? 就像应用的“预览”效果一样,左侧是会话历史列表,中间是对话框 ![Image](https://github.com/user-attachments/assets/6a8616e4-39ca-495a-ac5b-ab04909cb520)
yindo added the question label 2026-02-16 11:19:40 -05:00
yindo closed this issue 2026-02-16 11:19:40 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Feb 20, 2025):

@zy0606 你好!我是Dosu,一个能帮你解决问题、回答疑问并成为贡献者的机器人。在等待人类维护者的期间,我将会提供帮助。

在使用 iframe 嵌入 Dify 聊天界面时,可以通过 window.difyChatbotConfiginputs 对象来设置用户属性。例如:

window.difyChatbotConfig = {
    inputs: {
        name: 'apple',
    },
}

这些输入会被处理后附加到 iframe 的 URL 中 [1]

关于会话历史列表的展示,目前在 dify-docs 中没有找到相关的文档或示例说明如何在嵌入的聊天界面中同时展示会话历史列表 [1][2][3]。如果需要类似应用“预览”效果的布局,可能需要自定义开发或使用其他工具来实现。

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 (Feb 20, 2025): <!-- Greeting --> @zy0606 你好!我是[Dosu](https://dosu.dev),一个能帮你解决问题、回答疑问并成为贡献者的机器人。在等待人类维护者的期间,我将会提供帮助。 <!-- Answer --> 在使用 iframe 嵌入 Dify 聊天界面时,可以通过 `window.difyChatbotConfig` 的 `inputs` 对象来设置用户属性。例如: ```javascript window.difyChatbotConfig = { inputs: { name: 'apple', }, } ``` 这些输入会被处理后附加到 iframe 的 URL 中 <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/en/guides/application-publishing/embedding-in-websites.md)</sup>。 关于会话历史列表的展示,目前在 dify-docs 中没有找到相关的文档或示例说明如何在嵌入的聊天界面中同时展示会话历史列表 <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/en/guides/application-publishing/embedding-in-websites.md)</sup><sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/guides/application-publishing/embedding-in-websites.md)</sup><sup>[[3]](https://github.com/langgenius/dify-docs/blob/main/en/learn-more/use-cases/how-to-integrate-dify-chatbot-to-your-wix-website.md)</sup>。如果需要类似应用“预览”效果的布局,可能需要自定义开发或使用其他工具来实现。 <!-- 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/51c4a6e1-fb6d-4de3-9323-b845c146fcb2?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/51c4a6e1-fb6d-4de3-9323-b845c146fcb2?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/51c4a6e1-fb6d-4de3-9323-b845c146fcb2?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/51c4a6e1-fb6d-4de3-9323-b845c146fcb2?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/51c4a6e1-fb6d-4de3-9323-b845c146fcb2?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/51c4a6e1-fb6d-4de3-9323-b845c146fcb2?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/51c4a6e1-fb6d-4de3-9323-b845c146fcb2?feedback_type=other)</sup>
Author
Owner

@zy0606 commented on GitHub (Feb 20, 2025):

我要的是会话历史列表的用户设置,类似于后端API

Image

我是想iframe嵌入网站,是根据我设置的用户来进行聊天的

@zy0606 commented on GitHub (Feb 20, 2025): 我要的是会话历史列表的用户设置,类似于后端API ![Image](https://github.com/user-attachments/assets/16fe6cbe-0797-4dbc-bc1d-497f42392c40) 我是想iframe嵌入网站,是根据我设置的用户来进行聊天的
Author
Owner

@zy0606 commented on GitHub (Mar 6, 2025):

iframe嵌入到网站,可以传用户标识用来记录用户的会话列表,还有能不能传自定义的变量,用来工作流中的http节点鉴权使用?
@crazywoola

@zy0606 commented on GitHub (Mar 6, 2025): iframe嵌入到网站,可以传用户标识用来记录用户的会话列表,还有能不能传自定义的变量,用来工作流中的http节点鉴权使用? @crazywoola
Author
Owner

@CHub-zn commented on GitHub (Apr 17, 2025):

请问下iframe嵌入到网站,是怎么传用户标识user用来记录用户的会话列表 @zy0606

@CHub-zn commented on GitHub (Apr 17, 2025): 请问下iframe嵌入到网站,是怎么传用户标识user用来记录用户的会话列表 @zy0606
Author
Owner

@kalarita commented on GitHub (Apr 24, 2025):

langgenius/dify#14703

@kalarita commented on GitHub (Apr 24, 2025): langgenius/dify#14703
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-docs-archived#70