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
🐛 fix(AccordionComponent/index.tsx): prevent default behavior of Backspace key to improve user experience
🐛 fix(floatComponent/index.tsx): prevent default behavior of Backspace key to improve user experience
🐛 fix(inputComponent/index.tsx): prevent default behavior of Backspace key to improve user experience
🐛 fix(inputListComponent/index.tsx): prevent default behavior of Ctrl+Backspace key combination to improve user experience
🐛 fix(intComponent/index.tsx): prevent default behavior of Backspace key to improve user experience
🐛 fix(genericModal/index.tsx): prevent default behavior of Backspace key to improve user experience
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
🚩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
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.