Skip to content
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 45 commits into from
Aug 4, 2023
Merged

Fix SQLDatabaseChain and other small fixes #711

merged 45 commits into from
Aug 4, 2023

Conversation

ogabrielluiz
Copy link
Contributor

@ogabrielluiz ogabrielluiz commented Aug 3, 2023

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.

…t to enable support for SQL database chains

📦 chore(pyproject.toml): add langchain-experimental package as a dependency
@ogabrielluiz ogabrielluiz added the Release Label to be set only on release PR label Aug 3, 2023
….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 ogabrielluiz changed the title Fix SQLDatabaseChain Fix SQLDatabaseChain and other small fixes Aug 3, 2023
@ogabrielluiz 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
…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
…meError when using it in instantiate_prompt function

🐛 fix(utils.py): add handle_partial_variables function to handle partial variables in prompt formatting
…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
… with other settings

🔀 chore(utils.py): rename `LANGFLOW_LANGCHAIN_CACHE` environment variable to `CACHE` for clarity and consistency
ogabrielluiz and others added 21 commits August 4, 2023 08:33
- 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
…id_menu

✨ feat(types.py): improve component name generation logic based on component_output_types and file name
…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
Copy link
Contributor

@gustavoschaedler gustavoschaedler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gustavoschaedler gustavoschaedler merged commit 59a0b02 into main Aug 4, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release Label to be set only on release PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants