There is a problem with the Create data component
Describe the bug There is a problem with the Create data component
Add a Create data component and fill in the key and value, click Run, no output data
Browser and Version
- Browser [chrome,]
- Version [v1.0.7]
To Reproduce
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.
The issue with the Create Data component not producing output data after filling in the key and value fields is likely due to the build method not properly handling the input fields. Specifically, the kwargs parameter is expected to contain dictionaries, but if the input fields are not correctly passed or formatted, the data dictionary will remain empty.
Here is the relevant part of the build method:
def build(
self,
number_of_fields: int = 0,
text_key: str = "text",
**kwargs,
) -> Data:
data = {}
for value_dict in kwargs.values():
if isinstance(value_dict, dict):
# Check if the value of the value_dict is a Data
value_dict = {
key: value.get_text() if isinstance(value, Data) else value for key, value in value_dict.items()
}
data.update(value_dict)
return_data = Data(data=data, text_key=text_key)
self.status = return_data
return return_data
Ensure that the input fields are correctly passed as dictionaries to the build method [1].
To continue talking to Dosu, mention @dosu.
yes, I'm facing the same bug!
Hi @alex-ge123, @codenprogressive, can you please upgrade Langflow to 1.0.14 and try again? Plmk if you encounter any issues.
I was able to successfully create and parse data: