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
43.07k stars 5.98k forks source link

Increase the maximum length of the "paragraph" variable of the workflow input field. #4770

Closed nne998 closed 1 month ago

nne998 commented 3 months ago

Self Checks

1. Is this request related to a challenge you're experiencing?

I need to input a very long article.

image

2. Describe the feature you'd like to see

Increase the maximum length of the "paragraph" variable in the workflow.

3. How will this feature improve your workflow or experience?

maximum length of the "paragraph" variable in the workflow.

4. Additional context or comments

No response

5. Can you help us with this feature?

crazywoola commented 3 months ago

Change this value is easy, but how long do you need.

nne998 commented 2 months ago

I think, it can have a default value, but it can be set to unlimited if needed.

hjlarry commented 2 months ago

I encountered the definition PARAGRAPH_MAX_LENGTH = 1032 * 32 in the code, and I'm puzzled by the rationale behind this specific value. It might be more meaningful to align this with the token capacity of GPT-4, which is 128K tokens. 1 token ~= 4 chars in English, It would be PARAGRAPH_MAX_LENGTH = 128000 * 4

kawataki-yoshika commented 2 months ago

I am using Gemini 1.5 Pro in Japanese. This model can handle up to 2 million tokens, but I am not certain of the maximum length in characters. Therefore, it would be beneficial if PARAGRAPH_MAX_LENGTH could be unlimited or adjustable at dify startup.

Sakura4036 commented 2 months ago

I think, it can have a default value, but it can be set to unlimited if needed.

yes, I agree. We need the larger maximum length of the "paragraph" variable and 'text' variable of the workflow input field.

rainchen commented 2 months ago

Since a workflow can be published as a tool, we need a larger input field maximum length. I think this config should be customizable by admin user via Settings web UI or environment variable of deployment.

Sakura4036 commented 2 months ago

We desperately need this feature, as soon as possible.

Since a workflow can be published as a tool, we need a larger input field maximum length. I think this config should be customizable by admin user via Settings web UI or environment variable of deployment.