Commit graph

7,412 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
bc4cab16df
Add primary key and unique constraints to user, apikey, and flow tables (#1347)
This pull request adds primary key and unique constraints to the user, apikey, and flow tables in the database schema. This ensures data integrity and improves database performance.
2024-01-16 23:14:34 -03:00
Gabriel Luiz Freitas Almeida
490a9ef38c Update version number in pyproject.toml 2024-01-16 23:14:25 -03:00
Gabriel Luiz Freitas Almeida
8cb4fe9f5f Add primary key and unique constraints to user, apikey, and flow tables 2024-01-16 23:13:09 -03:00
Gabriel Luiz Freitas Almeida
70821701f2
Update version to 0.6.5a5 in pyproject.toml (#1343)
This pull request updates the version in the pyproject.toml file from 0.6.5a4 to 0.6.5a5.
2024-01-15 23:36:59 -03:00
Gabriel Luiz Freitas Almeida
aeb1a748fb Update version to 0.6.5a5 in pyproject.toml 2024-01-15 23:36:36 -03:00
Gabriel Luiz Freitas Almeida
37f331b578
Fix LangflowApplication initialization and update cohere version (#1342) 2024-01-15 23:32:06 -03:00
Gabriel Luiz Freitas Almeida
7d43b7822f Update cohere version to 4.44 and weaviate-client version to ^4.4b6 2024-01-15 23:30:58 -03:00
Gabriel Luiz Freitas Almeida
6b5d51016a Fix LangflowApplication initialization 2024-01-15 23:29:57 -03:00
Gabriel Luiz Freitas Almeida
f94ff70f70
Update create_engine method to include max_overflow parameter (#1341)
This pull request updates the `create_engine` method in the `DatabaseService` class to include the `max_overflow` parameter. This allows for better control of connection pooling and prevents connection errors when the pool is full. Additionally, it updates the `weaviate-client` version to `4.0.0` and the `langflow` version to `0.6.5a4`.
2024-01-15 19:26:01 -03:00
Gabriel Luiz Freitas Almeida
66ebaa80eb Update langflow version to 0.6.5a4 2024-01-15 19:25:19 -03:00
Gabriel Luiz Freitas Almeida
bd1145651d Update weaviate-client version to 4.0.0 2024-01-15 19:25:06 -03:00
Gabriel Luiz Freitas Almeida
79c20ec46b Update create_engine method to include max_overflow parameter 2024-01-15 19:24:56 -03:00
Gabriel Luiz Freitas Almeida
b718f53419
Refactor run_on_mac_or_linux function and remove unused imports (#1335)
This pull request refactors the run_on_mac_or_linux function by removing unused imports and updating the function signature. This improves the code readability and maintainability.
2024-01-14 18:16:48 -03:00
Gabriel Luiz Freitas Almeida
3244e3b34a Update version to 0.6.5a3 in pyproject.toml 2024-01-14 18:16:09 -03:00
Gabriel Luiz Freitas Almeida
7fc32b342a Refactor imports and initialize services in __main__.py 2024-01-14 18:15:56 -03:00
Gabriel Luiz Freitas Almeida
e75f5f4745 Refactor run_on_mac_or_linux function and remove unused imports 2024-01-14 18:14:40 -03:00
Gabriel Luiz Freitas Almeida
c7daa1d078
Fix memory inputs and update function arguments (#1334)
Refactor process_graph_cached function

Update version to 0.6.5a2 in pyproject.toml
2024-01-14 17:51:19 -03:00
Gabriel Luiz Freitas Almeida
2e9186db99 Update version to 0.6.5a2 in pyproject.toml 2024-01-14 17:50:33 -03:00
Gabriel Luiz Freitas Almeida
71bb7c18e4 Refactor process_graph_cached function 2024-01-14 17:50:03 -03:00
Gabriel Luiz Freitas Almeida
73f87dd611 Fix memory inputs and update function arguments 2024-01-14 17:49:28 -03:00
Gabriel Luiz Freitas Almeida
38bfa141d9
Add support for running on Linux using gunicorn (#1333)
This pull request adds support for running the application on Linux using gunicorn. It also updates the version number in the pyproject.toml file.
2024-01-14 16:02:41 -03:00
Gabriel Luiz Freitas Almeida
404bbcaf33 Update version number in pyproject.toml 2024-01-14 16:02:15 -03:00
Gabriel Luiz Freitas Almeida
54c40c670a Add support for running on Linux using gunicorn 2024-01-14 16:01:50 -03:00
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