Commit graph

2,398 commits

Author SHA1 Message Date
Sean Javiya
e1872be728
Fix: Required input llm for module LLMChain not found
There is a recurring intermittent bug, where Chains fail to validate, with an error "Required module ____ for module ____ not found". This happens frequently for all LLMs that inherit from the LLM class (example Cohere's wrapper).

This is caused by this chunk of code.
This also explains why the bug is intermittent and not every time.
"in" is matching LLM from source_types with BaseLLM from target_reqs. Also, this doesn't need to be a nested loop, it can be done with one loop.

I'm a user of LangFlow, and a first time contributor. Thanks!
2023-06-28 17:09:58 -07:00
Gabriel Luiz Freitas Almeida
e2a7d860ae
Add CodeQL workflow (#561) 2023-06-28 18:25:21 -03:00
Jorge
9784817821 Add CodeQL workflow 2023-06-28 18:42:32 +02:00
Gabriel Luiz Freitas Almeida
52329b36dc Merge remote-tracking branch 'origin/main' into dev 2023-06-26 14:54:53 -03:00
Gabriel Luiz Freitas Almeida
d4e01f28ef
Hotfix to AgentInitializer (#546) 2023-06-26 16:44:05 +00:00
Gabriel Luiz Freitas Almeida
644fc98271 🚀 chore(pyproject.toml): update package version to 0.2.2
The package version has been updated to 0.2.2 to reflect the changes made to the package. This is a chore commit as it does not include any functional changes to the package.
2023-06-26 13:38:00 -03:00
Gabriel Luiz Freitas Almeida
2b73f8fd5f
Merge branch 'main' into release 2023-06-26 16:36:59 +00:00
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
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
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
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
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