Closed BryceWG closed 1 day ago
I found a similar open issue that might be related to the problem you're experiencing: Optional variables not configured correctly for chatbot. This issue is still open and was last updated on November 10, 2024. The suggested solution involves checking how the system handles empty optional variables. Here are some steps you might consider:
Validation and Defaults: Ensure that the BasicVariablesConfigManager.validate_and_set_defaults
method is correctly validating and setting defaults for your optional variables. This method is crucial for configuration validation and setting default values where necessary.
Error Messages: Look for specific error messages or logs when these variables are left empty. Dify provides error messages such as {{key}} value can not be empty
for empty variable values, which might help identify the issue.
Configuration Settings: Verify if there are any specific configuration settings or flags affecting the behavior of optional variables when left empty. Review your configuration files for any anomalies.
Default Values: Check the default values assigned to optional variables. Incorrect defaults might lead to unexpected behavior when variables are left empty.
These steps might help in resolving the issue with optional input variables in your workflow chat assistant. If the problem persists, further investigation into the code or configuration may be necessary.
To continue talking to Dosu, mention @dosu.
Self Checks
Dify version
v0.11.0
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
My workflow project started encountering errors during conversations on the preview URL page after adding an optional input variable in all field types, as if my input was being interpreted as an input variable, as shown in the image below: Strangely, in the workflow edit page, everything is normal, and it also works fine when using the required input variables: Variable setting: A simple workflow DSL file example:
✔️ Expected Behavior
Adding optional input variable options in the web page also allows right conversation
❌ Actual Behavior
Conversation in the web page is not possible; conversations can only take place in the workflow debugging interface, and no conversation records are left in the conversation log