dify icon indicating copy to clipboard operation
dify copied to clipboard

[feat] Embed Workflow in webapp by embed.min.js

Open Weaxs opened this issue 1 year ago • 2 comments

Self Checks

  • [X] I have searched for existing issues search for existing issues, including closed ones.
  • [X] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [X] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [X] Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

I want to embed workflow in website. Embed the workflow into the website, with parameters taken from values on the web page, such as the current page.

2. Additional context or comments

I see web/app/components/app/overview/embedded/index.tsx.

It is only support ${url}/chatbot/${token}, maybe should be compatible with workflow?

3. Can you help us with this feature?

  • [ ] I am interested in contributing to this feature.

Weaxs avatar Jul 23 '24 07:07 Weaxs

I want to use workflow and embed it in webapp, like kimi Copilot image

Weaxs avatar Jul 26 '24 12:07 Weaxs

Agent is already supported by embed.min.js script, but workflow only can be used by iframe now.

Weaxs avatar Jul 26 '24 12:07 Weaxs

web/app/components/app/overview/embedded/index.tsx

I don't like iframe either since it will expose url.

How are you embedding the chatbot/agent/workflow currently?

taowang1993 avatar Sep 12 '24 16:09 taowang1993

I have not solved it.

I wanted try to support before, but not started development yet.

maybe you can help to support it If you have spare time ? 👀

web/app/components/app/overview/embedded/index.tsx

I don't like iframe either since it will expose url.

How are you embedding the chatbot/agent/workflow currently?

Weaxs avatar Sep 13 '24 05:09 Weaxs

where is the embed.min.js?

is this approach going to expose the api key?

taowang1993 avatar Sep 13 '24 19:09 taowang1993

Huỳnh Thể Hồng

Vào Th 3, 23 thg 7, 2024 lúc 14:44 Weaxs @.***> đã viết:

Self Checks

  1. Is this request related to a challenge you're experiencing? Tell me about your story.

I want to embed workflow in website. Embed the workflow into the website, with parameters taken from values on the web page, such as the current page. 2. Additional context or comments

I see web/app/components/app/overview/embedded/index.tsx https://github.com/langgenius/dify/blob/main/web/app/components/app/overview/embedded/index.tsx .

It is only support ${url}/chatbot/${token}, maybe should be compatible with workflow? 3. Can you help us with this feature?

  • I am interested in contributing to this feature.

— Reply to this email directly, view it on GitHub https://github.com/langgenius/dify/issues/6568, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCUATVCJUWTGSGQW44R44Y3ZNYCXXAVCNFSM6AAAAABLJ226EOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQZDINJQGE3DGNQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

rosehuynh92 avatar Sep 13 '24 19:09 rosehuynh92

where is the embed.min.js?

is this approach going to expose the api key?

https://github.com/langgenius/dify/blob/main/web/public/embed.min.js

token is SiteConfig.access_token at https://github.com/langgenius/dify/blob/main/web/types/app.ts I guess.

It's different with api key.

Weaxs avatar Sep 14 '24 06:09 Weaxs