Commit graph

7,389 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
116bb985d3
Bump version to 0.6.5a0 in pyproject.toml (#1332)
This pull request updates the version in the pyproject.toml file to 0.6.5a0.
2024-01-14 15:24:56 -03:00
Gabriel Luiz Freitas Almeida
bf30d158c3 Bump version to 0.6.5a0 in pyproject.toml 2024-01-14 15:24:02 -03:00
Gabriel Luiz Freitas Almeida
2d087c6ce2
Add experimental preload endpoint (#1331)
This endpoint allows the Graph to be kept preprocessed in a session.
2024-01-14 15:23:02 -03:00
Gabriel Luiz Freitas Almeida
be83ffb0e7 Add Optional parameter to load_session method 2024-01-14 15:21:59 -03:00
Gabriel Luiz Freitas Almeida
2a69254eda Add build_graph_and_generate_result function to process.py 2024-01-14 15:21:51 -03:00
Gabriel Luiz Freitas Almeida
0b68decdfc Add PreloadResponse schema 2024-01-14 15:21:46 -03:00
Gabriel Luiz Freitas Almeida
a562c1f98e Refactor API endpoints and add preload functionality 2024-01-14 15:21:43 -03:00
Gabriel Luiz Freitas Almeida
7b1f30ea80 Refactor LangflowApplication constructor 2024-01-14 15:21:39 -03:00
Gabriel Luiz Freitas Almeida
5c4b2a55de Update main.py with FastAPI configuration 2024-01-14 15:21:34 -03:00
Gabriel Luiz Freitas Almeida
88c75e29b2 Import multiprocessing and fix run_langflow function 2024-01-14 15:21:30 -03:00
Gabriel Luiz Freitas Almeida
13fdc62fde
Added OllamaEmbeddings component with documentation (#1309)
Ollama embeddings are useful to enhance langflow's support of Ollama,
allowing users to run LLMs such as Mistral and LLama locally. Langchain
documentation can be found via [this
link](https://python.langchain.com/docs/integrations/text_embedding/ollama).

Changes:

- New `OllamaEmbeddingsComponent` class
- Associated documentation in the `Embeddings` section
2024-01-11 12:04:46 -03:00
Gabriel Luiz Freitas Almeida
78c32b9b5a
Added AzureOpenAIEmbeddings component (#1293)
I have added AzureOpenAIEmbeddings component on Embeddings.
2024-01-11 12:04:18 -03:00
Gabriel Luiz Freitas Almeida
aac9ab2c5c
Update AzrueChatOpenAI component. Change api_version to option field … (#1288)
In order to reduce user’s operating steps, I change "api_version" to
option field and select the latest version by default.
2024-01-11 12:03:53 -03:00
Cyrus Pellet
37ced42f56 Added OllamaEmbeddings component with documentation 2024-01-09 13:16:07 +01: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
coolgo0811
b2bb23402b Add AzureOpenAIEmbeddings component 2024-01-05 11:24:07 +08:00
coolgo0811
1ecb97fd52 Update AzrueChatOpenAI component. Change api_version to option field and select the latest version by default. 2024-01-04 16:56:56 +08:00
abhatt
5ad13e0475 Added Elasticsearch Vector Store 2024-01-03 12:39:17 -08:00
Gabriel Luiz Freitas Almeida
7c6ee78c4a Refactor AmazonBedrockComponent cache parameter 2024-01-03 11:20:15 -03:00
Gabriel Luiz Freitas Almeida
7f37dcf7bc Refactor ChatDefinition class to use prompt_template instead of prompt 2024-01-02 23:30:57 -03:00
Gabriel Luiz Freitas Almeida
99ef882801 Refactor process_graph function to handle ChatDefinition with dict output key 2024-01-02 23:19:55 -03:00
Gabriel Luiz Freitas Almeida
c2da021cac Refactor ChatAdapter to ChatDefinition 2024-01-02 23:15:33 -03:00
Gabriel Luiz Freitas Almeida
8421e60f10 Refactor chat utils module 2024-01-02 23:15:27 -03:00
Gabriel Luiz Freitas Almeida
51fa0f22e0 Add GenericPromptTemplate class to handle different prompt template types 2024-01-02 22:36:32 -03:00
Gabriel Luiz Freitas Almeida
2312227766 Add ChatAdapter class to utils/chat.py 2024-01-02 22:36:26 -03:00
Gabriel Luiz Freitas Almeida
e69f3cfdef Add support for different types of build_result in process_graph function 2024-01-02 22:36:17 -03:00
Gabriel Luiz Freitas Almeida
5a79a343f8 Add llama-index package version 0.9.24 2024-01-02 22:36:08 -03:00
Gabriel Luiz Freitas Almeida
a901f89cd5 Refactor ChatService process_message method 2024-01-02 22:28:07 -03:00
Gabriel Luiz Freitas Almeida
5e615c0c14 Refactor AmazonBedrockComponent class in AmazonBedrock.py 2024-01-02 10:16:14 -03:00
Gabriel Luiz Freitas Almeida
c02bf47771
Update .gitignore for Pycharm (#1270)
Update .gitignore file for Pycharm IDE
2024-01-02 09:30:00 -03:00
Gabriel Luiz Freitas Almeida
e8c7bbbd39
Fix gcp walkthrough tutorial button on README.md (#1271)
With this fix the shell will be able to find the right script.
2024-01-02 09:29:44 -03:00
Robert Parcus
7122300297
Fix gcp walkthrough tutorial button on README.md 2023-12-30 17:30:41 +09:00
GuoHai
3faae5cef4
Update .gitignore for Pycharm 2023-12-30 12:27:02 +08:00
Gabriel Luiz Freitas Almeida
925c3d57f2 Update docs package.json with new dependencies 2023-12-29 12:06:20 -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
Gabriel Luiz Freitas Almeida
4c599cbc49
Merge branch 'main' into dev 2023-12-29 10:54:53 -03:00
Gabriel Luiz Freitas Almeida
c1c2b8ffc3 Update version number in pyproject.toml 2023-12-29 10:51:09 -03:00
Gabriel Luiz Freitas Almeida
b66a051a7e
Update .dockerignore file and add QEMU, Docker Buildx, and Docker Hub integration (#1267)
This pull request includes the following changes:

- Update .dockerignore file

- Add QEMU, Docker Buildx, and Docker Hub integration
2023-12-29 10:50:20 -03:00
Gabriel Luiz Freitas Almeida
41a7911f05 Add QEMU, Docker Buildx, and Docker Hub integration 2023-12-29 10:49:40 -03:00
Gabriel Luiz Freitas Almeida
b9fea47dd1 Update .dockerignore file 2023-12-29 10:46:39 -03:00
Gabriel Luiz Freitas Almeida
75390ebe15
Update bcrypt version to 4.0.1 and add .dockerignore entries for node_modules and dist directories (#1266)
This pull request updates the bcrypt version to 4.0.1 and adds .dockerignore entries for the node_modules and dist directories.
2023-12-29 09:49:57 -03:00
Gabriel Luiz Freitas Almeida
7e28707a23 Add .dockerignore entries for node_modules and dist directories 2023-12-29 09:45:09 -03:00
Gabriel Luiz Freitas Almeida
74a8954eb0 Update bcrypt version to 4.0.1 2023-12-29 09:45:03 -03:00
Gabriel Luiz Freitas Almeida
002adc3910
Add Dockerfile for building and pushing the application image (#1265)
This pull request adds a Dockerfile for building and pushing the application image. The Dockerfile includes the necessary steps to set up the environment, install dependencies, and run the application.
2023-12-29 09:38:42 -03:00
Gabriel Luiz Freitas Almeida
bb7ac56b6e Add Dockerfile for build and push 2023-12-29 09:38:14 -03:00