Commit graph

4,962 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
1e5ef1c8c0 🔥 refactor(test_llms_template.py): remove commented out code and unused import to improve code readability and maintainability 2023-09-19 15:13:03 -03:00
Gabriel Luiz Freitas Almeida
ce35caa59f 🐛 fix(base.py): fix variable name in if condition to correctly check field name for 'dict' type handling 2023-09-19 15:11:36 -03:00
Cristhian Zanforlin Lousa
5bb661dbb3 Merge branch 'feat-dict' of https://github.com/logspace-ai/langflow into feat-dict 2023-09-19 15:03:17 -03:00
Cristhian Zanforlin Lousa
2f63d29ce4 🎨 style(App.css): add padding to the .jv-card class to improve spacing and readability
🔥 refactor(parameterComponent/index.tsx): remove unnecessary code block in the value prop to improve code clarity and maintainability
2023-09-19 15:03:12 -03:00
Gabriel Luiz Freitas Almeida
a9034b6937 📝 docs(custom.mdx): add explanation about the difference between dict and langflow.field_typing.NestedDict types
📝 docs(custom.mdx): clarify that langflow.field_typing.NestedDict opens a more robust dictionary editor compared to dict type
2023-09-19 15:01:40 -03:00
Cristhian Zanforlin Lousa
c9126fdb62 🔀 refactor(parameterComponent): remove unused properties from default parameter value object to improve code readability and maintainability 2023-09-19 14:51:01 -03:00
Cristhian Zanforlin Lousa
fe92ce85f9 🐛 fix(parameterComponent): change default key-value pair in case of empty value to improve clarity
🐛 fix(keypairListComponent): update placeholder text to improve user guidance
2023-09-19 14:42:49 -03:00
Gabriel Luiz Freitas Almeida
e528b1363e 🐛 fix(parameterComponent): add condition to prevent setting state if tabId does not exist in previous state 2023-09-19 14:33:57 -03:00
Gabriel Luiz Freitas Almeida
0389d8ec1e 🐛 fix(documentloaders.py): change value of metadata from string to empty object to fix incorrect type assignment 2023-09-19 14:14:11 -03:00
Gabriel Luiz Freitas Almeida
1243c0b644 🐛 fix(test_llms_template.py): remove unused test_llms_settings function to improve code readability and maintainability
🐛 fix(test_template.py): update type annotation in test_format_dict function to reflect the correct type of the field
🐛 fix(test_prompts_template.py): update type annotation in test_prompt_template function to reflect the correct type of the field
2023-09-19 14:08:12 -03:00
Gabriel Luiz Freitas Almeida
01104e666c 🐛 fix(base.py): refactor handle_dict_type method to improve readability and semantics
 feat(base.py): add support for 'dict' type fields to be handled as 'dict' instead of 'code' or 'file'
🐛 fix(documentloaders.py): change field_type of metadata field to 'dict' instead of 'code'
🐛 fix(embeddings.py): change field_type of model_kwargs field to 'dict' instead of 'code'
🐛 fix(field_formatters.py): refactor DictCodeFileFormatter to handle 'dict' type fields as 'dict' instead of 'code' or 'file'
🐛 fix(prompts.py): call parent format_field method in PromptFrontendNode to ensure proper formatting
🐛 fix(vectorstores.py): change field_type of search_kwargs field to 'NestedDict' instead of 'code'
🐛 fix(util.py): remove unused replace_dict_type_with_code function
2023-09-19 14:07:58 -03:00
Gabriel Luiz Freitas Almeida
738bfa4812 🔨 refactor(PromptRunner.py): remove unused inputs field from the component configuration
🔨 refactor(MetalRetriever.py): remove field_type code from params field in the component configuration
🔨 refactor(GetRequest.py): remove field_type code from headers field in the component configuration
🔨 refactor(PostRequest.py): remove field_type code from headers field in the component configuration
2023-09-19 14:07:13 -03:00
Gabriel Luiz Freitas Almeida
5a70aa04dd 🐛 fix(base.py): fix the assignment of params[key] in Vertex class to correctly handle nested dictionaries and lists
The previous implementation was not correctly handling nested dictionaries and lists. This fix updates the assignment of params[key] to correctly handle nested dictionaries and lists by using a dictionary comprehension.
2023-09-19 11:28:01 -03:00
Cristhian Zanforlin Lousa
094fe2cc0d merge fix 2023-09-19 11:18:46 -03:00
Cristhian Zanforlin Lousa
83271fa0e8 🐛 fix(reactflowUtils.ts): remove unnecessary condition for template[t].type to improve code readability and maintainability 2023-09-18 22:59:40 -03:00
Cristhian Zanforlin Lousa
a6c80a8780 🐛 fix(reactflowUtils.ts): improve error message for empty key in validateNode function 2023-09-18 22:32:11 -03:00
Cristhian Zanforlin Lousa
52a8e6eeb5 🐛 fix(reactflowUtils.ts): fix validation logic for nested dictionaries in validateNode function
 feat(reactflowUtils.ts): add hasEmptyKey function to check for empty keys in dictionaries in validateNode function
2023-09-18 22:27:08 -03:00
Cristhian Zanforlin Lousa
b30f9ddf7f 🐛 fix(parameterComponent): convert parameter values to numbers before assigning them to improve data consistency
🔧 chore(reactflowUtils): add utility function to convert values to numbers in an array of objects
2023-09-18 21:51:22 -03:00
Cristhian Zanforlin Lousa
7d3f2377a5 🔧 fix(dictAreaModal/index.tsx): add useEffect hook to update dictObj state when value prop changes
🔧 fix(dictAreaModal/index.tsx): initialize dictObj state with value prop on component mount
2023-09-18 21:16:10 -03:00
Cristhian Zanforlin Lousa
71dd9821ea 🐛 fix(parameterComponent): handleOnNewValue now accepts Object[] as a valid parameter type to support dict and NestedDict types
🐛 fix(parameterComponent): remove unused state variables obj and dictArr
 feat(parameterComponent): add support for dict and NestedDict types in ParameterComponent
🐛 fix(dictComponent): call onChange when value prop changes to ensure proper synchronization
🐛 fix(keypairListComponent): call onChange when value prop changes to ensure proper synchronization
🐛 fix(dialog.tsx): add missing classes to prevent panning, dragging, undoing, and copying in DialogPortal and DialogOverlay components
2023-09-18 20:47:04 -03:00
Gabriel Luiz Freitas Almeida
3ae51da36e 🔧 chore(UpdateRequest.py): change field_type from "code" to "NestedDict" to improve clarity and semantics
🔧 chore(base.py): handle "dict" and "NestedDict" types in params parsing to ensure correct conversion from frontend data
🔧 chore(llms.py): change field_type from "code" to "dict" for model_kwargs field to improve semantics
🔧 chore(utilities.py): remove field_type "code" for fields with dict values to improve consistency
🔧 chore(constants.py): add "dict" and "NestedDict" to DIRECT_TYPES list to reflect available field types
🔧 chore(util.py): remove replace_dict_type_with_code function as it is no longer needed
2023-09-18 18:44:02 -03:00
Cristhian Zanforlin Lousa
21096562b2
Bugfix on DEV - Copy and Paste on CodeEditModal (#929)
🔧 chore(codeAreaModal/index.tsx): add additional class names to
CodeMirror component for better control and customization
2023-09-18 14:40:19 -03:00
Cristhian Zanforlin Lousa
14c9f863dc 🔧 fix(dialog.tsx): remove unnecessary CSS classes 'noundo' and 'nocopy' to simplify the code and improve maintainability
🔧 fix(codeAreaModal/index.tsx): remove unnecessary CSS classes 'nopan', 'nodrag', 'noundo', and 'nocopy' to simplify the code and improve maintainability
2023-09-18 14:26:27 -03:00
Cristhian Zanforlin Lousa
6521152184 🐛 fix(dialog.tsx): remove unnecessary CSS classes 'noundo' and 'nocopy' from DialogOverlay component to improve code readability and maintainability
🐛 fix(index.tsx): remove unnecessary CSS classes 'nopan', 'nodrag', 'noundo', and 'nocopy' from CodeMirror component to improve code readability and maintainability
2023-09-18 14:23:20 -03:00
Cristhian Zanforlin Lousa
d39685e9f5 🔧 chore(codeAreaModal): add additional class names to CodeArea component for better control and customization
🎨 style(codeAreaModal): add class names 'nopan', 'nodrag', 'noundo', and 'nocopy' to CodeArea component to disable specific behaviors
2023-09-18 13:51:42 -03:00
Cristhian Zanforlin Lousa
3e2f3046a9 🔧 chore(codeAreaModal/index.tsx): add additional class names to CodeMirror component for better control and customization 2023-09-18 13:51:01 -03:00
Cristhian Zanforlin Lousa
bdd79fc6f6 📝 chore(constants.ts): update CODE_DICT_DIALOG_SUBTITLE to improve clarity and remove unnecessary information 2023-09-18 11:36:14 -03:00
Cristhian Zanforlin Lousa
4b61a582ba 🔧 fix(constants.ts): fix indentation issue in CODE_DICT_DIALOG_SUBTITLE constant
🔧 fix(constants.ts): update CODE_DICT_DIALOG_SUBTITLE constant to include information about using eval() function
🔧 fix(reactflowUtils.ts): add check to convertObjToArray function to return the input if it is already an array
2023-09-18 11:25:18 -03:00
Gabriel Luiz Freitas Almeida
7d39cdc7aa
fix issue, the custom component cannot be load success by setting env… (#823) 2023-09-18 11:01:57 -03:00
Cristhian Zanforlin Lousa
46601245e1 🐛 fix(EditNodeModal/index.tsx): import convertObjToArray function from reactflowUtils to fix undefined reference error
🐛 fix(EditNodeModal/index.tsx): fix incorrect usage of convertObjToArray function to correctly convert object to array
2023-09-17 11:09:15 -03:00
Cristhian Zanforlin Lousa
0838baa50a merge dev 2023-09-17 10:32:45 -03:00
Cristhian Zanforlin Lousa
ddda46f6d6 🐛 fix(parameterComponent): convert object to array in data.node!.template[name].value to fix rendering issue 2023-09-17 10:31:42 -03:00
Cristhian Zanforlin Lousa
4a03e81314 🐛 fix(parameterComponent): remove redundant conditional statement and set dictionary array and node template value directly
The conditional statement checking for duplicate keys and setting the dictionary array was redundant. Instead, the dictionary array is now always set to the new value. Additionally, the node template value is now always updated with the new value.
2023-09-15 16:07:08 -03:00
Cristhian Zanforlin Lousa
55001b98c8 🔥 refactor(parameterComponent): remove console.log statement for newValue in ParameterComponent 2023-09-15 15:49:47 -03:00
Cristhian Zanforlin Lousa
ef5a3fb355 🔧 fix(parameterComponent): remove unused imports and variables to improve code cleanliness and readability
🔧 fix(parameterComponent): update useState initial value for dictArr to be an array of objects instead of an empty array
🔧 fix(parameterComponent): update value prop in ParameterInputListComponent to handle cases where data.node!.template[name].value is null or an empty array
🔧 fix(parameterComponent): update onChange prop in ParameterInputListComponent to handle any type of newValue instead of just string[]
🔧 fix(keypairListComponent): update className condition to check if value is null or undefined before checking its length
🔧 fix(editNodeModal): remove unused imports and variables to improve code cleanliness and readability
🔧 fix(editNodeModal): update useState initial value for dictArr to be an array of objects instead of an empty array
🔧 fix(editNodeModal): update value prop in KeypairListComponent to handle cases where myData.node.template[templateParam].value is null or an empty array
🔧 fix(editNodeModal): update onChange prop in KeypairListComponent to handle any type of newValue instead of just string[]
🔧 fix(types): update onChange type in KeyPairListComponentType to accept an array of objects instead of an array of strings
🔧 fix(reactflowUtils): remove unused convertArrayToObj function
2023-09-15 15:49:37 -03:00
Cristhian Zanforlin Lousa
c6122980ad 🐛 fix(reactflowUtils.ts): remove unnecessary space in key assignment to maintain consistent object key order 2023-09-15 14:50:27 -03:00
Cristhian Zanforlin Lousa
321024fd4c 🔥 refactor(keypairListComponent): remove commented out code and unused imports for cleaner code
🐛 fix(reactflowUtils.ts): add space before key in flattenedObject to prevent ordering when adding new keys to the object
2023-09-15 14:02:21 -03:00
Cristhian Zanforlin Lousa
55513a34a3 🐛 fix(parameterComponent): fix logic for setting default value in ParameterComponent
🐛 fix(dictComponent): fix class name for disabled input in DictComponent
🐛 fix(keypairListComponent): remove unnecessary disabled prop from Input component in KeypairListComponent
2023-09-15 09:27:48 -03:00
Cristhian Zanforlin Lousa
a6751d4a17 🐛 fix(parameterComponent): fix nullish coalescing operator usage to prevent potential error when accessing nested object properties 2023-09-15 08:48:23 -03:00
Cristhian Zanforlin Lousa
dd556c518d 🐛 fix(parameterComponent): remove unnecessary useEffect hook that sets dictArr state
🐛 fix(parameterComponent): update value prop of KeypairListComponent to use convertObjToArray(dict) instead of dict
2023-09-15 08:47:51 -03:00
Gabriel Luiz Freitas Almeida
44466dc2d1 🐛 fix(RecursiveCharacterTextSplitter.py): uncomment line to assign repr_value to separators variable
 feat(util.py): add build_loader_repr_from_documents function to generate a representation string from a list of documents
2023-09-14 21:38:10 -03:00
Gabriel Luiz Freitas Almeida
329d779b6e
Fixed Lint error and no module error (#918) 2023-09-15 00:35:36 +00:00
Guangya Liu
03a71b1fe8 use optional for user 2023-09-14 19:48:48 -04:00
Gabriel Luiz Freitas Almeida
5ac3208c8a Merge remote-tracking branch 'origin/main' into dev 2023-09-14 20:02:52 -03:00
Gabriel Luiz Freitas Almeida
fa94ae3350
🔧 chore(render.yaml): add disk configuration for langflow-data to pro… (#919) 2023-09-14 23:02:26 +00:00
Gabriel Luiz Freitas Almeida
ff18b32aeb 🔀 chore(README.md): update Railway deployment button link to use a different template 2023-09-14 20:01:51 -03:00
Cristhian Zanforlin Lousa
83e48f0728 🐛 fix(parameterComponent): fix issue with undefined values in DictComponent and KeypairListComponent 2023-09-14 19:57:33 -03:00
Cristhian Zanforlin Lousa
1c1d6d2c02 🔧 fix(parameterComponent): remove unused longString variable to improve code readability and reduce unnecessary code
🔧 fix(parameterComponent): move DictComponent and KeypairListComponent rendering logic to the correct position to fix rendering issues
🔧 fix(keypairListComponent): remove unused imports and fix formatting to improve code readability
🔧 fix(keypairListComponent): fix handleChangeKey function name to improve code clarity
🔧 fix(keypairListComponent): fix className prop in Input component to improve code readability
🔧 fix(keypairListComponent): remove unused GenericModal component and fix formatting to improve code readability
🔧 fix(reactflowUtils.ts): fix formatting and remove unnecessary whitespace to improve code readability
🔧 fix(reactflowUtils.ts): fix function names and formatting to improve code readability
🔧 fix(reactflowUtils.ts): fix formatting and remove unnecessary whitespace to improve code readability
🔧 fix(reactflowUtils.ts): fix formatting and remove unnecessary whitespace to improve code readability
2023-09-14 19:53:39 -03:00
Gabriel Luiz Freitas Almeida
40969d905a 🐛 fix(render.yaml): fix indentation of value for LANGFLOW_DATABASE_URL environment variable to match the key 2023-09-14 17:19:13 -03:00
Gabriel Luiz Freitas Almeida
502b520782 🔧 chore(render.yaml): add LANGFLOW_DATABASE_URL environment variable with sqlite database path to improve configuration
The LANGFLOW_DATABASE_URL environment variable is added with the value `sqlite:////home/user/.cache/langflow/langflow.db` to specify the path to the SQLite database file for the Langflow service. This improves the configuration by providing a specific location for the database file.
2023-09-14 17:18:22 -03:00