Commit graph

2,386 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
a45947c01b 🚀 feat(vectorstores.py): add VectorStoreRetriever as an extra base class to VectorStoreFrontendNode
The VectorStoreFrontendNode class now has VectorStoreRetriever as an extra base class in addition to BaseRetriever. This change was made to improve the functionality of the class by allowing it to inherit from VectorStoreRetriever.
2023-06-25 18:37:05 -03:00
Gabriel Luiz Freitas Almeida
02befe5052 📝 docs(config.yaml): add documentation links for LlamaCpp and CTransformers integrations
This commit adds documentation links for the LlamaCpp and CTransformers integrations in the config.yaml file. The links point to the relevant documentation pages on the LangChain website. This improves the accessibility of the documentation for these integrations.
2023-06-25 09:27:44 -03:00
Gabriel Luiz Freitas Almeida
d523b7f8b0 fix: removing placeholders 2023-06-25 09:26:13 -03:00
Gabriel Luiz Freitas Almeida
d0893d2eb7 🔥 chore(test_prompts_template.py): remove unused test_few_shot_prompt_template function
The test_few_shot_prompt_template function is not being used and is not necessary for the tests. Removing it will make the code cleaner and easier to maintain.
2023-06-24 16:53:13 -03:00
Gabriel Luiz Freitas Almeida
e7ce83562f 🐛 fix(settings.py): change default values of settings attributes from list to dictionary
The default values of the settings attributes were changed from an empty list to an empty dictionary. This change was made to avoid errors that could occur when trying to access a non-existent key in the dictionary.
2023-06-24 16:38:24 -03:00
Gabriel Luiz Freitas Almeida
aa4b7bfc32 🐛 fix(GenericNode): add conditional rendering to documentation link to prevent empty href
The documentation link was previously always rendered, even if the href was empty. This caused an issue where the link would be clickable but lead to nowhere. The fix adds a conditional rendering to the link, so it is only rendered if the href is not empty.
2023-06-24 16:38:11 -03:00
Gabriel Luiz Freitas Almeida
99f0b803e9 🔨 refactor(tabsContext.tsx): improve code readability by adding whitespace and consistent formatting
The code has been refactored to improve readability by adding whitespace and consistent formatting. The function names have been updated to use camelCase for consistency. The updateDisplay_name function has been updated to use a logical OR operator instead of a ternary operator for better readability. The updateNodeDocumentation function has been added to update the node documentation. The updateNodeBaseClasses, updateNodeEdges, updateNodeDescription, and updateNodeTemplate functions have been updated to use consistent parameter names and whitespace.
2023-06-24 16:32:48 -03:00
Gabriel Luiz Freitas Almeida
f52feac7e5 🎨 style(GenericNode/index.tsx): remove unused imports and add documentation link to node toolbar
🚀 feat(api/index.ts): add documentation field to APIClassType
The unused imports were removed to improve code readability. A documentation link was added to the node toolbar to allow users to easily access the documentation for the node. The documentation field was added to the APIClassType to allow for the storage of a link to the documentation for the API class.
2023-06-24 16:32:32 -03:00
Gabriel Luiz Freitas Almeida
2de86cbac4 📝 docs(frontend_node): add set_documentation method to set the documentation of the frontend node
 feat(frontend_node): add documentation field to the frontend node dict representation
The `set_documentation` method is added to the `FrontendNode` class to allow setting the documentation of the frontend node. The `to_dict` method is updated to include the `documentation` field in the dict representation of the frontend node. This improves the readability and usability of the frontend node by providing documentation for the node.
2023-06-24 16:32:00 -03:00
Gabriel Luiz Freitas Almeida
08cdc15d98 🔍 refactor(base.py): add documentation support to LangChainTypeCreator
This commit adds a new property to the LangChainTypeCreator class called docs_map, which is a dictionary that maps the name of the component to its documentation link. The docs_map property is used to set the documentation of the component in the signature of the component. This change improves the readability and maintainability of the code by making it easier to add and update documentation for components.
2023-06-24 16:31:47 -03:00
Gabriel Luiz Freitas Almeida
3be8ac0d72 Update settings structure 2023-06-24 16:31:39 -03:00
Gabriel Luiz Freitas Almeida
c94094a2e7
Release 0.2 (#537) 2023-06-23 22:52:46 +00:00
Gabriel Luiz Freitas Almeida
01bc5e41bc 🔖 chore(pyproject.toml): bump up version to 0.2.0
The version number has been updated from 0.1.7 to 0.2.0 to reflect the changes made to 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.
2023-06-23 19:48:45 -03:00
Cristhian Zanforlin Lousa
27d7553fb6
Icons style - Lucide Icons (#529)
🎨 style(GenericNode): change nodeIcons import to nodeIconsLucide to
match the new icon library
🎨 style(NodeModal): change Icon type to any to fix type error
🎨 style(chatInput): remove unnecessary array brackets
🎨 style(DisclosureComponent): change Icon size to 22 to match the new
icon library
🎨 style(extraSidebarComponent): change nodeIcons import to
nodeIconsLucide to match the new icon library and add Search icon
🎨 style(components/index): add SVGProps to import and change Icon type
to any to fix type error

 feat(utils.ts): add support for Lucide icons to be used in the app to
improve UI and UX.
2023-06-23 18:34:52 -03:00
anovazzi1
1af05a2c97
Bugfix modals (#535) 2023-06-23 18:32:54 -03:00
Cristhian Zanforlin Lousa
f0476e20df 🎨 style(inputFileComponent): reduce size of FileSearch2 icon to improve UI aesthetics 2023-06-23 18:30:35 -03:00
Cristhian Zanforlin Lousa
b61c0ac23a 🐛 fix(modals): add unique key prop to TabsTrigger component to remove console warning
🎨 style(modals): add whitespace to Dialog component props for better readability
2023-06-23 18:27:51 -03:00
anovazzi1
faaa707722 Merge branch 'dev' of personal:logspace-ai/langflow into dev 2023-06-23 18:26:50 -03:00
anovazzi1
6abb03dfa1 refactor(tabsContext.tsx): add type annotations to function parameters and return types
feat(tabsContext.tsx): add support for display_name property in node templates to allow custom node names
fix(tabsContext.tsx): add null checks to prevent errors when processing flow edges and nodes
refactor(typesContext/index.ts): change template object type to APIClassType to match usage in tabsContext
2023-06-23 18:26:31 -03:00
Cristhian Zanforlin Lousa
3b20a40af8 Formatting code 2023-06-23 18:08:16 -03:00
Cristhian Zanforlin Lousa
eac1f7c922 Merge fix with dev 2023-06-23 18:06:51 -03:00
Cristhian Zanforlin Lousa
facfe6ac57 Merge branch 'dev' of https://github.com/logspace-ai/langflow into dev 2023-06-23 18:03:17 -03:00
Cristhian Zanforlin Lousa
c788d4c200 🐛 fix(extraSidebarComponent): fix key prop in DisclosureComponent and TooltipComponent to use unique values 2023-06-23 18:02:07 -03:00
anovazzi1
46b247d1a1
Remove unnecessary text-sm class from message sender name to improve readability (#531)
🐛 fix(chatMessage): remove unnecessary text-sm class from message sender
name to improve readability
2023-06-23 17:53:38 -03:00
Gabriel Luiz Freitas Almeida
363e6459cb 🚀 feat(documentloaders.py): add SlackDirectoryLoader to the list of document loaders
The SlackDirectoryLoader is added to the list of document loaders in the DocumentLoaderFrontNode class. This allows users to load zip files from Slack into the application.
2023-06-23 17:52:59 -03:00
anovazzi1
247e911620 Merge branch 'dev' of personal:logspace-ai/langflow into dev 2023-06-23 17:30:09 -03:00
anovazzi1
49bbb41e98 feat(frontend): add size="small" to ModalField input to improve UI consistency
feat(frontend): add save function to TabsContext to enable saving of changes made to tabs
fix(frontend): add save function to TabsContext in ParameterComponent to enable saving of changes made to tabs
2023-06-23 17:29:26 -03:00
anovazzi1
fc17bc541b refactor(dropdownComponent): add useEffect hook to update internalValue when value prop changes to avoid stale data 2023-06-23 17:28:33 -03:00
Gabriel Luiz Freitas Almeida
3940c0959d
Gitloader (#533)
Added GitLoader
2023-06-23 20:24:24 +00:00
anovazzi1
d06e8aa517 refactor(extraSidebarComponent): change ShadTooltip content to display the display_name property of data object instead of the key name to improve readability and user experience 2023-06-23 17:11:08 -03:00
anovazzi1
07125b8c8c Merge branch 'dev' of personal:logspace-ai/langflow into dev 2023-06-23 17:09:22 -03:00
anovazzi1
9bee33fa18 refactor(extraSidebarComponent): change variable name 't' to 'displayName' for better readability and clarity of code 2023-06-23 17:09:12 -03:00
Gabriel Luiz Freitas Almeida
8325caa76e 🔺 chore(pyproject.toml): update langchain dependency from 0.0.209 to 0.0.211
This commit updates the langchain dependency from version 0.0.209 to version 0.0.211. This is a minor version update that includes bug fixes and performance improvements.
2023-06-23 17:07:50 -03:00
anovazzi1
019e2b2bb4 refactor(GenericNode): change data.type to data.node.display_name to improve semantics and readability
feat(api): add display_name field to APIClassType to provide a human-readable name for the class
2023-06-23 17:06:58 -03:00
Gabriel Luiz Freitas Almeida
d9ec262752 formatting 2023-06-23 16:51:54 -03:00
Gabriel Luiz Freitas Almeida
0bab7ae714 🚀 feat(documentloaders.py): add fields to GitLoader template to support repository path, clone URL, branch, and file filter
The GitLoader template now has four new fields: repo_path, clone_url, branch, and file_filter. These fields allow the user to specify the repository path, clone URL, branch, and file extensions to be loaded. This improves the flexibility of the GitLoader template and allows it to be used in a wider range of scenarios. Additionally, a minor change was made to the add_extra_fields method to ensure that the field.show attribute is set to True for all fields.
2023-06-23 16:50:22 -03:00
Gabriel Luiz Freitas Almeida
15ac75ecc5 🔨 refactor(loading.py): add support for filtering files by extension in document loader
The `instantiate_documentloader` function now supports filtering files by extension using a `file_filter` parameter. The parameter is a string of comma-separated extensions, and the function now converts it into a lambda function that filters files based on whether their name contains any of the specified extensions. This improves the flexibility of the document loader by allowing it to load only specific types of files.
2023-06-23 16:50:11 -03:00
Gabriel Luiz Freitas Almeida
96bab94b14 🔥 chore(chains.py): remove unnecessary commented line
The commented line is not needed and can be safely removed.
2023-06-23 16:13:16 -03:00
Gabriel Luiz Freitas Almeida
a0b81f6227
Upload File Endpoint / Better VectorStore Implementation (#525) 2023-06-23 19:09:26 +00:00
Gabriel Luiz Freitas Almeida
02c6d77b64 🐛 fix(base.py): sort fields alphabetically before sorting by DIRECT_TYPES
The fields in the Template class were previously sorted by DIRECT_TYPES, which caused issues when fields had the same field_type. Sorting alphabetically first ensures that fields are sorted in a consistent manner before sorting by DIRECT_TYPES.
2023-06-23 15:53:48 -03:00
Gabriel Luiz Freitas Almeida
d9fa17189e 🎨 style(MongoDB icon): rename SlackSVG to MongoDBSVG for better naming
The SlackSVG component was renamed to MongoDBSVG to better reflect the actual icon being used. This improves the naming consistency and makes the code more readable.
2023-06-23 15:33:10 -03:00
Gabriel Luiz Freitas Almeida
99121d95c1 🔀 refactor(loading.py): use dictionary to initialize vector stores
The `instantiate_vectorstore` function now uses a dictionary to initialize vector stores instead of a series of if-else statements. This improves the readability and maintainability of the code. A new dictionary `vecstore_initializer` is added to `vector_store.py` to map the class names of vector stores to their respective initialization functions.
2023-06-23 14:32:15 -03:00
Gabriel Luiz Freitas Almeida
19bd687b3f 📦 chore(pyproject.toml): add certifi package to dev dependencies
The certifi package is added to the dev dependencies to ensure that the package is available during development. This package provides Mozilla's carefully curated collection of Root Certificates for validating the trustworthiness of SSL certificates while making HTTPS requests.
2023-06-23 13:20:28 -03:00
Gabriel Luiz Freitas Almeida
fb7bcb50e5 🚀 feat(loading.py): add support for MongoDBAtlasVectorSearch vector store
The `instantiate_vectorstore` function now supports the `MongoDBAtlasVectorSearch` vector store. This allows for the use of MongoDB Atlas as a vector store for Langflow. The `search_kwargs` parameter is now supported for all vector stores that have a `as_retriever` method. This allows for the configuration of the vector store's search parameters.
2023-06-23 13:20:02 -03:00
Gabriel Luiz Freitas Almeida
ea0231025f feat(vectorstores.py): add support for index_name parameter in MongoDBAtlasVectorSearch template
The hardcoded values for db_name, collection_name, and index_name have been removed from the initialize_mongodb function and are now required parameters. This makes the function more flexible and allows it to be used with different databases and collections. The support for the index_name parameter has been added to the MongoDBAtlasVectorSearch template in vectorstores.py, which allows the user to specify the name of the index to be used in the search.
🐛 fix(vector_store.py): remove hardcoded values for db_name, collection_name, and index_name and make them required parameters
2023-06-23 13:19:30 -03:00
Gabriel Luiz Freitas Almeida
81fb84b081 🎨 style(MongoDBIcon): add MongoDBIcon component to frontend app
The MongoDBIcon component was added to the frontend app to be used as an icon for MongoDB Atlas Vector Search. The icon was added as an SVG file and imported as a React component. The component was then added to the nodeIcons object in the utils.ts file.
2023-06-23 13:18:52 -03:00
Gabriel Luiz Freitas Almeida
086ed52923 📦 chore(pyproject.toml): add pymongo dependency to dev dependencies
The pymongo package is added to the dev dependencies section of the pyproject.toml file. This package is required for development purposes.
2023-06-23 12:38:22 -03:00
Gabriel Luiz Freitas Almeida
4cc2fae52b 🚀 feat(langflow): add support for MongoDB Atlas Vector Search in vectorstores
 feat(langflow): add support for search_kwargs field in VectorStoreFrontendNode
The changes add support for MongoDB Atlas Vector Search in the vectorstores. The `MongoDBAtlasVectorSearch` class is now imported and initialized in `vector_store.py`. The `initialize_mongodb` function is added to initialize the MongoDB Atlas Vector Search class. The `VectorStoreFrontendNode` class is updated to add the `mongodb_atlas_cluster_uri`, `collection_name`, and `db_name` fields. The `search_kwargs` field is also added to the `VectorStoreFrontendNode` class to allow users to pass additional search parameters to the vector store.
2023-06-23 12:38:02 -03:00
Gabriel Luiz Freitas Almeida
dc0a772635 🚚 chore(endpoints.py): reorder endpoints to keep backwards compatibility
The `/predict/{flow_id}` endpoint was moved above the `/process/{flow_id}` endpoint to maintain backwards compatibility with existing clients.
2023-06-23 12:36:46 -03:00
Gabriel Luiz Freitas Almeida
bcb80a08b2 🐛 fix(loading.py): remove unnecessary type hinting for allowed_tools variable
The type hinting for allowed_tools variable is unnecessary as it is already defined in the previous line. Removing the type hinting improves the readability of the code.
2023-06-23 11:04:03 -03:00