langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
51.78k stars 7.5k forks source link

one more input file variable in webApp, just one file in request body #10542

Open keenouter opened 5 days ago

keenouter commented 5 days ago

Self Checks

Dify version

0.11.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

1731315268562

i have upload two files, but the RUN just put one file in the requests body

if required file input and Optional file input, first upload required file input,then upload optional file input, the error is the required file not exist。

✔️ Expected Behavior

put all the file variable in the workflow request body

❌ Actual Behavior

No response

dosubot[bot] commented 5 days ago

Hello, @keenouter! I'm here to help you with any bugs, questions, or contributions you have regarding the project. Let's tackle this together!

I found a similar discussion that might be relevant to your issue: Why can't the Variable Aggregator merge files?. This discussion is currently unsolved and might provide some insights into handling multiple file inputs in Dify [1].

To ensure that all file variables, including both required and optional input files, are included in the request body, you should structure your request body properly. Make sure to include all required and optional variables in the inputs object and list all file variables in the files array. Each file should be specified with its type, transfer method, and URL if applicable [2].

If you're still encountering issues, it might be related to how the files are being processed or aggregated in the workflow. The 'Variable Aggregator' in Dify is designed to aggregate variables of the same data type, including files, from different branches into a single unified variable. This might be useful if you're dealing with multiple branches in your workflow [3].

To continue talking to Dosu, mention @dosu.