You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To address the issue with the prompt component extracting input variables incorrectly when using JSON-like syntax, you can utilize the _fix_variable function from the api_utils.py file. This function is designed to handle and correct input variables that contain invalid characters or formats.
Here's a brief guide on how to use the _fix_variable function to resolve this issue:
Identify Invalid Characters: The function will remove any invalid characters defined in _INVALID_CHARACTERS, such as spaces, commas, and brackets, from the input variables.
Correct JSON-like Syntax: The function ensures that JSON-like variables are correctly identified and processed by temporarily replacing {{ and }} to avoid treating them as invalid during processing.
By using this function, you can ensure that the JSON-like syntax in your prompt is not mistakenly treated as a variable, thus preventing the error you encountered [1].
Bug Description
Reproduction
Prompt Template value:
Expected behavior
Should not consider as a variable.
Who can help?
No response
Operating System
mac
Langflow Version
main
Python Version
3.12
Screenshot
No response
Flow File
No response
The text was updated successfully, but these errors were encountered: