This commit adds a new file called `extract_info_from_class.py` containing a `ClassCodeExtractor` class that can extract information (imports, class details and functions) from a Python class code. It also adds a function called `is_valid_class_template` that checks if a given Python class code matches a certain template. Additionally, the commit adds a new endpoint in the `/custom_component` route of `endpoints.py` that returns a dictionary of all `langchain` types created by a specific creator. Finally, the commit adds a new section to `types.py` named `template_node`, which describes a default dictionary that can be used to define a new node for Langflow's template editor.
🚀 feat(frontend): add hover effect to file search icon in InputFileComponent
🚀 feat(frontend): add support for dark mode in alert icons
🚀 feat(frontend): add support for dark mode in dropdown chevron icon
🚀 feat(frontend): add support for dark mode in success alert icon
🚀 feat(frontend): add support for dark mode in notice alert icon
🚀 feat(frontend): add support for dark mode in error alert icon
🚀 feat(frontend): add support for process.env.PORT environment variable to be able to run app on a configurable port
🚀 feat(frontend): add parameter types to GenericNode component
🚀 feat(frontend): add hover effect to external link icon in CodeAreaComponent
🚀 feat(frontend): add hover effect to plus icon in MenuBar component
🚀 feat(frontend): add hover effect to settings icon in MenuBar component
🚀 feat(frontend): add hover effect to undo icon in MenuBar component
🚀 feat(frontend): add hover effect to redo icon in MenuBar component
🎨 style(inputListComponent): add space before self-closing tag to improve readability
🎨 style(promptComponent): add space before self-closing tag to improve readability
🎨 style(ApiModal): fix indentation to improve readability
🎨 style(chatInput): add space before self-closing tag to improve readability
🎨 style(chatMessage): remove unnecessary line breaks to improve readability
🎨 style(fileComponent): add space before self-closing tag to improve readability
🎨 style(chatModal): remove unnecessary line breaks to improve readability
🎨 style(codeAreaModal): fix indentation to improve readability
🎨 style(genericModal): fix indentation to improve readability
🎨 style(DisclosureComponent): add space before self-closing tag to improve readability
🎨 style(extraSidebarComponent): fix indentation to improve readability
The import statements for the weaviate and pinecone libraries were causing import errors. Adding the `# type: ignore` comment suppresses these errors and allows the code to run without issues.
This commit adds type hinting to the function arguments of `get_result_and_thought` and `process_graph_cached` functions in `process.py` file. This improves code readability and maintainability.
🐛 fix(chatMessage): replace ChatBubbleOvalLeftEllipsisIcon with MessageCircle icon for consistency and better semantics
🎨 style(frontend): replace heroicons with lucide-react icons for consistency and better performance
🐛 fix(ApiModal): replace CodeBracketSquareIcon with Code2 icon for better semantics and consistency
🎨 style(frontend): replace heroicons with lucide-react icons for consistency and better design
🎨 style(genericModal/index.tsx): replace DocumentTextIcon with FileText icon from lucide-react library
🎨 style(importModal/buttonBox/index.tsx): remove unused imports
🎨 style(DisclosureComponent/index.tsx): replace ChevronRightIcon with ChevronRight icon from lucide-react library
🎨 style(extraSidebarComponent/index.tsx): replace Bars2Icon with Menu icon from lucide-react library
🔥 chore(entities/index.ts): remove unused HomeIcon import from heroicons-react library
This commit updates the langchain dependency from version 0.0.208 to version 0.0.209. This is a minor version update and is done to keep the dependency up-to-date with the latest features and bug fixes.
🐛 fix(graph.py): change message variable to a dictionary to match the expected input of get_result_and_thought function and update the assertion to check if the result is a dictionary instead of a string
The test for agents_template.py was updated to include the openai-multi-functions agent in the list of agents. This was done to ensure that the test coverage for the agent is complete.
The test for graph.py was updated to change the message variable to a dictionary to match the expected input of the get_result_and_thought function. The assertion was also updated to check if the result is a dictionary instead of a string. This was done to ensure that the test coverage for the function is complete.
The `initialize_chroma` function had redundant code that was removed. The `embedding_function` parameter was renamed to `embedding` to match the parameter name used in the `class_object` constructor. The `documents` and `texts` parameters were being used interchangeably, so the code was updated to use only `documents`.
The `name` parameter in the `format_field` method of the `DocumentLoaderFrontNode` class now uses the `Optional` type hint to indicate that it can be None. This improves the code's readability and makes it easier to understand the expected behavior of the method.
The function now checks if "texts" is in the params dictionary and renames it to "documents" for consistency. The "supabase_url" and "supabase_service_key" are now removed from the params dictionary and passed directly to the create_client function. The function also removes the "documents" and "texts" keys from the params dictionary if there are no documents in the params. This improves the readability of the code and removes redundant code.
The log level of the sorted vertices in the generator_build method of the Graph class has been changed from info to debug. This is because the sorted vertices are not critical information and are only useful for debugging purposes.
✨ feat(vector_store.py): add support for Supabase client object to be passed in as a parameter
The 'texts' parameter has been renamed to 'documents' to improve semantics. This change makes it clearer that the parameter is a list of documents. Additionally, support for a Supabase client object has been added as a parameter. This allows for more flexibility in the initialization of the SupabaseVectorStore class.
The SupabaseVectorStore is now supported in the vectorstores configuration in the config.yaml file. The SupabaseIcon has been added to the nodeIcons object in the utils.ts file to be able to display the icon for the SupabaseVectorStore.
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
🐛 fix(parameterComponent): fix key prop warning by generating rando key
using new function getRandomKeyByssmm
✨ feat(parameterComponent): add support for dynamic rendering of
parameter component by grouping data by family
🐛 fix(menuBar): fix DropdownMenuTrigger component by adding asChild prop
🐛 fix(card.tsx): change p tag to div tag to fix accessibility issue
🐛 fix(extraSidebarComponent): fix key prop warning by adding key prop to
Tooltip component
✨ feat(utils.ts): add new function getRandomKeyByssmm to generate random
keys for components
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.
✨ feat(parameterComponent): add support for dynamic rendering of parameter component by grouping data by family
🐛 fix(menuBar): fix DropdownMenuTrigger component by adding asChild prop
🐛 fix(card.tsx): change p tag to div tag to fix accessibility issue
🐛 fix(extraSidebarComponent): fix key prop warning by adding key prop to Tooltip component
✨ feat(utils.ts): add new function getRandomKeyByssmm to generate random keys for components
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.
refactor(codeAreaComponent): change template to nodeClass and setTemplate to setNodeClass to improve semantics
refactor(API): change UpdateTemplate function parameter from template to nodeClass to improve semantics
refactor(codeAreaModal): change template to nodeClass and setTemplate to setNodeClass to improve semantics and fix bug
refactor(types): add APIClassType to import and change APITemplateType to import in relevant files to improve semantics
fix(API): fix UpdateTemplate function return type to match the actual response
fix(vite.config.ts): add dynamic_node route to apiRoutes array to proxy requests to backend