Commit graph

11,619 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
bc57e48bd8 🐛 fix(base.py): skip values with show == False and key != "code" when iterating over template_dict to improve filtering logic 2023-08-04 17:11:22 -03:00
Gabriel Luiz Freitas Almeida
c207f0aa4b 🐛 fix(directory_reader.py): fix the name of the custom component to always be "CustomComponent" for consistency
🐛 fix(directory_reader.py): add the output types of the custom component to the component template to ensure correct behavior
🐛 fix(types.py): add the output types of the custom component to the component template to ensure correct behavior
2023-08-04 17:11:20 -03:00
Gabriel Luiz Freitas Almeida
e961e8b89a 🔧 fix(directory_reader.py): change component name from snake_case to CamelCase for better UI display
📝 chore(directory_reader.py): add comments to explain the purpose of changing the component name
2023-08-04 17:11:19 -03:00
Gabriel Luiz Freitas Almeida
1c2ba872c5 fix: 🐛 fixes condition in release workflow 2023-08-04 17:11:19 -03:00
Gabriel Luiz Freitas Almeida
29b7e62cfe 🔖 chore(pyproject.toml): bump version from 0.4.0 to 0.4.1 for langflow package 2023-08-04 17:11:18 -03:00
Gabriel Luiz Freitas Almeida
c86fd2f741 🐛 fix(types.py): change update_display_name_and_description function name to update_attributes to reflect its purpose more accurately
🐛 fix(component.py): change field_config key to beta in template_config dictionary to match the expected key
2023-08-04 17:11:17 -03:00
Gabriel Luiz Freitas Almeida
86b623da27 🔀 chore(base.py): import SQLDatabaseChain from langchain_experimental.sql with type ignore to suppress type checking error 2023-08-04 17:11:16 -03:00
Gabriel Luiz Freitas Almeida
817e05b7de 🔀 merge(base.py): add SQLDatabaseChain to the ChainCreator's type_dict to enable support for SQL database chains
📦 chore(pyproject.toml): add langchain-experimental package as a dependency
2023-08-04 17:11:15 -03:00
Gabriel Luiz Freitas Almeida
0d131e101d
Merge branch 'main' into release 2023-08-04 17:01:01 -03:00
Gabriel Luiz Freitas Almeida
35ec2e0867 🐛 fix(vector_store.py): build Chroma settings if any of the chroma_server_ params are present in params
 feat(vectorstores.py): add new fields for Chroma vector store configuration
2023-08-04 16:56:36 -03:00
anovazzi1
2426656b93 fix but on get fork flow 2023-08-04 16:24:08 -03:00
Gustavo Schaedler
59a0b02687
Fix SQLDatabaseChain and other small fixes (#711)
This fixes SQLDatabaseChain by adding langchain_experimental dep.

Fixes beta attribute not being set correctly.

Fixes env-file not loading and removes database-url option in the CLI

Fixes to word breaking in text fields.
2023-08-04 20:07:07 +01:00
anovazzi1
b656efba7d fix(tabsContext.tsx): add checkOldEdgesHandles function to ensure that only old edges with invalid handles are updated
fix(reactflowUtils.ts): rename checkEdgesHandles function to checkOldEdgesHandles for clarity
2023-08-04 16:04:52 -03:00
Cristhian Zanforlin Lousa
e2f0f2069e 🐛 fix(reactflowUtils.ts): prevent default behavior and stop propagation of keyboard event when pressing Ctrl + Backspace on input value that matches block or ends with a space character to improve user experience 2023-08-04 16:04:15 -03:00
anovazzi1
d6168cabde feat(reactflowUtils.ts): add checkEdgesHandles function to validate if any of the handles in an array of edges are not a JSON string
The checkEdgesHandles function is added to the reactflowUtils.ts file. This function takes an array of edges as input and returns true if any of the handles in the edges are not a JSON string. It checks each edge in the array and verifies if the sourceHandle and targetHandle properties exist and contain a JSON string. If any of the handles are not a JSON string, the function returns true. This function is useful for validating the integrity of the handles in the edges before further processing.
2023-08-04 15:39:14 -03:00
anovazzi1
d7516e17e4 update json stringy and parse procces to scape some characters 2023-08-04 15:22:30 -03:00
Gabriel Luiz Freitas Almeida
520bbc35b0 🔥 refactor(chat.py): remove unused code line that accessed vertex_type attribute of a vertex object 2023-08-04 15:13:09 -03:00
anovazzi1
ee196210f2 fix(tabsContext.tsx): add missing import statement for updateEdgesHandleIds function
fix(tabsContext.tsx): update processFlowEdges function to call updateEdgesHandleIds and update the edges in the flow data
refactor(reactflowUtils.ts): update updateEdgesHandleIds function to return the updated edges instead of using setEdges function
2023-08-04 14:52:44 -03:00
Gabriel Luiz Freitas Almeida
33ba16da16
Update docker-compose.yml to use the correct default langflow port (#713) 2023-08-04 14:48:47 -03:00
anovazzi1
736bbf93f2 fix(GenericNode/index.tsx): fix indentation in map function for validationStatus.params
fix(GenericNode/index.tsx): fix indentation in map function for ParameterComponent key
fix(GenericNode/index.tsx): fix indentation in map function for ParameterComponent name
fix(GenericNode/index.tsx): fix indentation in map function for ParameterComponent info
fix(GenericNode/index.tsx): fix indentation in map function for ParameterComponent color
fix(GenericNode/index.tsx): fix indentation in map function for ParameterComponent key
fix(GenericNode/index.tsx): fix indentation in map function for ParameterComponent data
fix(GenericNode/index.tsx): fix indentation in map function for ParameterComponent setData
fix(GenericNode/index.tsx): fix indentation in map function for ParameterComponent key
fix(GenericNode/index.tsx): fix indentation in map function for ParameterComponent data
fix(GenericNode/index.tsx): fix indentation in map function for ParameterComponent setData
fix(GenericNode/index.tsx): fix indentation in map function for ParameterComponent color
fix(GenericNode/index.tsx): fix indentation in map function for ParameterComponent key
fix(GenericNode/index.tsx): fix indentation in map function for ParameterComponent data
fix(GenericNode/index.tsx): fix indentation in map function for ParameterComponent setData
fix(GenericNode/index.tsx): fix indentation in map function for ParameterComponent color
fix(GenericNode/index.tsx): fix indentation in map function for ParameterComponent key
fix(GenericNode/index.tsx): fix indentation in map function for ParameterComponent data
fix(GenericNode/index.tsx): fix indentation in map function for ParameterComponent setData
fix(GenericNode/index.tsx): fix indentation in map function for ParameterComponent color
fix(GenericNode/index.tsx): fix indentation in map function for ParameterComponent key
fix(GenericNode/index.tsx): fix indentation in map function for ParameterComponent data
fix(GenericNode/index.tsx): fix indentation in map function for ParameterComponent setData
fix(GenericNode/index.tsx): fix indentation in map function for ParameterComponent color
fix(GenericNode/index.tsx): fix indentation in map function for ParameterComponent key
fix(GenericNode/index.tsx): fix indentation in map function for ParameterComponent data
fix(GenericNode/index.tsx): fix indentation in map function for ParameterComponent setData
fix(GenericNode/index.tsx): fix indentation in map function for
2023-08-04 14:33:42 -03:00
anovazzi1
4ec6a283f3 refactor(tabsContext.tsx): update the logic for modifying the sourceHandle property of edges in the TabsProvider component
The previous implementation used string manipulation to modify the sourceHandle property, but it has been refactored to use JSON parsing and stringifying for better readability and maintainability. The sourceHandle property is now parsed into an object, and the baseClasses property is updated by concatenating it with the values from the template's "base_classes" property. The modified sourceHandle object is then stringified and assigned back to the edge.sourceHandle property.
2023-08-04 14:12:01 -03:00
anovazzi1
20b28a09a0 fix(tabsContext.tsx): import Edge from reactflow to fix compilation error
fix(tabsContext.tsx): import sourceHandleType and targetHandleType from flow types to fix type errors
refactor(tabsContext.tsx): update usage of Edge type in forEach loop to fix type error
refactor(tabsContext.tsx): update usage of sourceHandle and targetHandle to use JSON.parse and JSON.stringify to fix type errors
refactor(tabsContext.tsx): update className and animated properties of edges to use targetHandleObject.type instead of splitting targetHandle string
refactor(tabsContext.tsx): update updateEdges function to use Edge type and targetHandleObject to fix type errors
refactor(tabsContext.tsx): update sourceHandle in forEach loop to use JSON.stringify instead of splitting and joining the string
refactor(tabsContext.tsx): update sourceHandle in forEach loop to use JSON.stringify instead of splitting and joining the string
2023-08-04 14:08:51 -03:00
Gabriel Luiz Freitas Almeida
bb3be161bd 🐛 fix(base.py): fix typo in "successfully" in the built object representation message
🐛 fix(custom_component.py): add support for custom representation of repr_value if it is a dictionary by using yaml.dump() function
2023-08-04 13:49:54 -03:00
Gabriel Luiz Freitas Almeida
aac7e92832 📝 docs(custom-component.mdx): update guidelines for loading custom components
🔧 fix(custom-component.mdx): correct the recommended way to load custom components by setting LANGFLOW_COMPONENTS_PATH environment variable instead of using --components-path argument

💡 docs(custom-component.mdx): provide an alternative method to specify the path to custom components using --components-path argument
2023-08-04 13:49:53 -03:00
anovazzi1
10a22197a4 Merge branch 'dev' into newHandleId 2023-08-04 13:30:39 -03:00
Lucas Oliveira
87a2e63f79 Fixed chat message size 2023-08-04 12:47:21 -03:00
Lucas Oliveira
b9d433b37c Fixed break words on all code 2023-08-04 12:34:25 -03:00
Gabriel Luiz Freitas Almeida
19c6dc5ca7 🐛 fix(types.py): fix syntax error in adding component to valid menu dictionary 2023-08-04 11:35:48 -03:00
Gabriel Luiz Freitas Almeida
791b1b4266 🔒 chore(poetry.lock): update cohere package version from 4.17.0 to 4.19.2
🔒 chore(poetry.lock): update debugpy package version from 1.6.8 to 1.6.7

🔀 chore: update dependencies

🔄 refactor: update debugpy package to version 1.6.7

🔒 chore(poetry.lock): update google-cloud-resource-manager to version 1.10.3
🔒 chore(poetry.lock): update jcloud to version 0.2.16
🔒 chore(poetry.lock): update more-itertools to version 10.1.0
2023-08-04 11:11:23 -03:00
Gabriel Luiz Freitas Almeida
06e8dd626f 🐛 fix(chat.py): fix debug log message to include vertex type and output 2023-08-04 11:11:03 -03:00
Gabriel Luiz Freitas Almeida
b25098e24b 🐛 fix(custom_component.py): handle case when repr_value is a string in custom_repr method 2023-08-04 11:10:29 -03:00
Gabriel Luiz Freitas Almeida
47fe4481f3 🐛 fix(types.py): fix syntax error in adding component_template to valid_menu
 feat(types.py): improve component name generation logic based on component_output_types and file name
2023-08-04 10:45:28 -03:00
Gabriel Luiz Freitas Almeida
1a02e61701 🔧 chore(loading.py): add debug log to show instantiation of node_type and base_type 2023-08-04 09:55:55 -03:00
Gabriel Luiz Freitas Almeida
e23e58f7f7 🐛 fix(utils.py): simplify import_custom_component function by directly importing the CustomComponent class 2023-08-04 09:55:32 -03:00
Gabriel Luiz Freitas Almeida
e08d62e6e9 🔧 fix(directory_reader.py): fix typo in variable name 'filtered' to improve code readability 2023-08-04 09:55:10 -03:00
Gabriel Luiz Freitas Almeida
2f776cc882 🔧 chore(component.py): add missing import for 'Any' type in typing module to fix type hinting
🚀 feat(component.py): add 'build' method to Component class to enforce implementation in subclasses
2023-08-04 09:53:50 -03:00
Gabriel Luiz Freitas Almeida
27c7923ee3 🔨 refactor(types.py): add logging statements for debugging purposes in build_langchain_template_custom_component function
🔨 refactor(types.py): add logging statements for debugging purposes in build_and_validate_all_files function
🔨 refactor(types.py): add logging statements for debugging purposes in build_valid_menu function
🔨 refactor(types.py): add logging statements for debugging purposes in build_invalid_menu function
2023-08-04 09:52:31 -03:00
Gabriel Luiz Freitas Almeida
d3fab9ac44 🔧 fix(endpoints.py): add logging statements to improve debugging and monitoring
🔧 fix(endpoints.py): add logging statements to improve debugging and monitoring in the get_all() function
2023-08-04 09:52:07 -03:00
Gabriel Luiz Freitas Almeida
56dfa2015c 🐛 fix(settings.py): fix issue with extending components_path list with duplicate paths
 feat(settings.py): add logging of components_path and updated settings values for debugging purposes
2023-08-04 09:51:41 -03:00
Gabriel Luiz Freitas Almeida
e985b15af6 🐛 fix(types.py): update error message to include the output types of the component that failed to load for better debugging 2023-08-04 08:36:53 -03:00
Gabriel Luiz Freitas Almeida
2efa7022f0 🔧 fix(settings.py): convert BASE_COMPONENTS_PATH to string to ensure compatibility with other parts of the codebase
🔧 fix(settings.py): update COMPONENTS_PATH to accept a list of strings instead of a list of Paths to improve flexibility and compatibility
🔧 fix(settings.py): update set_components_path method to handle LANGFLOW_COMPONENTS_PATH as a list of paths or a single path string
2023-08-04 08:34:25 -03:00
Gabriel Luiz Freitas Almeida
941ec72fc1 feat(components): add new custom component and chains package
- Added a new file `__init__.py` in the `components` directory to import the `CustomComponent` class from `langflow.interface.custom.custom_component`.
- Created a new package `chains` in the `components` directory.
2023-08-04 08:34:01 -03:00
Gabriel Luiz Freitas Almeida
a1cca2afc8 🔨 refactor(custom_component.py): read build method 2023-08-04 08:33:39 -03:00
Gabriel Luiz Freitas Almeida
840629bef4 🔧 chore(constants.py): import BaseOutputParser from langchain.schema to use it in LANGCHAIN_BASE_TYPES 2023-08-04 08:31:36 -03:00
Gabriel Luiz Freitas Almeida
e9400c04df 🔀 chore(utils.py): rename cache variable to CACHE for consistency with other settings
🔀 chore(utils.py): rename `LANGFLOW_LANGCHAIN_CACHE` environment variable to `CACHE` for clarity and consistency
2023-08-04 07:49:42 -03:00
Gabriel Luiz Freitas Almeida
91ce018927 🔧 chore(settings.py): update debug log messages for setting default components path 2023-08-04 07:45:45 -03:00
Gabriel Luiz Freitas Almeida
0cf1fb09a9 🐛 fix(prompt_runner.py): fix issue with accessing result content when invoking chain with an empty dict input 2023-08-04 00:20:16 -03:00
Gabriel Luiz Freitas Almeida
d5a33d56bf 🔥 refactor(component.py): remove unused build method from Component class
🔥 refactor(custom_component.py): remove unused build method from CustomComponent class
2023-08-04 00:19:52 -03:00
Gabriel Luiz Freitas Almeida
3fe6a029fc 📝 docs(README.md): update CLI options section to remove --database-url option
The `--database-url` option has been removed from the CLI options. Instead, a local SQLite database will be used if no database URL is provided. This change simplifies the configuration process and aligns with the default behavior.
2023-08-04 00:11:28 -03:00
Gabriel Luiz Freitas Almeida
d99bcbd80b feat(prompt_runner.py): add PromptRunner component to run a Chain with a given PromptTemplate 2023-08-04 00:11:00 -03:00