The SupabaseVectorStore type requires additional fields such as table_name, query_name, supabase_url, and supabase_service_key. These fields are added to the extra_fields list and are then added to the list of fields that are displayed to the user. This change allows the user to create a SupabaseVectorStore with the required fields.
🚀 feat(vector_store.py): add support for initializing SupabaseVectorStore
This commit adds support for initializing new vector store types in the loading.py file. Specifically, the initialize_weaviate, initialize_faiss, and initialize_supabase functions were added to support the Weaviate, FAISS, and SupabaseVectorStore vector stores, respectively. The vector_store.py file was also updated to include the SupabaseVectorStore class and the initialize_supabase function. This allows for more flexibility in choosing vector stores for the application.
The websockets version was downgraded to 10.3 to fix compatibility issues with other dependencies. Supabase was added to the dependencies to support it as a vector store. The initialize_supabase function was added to initialize the Supabase client and return the class object. This allows the use of Supabase as a vector store in the application.
🚀 chore(pyproject.toml): downgrade websockets version to 10.3
🚀 chore(pyproject.toml): add supabase to dependencies
The pinecone-client dependency was added to the dev dependencies section of the pyproject.toml file. This was done to enable the use of Pinecone in the development environment.
This commit adds support for Weaviate and FAISS vector stores to the existing Pinecone, Qdrant, and Chroma vector stores. The `initialize_weaviate` function initializes Weaviate and returns the class object. The `initialize_faiss` function initializes FAISS and returns the class object. These functions are used to initialize the respective vector stores. The `docs_in_params` function is used to check if there are documents in the parameters.
The FAISS vector store type is now supported and can be configured with the folder_path and index_name fields. The folder_path field specifies the local path to the FAISS index, while the index_name field specifies the name of the index. Additionally, a new client_kwargs field has been added to support additional client configuration options.
✨ feat(schemas.py): add StreamData class to handle SSE messages
✨ feat(frontend): add RadialProgress and ProgressBar components
🔧 chore(frontend): add daisyui to project dependencies
🎨 style(headerComponent): comment out unused code
✨ feat(ui/progress.tsx): add Progress component to reuse in other components
✨ feat(types/components): add ProgressBarType and RadialProgressType to use in components
🎨 style(tailwind.config.js): add daisyui plugin to tailwind configuration to use in the project
The return_direct field is a boolean field that allows the user to specify whether the output of the Python function should be returned directly or wrapped in a dictionary. This field is added to the TemplateField list of the PythonFunctionToolNode class.
The payload key was changed from "message" to "inputs" to match the API requirements. This change ensures that the API can correctly parse the request payload.
✨ feat(schemas.py): add ProcessResponse schema to represent the response of the process endpoint
The PredictRequest schema has been renamed to InputRequest to better reflect its purpose. The message field has been removed as it is not needed. TweaksRequest has been added to represent the request body for the tweaks endpoint. UpdateTemplateRequest has been added to represent the request body for updating a template. ProcessResponse has been added to represent the response of the process endpoint, which returns a dictionary as the result.
The code has been refactored to improve readability by adding type hints and reformatting the code. The initialize_pinecone and initialize_chroma functions have been updated to support initializing objects from existing indexes. If there are no docs in the params, the functions will return an existing index. If there are docs in the params, the functions will create a new index. The initialize_qdrant function has not been changed.
🔨 refactor(vector_store.py): improve code readability by adding type hints and reformatting code
This commit removes unused imports and variables from the process.py file. The get_result_and_thought function has been simplified to take a dictionary of inputs instead of a single message string. The function now returns the output of the langchain_object instead of a tuple of result and thought.
The MemoryFrontendNode template now includes two new fields, input_key and output_key, which are string fields that are not required and are shown in the advanced section of the template. These fields can be used to specify the input and output keys for the memory node.
🔀 refactor(constants.tsx): update BASE_API_URL to reflect the changes in the predict_flow endpoint name
The predict_flow endpoint has been renamed to process_flow to better reflect its functionality. The inputs are now passed as a dictionary instead of a PredictRequest object. The tweaks parameter is now optional and is passed as a dictionary. The response model has been updated to reflect the changes in the response. The BASE_API_URL constant in constants.tsx has been updated to reflect the changes in the endpoint name.
The VectorStoreFrontendNode class now supports the Pinecone vector store type. Two new fields, pinecone_api_key and pinecone_env, have been added to the extra_fields list. The add_extra_fields method has been updated to add these fields to the template if the type_name is Pinecone. The add_field method has been updated to add all fields in the extra_fields list to the template. The add_field method has also been updated to remove the text_key field if the field name is "text_key". Finally, the fields list has been updated to include the new fields.
GitLoader is added to documentloaders to allow loading of documents from a Git repository. Pinecone is added to vectorstores to allow for vector similarity search. These additions improve the functionality of the application by allowing for more diverse sources of data and more efficient search capabilities.
🚀 feat(base.py): update import statement for loading module
🚀 feat(vector_store.py): add initialization functions for pinecone, chroma, and qdrant
The unused imports and endpoint for node validation were removed from validate.py. The import statement for the loading module was updated in base.py. Initialization functions for pinecone, chroma, and qdrant were added to vector_store.py to allow for the creation of objects from the respective services.
The `return_source_documents` field is added to the template as a boolean field. It is not a required field and is set to `True` by default. This field is used to determine whether the source documents should be returned or not. It is displayed in the frontend and can be toggled by the user.
The function build_template was renamed to build_file_field to improve naming consistency. A metadata field of type dict was added to the document loader template to allow for additional information to be passed along with the document. The format_field method was updated to show the metadata field when it is present.
🔨 refactor(documentloaders.py): rename build_template function to build_file_field for better semantics
📝 docs(initialize): add empty __init__.py file to initialize directory
The initialize directory was added to the project, but it was missing an __init__.py file. This file is necessary to make the directory a package and allow importing modules from it. An empty __init__.py file was added to the directory to fix this issue.
A new PineconeIcon component was added to the nodeIcons object in utils.ts. This allows the Pinecone icon to be used in the frontend application. The icon was added to improve the visual representation of the Pinecone node in the application.
🐛 fix(process.py): correctly update template_data with tweak_value
The file extension is no longer included in the saved file name to avoid issues with file extensions that may not be supported. In process.py, the tweak_value is now correctly updated in the template_data dictionary. The key is now set to "value" for all tweaks except for "file_path" where the key is set to the name of the tweak.
✨ feat(loading.py): add persist parameter to Chroma vector store instantiation to enable persistence of vector store
The persist parameter is now extracted from the params dictionary before instantiating the Chroma vector store. This improves readability and reduces the complexity of the code. The persist parameter is now added to the Chroma vector store instantiation to enable persistence of the vector store. This allows the vector store to be reused across multiple sessions, improving performance and reducing the time required to load the vector store.
🐛 fix(vectorstores.py): add persist field to Weaviate vector store type
The `VectorStoreFrontendNode` class now supports the Chroma vector store type. A new boolean field `persist` has been added to the Chroma vector store type. The `add_extra_fields` method has been updated to add the `persist` field to the Chroma vector store type. The `format_field` method has been updated to include the `persist` field in the basic fields. Additionally, the `add_extra_fields` method has been updated to add the `weaviate_url` field to the Weaviate vector store type.
The changes in this commit are purely cosmetic. The indentation and formatting issues in the code have been fixed to improve readability and maintainability.
The version number has been updated from 0.1.6 to 0.1.7 to reflect the changes made in the package. This is a chore commit as it does not add any new features or fix any bugs, but rather updates the version number.
The QueryCheckerTool class was renamed to QuerySQLCheckerTool to match the correct class name. This change ensures that the correct class is being used and avoids any potential errors that may arise from using the wrong class name.
The langchain dependency has been updated to version 0.0.208 to ensure compatibility with the latest version of the package. The package version has been bumped to 0.1.6 to reflect the changes made.
🔼 chore(pyproject.toml): update langchain dependency to version 0.0.208
The save_uploaded_file function now uses the folder_name parameter instead of file_name to improve semantics. The appdirs library is now used to get the user cache directory and a folder for langflow cache is created. The sha256 hash of the file content is now used as the file name to avoid collisions and improve security. A folder is now created for each flow_id in the save_uploaded_file function. The code that deletes files after loading in the instantiate_documentloader function has been removed as it is unnecessary and can cause issues.
🐛 fix(endpoints.py): change file_name parameter to folder_name in save_uploaded_file function
🔒 chore(utils.py): use appdirs to get user cache directory and create a folder for langflow cache
🔒 chore(utils.py): use sha256 hash of file content as file name to avoid collisions and improve security
🔒 chore(utils.py): create folder for each flow_id in save_uploaded_file function
This change updates an event parameter type in BuildTrigger to improve type safety. Specifically, an event parameter type was modified from 'any' to a more specific type to avoid invalid use of the event parameter.
The event name was changed from "node" to "message" to better reflect the nature of the data being sent. The data being sent is a message response from the server, not a node in the graph.
🐛 fix(buildTrigger): handle error response from server when starting a build
The ProgressBarComponent import was removed as it was not being used. The error handling was improved to handle the case where the server returns an error response when starting a build. The error message is now displayed to the user and the build state is reset.
🐛 fix(chat.py): fix StreamData class import statement
✨ feat(chat.py): add progress tracking and node building events to stream_build function
The unused import statement has been removed to improve code readability. The StreamData class import statement has been fixed to avoid errors. Progress tracking and node building events have been added to the stream_build function to provide more information to the user about the build process.