Commit graph

1,141 commits

Author SHA1 Message Date
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
d99bcbd80b feat(prompt_runner.py): add PromptRunner component to run a Chain with a given PromptTemplate 2023-08-04 00:11:00 -03:00
Gabriel Luiz Freitas Almeida
7a82519262 🐛 fix(loading.py): import handle_partial_variables function to fix NameError when using it in instantiate_prompt function
🐛 fix(utils.py): add handle_partial_variables function to handle partial variables in prompt formatting
2023-08-04 00:09:39 -03:00
Gabriel Luiz Freitas Almeida
3ce502f298 🐛 fix(types.py): fix prompt template formatting to handle missing artifacts gracefully 2023-08-04 00:07:49 -03:00
Gabriel Luiz Freitas Almeida
bc69e7ae48 🐛 fix(base.py): refactor database engine creation and retrieval to use a singleton pattern for better performance and maintainability
 feat(base.py): add support for LANGFLOW_DATABASE_URL environment variable to override the database URL configuration
2023-08-04 00:06:57 -03:00
Gabriel Luiz Freitas Almeida
b0346bd405 🔧 chore(main.py): import Engine from langflow.database.base to fix missing reference error
 feat(main.py): add Engine.update as a startup event to update the engine on app startup
2023-08-04 00:05:43 -03:00
Gabriel Luiz Freitas Almeida
c64d469a83 🔧 chore(__main__.py): remove unused database_url parameter and related code for simplification
🔧 chore(__main__.py): remove unused env_file parameter and related code for simplification
🔧 chore(__main__.py): remove unused imports and variables for cleaner code
🔧 chore(__main__.py): remove unused load_params function for code cleanup
2023-08-04 00:05:03 -03:00
Gabriel Luiz Freitas Almeida
0a5ad3b06d refactor settings 2023-08-04 00:04:35 -03:00
Gabriel Luiz Freitas Almeida
dc8097ebd7 🔧 fix(types.py): add exception handling when evaluating field_value using ast.literal_eval to prevent potential errors
🔀 chore(types.py): import ast and contextlib modules for future use
2023-08-03 15:28:15 -03:00
Gabriel Luiz Freitas Almeida
18949de603 🐛 fix(base.py): handle parsing of code type values in Vertex class to prevent errors and improve error logging 2023-08-03 15:27:43 -03:00
Gabriel Luiz Freitas Almeida
d1657eb9e7 🔥 refactor(endpoints.py): remove unused imports and endpoints
The following changes were made:
- Removed unused imports from the file
- Removed the unused `get_load_custom_component_from_path` endpoint
- Removed the unused `get_load_custom_component_from_path_test` endpoint
2023-08-03 14:32:00 -03:00
Gabriel Luiz Freitas Almeida
6fbf7f7a54 🐛 fix(base.py): skip values with show == False and key != "code" when iterating over template_dict to improve filtering logic 2023-08-03 14:29:31 -03:00
Gabriel Luiz Freitas Almeida
ee63e5432d 🐛 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-03 14:22:20 -03:00
Gabriel Luiz Freitas Almeida
c11204d3c5 🔧 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-03 13:48:57 -03:00
Gabriel Luiz Freitas Almeida
d90b6c2691 🐛 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-03 11:43:18 -03:00
Gabriel Luiz Freitas Almeida
f4829bf21d 🔀 chore(base.py): import SQLDatabaseChain from langchain_experimental.sql with type ignore to suppress type checking error 2023-08-02 22:12:45 -03:00
Gabriel Luiz Freitas Almeida
d397f4457f 🔀 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-02 22:05:52 -03:00
Gabriel Luiz Freitas Almeida
81f195e8da 🔧 chore(constants.py): remove unused classes "Runnable" and "Generic" from CLASSES_TO_REMOVE list
🔇 chore(test_chains_template.py): comment out unused test_chains_settings test function
2023-08-02 15:57:45 -03:00
Gabriel Luiz Freitas Almeida
5d75d46aef 🐛 fix(loading.py): handle invalid JSON strings in kwargs by removing the key from params 2023-08-02 15:54:57 -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
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
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
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
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
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
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
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
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
566c48166e 🔀 refactor(custom_component.py): modify get_flow method to accept keyword arguments for flow_name and flow_id to improve flexibility and readability 2023-07-31 10:35:48 -03:00
Gabriel Luiz Freitas Almeida
9acb6fef36 🚀 feat(custom_component.py): add methods to retrieve flow by name and flow by id for CustomComponent
🐛 fix(custom_component.py): fix indentation issue in CustomComponent class
2023-07-31 10:26:27 -03:00
gustavoschaedler
7f23334f97 🐛 fix(directory_reader.py): add check for usage of 'Optional' type hint without importing it
 feat(directory_reader.py): add methods to check if a specific type hint is imported and used in function arguments
 feat(directory_reader.py): add method to check if a type hint is used but not imported in the code
 feat(directory_reader.py): add check for usage of 'Optional' type hint without importing it in the process_file method
2023-07-28 23:24:17 +01:00
Lucas Oliveira
115a784b66 Merge branch 'python_custom_node_component' of github.com:logspace-ai/langflow into python_custom_node_component 2023-07-28 15:21:14 -03:00
Lucas Oliveira
5e78f6be79 Changed gitignore 2023-07-28 15:19:31 -03:00
Gabriel Luiz Freitas Almeida
bdc62ba725 🐛 fix(__main__.py): change default value of workers option from -1 to 2 to limit the number of worker processes 2023-07-28 15:17:03 -03:00
Lucas Oliveira
eaceee9480 GitIgnore changed 2023-07-28 15:07:03 -03:00
Lucas Oliveira
1ea05b3584 Merge branch 'python_custom_node_component' of github.com:logspace-ai/langflow into python_custom_node_component 2023-07-28 14:49:11 -03:00
Lucas Oliveira
641bcb4a58 Fixed unique keys bug 2023-07-28 14:48:40 -03:00
gustavoschaedler
2f0ce5fc1b 🐛 fix(types.py): change default value of "error" field in component_template to None for better consistency and readability
🐛 fix(base.py): change default value of "error" field in FrontendNode class to None for better consistency and readability
2023-07-28 18:32:03 +01:00
gustavoschaedler
36772dac99 🐛 fix(types.py): add missing error field to component template in build_invalid_menu function
🐛 fix(base.py): add missing error field to FrontendNode class to match the template structure
2023-07-28 16:58:04 +01:00
Gabriel Luiz Freitas Almeida
98eca09270 🔧 fix(custom_component.py): add type hints to improve code readability and maintainability
🔧 fix(custom_component.py): add return type hint to 'load_flow' method for better code documentation
🔧 fix(custom_component.py): add return type hint to 'list_flows' method for better code documentation
2023-07-28 11:22:40 -03:00
Gabriel Luiz Freitas Almeida
25a59d745d 🔧 chore(types.py): refactor add_new_custom_field function to improve readability and maintainability
🔧 chore(types.py): refactor build_field_config function to improve readability and maintainability
2023-07-28 11:22:10 -03:00
gustavoschaedler
d579257f0d 🐛 fix(types.py): handle exceptions when getting custom function and building field config to prevent crashes and log errors
 feat(types.py): add validation check for custom component before building field config to ensure only valid components are processed
🐛 fix(types.py): handle empty function_args case to prevent errors when adding extra fields to the frontend node
🐛 fix(types.py): handle exceptions when creating custom component to prevent crashes and log errors
2023-07-28 01:21:05 +01:00