Commit graph

350 commits

Author SHA1 Message Date
Gabriel Almeida
0f0366ebbb Refactor chromadb import in run.py for type hinting
This commit modifies run.py to use type hinting and avoid circular imports by changing the import for NotEnoughElementsException to use type: ignore. Specifically, the code now imports from chromadb.errors instead of chromadb.exceptions.
2023-04-25 15:38:21 -03:00
Gabriel Almeida
c14fb1eac3 feat(base.py): add logic to detect api keys in FrontendNode fields 2023-04-25 15:38:21 -03:00
Gabriel Almeida
3497161105 fix(base.py): set OpenAI API Key field as not required 2023-04-25 15:38:21 -03:00
Gabriel Almeida
c6d2d96da8 refactor(nodes.py): set 'required' field to False for API key and token fields to support loading from environment variables 2023-04-25 15:38:21 -03:00
Gabriel Almeida
c522727d6e Refactor ImportModal code to use useState and useContext hooks
This commit refactors the code for the ImportModal component to use hooks like useState and useContext, resulting in improved readability and maintainability. It also adds functionality to load prebuilt examples and handle local file uploads.
2023-04-25 11:03:11 -03:00
Gabriel Almeida
9f5f222f2a refactor(base.py): remove print statement from ToolCreator class 2023-04-25 09:38:28 -03:00
anovazzi1
b3155a58a9
Add Import Examples Feature to Flow Editor (#175)
This pull request adds a new feature to the flow editor that allows
users to easily import example flows from the
[logspace-ai/langflow_examples](https://github.com/logspace-ai/langflow_examples)
repository on GitHub. The feature is accessible via the import example
button

Clicking on the "Import Examples" button opens a dialog box that
displays a list of available example flows from the GitHub repository.
Users can select one example to import, and the flow editor will
automatically add the selected flow to the user's current project.

This feature saves users time and effort by providing a convenient way
to explore and utilize pre-built flows.

Additionally, this feature promotes collaboration and community
involvement by encouraging users to contribute their own flows to the
repository for others to use and benefit from.
2023-04-24 19:08:21 -03:00
anovazzi1
a15d605cc8 update styles 2023-04-24 19:03:20 -03:00
Gabriel Almeida
23eb511560 Merge branch 'dev' of https://github.com/logspace-ai/langflow into dev 2023-04-24 08:40:49 -03:00
Gabriel Almeida
23fbec9d42 feat(loading.py): add error handling for empty documents in vectorstore instantiation
feat(loading.py): add optional build parameter to load_flow_from_json function
2023-04-24 08:40:06 -03:00
Rodrigo Nader
76162a9ffa feat(langflow): Handle ChromaDB NotEnoughElementsException
This change adds error handling to catch a specific exception that may occur when processing documents with the ChromaDB library. If there are not enough documents for indexing, the error message will suggest reducing the chunk size in TextSplitter.
2023-04-23 23:06:10 -03:00
Petru Molla
801ff57dc0 Update loading.py 2023-04-20 16:06:22 -03:00
Gabriel Luiz Freitas Almeida
ded527a64a Update loading.py 2023-04-20 16:06:22 -03:00
Petru Molla
68f69e878e Using an exported Flow JSON file with load_flow_from_json("path/to/flow.json") returns
"UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 9465: character maps to
<undefined>".

Specifying the encodint type in the function helps to fix that error.
2023-04-20 16:06:22 -03:00
Ibis Prevedello
46e76c8ca4 feat: add SQLDatabaseChain
Close #173
2023-04-20 15:17:23 -03:00
Ibis Prevedello
843ae8efc5 feat: add extra tools and utilities 2023-04-20 15:17:23 -03:00
Ibis Prevedello
571f407ef3 refac: refactor tools and add QuerySQLDataBaseTool 2023-04-20 15:17:23 -03:00
anovazzi1
53b8f48f96 change text on examples page 2023-04-19 22:13:31 -03:00
anovazzi1
26db1f4e1b added github logo with link to repo 2023-04-19 22:11:18 -03:00
anovazzi1
4a66105ef7 updade examples color 2023-04-19 21:58:30 -03:00
Gabriel Almeida
8721083c25 refactor(run.py): simplify fix_memory_inputs function and handle cases where langchain_object has no prompt attribute 2023-04-19 00:48:06 -03:00
Gabriel Almeida
cd241c22c7 refactor(loading.py): add support for instantiating tool nodes
refactor(tools/base.py): comment out unused code for ToolCreator
feat(nodes.py): add 'return_direct' field to ToolNode template and set base class to 'Tool'
2023-04-19 00:46:57 -03:00
Gabriel Almeida
a0da9c6111 refactor(validate.py): filter function objects by filename to ensure they are from the evaluated string 2023-04-18 21:27:47 -03:00
anovazzi1
999f3b21d0 improve scroll behavior for import modal 2023-04-18 15:37:57 -03:00
anovazzi1
a583a11876 improve tabs behavior 2023-04-18 15:19:35 -03:00
anovazzi1
d28d73a37e update add flow function to show import flow name 2023-04-18 15:14:08 -03:00
anovazzi1
a923cdeccb improve example ui 2023-04-18 15:12:10 -03:00
anovazzi1
4f72d54cb1 update types and improve tooltip component 2023-04-18 15:11:35 -03:00
anovazzi1
b3d5221ac2 added new tailwind dependencies 2023-04-18 15:10:58 -03:00
anovazzi1
1049275715 set back button and high of the example element 2023-04-17 23:18:45 -03:00
anovazzi1
dbe3e156d7 showing examples name 2023-04-17 22:24:28 -03:00
Ibis Prevedello
e1f4041908 Fix bug when running LLM alone
Fix #117
2023-04-17 16:57:49 -03:00
Ibis Prevedello
ec0c6c79c1 feat: add SQL agent 2023-04-13 22:33:46 -03:00
Ibis Prevedello
3d211fc487 fix test, linting, and vector_store folder 2023-04-13 22:12:21 -03:00
Ibis Prevedello
ba1f7daa7a refac: change docstring parser 2023-04-13 21:39:25 -03:00
Gabriel Almeida
ce542e9337 fix(langflow): return None when a node is not loaded in LangChainTypeCreator classes 2023-04-13 15:54:40 -03:00
Gabriel Almeida
6d2f948bdb refactor(base.py): remove unnecessary comment
feat(base.py): add support for int type in node value
feat(base.py): add support for chunk_size and chunk_overlap in TextSplitterCreator signature
2023-04-13 15:45:08 -03:00
Gabriel Almeida
b56d905042 fix conflicts 2023-04-13 12:00:07 -03:00
Gabriel Almeida
c28e6ad62d fix: fix import paths for several modules
feat: add logging for missing nodes in LangChainTypeCreator classes
feat: add support for custom TextLoader document loader
fix: fix typo in document loaders base module name
fix: fix typo in text_splitters package name and add __init__.py file

refactor(interface): rename textSplitters to text_splitters
refactor(interface): rename documentLoaders to document_loaders
refactor(interface): rename vectorStore to vectorstore
refactor(interface): rename toolkits to toolkit
refactor(interface): rename tools to tool
refactor(interface): rename prompts to prompt
refactor(interface): rename memories to memory
refactor(interface): rename embeddings to embedding
refactor(interface): rename wrappers to wrapper
fix(interface): fix typo in text_splitters/base.py
fix(interface): fix typo in toolkits/base.py
fix(interface): fix typo in vectorstore/base.py
fix(interface): fix typo in wrappers/base.py
feat(interface): add logging for when a type is not loaded
2023-04-13 11:57:10 -03:00
Ibis Prevedello
b9ef727248 refac: remove UnstructuredImageLoader because of issue with Python 3.11 2023-04-13 11:52:42 -03:00
Ibis Prevedello
41c2ba9639 refac: add decorator to create cache folder 2023-04-13 11:52:42 -03:00
Ibis Prevedello
c69e5a72f0 feat: add document loaders 2023-04-13 11:52:42 -03:00
Ibis Prevedello
296ecafdcf refac: change cache folder 2023-04-13 11:52:42 -03:00
Gabriel Luiz Freitas Almeida
396cb7be2b
Merge branch 'dev' into 146-improve-conversationchain-node 2023-04-10 19:20:56 -03:00
Gabriel Almeida
103cb84394 Merge branch 'dev', remote-tracking branch 'origin' into 146-improve-conversationchain-node 2023-04-10 19:18:31 -03:00
Gabriel Luiz Freitas Almeida
e1ca085a7a
Vector stores, embeddings, document loaders, and text splitters (#145) 2023-04-10 19:16:45 -03:00
anovazzi1
36a083799f removable edges implemented 2023-04-10 18:49:35 -03:00
anovazzi1
fe98187b82 using local font family for working on firefox without web 2023-04-10 17:42:37 -03:00
anovazzi1
357dfbd009 solved issue for firefox, with internet connection 2023-04-10 17:23:04 -03:00
Gabriel Almeida
026482bef4 feat(nodes.py): add required and show properties to input_key and output_key fields in ChainFrontendNode
feat(nodes.py): add show property to prompt field in LLMFrontendNode
fix(nodes.py): set password property to False for MemoryFrontendNode's Memory Size field
2023-04-10 15:12:54 -03:00