dify icon indicating copy to clipboard operation
dify copied to clipboard

The "inputs" field in the embedded app does not work

Open HaiShin opened this issue 2 years ago • 2 comments

Self Checks

  • [X] This is only for bug report, if you would like to ask a question, please head to Discussions.
  • [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] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [X] Please do not modify this template :) and fill in all the required fields.

Dify version

0.11.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When I use the Inputs field in difyChatbotConfig in the embedded app, I find that it only generates a request link in the chatbot that generates the iframe, but does not do any further operations in the background code. I wonder if the role of this field should be related to the inputs field of the user-defined chat application.

✔️ Expected Behavior

I hope that the inputs field can interact with the message inputs request and be changeable, rather than being hard-coded in the conversation table.

❌ Actual Behavior

No further action is taken on the inputs field.

HaiShin avatar Nov 26 '24 06:11 HaiShin

https://github.com/langgenius/dify/pull/7955

HaiShin avatar Nov 26 '24 06:11 HaiShin

I found a similar unsolved discussion that might be relevant to your issue: In chat-messages, the dialog "inputs:{} cannot be passed in the second time, which was last updated on October 31, 2024 [1].

Regarding your issue with the 'inputs' field in the embedded app, the 'inputs' field is intended to allow the configuration of input variables that can be passed to the Dify chatbot. These inputs are processed, compressed using GZIP, and encoded in base64 before being appended to the URL used by the chatbot [2][3].

The processing of the 'inputs' field in the embedded app is handled by the useEmbeddedChatbot hook, specifically through functions like inputsForms and handleNewConversationInputsChange. These functions manage the data passed through the 'inputs' field, ensuring it is structured and validated correctly [4].

If the 'inputs' field is not interacting as expected, it might be worth checking the implementation of these functions to ensure they are correctly processing and updating the input values. Additionally, ensure that the input types and values conform to the expected formats and constraints as defined in the documentation [2][3].

To continue talking to Dosu, mention @dosu.

dosubot[bot] avatar Nov 26 '24 06:11 dosubot[bot]