-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix SQLDatabaseChain and other small fixes #711
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…t to enable support for SQL database chains 📦 chore(pyproject.toml): add langchain-experimental package as a dependency
….sql with type ignore to suppress type checking error
…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
ogabrielluiz
changed the title
Fix SQLDatabaseChain
Fix SQLDatabaseChain and other small fixes
Aug 3, 2023
ogabrielluiz
requested review from
anovazzi1
and removed request for
rodrigosnader
August 3, 2023 15:53
…CamelCase for better UI display 📝 chore(directory_reader.py): add comments to explain the purpose of changing the component name
…lways 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
… iterating over template_dict to improve filtering logic
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
… prevent errors and improve error logging
…sing ast.literal_eval to prevent potential errors 🔀 chore(types.py): import ast and contextlib modules for future use
…d 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
…ssing reference error ✨ feat(main.py): add Engine.update as a startup event to update the engine on app startup
…e 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
…ifacts gracefully
…meError when using it in instantiate_prompt function 🐛 fix(utils.py): add handle_partial_variables function to handle partial variables in prompt formatting
…ith a given PromptTemplate
…rl` 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.
…lass 🔥 refactor(custom_component.py): remove unused build method from CustomComponent class
… invoking chain with an empty dict input
… with other settings 🔀 chore(utils.py): rename `LANGFLOW_LANGCHAIN_CACHE` environment variable to `CACHE` for clarity and consistency
…to use it in LANGCHAIN_BASE_TYPES
- 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.
…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
…the component that failed to load for better debugging
…h duplicate paths ✨ feat(settings.py): add logging of components_path and updated settings values for debugging purposes
…monitoring 🔧 fix(endpoints.py): add logging statements to improve debugging and monitoring in the get_all() function
…n 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
…dule to fix type hinting 🚀 feat(component.py): add 'build' method to Component class to enforce implementation in subclasses
…mprove code readability
…y importing the CustomComponent class
…id_menu ✨ feat(types.py): improve component name generation logic based on component_output_types and file name
…n custom_repr method
…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
…mponents 🔧 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
…entation message 🐛 fix(custom_component.py): add support for custom representation of repr_value if it is a dictionary by using yaml.dump() function
…e attribute of a vertex object
gustavoschaedler
approved these changes
Aug 4, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.