Commit graph

11,619 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
c51a90c537 🚀 feat(custom.py): add AgentType enum to improve readability and type safety
The `AgentType` enum is added to the `langchain.agents.custom` module to improve readability and type safety. The `InitializeAgent` class now uses the `AgentType` enum to ensure that the `agent` parameter is a valid value from the enum.
2023-06-26 13:27:05 -03:00
Lucas Oliveira
2b08969c0d 🎨 style(chatTrigger, formTrigger, formModal): change absolute positioning to fixed positioning to improve UI layout and consistency, added ShadCN modal 2023-06-26 12:00:53 -03:00
Lucas Oliveira
ea65c58682 🐛 fix(chatComponent): fix ChatTrigger and FormTrigger open state to open when either of them is clicked 2023-06-26 11:48:25 -03:00
Lucas Oliveira
4303e9efb0 Merge branch 'form_io' of github.com:logspace-ai/langflow into form_io 2023-06-26 11:45:31 -03:00
Lucas Oliveira
90cc4023e5 Added form button to bottom right and copied chat modal 2023-06-26 11:45:27 -03:00
carlosrcoelho
947c921a48 adjusted footer 2023-06-26 11:38:35 -03:00
Gabriel Luiz Freitas Almeida
89286c6456 🔨 refactor(utils.py): extract build_input_keys_response function to improve code reusability
🚀 feat(chat.py): use build_input_keys_response function to build input keys response
The build_input_keys_response function was extracted from the remove_api_keys function to improve code reusability. It builds the input keys response object, which contains the input keys and memory keys of a langchain object. The chat.py file now uses this function to build the input keys response object instead of building it manually. This improves code readability and reduces code duplication.
2023-06-26 10:52:53 -03:00
Lucas Oliveira
466d583103 Merge branch 'form_io' of github.com:logspace-ai/langflow into form_io 2023-06-26 10:34:43 -03:00
Lucas Oliveira
5a6d75a38c 🔥 chore(.gitignore): remove .githooks/prepare-commit-msg from git tracking to avoid committing hooks accidentally 2023-06-26 10:23:00 -03:00
Gabriel Luiz Freitas Almeida
423caa5ddc 🔍 chore(.gitignore): add prepare-commit-msg to avoid pushing Opencommit hook
The prepare-commit-msg file is added to the .gitignore file to avoid pushing the Opencommit hook to the remote repository. This is done to prevent the hook from being executed on other machines and to avoid any issues that may arise from the hook being executed on different machines.
2023-06-26 10:22:27 -03:00
Gabriel Luiz Freitas Almeida
ebcaedb840 feat(base.py): add input validation for PromptTemplate to ensure that the template and input variables are valid
The commented out code was removed to improve code readability. Input validation was added to ensure that the template and input variables are valid before creating a PromptTemplate object. This helps to prevent errors that may occur when the object is created with invalid input.
🔒 chore(base.py): remove commented out code and add input validation for PromptTemplate
2023-06-26 10:20:48 -03:00
Gabriel Luiz Freitas Almeida
ff0abf5183 🔧 refactor(chat.py): refactor stream_build function to send input_keys to the client
The stream_build function has been refactored to send input_keys to the client if the langchain_object has the attribute "input_keys". This change improves the user experience by providing the client with the necessary input keys to continue the conversation.
2023-06-26 10:20:28 -03:00
Gabriel Luiz Freitas Almeida
2d77aaaa15 🐛 fix(loading.py): fix instantiation of TextSplitter by removing unnecessary check for RecursiveCharacterTextSplitter
The import of RecursiveCharacterTextSplitter was removed as it was not being used in the code. The instantiation of TextSplitter was fixed by removing the unnecessary check for RecursiveCharacterTextSplitter and simplifying the code.
🔥 refactor(loading.py): remove unused import of RecursiveCharacterTextSplitter
2023-06-26 07:58:49 -03:00
Rodrigo Nader
361e981d0d Refactor component styles for better visual consistency
This commit refactors the styling of some components to improve their visual consistency with the rest of the application. Specifically, it removes unnecessary background and text color properties and adjusts classes for spacing and layout. These changes will enhance the user experience and create a more polished look and feel.
2023-06-26 01:42:25 -03:00
Gabriel Luiz Freitas Almeida
6459a27777 🐛 fix(loading.py): use 'is' instead of '==' to compare object types
The commit changes the comparison operator from '==' to 'is' to compare object types. This is because 'is' compares the object identity while '==' compares the object value. In this case, we want to compare the object identity, so 'is' is the correct operator to use.
2023-06-25 21:37:24 -03:00
Gabriel Luiz Freitas Almeida
7d415e62df 🎨 style(GenericNode): refactor tooltip to improve accessibility and user experience
The tooltip now includes a link to the documentation of the node, which makes it more accessible and user-friendly. The link is now wrapped in the tooltip title, which improves the semantics of the code.
2023-06-25 21:32:48 -03:00
Rodrigo Nader
ae71a54a06
Main (#543) 2023-06-25 20:08:33 -03:00
Rodrigo Nader
f373d18502
Fix Icons, Add LLM Caching (#542)
- Fixed Icons that were not set properly on refactor.
- Added LLM Caching
2023-06-25 20:03:53 -03:00
Gabriel Luiz Freitas Almeida
a3efa8fe5d 🐛 fix(utils.py): fix import order to avoid import errors
The import order was changed to avoid import errors. The import of langchain was moved to the top of the file to avoid circular import errors.
2023-06-25 19:52:49 -03:00
Gabriel Luiz Freitas Almeida
31ee134ee7 Merge branch 'llm_caching' into release 2023-06-25 19:51:56 -03:00
Gabriel Luiz Freitas Almeida
5cd809ea6a 🔼 chore(pyproject.toml): update langchain dependency to version 0.0.215
🔼 chore(pyproject.toml): bump package version to 0.2.1
The langchain dependency has been updated to version 0.0.215, which includes bug fixes and performance improvements. The package version has been bumped to 0.2.1 to reflect the changes made.
2023-06-25 19:45:00 -03:00
Gabriel Luiz Freitas Almeida
6f9e6922df 🐛 fix(utils.ts): correct typo in MidjourneyIcon import
The import statement for the MidjourneyIcon was misspelled as MidjorneyIcon, which caused a runtime error. This commit fixes the typo by changing the import statement to MidjourneyIcon.
2023-06-25 19:42:56 -03:00
Gabriel Luiz Freitas Almeida
263ca75fd5 feat(utils.ts): add new icons to nodeIconsLucide
The import of Boxes and LayoutDashboard were removed as they were not being used in the file. New icons were added to nodeIconsLucide to improve the variety of icons available for use. The new icons added are MongoDBAtlasVectorSearch, Pinecone, and SupabaseVectorStore.
🔥 chore(utils.ts): remove unused import of Boxes and LayoutDashboard
2023-06-25 19:39:30 -03:00
Gabriel Luiz Freitas Almeida
a2197bfeb5 🐛 fix(Midjorney): fix typo in import statement and component name
The import statement and component name were both misspelled as "Midjorney" instead of "Midjourney". This commit fixes the typo in both places.
2023-06-25 19:39:20 -03:00
Naveen Choudhary
31f3b74c90 Update pyproject.toml 2023-06-25 19:35:39 -03:00
Gabriel Luiz Freitas Almeida
0c398fb6c5 🔨 refactor(loading.py): add type hinting to instantiate_agent function
🐛 fix(loading.py): fix type hinting in instantiate_embedding function
🔨 refactor(loading.py): add type hinting to instantiate_textsplitter function
The changes in this commit add type hinting to the `instantiate_agent`, `instantiate_embedding`, and `instantiate_textsplitter` functions to improve code readability and maintainability. The `instantiate_embedding` function had a bug in its type hinting which has been fixed.
2023-06-25 19:34:25 -03:00
Gabriel Luiz Freitas Almeida
9510474aa6 📝 docs(config.yaml): add documentation links to vectorstores integrations
Added documentation links to the vectorstores integrations in the config.yaml file. This will make it easier for developers to access the documentation for each integration.
2023-06-25 18:59:40 -03:00
Gabriel Luiz Freitas Almeida
005e7ec51c 🚀 feat(textsplitters.py): add a field for separator type in RecursiveCharacterTextSplitter
The RecursiveCharacterTextSplitter class in textsplitters.py now has a new field called separator_type. This field is used to specify the type of separator to be used in the splitter. The separator_type field is a string and can take any value from the Language enum or "Text". This change was made to improve the flexibility of the RecursiveCharacterTextSplitter class.
2023-06-25 18:57:45 -03:00
Gabriel Luiz Freitas Almeida
217225467f 🔨 refactor(loading.py): add type hints to function parameters and return types
This commit adds type hints to the function parameters and return types in the loading.py file. This improves the readability and maintainability of the codebase by making it easier to understand the expected types of the parameters and return values of the functions.
2023-06-25 18:57:35 -03:00
Gabriel Luiz Freitas Almeida
d4599a52b3 📝 docs(config.yaml): add documentation links for new integrations and memories
Added documentation links for new integrations and memories to improve the documentation of the project. The new integrations are Cohere and HuggingFaceHub, and the new memories are ConversationBufferWindowMemory and VectorStoreRetrieverMemory.
2023-06-25 18:37:18 -03:00
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
5f56384dce 🚀 feat(__main__.py): add support for cache configuration
The `update_settings` function now accepts a `cache` parameter that allows the user to specify the type of cache to use. The `cache` parameter is set to a default value of `SQLiteCache` and can be overridden by setting the `LANGCHAIN_CACHE` environment variable. This feature improves the flexibility of the application as it allows the user to choose the type of cache that best suits their needs.
2023-06-25 18:20:21 -03:00
Gabriel Luiz Freitas Almeida
a15da8eb0d 🚀 feat(settings.py): add cache configuration option
The cache configuration option has been added to the settings file with a default value of "InMemoryCache". This allows the user to choose the cache implementation they want to use.
2023-06-25 18:20:13 -03:00
Gabriel Luiz Freitas Almeida
89c2e5b064 🚀 feat(utils.py): add support for configurable LLM caching
This commit adds support for configurable LLM caching. The `setup_llm_caching` function now imports the cache class from the `langchain.cache` module based on the `settings.cache` value. If the import is successful, the `langchain.llm_cache` is set to an instance of the cache class. If the import fails, a warning is logged. If an exception is raised during the setup, a warning is logged with the error message.
2023-06-25 18:19:59 -03:00
Rodrigo Nader
1a318a82ae
Update README.md 2023-06-25 17:40:14 -03:00
Gustavo Schaedler
3287f45137
Add LLM cache (#541)
 feat(main.py): call setup_llm_caching function on app startup
The `setup_llm_caching` function is added to `utils.py` to set up LLM
caching. The function is then called on app startup in `main.py` using
the `app.on_event("startup")` method. This improves the performance of
the application by caching LLM objects.
2023-06-25 21:00:34 +01: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
29542f4cf8 🔧 chore(utils.py): add setup_llm_caching function to set up LLM caching
 feat(main.py): call setup_llm_caching function on app startup
The `setup_llm_caching` function is added to `utils.py` to set up LLM caching. The function is then called on app startup in `main.py` using the `app.on_event("startup")` method. This improves the performance of the application by caching LLM objects.
2023-06-25 09:12:41 -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
Cristhian Zanforlin Lousa
94cc554834 🐛 fix(dropdownComponent): add missing context imports and dependencies
🐛 fix(floatComponent): add missing context imports and dependencies
🐛 fix(intComponent): add missing context imports and dependencies
2023-06-24 11:03:36 -03:00
Cristhian Zanforlin Lousa
6cc4106c23 🐛 fix(inputListComponent): fix onChange event not being triggered when input value changes
 feat(inputListComponent): add PopUpContext to be able to close pop-ups when input value changes
2023-06-23 20:15:44 -03:00
Gabriel Luiz Freitas Almeida
c94094a2e7
Release 0.2 (#537) 2023-06-23 22:52:46 +00:00