Commit graph

385 commits

Author SHA1 Message Date
Gabriel Almeida
c5d09f0e88 refactor(nodes.py): set advanced field to False for fields other than prompt in ChainFrontendNode class 2023-04-28 20:07:59 -03:00
anovazzi1
ccd8a3fe09 check advanced on node too 2023-04-28 20:02:37 -03:00
anovazzi1
8d29bd1b0a hide advanced icon if all the fields aren't advancedand show true 2023-04-28 19:46:53 -03:00
anovazzi1
733f62defb remove error on console 2023-04-28 19:44:15 -03:00
anovazzi1
cfe74e6765 Merge branch 'NodeModal' of personal:logspace-ai/langflow into NodeModal 2023-04-28 19:41:26 -03:00
anovazzi1
11b82aa556 hide advanced icon if all the fields aren't advanced 2023-04-28 19:41:17 -03:00
Gabriel Almeida
0fd8f73c08 refactor(langflow): set advanced flag to True for TemplateFieldCreator class
refactor(langflow): set advanced flag to False for LLMFrontendNode class' api key field
feat(langflow): add show flag to LLMFrontendNode class' model_kwargs field
refactor(langflow): set advanced flag to False and show flag to True for LLMFrontendNode class' model_name and temperature fields
2023-04-28 19:17:38 -03:00
anovazzi1
69c7bbb0a9 fixed wrong bolean logic, now show in modal only if show is true 2023-04-27 20:48:52 -03:00
anovazzi1
1f9cc38fd8 Merge branch 'dev' into NodeModal 2023-04-27 20:37:04 -03:00
anovazzi1
65172707d9 Merge branch 'dev' into NodeModal 2023-04-27 20:22:21 -03:00
anovazzi1
be25947f55 check if show if false to add item on advanced modal 2023-04-27 19:36:37 -03:00
Gabriel Almeida
3b5b63e070 refactor(loading.py): add comment explaining type ignore for agent variable 2023-04-27 15:03:11 -03:00
Gabriel Almeida
f00420ecbe feat(custom.py): pass llm parameter to SQLDatabaseToolkit constructor 2023-04-27 15:03:11 -03:00
Gabriel Almeida
601ec86273 style(langflow): fix formatting and add type hinting to custom.py and run.py files 2023-04-25 17:47:43 -03:00
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
f1ef859374 feat(template): add advanced flag to TemplateFieldCreator and FrontendNode classes
Add an advanced flag to the TemplateFieldCreator and FrontendNode classes to allow for fields to be hidden from the user interface. In the TemplateFieldCreator class, the advanced flag is set to False by default. In the FrontendNode class, the advanced flag is set to False for all fields except for "model_type" and "model_kwargs", which are set to True.
2023-04-19 14:52:05 -03:00
Gabriel Almeida
72bb4e45c5 Merge branch 'dev' of https://github.com/logspace-ai/langflow into NodeModal 2023-04-19 14:25:20 -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
anovazzi1
a3294c4fcf added advanced verification and removed show property from validation 2023-04-18 22:36:04 -03:00
anovazzi1
38aa051bf9 update node verification bug for boolean field 2023-04-18 22:32:54 -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