Commit graph

5,358 commits

Author SHA1 Message Date
anovazzi1
aa44a70a02 feat(flowManagerStore.ts): add paste function to allow pasting copied nodes and edges at a specified position
feat(flowManagerStore.ts): add lastCopiedSelection object to store the last copied nodes and edges for pasting
2024-01-04 16:36:46 -03:00
anovazzi1
c32a7f9f11 Fix formatting and remove unused imports 2024-01-04 15:58:29 -03:00
anovazzi1
fb52f1368e feat(flowManagerStore.ts): add flowManagerStore to manage nodes and edges in reactflow
The flowManagerStore.ts file is added to the src/frontend/src/stores directory. This file contains the implementation of a custom store called RFState, which manages the state of nodes and edges in a reactflow component. The store provides various functions and callbacks to manipulate and update the nodes and edges.

The RFState interface defines the structure of the store, including the nodes and edges arrays, as well as callbacks for handling changes to nodes and edges.

The useStore hook is created using the create function from the zustand library. It initializes the store with an empty nodes and edges array, and defines callbacks for handling changes to nodes, edges, and connections.

The setEdges and setNodes functions are used to update the nodes and edges arrays in the store.

The deleteNode function removes a node from the nodes array and any associated edges from the edges array.

The deleteEdge function removes an edge from the edges array.

This store can be used in components to access and manipulate the nodes and edges in a reactflow component.
2024-01-04 15:22:53 -03:00
cristhianzl
beb0223605 chore(package.json): add zustand package as a dependency to the frontend package.json file
fix(codeTabsComponent): remove unused imports and update import for FlowsContext

fix(headerComponent): remove unused imports and update import for FlowsContext, useDarkStore, and remove darkContext

fix(tagsSelectorComponent): remove unused import and update import for useDarkStore

refactor(darkStore): move darkContext functionality to a separate zustand store called darkStore

refactor(index.tsx): remove import for darkContext and DarkProvider

fix(codeAreaModal): remove unused imports and update import for useDarkStore

feat(darkStore): add zustand store for managing dark mode state, stars count, and gradient index

feat(darkStore): fetch and set stars count from API in darkStore

feat(darkStore): generate and set random gradient index in darkStore

feat(darkStore): add updateDark, updateStars, and updateGradientIndex actions to darkStore

feat(darkStore): initialize dark mode state, stars count, and gradient index in darkStore

feat(darkStore): fetch and set stars count from API in darkStore

feat(darkStore): generate and set random gradient index in darkStore

feat(darkStore): add updateDark, updateStars, and updateGradientIndex actions to darkStore

feat(darkStore): initialize dark mode state, stars count, and gradient index in darkStore
2024-01-04 11:17:09 -03:00
Lucas Oliveira
f533ab43f9 Added debouncing on node and edge change to not make unnecessary saveFlows. 2023-12-31 12:46:04 -03:00
Lucas Oliveira
20f0e758a4 Fixed Flow Settings Modal not updating when re-entering 2023-12-31 12:36:27 -03:00
Lucas Oliveira
faa9de996f made flowSaving silent 2023-12-31 12:25:46 -03:00
Lucas Oliveira
e6e5a3cac5 Fixed copy paste only copying one node 2023-12-31 12:19:05 -03:00
Lucas Oliveira
c28817ed3b Fixed multiple set pending on move making it lag 2023-12-31 12:11:43 -03:00
Lucas Oliveira
081b6a63be Fixed initial onChange on all components 2023-12-31 12:10:24 -03:00
Lucas Oliveira
1ec50a2f27 Fixed infinite saving when input was connected 2023-12-31 12:07:07 -03:00
Lucas Oliveira
13e3d6fc19 removed unused updateNodeInternals 2023-12-31 11:59:51 -03:00
Lucas Oliveira
85979b8d37 Fixed name, description and showNode to use the interceptor function 2023-12-31 11:53:12 -03:00
Lucas Oliveira
8728e4a0ea removed dataRef 2023-12-30 21:10:05 -03:00
Lucas Oliveira
3241c795ad Fixed types of tabsState 2023-12-30 21:02:13 -03:00
Lucas Oliveira
f6bd5a4e4a Removed all reactFlowInstance nodes and edges settings. Centralized flow saving. 2023-12-30 20:50:51 -03:00
Lucas Oliveira
6e2673e1d5 Fix handleNodeClass and handleOnNewValue to use interceptor saving, added cleanEdges on interceptor 2023-12-30 19:31:13 -03:00
Lucas Oliveira
319e70863a Fixed isValidConnection 2023-12-30 17:54:31 -03:00
Lucas Oliveira
5c1c613c76 Removed reactFlowInstance and changed to the interceptor function, validate connection not working 2023-12-29 23:21:53 -03:00
Gabriel Luiz Freitas Almeida
d9fe8c838d Refactor ChatOllamaEndpoint.py 2023-12-29 11:00:34 -03:00
Gabriel Luiz Freitas Almeida
82a33ec7b6
add ChatOllama LLM (#1235)
This is a draft of a custom component to access the Ollama API endpoint.
2023-12-29 10:57:22 -03:00
Gabriel Luiz Freitas Almeida
5e0d30a7f6
Adding Vectara Self Query Retriever - feature request (#1249)
### Pull Request for Issue #1246 

**Description**,
This pull request addresses issue #1246, which proposes the addition of
a self-query retriever according to the LangChain Vectara integration.
The self-query retriever aims to empower users with the ability to
perform queries directly within the Vectara component(vector store).

**Changes Made**
I have added one more file under
`src\backend\langflow\components\retrievers` which contains a new
VectaraSelfQueryRetriverComponent class

**Files Added:** VectaraSelfQueryRetriever.py

**langchain documentation for this component:**

https://python.langchain.com/docs/integrations/retrievers/self_query/vectara_self_query
2023-12-29 10:56:18 -03:00
cristhianzl
58eebab84b fix(dropdownComponent): add condition to check if options object is empty before rendering dropdown component
fix(chatInput): add condition to check if chatValue is an empty object before displaying message
fix(chatMessage): remove useMemo hook and fix condition to check if chat message is empty before displaying message
fix(formModal): add conditions to check if thought and files exist before updating chat object
fix(genericModal): add condition to check if inputVariables exist before displaying notice or success message
2023-12-28 10:57:02 -03:00
yamonkjd
e9cd339278
Update ChatOllamaEndpoint.py 2023-12-26 18:57:40 +09:00
yamonkjd
3b6672e06d
Update OllamaLLM.py 2023-12-26 18:57:27 +09:00
Atharva J
5df7319bd8 for test cases 2023-12-26 01:28:21 +05:30
Atharva J
6720b2c058 VectaraSelfQueryRetriverComponent 2023-12-26 01:19:00 +05:30
Gabriel Luiz Freitas Almeida
a27c7221bb
Vectara Component Update - feature enhancement (#1219)
### Pull Request for Issue #1217 
[feature
request](https://github.com/logspace-ai/langflow/labels/feature%20request)
[python](https://github.com/logspace-ai/langflow/labels/python)

**Description**
This pull request addresses issue #1217 , which concerns the ability to
add files directly to the Vectara vector store using the indexing API's
file upload feature.

**Changes Made**
I have implemented the ability to add files directly to the Vectara
vector store by providing URLs of documents online. The add_files()
method (as well as from_files()) has been added to facilitate this
functionality.

**Files Modified/Added**
Modified: vectara.py
2023-12-24 20:04:38 -03:00
Gabriel Luiz Freitas Almeida
04fde52a21 Fix param overwrite issue in Vertex class 2023-12-22 17:07:19 -03:00
yamonkjd
6c0b4fb416
Merge branch 'logspace-ai:dev' into Add-Ollama-LLM 2023-12-23 03:58:56 +09:00
yamonkjd
c303bf3d49
Create OllamaLLM.py 2023-12-23 03:58:36 +09:00
yamonkjd
bea5065237
Update ChatOllamaEndpoint.py 2023-12-23 03:57:38 +09:00
Gabriel Luiz Freitas Almeida
3d4b9a81a3 Refactor imports and update Result model 2023-12-22 11:21:48 -03:00
Gabriel Luiz Freitas Almeida
b900b6dd55 Remove validate 2023-12-22 11:21:42 -03:00
Gabriel Luiz Freitas Almeida
f7ae3ae852 Refactor process_inputs function to handle optional inputs and artifacts 2023-12-22 10:53:53 -03:00
Gabriel Luiz Freitas Almeida
d07150ad17 Update worker.py with typing changes 2023-12-22 10:53:46 -03:00
Gabriel Luiz Freitas Almeida
010a045448 Update typing imports and add logger import 2023-12-22 10:46:47 -03:00
Gabriel Luiz Freitas Almeida
75493bbdea Refactor process_inputs function to handle both dict and list inputs 2023-12-22 10:46:35 -03:00
Gabriel Luiz Freitas Almeida
3213c87193 Refactor API endpoints and imports 2023-12-22 10:41:49 -03:00
Gabriel Luiz Freitas Almeida
266bc0d7f8 Format imports 2023-12-22 10:40:58 -03:00
Gabriel Luiz Freitas Almeida
28ff6a8c03 Fix code formatting and import statements 2023-12-22 10:40:38 -03:00
Gabriel Luiz Freitas Almeida
13783c1c60 Format json file 2023-12-22 10:39:43 -03:00
Gabriel Luiz Freitas Almeida
f943ea26d6 Refactor AgentInitializerComponent to support optional memory parameter 2023-12-22 10:39:26 -03:00
Gabriel Luiz Freitas Almeida
8306a5bbd8 Remove import validation for typing module 2023-12-22 10:39:17 -03:00
Gabriel Luiz Freitas Almeida
7d40090364
BUGFIX: Issue GITHUB #1227 (#1237)
fix(extraSidebarComponent): update condition to show ExportMemo buttun
based on hasApiKey and validApiKey variables

Github Issue: https://github.com/logspace-ai/langflow/issues/1227
2023-12-21 16:04:36 -03:00
cristhianzl
34474166b8 fix(extraSidebarComponent): update condition to show ExportMemo button based on hasApiKey and validApiKey variables 2023-12-21 15:06:41 -03:00
Gabriel Luiz Freitas Almeida
55e9b4ba1c Add AIMessage support and update Result model 2023-12-21 14:52:12 -03:00
yamonkjd
c979823d58
Create ChatOllamaEndpoint.py
This is a draft of a custom component to access the Ollama API endpoint.
2023-12-21 17:59:15 +09:00
Gabriel Luiz Freitas Almeida
cfcfc37928 Add temperature parameter to ConversationalAgent 2023-12-20 21:06:09 -03:00
Gabriel Luiz Freitas Almeida
955ef77060 Add Redis URL configuration option 2023-12-20 21:03:17 -03:00