Commit graph

7,638 commits

Author SHA1 Message Date
anovazzi1
68870301f3 chat modal messages firts version finished 2023-04-24 22:04:25 -03:00
anovazzi1
020e9c8461 chat modal working 2023-04-24 21:10:51 -03:00
anovazzi1
2c0b846f54 migrate chat logic to chat modal 2023-04-24 21:02:23 -03:00
anovazzi1
8ed1ea92d4 clean chat area 2023-04-24 20:03:05 -03:00
anovazzi1
9464b8790c added chat trigger component 2023-04-24 19:25:33 -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
anovazzi1
a8f2d69f9a updated type type context, need to change place where call api 2023-04-24 18:40:24 -03:00
anovazzi1
9e76c50f09 bug found migrate template code to types context 2023-04-24 18:31:03 -03:00
anovazzi1
2146025d42 Merge branch 'dev' into autoUpdateNodes 2023-04-24 18:02:48 -03:00
Gabriel Almeida
f122151b12 fix(validate.py): raise an exception with a message when node is not found
feat(GenericNode): add node validation with outline color feedback
feat(tailwind.config.js): add styles for outline colors and animations
2023-04-24 13:43:52 -03:00
Gabriel Almeida
09320824a9 refactor(validate.py): extract build_graph function to langflow.interface.run module
feat(validate.py): add post_validate_node endpoint to validate a single node in the graph by its id
2023-04-24 10:32:15 -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
Gabriel Almeida
ebc1f6a0df feat(api): add callback handler for streaming LLM responses
Add a new file `callback.py` that contains a new class `StreamingLLMCallbackHandler` that inherits from `AsyncCallbackHandler`. This class handles streaming LLM responses. It has a constructor that takes a `websocket` parameter and sets it as an instance variable. It also has an `on_llm_new_token` method that takes a `token` parameter and sends a `ChatResponse` object to the `websocket` instance variable.

Update `chat_manager.py` to import the new `StreamingLLMCallbackHandler` class. Add a new function `try_setting_streaming_options` that takes a `langchain_object` and a `websocket` parameter. This function checks if the `llm` attribute of the `langchain_object` is an instance of `OpenAI`, `ChatOpenAI`, `AzureOpenAI`, or `AzureChatOpenAI`. If it is, it sets the
2023-04-23 14:31:21 -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
Gabriel Almeida
5169c0bc27 feat(chat_manager.py): add support for sending file responses
fix(schemas.py): add validation for file response type and data type
test(test_websocket.py): remove data and data_type fields from ChatResponse messages in tests
2023-04-20 11:09:42 -03:00
Gabriel Almeida
3da30cc5bf refactor(cache): move cache functionality to a separate class
feat(cache): add support for multiple clients and context manager to set client_id
feat(cache): add observer pattern to notify on cache changes
feat(cache): add async observer pattern to notify on cache changes in async functions
feat(cache): add methods to add pandas DataFrame or Series and PIL Image to cache
feat(cache): add method to get an object from cache by key
feat(cache): add method to get the last added item in cache
2023-04-20 11:09:11 -03:00
anovazzi1
c2d21178e1 found bug on save langflow state 2023-04-19 23:41:30 -03:00
anovazzi1
5c64bc6698 created langFlowState type 2023-04-19 23:33:01 -03:00
anovazzi1
7e1d361c90 templates from backend stored in context 2023-04-19 23:19:17 -03:00
anovazzi1
284f865c36 created template context and type 2023-04-19 22:54:46 -03:00
Gabriel Almeida
0a630cd70d refactor(chat_manager.py): move process_graph function outside of ChatManager class
test(websocket.py): add tests for websocket connection, chat history, and sending messages
2023-04-19 22:23:31 -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
7d183ff57e refactor(chat.py, chat_manager.py, schemas.py, run.py): add chat history to ChatManager and ChatMessage schema
feat(chat.py, chat_manager.py): add error handling for async_get_result_and_steps
feat(chat.py): add client_id to websocket endpoint
feat(schemas.py): add data_type field to ChatResponse schema
refactor(run.py): memoize build_langchain_object_with_caching function with maxsize of 10
2023-04-19 21:28:05 -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
9b1f86b681 refactor(chatComponent): simplify conditional statement in Chat component's error handling logic 2023-04-19 14:20:05 -03:00
Gabriel Almeida
18b3583850 test(websocket.py): add tests for websocket connection, chat history and sending message 2023-04-19 13:13:58 -03:00
Gabriel Almeida
e4d0a39b0b refactor: remove unnecessary build and push scripts and Dockerfiles
The removed files were unnecessary and were removed to simplify the project.
2023-04-19 11:49:17 -03:00
Gabriel Almeida
d978ae5438 refactor(cache): move cache-related functions to base.py module
feat(cache): add support for pandas and PIL Image objects caching
fix(interface): import cache-related functions from base.py module
test(cache): update import statements in cache-related test file
2023-04-19 11:02:32 -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