Commit graph

3,872 commits

Author SHA1 Message Date
anovazzi1
fbca8497d6 refactor(reactflowUtils.ts): improve variable names and add type checking for source and target nodes in updateEdgesHandleIds function
fix(reactflowUtils.ts): fix assignment of newTarget in updateEdgesHandleIds function to correctly set type, fieldName, id, and inputTypes properties
fix(reactflowUtils.ts): fix assignment of newSource in updateEdgesHandleIds function to correctly set dataType, id, and baseClasses properties
fix(reactflowUtils.ts): fix assignment of sourceHandle and targetHandle in updateEdgesHandleIds function to correctly stringify newSource and newTarget objects
2023-08-01 22:09:32 -03:00
anovazzi1
75c4d3e85c refactor(reactflowUtils.ts): add type definitions for updateEdgesHandleIdsType to improve code readability and maintainability
feat(reactflowUtils.ts): implement updateEdgesHandleIds function to update handle ids in edges based on node changes
2023-08-01 22:09:32 -03:00
anovazzi1
1e3c918880 update old handle as string to json format and types to easily use the new id as json 2023-08-01 22:09:07 -03:00
anovazzi1
6604ef5351 created type for HandleIds 2023-08-01 22:08:01 -03:00
Gabriel Luiz Freitas Almeida
3a76d2de59 🐛 fix(parameterComponent): change default value for unknown node family to "Other" for better clarity 2023-08-01 19:27:08 -03:00
anovazzi1
ba1fe2c815 Merge branch 'dev' of personal:logspace-ai/langflow into dev 2023-08-01 18:55:30 -03:00
anovazzi1
1d20a91b6e fix csv file upload bug 2023-08-01 18:53:47 -03:00
Gabriel Luiz Freitas Almeida
9f97ecba25 🐛 fix(__main__.py): fix default value of components_path option to point to the correct directory
 feat(__main__.py): add support for LANGFLOW_COMPONENTS_PATH environment variable to specify the directory containing custom components
2023-08-01 18:12:02 -03:00
Gabriel Luiz Freitas Almeida
f4271ba4d9 🔧 chore(settings.py): add debug logs to track the behavior of components_path configuration
 feat(settings.py): add support for LANGFLOW_COMPONENTS_PATH environment variable to add custom components path to components_path
2023-08-01 18:09:01 -03:00
Gabriel Luiz Freitas Almeida
3e465f6df3 📝 docs(flow-runner.mdx): update example code formatting and fix indentation for better readability
🖼️ chore(flow_runner_code.png): update flow_runner_code.png image
2023-08-01 17:49:58 -03:00
Gabriel Luiz Freitas Almeida
11854ccdb3 🔧 chore(constants.py): update default custom component code to improve readability and remove unnecessary imports
 feat(constants.py): update display name and description of the custom component to improve clarity and user experience
🔧 chore(custom_components.py): update display name of the custom component to improve clarity and user experience
2023-08-01 17:44:02 -03:00
Lucas Oliveira
6450ec0e7b Changed Display Name from custom_components 2023-08-01 16:41:16 -03:00
Gabriel Luiz Freitas Almeida
c112a42292 Merge branch 'main' into dev 2023-08-01 16:02:03 -03:00
Gabriel Luiz Freitas Almeida
7e8495efc2 formatting 2023-08-01 15:45:06 -03:00
Gabriel Luiz Freitas Almeida
6c872bf4ac 🐛 fix(custom_component.py): remove unnecessary return type annotation from _class_template_validation method
🐛 fix(custom_component.py): handle case when code is empty in is_check_valid method to avoid potential error
🐛 fix(types.py): change field_value parameter type from str to Any in add_new_custom_field function to allow any value type
2023-08-01 15:44:23 -03:00
Gabriel Luiz Freitas Almeida
535e13ca8a 🔖 chore(pyproject.toml): update package version from 0.3.3 to 0.4.0
⬆️ chore(pyproject.toml): update langchain dependency from version 0.0.240 to 0.0.249
2023-08-01 15:38:30 -03:00
Gustavo Schaedler
7853749884
Python custom node component (#610) 2023-08-01 19:32:49 +01:00
Gabriel Luiz Freitas Almeida
d7a13755b3
Merge branch 'dev' into python_custom_node_component 2023-08-01 15:31:44 -03:00
Gabriel Luiz Freitas Almeida
70f8199287 🐛 fix(types.py): set default value of boolean custom field to False if value is None to prevent potential errors 2023-08-01 11:09:04 -03:00
Lucas Oliveira
baf86152db Minor bug fixes 2023-08-01 10:55:20 -03:00
Gabriel Luiz Freitas Almeida
2f9ffd1d48 🐛 fix(flow-runner.mdx): handle case where document is a list and extract the first element to ensure compatibility with the flow
🔨 refactor(flow-runner.mdx): remove unnecessary comment and unused variable to improve code readability and maintainability
2023-07-31 21:42:08 -03:00
Gabriel Luiz Freitas Almeida
8a6a953179 📝 docs(custom.mdx): add description of the 'repr_value' attribute in the CustomComponent class
📝 docs(custom-component.mdx): update example code and description of the 'repr_value' attribute in the DocumentProcessor class
2023-07-31 21:23:15 -03:00
Gabriel Luiz Freitas Almeida
99ed85c03c 🐛 fix(directory_reader.py): handle SyntaxError when checking if type hint is used but not imported
🔍 refactor(directory_reader.py): improve error handling when checking if type hint is used but not imported
2023-07-31 21:11:41 -03:00
gustavoschaedler
267d543420 🐛 fix(custom_component.py): update error message to include the specific type hint that is used but not imported in the code
🐛 fix(directory_reader.py): update error message to include the specific type hint that is used but not imported in the code
2023-07-31 23:22:12 +01:00
gustavoschaedler
082a61eadd 🐛 fix(custom_component.py): fix error message typo in CustomComponent class
🐛 fix(directory_reader.py): fix error message typo in DirectoryReader class
2023-07-31 23:07:02 +01:00
Gabriel Luiz Freitas Almeida
15643263a8 🔧 chore(docusaurus.config.js): update remarkCodeHike configuration to use the "github-light" theme for better code highlighting aesthetics 2023-07-31 18:58:51 -03:00
Gabriel Luiz Freitas Almeida
f1f1759f02 📝 docs(multiple-vectorstores.mdx): fix code block language from 'txt' to 'text' for clarity and consistency 2023-07-31 18:54:46 -03:00
Gabriel Luiz Freitas Almeida
0907e477fd 📝 docs(custom-component.mdx): improve clarity by emphasizing the --components-path argument using italics
📝 docs(chatprompttemplate_guide.mdx): update the "Prompt" field text to use italics for better readability
2023-07-31 18:46:31 -03:00
Gabriel Luiz Freitas Almeida
68bd9ce4da 🐛 fix(styleUtils.ts): update the label for the 'unknown' node to 'Other' for better clarity and consistency 2023-07-31 18:32:24 -03:00
Gabriel Luiz Freitas Almeida
1fa00fcf8f 📝 docs(custom-component.mdx): add note about custom components appearing in 'Other' category if using a subdirectory not listed in config.yaml 2023-07-31 18:31:52 -03:00
Gabriel Luiz Freitas Almeida
a5cb741fc5 📝 docs(custom-component.mdx): add instructions for loading custom components outside of the standard interface
📝 docs(custom-component.mdx): update folder structure section to include custom agents directory

📝 docs(custom-component.mdx): add instructions for specifying the path to custom components using the Langflow CLI

📝 docs(custom-component.mdx): add instructions for setting the LANGFLOW_COMPONENTS_PATH environment variable

📝 docs(custom-component.mdx): clarify that Langflow will continue loading components even if there are errors in some of them

📝 docs(custom-component.mdx): add section on interacting with custom components in Langflow's sidebar
2023-07-31 18:15:56 -03:00
Gabriel Luiz Freitas Almeida
868ecd86ab 📝 docs(README.md): remove unnecessary empty line
📝 docs(README.md): update Table of Contents formatting
📝 docs(README.md): update Installation section formatting
📝 docs(README.md): update Command Line Interface (CLI) section formatting
📝 docs(README.md): update Deployment section formatting
📝 docs(README.md): update API Usage section formatting

🔧 chore(README.md): remove unnecessary whitespace and fix indentation in code block
📝 docs(README.md): update contributing section and add links to Discord server and contributing guidelines

🐛 fix(__main__.py): change envvar name from LANGFLOW_COMPONENT_PATH to LANGFLOW_COMPONENTS_PATH for consistency and clarity
2023-07-31 17:47:24 -03:00
Gabriel Luiz Freitas Almeida
a2ce598e08 🐛 fix(__main__.py): rename component_path to components_path for consistency and clarity
 feat(__main__.py): add support for components_path command line option to specify the directory containing custom components
🐛 fix(endpoints.py): rename settings.component_path to settings.components_path to match the updated attribute name in Settings class
🐛 fix(settings.py): rename component_path attribute to components_path for consistency and clarity
2023-07-31 17:47:23 -03:00
Lucas Oliveira
af083f24d3 Fixed modal saving changes when not supposed to 2023-07-31 17:44:55 -03:00
Gabriel Luiz Freitas Almeida
ddafdf31b5 🔧 fix(conftest.py): remove unused imports and commented out code
 feat(conftest.py): add session_getter fixture to create a blank session for testing
🔧 fix(test_custom_component.py): pass session_getter fixture to list_flows function for testing
2023-07-31 17:31:40 -03:00
Gabriel Luiz Freitas Almeida
2e7b35ddd5 🔧 fix(custom_component.py): change list_flows and get_flow methods to accept an optional get_session parameter for better flexibility and testability 2023-07-31 17:28:29 -03:00
Gabriel Luiz Freitas Almeida
6d6cc4609d
Adds motorhead memory (#685) 2023-07-31 16:11:36 -03:00
Gabriel Luiz Freitas Almeida
b2979bce17 🐛 fix(flow-runner.mdx): remove unnecessary load_flow calls and update get_flow method signature to include tweaks parameter
🚚 chore(flow-runner.mdx): update load_flow references to get_flow
🚚 chore(flow-runner.mdx): remove commented out code
🚚 chore(flow-runner.mdx): update load_flow references to get_flow
2023-07-31 16:03:51 -03:00
Gabriel Luiz Freitas Almeida
c5585565c2
Optional_deps (#589) 2023-07-31 15:41:51 -03:00
Gabriel Luiz Freitas Almeida
95bf9ba233 🔧 refactor(custom_component.py): refactor get_flow method signature to use Optional type hint for flow_name and flow_id parameters for better clarity and maintainability 2023-07-31 15:02:13 -03:00
Gabriel Luiz Freitas Almeida
10ca88f709 📝 docs(CONTRIBUTING.md): update contributing guidelines and local development instructions
🚩GitHub Issues:
- Update heading level for GitHub Issues section to match the document structure

Issue labels:
- Update heading level for Issue labels section to match the document structure

Local development:
- Update heading level for Local development section to match the document structure

Run locally:
- Update heading level for Run locally section to match the document structure
- Add instructions for installing dependencies and starting the development server for the backend
- Add instructions for installing dependencies and starting the development server for the frontend

Docker compose:
- Update heading level for Docker compose section to match the document structure
- Add instructions for running the backend and frontend using Docker compose

Documentation:
- Update heading level for Documentation section to match the document structure
- Add instructions for running the documentation locally using Docusaurus
- Update the available URL for the documentation

Create a Pull Request:
- Add a closing statement with instructions to create a Pull Request to the `main` branch
2023-07-31 14:58:05 -03:00
Gabriel Luiz Freitas Almeida
92b99f82d9 📝 docs(how-contribute.md): update contribution guide with instructions for running documentation locally using Docusaurus
🐛 fix(how-contribute.md): fix formatting and add missing newline at end of file
2023-07-31 14:56:10 -03:00
Gabriel Luiz Freitas Almeida
ec17b4e9d3 📝 docs(flow-runner.mdx): update explanation of using Document input in FlowRunner class
The change clarifies that using a `Document` as input in the `FlowRunner` class is a straightforward way to pass text data in Langflow, specifically because it can be connected to many loaders. It also mentions that generally, a flow expects a string or a dictionary as input. Additionally, it updates the explanation of extracting the content of a document using the `page_content` attribute, which is a string.
2023-07-31 14:51:09 -03:00
Gabriel Luiz Freitas Almeida
9cc0ae0242 📝 docs(flow-runner.mdx): add explanation about using Document as input in FlowRunner class
The commit adds an explanation about using a `Document` as input in the `FlowRunner` class. It clarifies that using a `Document` is a straightforward way to pass text data in Langflow. Typically, a flow expects a string or a dictionary as input, and if a dictionary is used, it should be built according to the needs of the specific flow. The commit also mentions that the content of a document can be extracted using the `page_content` property and passed as an argument to the selected flow.
2023-07-31 14:37:18 -03:00
Lucas Oliveira
ce0a67553a Merge branch 'python_custom_node_component' of github.com:logspace-ai/langflow into python_custom_node_component 2023-07-31 14:05:41 -03:00
Lucas Oliveira
1687824453 Optimized code 2023-07-31 14:01:54 -03:00
Gabriel Luiz Freitas Almeida
1eda86658d 📝 docs(custom.mdx): fix formatting and typos in the CustomComponent class documentation
🔀 docs(custom.mdx): merge changes from the CustomComponent class documentation
📝 docs(custom.mdx): improve readability and formatting in the CustomComponent class documentation
🔀 docs(custom.mdx): merge changes from the CustomComponent class documentation
📝 docs(custom.mdx): update CustomComponent class documentation with additional methods and descriptions
🔀 docs(custom.mdx): merge changes from the CustomComponent class documentation
📝 docs(custom.mdx): update CustomComponent class documentation with corrected method names and descriptions
🔀 docs(custom.mdx): merge changes from the CustomComponent class documentation
2023-07-31 11:48:17 -03:00
Gabriel Luiz Freitas Almeida
e03e306292 📝 docs(flow-runner.mdx): fix typo in line 141, "looks" instead of "look like"
📝 docs(flow-runner.mdx): remove extra blank lines in code examples for better readability
2023-07-31 11:46:23 -03:00
Gabriel Luiz Freitas Almeida
5c42683b40 📝 docs(flow-runner.mdx): add example code for a Flow Runner custom component
ℹ️ The example code demonstrates how to create a custom component called "Flow Runner" that runs other flows using a document as input. The code includes the implementation of the `build_config` and `build` methods.

 feat(flow-runner.mdx): add example code for a Flow Runner custom component to provide a practical example for users to follow
2023-07-31 10:58:37 -03:00
Gabriel Luiz Freitas Almeida
16935ec198 🐛 fix(flow-runner.mdx): fix broken link to langchain.schema module in import statement
🐛 fix(flow-runner.mdx): remove unnecessary focus annotations in code snippets
 feat(flow-runner.mdx): add support for getting flow by name instead of id in build method
 feat(flow-runner.mdx): add caution about unique flow names in version 0.4.0
 feat(flow-runner.mdx): add support for passing document parameter in build method
🐛 fix(flow-runner.mdx): remove redundant Optional type hint for document parameter in build method
🐛 fix(flow-runner.mdx): remove empty line at the end of the file
2023-07-31 10:58:35 -03:00