🔒 chore(auth.py): refactor get_current_user function to use database session instead of fake_users_db for retrieving user information
🔒 chore(auth.py): refactor get_current_active_user function to use database session instead of fake_users_db for retrieving user information
🔒 chore(user.py): refactor get_user function to use database session instead of fake_users_db for retrieving user information
🔒 chore(login.py): refactor login_for_access_token function to use database session instead of fake_users_db for authentication and token creation
🔒 feat(models.py): add User model to represent user data in the database
🔒 feat(base_control.py): add BaseControl model to represent common control fields in database models
feat(reactflowUtils.ts): add getConnectedNodes function to retrieve connected nodes based on an edge
fix(styleUtils.ts): remove unused getConnectedNodes function
This commit adds a new file 'custom.py' under the 'src/backend/langflow/components/custom_components' directory. The file contains the implementation of a custom component called 'YourComponent'.
The 'YourComponent' class extends the 'CustomComponent' class from the 'langflow' library. It has a display name of "Custom Component" and a description of "My description".
The component has a 'build_config' method that returns a configuration object with a single property 'url'. The 'url' property is multiline and required.
The 'build' method of the component takes in a 'url' string, a 'llm' object of type 'BaseLLM', and a 'prompt' object of type 'PromptTemplate'. It makes a GET request to the provided 'url', runs the response text through an 'LLMChain' with the given 'llm' and 'prompt', and returns a 'Document' object with the resulting page content.
✨ 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
🐛 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
📝 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
✨ 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
✨ 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