Commit graph

7,482 commits

Author SHA1 Message Date
anovazzi1
95b02ceeae Import WikipediaAPIWrapper from langchain_community.utilities 2024-01-09 18:34:50 -03:00
anovazzi1
411b4f78c0 Update ZeroShotAgent import 2024-01-09 11:53:45 -03:00
anovazzi1
102e0e0f93 Update imports in VectorStoreRouterAgent.py 2024-01-09 11:51:50 -03:00
anovazzi1
5e0315ad0b Update JsonAgent.py imports 2024-01-09 11:33:21 -03:00
anovazzi1
db13e00258 Merge remote-tracking branch 'origin/cz/bug/state/zustand' into update_lc 2024-01-09 10:52:34 -03:00
Gabriel Luiz Freitas Almeida
15dd9e3ee1 Update import statements in GitbookLoader, JsonToolkit, CSVAgent, UnstructuredHTMLLoader, IMSDbLoader, IFixitLoader, BSHTMLLoader, ReadTheDocsLoader, OpenAPIToolkit, Qdrant, EverNoteLoader, CoNLLULoader, and AirbyteJSONLoader components 2024-01-09 10:17:35 -03:00
Gabriel Luiz Freitas Almeida
6ffb7cc233 Fix import path in constants.py 2024-01-09 10:17:27 -03:00
Gabriel Luiz Freitas Almeida
8e32b5e6ea Fix import statement in custom_component_full.ts 2024-01-09 10:17:21 -03:00
Gabriel Luiz Freitas Almeida
5677dd9ad3 Refactor component filtering in DirectoryReader class 2024-01-09 10:17:10 -03:00
cristhianzl
448c69c038 refactor(EditNodeModal): remove console.log statement for myData.value to improve code cleanliness 2024-01-09 10:10:21 -03:00
cristhianzl
3a7d07916a chore(package.json): add "@preact/signals-react" dependency to package.json
feat(EditNodeModal): use signals-react library for state management and add support for dynamic updates of myData value
2024-01-09 10:09:35 -03:00
Gabriel Luiz Freitas Almeida
4ee7a9c62d Update langchain version to ~0.0.345 2024-01-09 10:05:25 -03:00
anovazzi1
4591824a63 Merge branch 'cz/bug/state/zustand' into update_lc 2024-01-09 10:02:30 -03:00
Gabriel Luiz Freitas Almeida
4852b845b4 Add broken components 2024-01-09 00:30:23 -03:00
anovazzi1
b80cad7d9d fix(authAdminGuard): remove unnecessary promise return in logout function call
fix(authGuard): remove unnecessary promise return in logout function call
fix(headerComponent): remove unnecessary promise return in logout function call
fix(authContext): add navigation to login page after logout
fix(api): remove unnecessary promise return in logout function call and add navigation to login page after logout
2024-01-08 16:51:56 -03:00
Lucas Oliveira
ad2351e3e7 removed location 2024-01-08 16:27:42 -03:00
Lucas Oliveira
c723924388 removed unused location store context 2024-01-08 16:22:32 -03:00
anovazzi1
d79915e7dc Remove unused Loading component and import statements 2024-01-08 16:08:07 -03:00
anovazzi1
dbfa18bb95 Fix login delay and add access token to every request 2024-01-08 16:07:31 -03:00
Lucas Oliveira
d26b4b4c11 Fixed past and future state on undo redo, removed loading on flow page 2024-01-08 15:58:58 -03:00
anovazzi1
d042b28c52 Add access token as a cookie in auto_login endpoint 2024-01-08 15:54:50 -03:00
anovazzi1
e9f5ad4017 Refactor code formatting 2024-01-08 15:35:40 -03:00
anovazzi1
a7427ef20b Update login.py to include request parameter in refresh_token endpoint 2024-01-08 15:35:10 -03:00
anovazzi1
2f91fc0b8f Merge branch 'cz/bug/state/zustand' of personal:logspace-ai/langflow into cz/bug/state/zustand 2024-01-08 15:34:27 -03:00
Lucas Oliveira
4ba94fbd29 set sse data when changing nodes and edges to empty 2024-01-08 15:32:47 -03:00
Lucas Oliveira
221776c2d4 Removed SSE Store and fixed node building not appearing at node 2024-01-08 15:31:18 -03:00
anovazzi1
6aaad2d2cd Revert "code format"
This reverts commit 8a0b240a7f.
2024-01-08 15:00:42 -03:00
Lucas Oliveira
41976f608e Fixed accordion button inside button 2024-01-08 14:34:26 -03:00
Lucas Oliveira
fe61802972 Fixed chatComponent not appearing after build 2024-01-08 14:27:50 -03:00
Lucas Oliveira
d1f82fa691 SSE Context moved to Zustand 2024-01-08 14:20:03 -03:00
Lucas Oliveira
c3304c4b6e Location Context moved to Zustand 2024-01-08 14:11:16 -03:00
Lucas Oliveira
e2a0990c06 Removed typesContext 2024-01-08 14:03:22 -03:00
Lucas Oliveira
31c80204eb Fix copy paste not being able to paste on other flow 2024-01-08 14:00:43 -03:00
anovazzi1
8a0b240a7f code format 2024-01-08 13:51:22 -03:00
anovazzi1
3d4200fc82 Add logout functionality to login API 2024-01-08 13:50:34 -03:00
anovazzi1
c7435c0c49 Revert "Refactor code and fix formatting issues"
This reverts commit 334ec24addf783990850b835d911ac778dfce6a2.
2024-01-08 13:39:32 -03:00
anovazzi1
f8f71fb603 Refactor code and fix formatting issues 2024-01-08 13:39:32 -03:00
anovazzi1
a76263097a Add cookies for access and refresh tokens 2024-01-08 13:38:58 -03:00
Gabriel Luiz Freitas Almeida
b1ec1225ff Update langchain version to 0.1.0 and add langchain-openai dependency 2024-01-07 20:06:41 -03:00
Gabriel Luiz Freitas Almeida
4c89bee640 Update tool imports in constants.py 2024-01-07 20:06:35 -03:00
Gabriel Luiz Freitas Almeida
cef8fd7e74 Update import statements in ChatOllamaEndpoint.py 2024-01-07 20:06:27 -03:00
Gabriel Luiz Freitas Almeida
de292b8fff Refactor OllamaLLM imports and remove unnecessary code 2024-01-07 20:06:20 -03:00
Gabriel Luiz Freitas Almeida
357cad48b9 Update lock 2024-01-06 16:27:39 -03:00
Gabriel Luiz Freitas Almeida
d2257441f5
Added Elasticsearch Vector Store (#1286)
In this pull request, I have:
- added Elasticsearch component on Vector Store
- functionality is basic to get started quickly

**Set up a Single-node Elasticsearch cluster on localhost on docker**
1. sudo docker network create elastic
2. sudo docker run --net elastic -p 9200:9200 -e
"discovery.type=single-node" -e "xpack.security.enabled=false" -e
"xpack.security.http.ssl.enabled=false" -d
docker.elastic.co/elasticsearch/elasticsearch:8.11.3
3. curl http://localhost:9200
   {
     "name" : "994a10c1dab5",
     "cluster_name" : "docker-cluster",
     "cluster_uuid" : "p_iQ88F-T2agFpIdzJN7Ow",
     "version" : {
       "number" : "8.11.3",
       "build_flavor" : "default",
       "build_type" : "docker",
       "build_hash" : "64cf052f3b56b1fd4449f5454cb88aca7e739d9a",
       "build_date" : "2023-12-08T11:33:53.634979452Z",
       "build_snapshot" : false,
       "lucene_version" : "9.8.0",
       "minimum_wire_compatibility_version" : "7.17.0",
       "minimum_index_compatibility_version" : "7.0.0"
     },
     "tagline" : "You Know, for Search"
   }
4. curl -GET http://localhost:9200/_cat/indices
   No indices are available

**Set up Langlow:**
1. make backend
2. make frontend
3. open localhost:3000
4. New Project -> Import from JSON: elasticsearch-langflow.json
**[elasticsearch-langflow.json](https://github.com/logspace-ai/langflow/files/13823444/elasticsearch-langflow.json)**
5. poetry add elasticsearch or pipenv install elasticsearch or pip
install elasticsearch
6. Select text file to load
7. Provide OpenAPI keys for OpenAIEmbeddings and ChatOpenAI
8. Build
9. Verify that document is indexed: curl -GET
http://localhost:9200/_cat/indices
health status index uuid pri rep docs.count docs.deleted store.size
pri.store.size dataset.size
yellow open test-index pt9_ZOACR8mWCNx7GO3scA 1 1 1 0 39.3kb 39.3kb
39.3kb
10. Open Chat and you can ask: "What is the document about?"
2024-01-06 16:23:51 -03:00
Gabriel Luiz Freitas Almeida
0c592c8f06
Merge branch 'dev' into vectorstores/elasticsearch 2024-01-06 16:23:42 -03:00
Gabriel Luiz Freitas Almeida
a5aef06544
Adds ChatDefinition utility (#1279)
The ChatDefinition allows users to turn any flow into a Chat flow by
defining what has to run and what are the inputs and outputs.

The ChatDefinition requires a function, inputs(optional) and
output_key(optional).
The function receives a dictionary as input and can output a string or a
dict. If the output is a dict, then an output_key must be provided.

Anything can run inside the function. You can also pass methods of
pre-built classes like a Chain.

Here's an example of how to use it in a CustomComponent:

```python
from langflow import CustomComponent
from langflow.utils.chat import ChatDefinition

class Component(CustomComponent):
    documentation: str = "http://docs.langflow.org/components/custom"

    def build(self) -> Data:
        
        def func(inputs, callbacks):
            return {"text":'This is a simple example.'}
        
        return ChatDefinition(func=func, inputs=[], output_key="text")
```
2024-01-06 16:17:14 -03:00
Lucas Oliveira
c3bfcca6e2 Removed manual saving, only autosave now 2024-01-06 15:28:05 -03:00
Lucas Oliveira
4a3035873b Refactored stars and version refreshing 2024-01-06 15:15:25 -03:00
Lucas Oliveira
f87379c3d7 removed console log of errors 2024-01-06 15:01:22 -03:00
Lucas Oliveira
db99d64139 added function to useCallback 2024-01-06 14:58:42 -03:00