🐛 fix(interface/loading.py): fix custom_node instantiation to handle classes without initialize method
✨ feat(template/frontend_node/prompts.py): change type_name to match class name
✨ feat(template/frontend_node/tools.py): change type_name to match class name
🔥 chore(test_agents_template.py): remove test_agents_settings and update initialize_agent test
The vertex_type assignment in the Vertex class was not handling uppercase template types correctly. This has been fixed to handle both uppercase and lowercase types. The custom_node instantiation in the instantiate_class function was not handling classes without an initialize method correctly. This has been fixed to instantiate the class directly if the initialize method is not present. The type_name in the ZeroShotPromptNode and PythonFunctionToolNode classes have been changed to match the class name. The test_agents_settings test has been removed as it is no longer necessary and the initialize_agent test has been updated to match the new AgentInitializer class name.
🔨 refactor(base.py): add CustomAgentExecutor class and move CustomChain to base.py
🔨 refactor(custom_lists.py): update reference to CustomChain to CustomAgentExecutor
The CustomChain class has been renamed to CustomAgentExecutor to better reflect its purpose. The class has been moved to base.py and a new CustomAgentExecutor class has been added to custom.py. The reference to CustomChain in custom_lists.py has been updated to CustomAgentExecutor. These changes improve the semantics of the code and make it easier to understand the purpose of the classes.
✨ feat(langflow): add new chains to config.yaml and custom chains to interface/chains/custom.py
The following chains were added to the config.yaml file: RetrievalQA, RetrievalQAWithSourcesChain, QAWithSourcesChain, ConversationalRetrievalChain, and CombineDocsChain. These chains were added to improve the functionality of the application and provide more options for users.
In addition, custom chains were added to the interface/chains/custom.py file. The CombineDocsChain was added to allow users to combine multiple documents into a single document for use in the question answering chains. The QA_CHAIN_TYPES constant was also added to the frontend_node/constants.py file to provide a list of available question answering chain types.
🔀 refactor(custom_lists.py): merge CUSTOM_AGENTS and CUSTOM_CHAINS into CUSTOM_NODES
🔀 refactor(loading.py): add instantiate_chains function to instantiate chains
🔀 refactor(base.py): add CustomChain class
The changes add support for a new chain called load_qa_chain to CUSTOM_NODES. CUSTOM_AGENTS and CUSTOM_CHAINS are merged into CUSTOM_NODES. A new function called instantiate_chains is added to instantiate chains. A new class called CustomChain is added to the base.py file. This class is used to define a custom chain.
✨ feat(frontend_node): add extra fields to MemoryFrontendNode and ChainFrontendNode
The unused code in custom.py has been removed. The MemoryFrontendNode and ChainFrontendNode classes have been updated to include additional fields that are required for their respective templates. The MemoryFrontendNode now has a return_messages field, and the ChainFrontendNode now has a memory field. These fields are optional and can be toggled on or off as required.
This commit only updates the version number of the package in the pyproject.toml file. The version number is updated to 0.0.84. This is a chore commit as it does not add any new features or fix any bugs, but it is necessary to keep track of the package version.
The conditional statement in line 292 was not properly checking for undefined and null values, which could lead to unexpected behavior. The fix ensures that the statement checks for all falsy values, including undefined and null.
The new build_and_run target removes the dist folder, builds the application, installs it, and runs it. This target is useful for quickly building and running the application in a development environment.
✨ feat(__main__.py): add banner with title and info text to be displayed on server start
🐛 fix(App.tsx): fix API endpoint URL
The sendAll function URL had an extra forward slash. The API endpoint URL in App.tsx was incorrect and has been fixed. A banner with a title and info text has been added to be displayed on server start to provide users with more information about the application.
The PythonFunction tool has been added to the list of available tools in the config.yaml file. This allows the backend to use Python functions as part of the language processing pipeline.
🧪 test(test_database.py): add test case for creating flows without a flow
The flow field is now optional to allow creation of flows without a flow. This is useful when creating a flow that will be populated later. A test case was added to ensure that flows can be created without a flow.
🐛 fix(llms.py): add name check before checking if "azure" is in name.lower()
🔨 refactor(test_database.py): rename updated_flow_style variable to to_update_flow_style for clarity
The update_settings function now has an optional database_url parameter to allow for more flexibility in updating settings. The llms.py file now checks if the name variable is not None before checking if "azure" is in name.lower(). In test_database.py, the updated_flow_style variable is renamed to to_update_flow_style for clarity.
✨ feat(test_database.py): add tests for creating, reading, updating, and deleting FlowStyle objects
🚨 fix(test_database.py): fix flow_id type in test_read_flow to be UUID instead of string
🚨 fix(test_database.py): fix HTTP method in test_update_flow from PUT to PATCH
🚨 fix(test_database.py): fix API endpoint URLs in test_update_flow and test_update_nonexistent_flow
🚨 fix(test_database.py): fix HTTP method in test_update_flow_idempotency from PUT to PATCH
🚨 fix(test_database.py): fix API endpoint URLs in test_update_flow_idempotency
🚨 fix(test_database.py): fix HTTP method in test_delete_flow from DELETE to PATCH
🚨 fix(test_database.py): fix API endpoint URLs in test_delete_flow and test_delete_nonexistent_flow
🚨 fix(test_database.py): fix API endpoint URLs in test_read_flows and test_read_empty_flows
The changes in this commit fix the API endpoint URLs to include the version number and fix various HTTP methods. Additionally, tests were added for creating, reading, updating, and deleting FlowStyle objects. The test_read_flow was fixed to use UUID instead of string for the flow_id.
🚨 test(database.py): add tests for CRUD operations on FlowStyle model
This commit adds tests for the CRUD operations on the FlowStyle model. The tests include creating a flow style, reading all flow styles, reading a single flow style, updating a flow style, and deleting a flow style. These tests ensure that the API endpoints for the FlowStyle model are working as expected.
The FlowListRead schema is added to support reading a list of flows with their styles. The SQLModelSerializable base model is added to support serialization of SQLModel objects to JSON using orjson. This improves performance and reduces memory usage.
🐛 fix(flow.py): add optional style relationship to Flow model
The style relationship is now optional to allow for flows without styles. This is achieved by setting the uselist parameter of the sa_relationship_kwargs to False.
✨ feat(flow.py): add FlowReadWithStyle and FlowUpdate models
The FlowReadWithStyle model is added to support reading a flow with its style. The FlowUpdate model is added to support updating a flow.
The FlowStyle model is added to the project, which represents the style of a flow. It has a color and an emoji field, and a foreign key to the Flow model. The CRUD classes are also added to the file, which are FlowStyleCreate, FlowStyleRead, and FlowStyleUpdate. These classes are used to create, read, and update FlowStyle instances respectively.
The imports for the deleted FlowStyle model are removed from flow_styles.py. The comments for the FlowStyleCreate class are updated to reflect the fields it contains.
✨ feat(router.py): add new routers for flows and flow styles
🔧 refactor(__init__.py): add new routers to __all__ list
🔧 refactor(conftest.py): update import statement for get_session function
The unused code and endpoints related to flows have been removed from the database.py file. New routers for flows and flow styles have been added to the router.py file. The __all__ list in the __init__.py file has been updated to include the new routers. The import statement for the get_session function in the conftest.py file has been updated to reflect the new location of the function.
The orjson library is added as a dependency to improve the performance of JSON serialization. This will help to reduce the time taken to serialize and deserialize JSON data, which is especially important in high-performance applications.
The Makefile has been updated to include the `install_backend` command as a dependency of the `backend` target. This ensures that the backend dependencies are installed before running the backend server.