From 52093240b1bbfd8e51b922547d3de761c3f82446 Mon Sep 17 00:00:00 2001 From: Deepankar Mahapatro Date: Mon, 15 May 2023 17:48:02 +0530 Subject: [PATCH 01/50] feat: deploy langflow using langchain-serve --- Makefile | 11 +++++++++++ jcloud.yml | 2 ++ lcserve.Dockerfile | 16 ++++++++++++++++ src/backend/langflow/__main__.py | 14 ++++++++++++++ src/backend/langflow/lcserve.py | 14 ++++++++++++++ 5 files changed, 57 insertions(+) create mode 100644 jcloud.yml create mode 100644 lcserve.Dockerfile create mode 100644 src/backend/langflow/lcserve.py diff --git a/Makefile b/Makefile index a2e49ee98..be87989ef 100644 --- a/Makefile +++ b/Makefile @@ -46,6 +46,17 @@ build: poetry build --format sdist rm -rf src/backend/langflow/frontend +lcserve_push: + make build_frontend + @version=$$(poetry version --short); \ + lc-serve push --app langflow.lcserve:app --app-dir . \ + --image-name langflow --image-tag $${version} \ + --version deep-0.0.1 --verbose + +lcserve_deploy: + @:$(if $(uses),,$(error `uses` is not set. Please run `make uses=... lcserve_deploy`)) + lc-serve deploy jcloud --app langflow.lcserve:app --app-dir . --uses $(uses) --verbose + dev: make install_frontend ifeq ($(build),1) diff --git a/jcloud.yml b/jcloud.yml new file mode 100644 index 000000000..ffc1c9b8a --- /dev/null +++ b/jcloud.yml @@ -0,0 +1,2 @@ +instance: C4 +autoscale_min: 1 \ No newline at end of file diff --git a/lcserve.Dockerfile b/lcserve.Dockerfile new file mode 100644 index 000000000..883a2c040 --- /dev/null +++ b/lcserve.Dockerfile @@ -0,0 +1,16 @@ +# This file is used by `lc-serve` to build the image. +# Don't change the name of this file. + +FROM jinawolf/serving-gateway:${version} + +RUN apt-get update \ + && apt-get install --no-install-recommends -y build-essential libpq-dev + +COPY . /appdir/ + +RUN pip install poetry==1.4.0 && cd /appdir && pip install . && \ + pip uninstall -y poetry && \ + apt-get remove --auto-remove -y build-essential libpq-dev && \ + apt-get autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/* + +ENTRYPOINT [ "jina", "gateway", "--uses", "config.yml" ] \ No newline at end of file diff --git a/src/backend/langflow/__main__.py b/src/backend/langflow/__main__.py index 1f16744ae..8da0062bf 100644 --- a/src/backend/langflow/__main__.py +++ b/src/backend/langflow/__main__.py @@ -69,6 +69,20 @@ def serve( LangflowApplication(app, options).run() +@app.command() +def jcloud(): + """ + Deploy Langflow server on Jina AI Cloud + """ + import os + from importlib.metadata import version as mod_version + + app_name = "langflow.lcserve:app" + version = mod_version("langflow") + uses = f"jinaai+docker://langflow:{version}" + os.system(f"lc-serve deploy jcloud --app {app_name} --app-dir . --uses {uses}") + + def main(): app() diff --git a/src/backend/langflow/lcserve.py b/src/backend/langflow/lcserve.py new file mode 100644 index 000000000..8b84d7fef --- /dev/null +++ b/src/backend/langflow/lcserve.py @@ -0,0 +1,14 @@ +# This file is used by lc-serve to load the mounted app and serve it. + +from pathlib import Path +from fastapi.staticfiles import StaticFiles +from langflow.main import create_app + +app = create_app() +path = Path(__file__).parent +static_files_dir = path / "frontend" +app.mount( + "/", + StaticFiles(directory=static_files_dir, html=True), + name="static", +) \ No newline at end of file From e4f99b797189ee0f5b68e27b7222e5477103e102 Mon Sep 17 00:00:00 2001 From: Deepankar Mahapatro Date: Mon, 15 May 2023 17:56:26 +0530 Subject: [PATCH 02/50] feat: deploy langflow using langchain-serve --- Makefile | 3 +-- pyproject.toml | 1 + src/backend/langflow/__main__.py | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index be87989ef..4b634e90c 100644 --- a/Makefile +++ b/Makefile @@ -50,8 +50,7 @@ lcserve_push: make build_frontend @version=$$(poetry version --short); \ lc-serve push --app langflow.lcserve:app --app-dir . \ - --image-name langflow --image-tag $${version} \ - --version deep-0.0.1 --verbose + --image-name langflow --image-tag $${version} --verbose lcserve_deploy: @:$(if $(uses),,$(error `uses` is not set. Please run `make uses=... lcserve_deploy`)) diff --git a/pyproject.toml b/pyproject.toml index 0cc181617..0e97c56cf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,6 +51,7 @@ websockets = "^11.0.2" tiktoken = "^0.3.3" wikipedia = "^1.4.0" gptcache = "^0.1.23" +langchain-serve = "^0.0.28" [tool.poetry.group.dev.dependencies] black = "^23.1.0" diff --git a/src/backend/langflow/__main__.py b/src/backend/langflow/__main__.py index 8da0062bf..46225e977 100644 --- a/src/backend/langflow/__main__.py +++ b/src/backend/langflow/__main__.py @@ -78,9 +78,10 @@ def jcloud(): from importlib.metadata import version as mod_version app_name = "langflow.lcserve:app" + app_dir = str(Path(__file__).parent) version = mod_version("langflow") - uses = f"jinaai+docker://langflow:{version}" - os.system(f"lc-serve deploy jcloud --app {app_name} --app-dir . --uses {uses}") + base_image = "jinaai+docker://deepankarm/langflow" + os.system(f"lc-serve deploy jcloud --app {app_name} --app-dir {app_dir} --uses {base_image}:{version}") def main(): From 5d8f18f046ec213fb0fc639966ba0aa234821c9b Mon Sep 17 00:00:00 2001 From: Deepankar Mahapatro Date: Mon, 15 May 2023 18:17:14 +0530 Subject: [PATCH 03/50] feat: deploy langflow using langchain-serve --- Makefile | 3 ++- jcloud.yml => src/backend/langflow/jcloud.yml | 0 2 files changed, 2 insertions(+), 1 deletion(-) rename jcloud.yml => src/backend/langflow/jcloud.yml (100%) diff --git a/Makefile b/Makefile index 4b634e90c..0d8556e47 100644 --- a/Makefile +++ b/Makefile @@ -54,7 +54,8 @@ lcserve_push: lcserve_deploy: @:$(if $(uses),,$(error `uses` is not set. Please run `make uses=... lcserve_deploy`)) - lc-serve deploy jcloud --app langflow.lcserve:app --app-dir . --uses $(uses) --verbose + lc-serve deploy jcloud --app langflow.lcserve:app --app-dir . \ + --uses $(uses) --config src/backend/langflow/jcloud.yml --verbose dev: make install_frontend diff --git a/jcloud.yml b/src/backend/langflow/jcloud.yml similarity index 100% rename from jcloud.yml rename to src/backend/langflow/jcloud.yml From 916e4dfa80ecd651a24f35956cf45ab9c5b7ed18 Mon Sep 17 00:00:00 2001 From: Deepankar Mahapatro Date: Mon, 15 May 2023 19:57:48 +0530 Subject: [PATCH 04/50] feat: deploy langflow using langchain-serve --- pyproject.toml | 2 +- src/backend/langflow/__main__.py | 27 +++++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0e97c56cf..e58e759ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ websockets = "^11.0.2" tiktoken = "^0.3.3" wikipedia = "^1.4.0" gptcache = "^0.1.23" -langchain-serve = "^0.0.28" +langchain-serve = "^0.0.29" [tool.poetry.group.dev.dependencies] black = "^23.1.0" diff --git a/src/backend/langflow/__main__.py b/src/backend/langflow/__main__.py index 46225e977..bed6ad435 100644 --- a/src/backend/langflow/__main__.py +++ b/src/backend/langflow/__main__.py @@ -74,14 +74,37 @@ def jcloud(): """ Deploy Langflow server on Jina AI Cloud """ - import os + import asyncio + + import click + from lcserve.__main__ import serve_on_jcloud from importlib.metadata import version as mod_version app_name = "langflow.lcserve:app" app_dir = str(Path(__file__).parent) version = mod_version("langflow") base_image = "jinaai+docker://deepankarm/langflow" - os.system(f"lc-serve deploy jcloud --app {app_name} --app-dir {app_dir} --uses {base_image}:{version}") + + click.echo("๐Ÿš€ Deploying Langflow server on Jina AI Cloud") + app_id = asyncio.run( + serve_on_jcloud( + fastapi_app_str=app_name, + app_dir=app_dir, + uses=f"{base_image}:{version}", + name="langflow", + ) + ) + click.secho( + "๐ŸŽ‰ Langflow server successfully deployed on Jina AI Cloud ๐ŸŽ‰", fg="green" + ) + click.secho( + "๐Ÿ”— Click on the link to open the server (please allow ~1-2 minutes for the server to startup): ", + nl=False, + fg="green", + ) + click.secho(f"https://{app_id}.wolf.jina.ai/", fg="blue") + click.secho("๐Ÿ“– Read more about managing the server: ", nl=False, fg="green") + click.secho("https://github.com/jina-ai/langchain-serve", fg="blue") def main(): From 1ba8d775c175ab13d09d1a015e32f9e241e18027 Mon Sep 17 00:00:00 2001 From: Deepankar Mahapatro Date: Mon, 15 May 2023 22:07:17 +0530 Subject: [PATCH 05/50] feat: deploy langflow using langchain-serve --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e58e759ba..7a72f9663 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ websockets = "^11.0.2" tiktoken = "^0.3.3" wikipedia = "^1.4.0" gptcache = "^0.1.23" -langchain-serve = "^0.0.29" +langchain-serve = "^0.0.30" [tool.poetry.group.dev.dependencies] black = "^23.1.0" From 8e4e627451609d767678e4ab9fd5385e12cf8f7d Mon Sep 17 00:00:00 2001 From: Deepankar Mahapatro Date: Tue, 16 May 2023 11:23:39 +0530 Subject: [PATCH 06/50] build: make langchain-serve optional --- pyproject.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7a72f9663..6d01456fa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ websockets = "^11.0.2" tiktoken = "^0.3.3" wikipedia = "^1.4.0" gptcache = "^0.1.23" -langchain-serve = "^0.0.30" +langchain-serve = { version = "^0.0.31", optional = true } [tool.poetry.group.dev.dependencies] black = "^23.1.0" @@ -67,6 +67,9 @@ pandas-stubs = "^2.0.0.230412" types-pillow = "^9.5.0.2" +[tool.poetry.extras] +production = ["langchain-serve"] + [tool.ruff] line-length = 120 From 54da71cc0afcda0ddbf3444aa16cba04531145a8 Mon Sep 17 00:00:00 2001 From: Deepankar Mahapatro Date: Tue, 16 May 2023 13:34:34 +0530 Subject: [PATCH 07/50] build: make langchain-serve optional --- src/backend/langflow/__main__.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/backend/langflow/__main__.py b/src/backend/langflow/__main__.py index bed6ad435..685c9cbe0 100644 --- a/src/backend/langflow/__main__.py +++ b/src/backend/langflow/__main__.py @@ -75,10 +75,18 @@ def jcloud(): Deploy Langflow server on Jina AI Cloud """ import asyncio + from importlib.metadata import version as mod_version import click - from lcserve.__main__ import serve_on_jcloud - from importlib.metadata import version as mod_version + + try: + from lcserve.__main__ import serve_on_jcloud + except ImportError: + click.secho( + "๐Ÿšจ Please install langchain-serve to deploy Langflow server on Jina AI Cloud using `pip install langchain-serve`", + fg="red", + ) + return app_name = "langflow.lcserve:app" app_dir = str(Path(__file__).parent) From dd4a9f50b6ceac1a5fa6a8c7380d3fdffa08c5a2 Mon Sep 17 00:00:00 2001 From: Deepankar Mahapatro Date: Tue, 16 May 2023 14:45:23 +0530 Subject: [PATCH 08/50] build: make langchain-serve optional --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6d01456fa..1fd786902 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ websockets = "^11.0.2" tiktoken = "^0.3.3" wikipedia = "^1.4.0" gptcache = "^0.1.23" -langchain-serve = { version = "^0.0.31", optional = true } +langchain-serve = {version = "^0.0.31", optional = true} [tool.poetry.group.dev.dependencies] black = "^23.1.0" From dc9121c8436805f58ed0e794cf42c477b798c263 Mon Sep 17 00:00:00 2001 From: Deepankar Mahapatro Date: Tue, 16 May 2023 14:52:22 +0530 Subject: [PATCH 09/50] build: make langchain-serve optional --- poetry.lock | 965 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 950 insertions(+), 15 deletions(-) diff --git a/poetry.lock b/poetry.lock index be596cd0a..c2f718c86 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,5 +1,17 @@ # This file is automatically @generated by Poetry 1.4.0 and should not be changed by hand. +[[package]] +name = "aiofiles" +version = "23.1.0" +description = "File support for asyncio." +category = "main" +optional = true +python-versions = ">=3.7,<4.0" +files = [ + {file = "aiofiles-23.1.0-py3-none-any.whl", hash = "sha256:9312414ae06472eb6f1d163f555e466a23aed1c8f60c30cccf7121dba2e53eb2"}, + {file = "aiofiles-23.1.0.tar.gz", hash = "sha256:edd247df9a19e0db16534d4baaf536d6609a43e1de5401d7a4c1c148753a1635"}, +] + [[package]] name = "aiohttp" version = "3.8.4" @@ -124,6 +136,18 @@ files = [ [package.dependencies] frozenlist = ">=1.1.0" +[[package]] +name = "aiostream" +version = "0.4.5" +description = "Generator-based operators for asynchronous iteration" +category = "main" +optional = true +python-versions = "*" +files = [ + {file = "aiostream-0.4.5-py3-none-any.whl", hash = "sha256:25b7c2d9c83570d78c0ef5a20e949b7d0b8ea3b0b0a4f22c49d3f721105a6057"}, + {file = "aiostream-0.4.5.tar.gz", hash = "sha256:3ecbf87085230fbcd9605c32ca20c4fb41af02c71d076eab246ea22e35947d88"}, +] + [[package]] name = "anyio" version = "3.6.2" @@ -169,6 +193,21 @@ files = [ {file = "argilla-0.0.1.tar.gz", hash = "sha256:5017854754e89f573b31af25b25b803f51cea9ca1fa0bcf00505dee1f45cf7c9"}, ] +[[package]] +name = "asgiref" +version = "3.6.0" +description = "ASGI specs, helper code, and adapters" +category = "main" +optional = true +python-versions = ">=3.7" +files = [ + {file = "asgiref-3.6.0-py3-none-any.whl", hash = "sha256:71e68008da809b957b7ee4b43dbccff33d1b23519fb8344e33f049897077afac"}, + {file = "asgiref-3.6.0.tar.gz", hash = "sha256:9567dfe7bd8d3c8c892227827c41cce860b368104c3431da67a0c5a65a949506"}, +] + +[package.extras] +tests = ["mypy (>=0.800)", "pytest", "pytest-asyncio"] + [[package]] name = "asttokens" version = "2.2.1" @@ -799,6 +838,24 @@ files = [ {file = "decorator-5.1.1.tar.gz", hash = "sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330"}, ] +[[package]] +name = "deprecated" +version = "1.2.13" +description = "Python @deprecated decorator to deprecate old python classes, functions or methods." +category = "main" +optional = true +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "Deprecated-1.2.13-py2.py3-none-any.whl", hash = "sha256:64756e3e14c8c5eea9795d93c524551432a0be75629f8f29e67ab8caf076c76d"}, + {file = "Deprecated-1.2.13.tar.gz", hash = "sha256:43ac5335da90c31c24ba028af536a91d41d53f9e6901ddb021bcc572ce44e38d"}, +] + +[package.dependencies] +wrapt = ">=1.10,<2" + +[package.extras] +dev = ["PyTest", "PyTest (<5)", "PyTest-Cov", "PyTest-Cov (<2.6)", "bump2version (<1)", "configparser (<5)", "importlib-metadata (<3)", "importlib-resources (<4)", "sphinx (<2)", "sphinxcontrib-websupport (<2)", "tox", "zipp (<2)"] + [[package]] name = "dill" version = "0.3.6" @@ -814,6 +871,57 @@ files = [ [package.extras] graph = ["objgraph (>=1.7.2)"] +[[package]] +name = "docarray" +version = "0.21.0" +description = "The data structure for unstructured data" +category = "main" +optional = true +python-versions = "*" +files = [ + {file = "docarray-0.21.0.tar.gz", hash = "sha256:3c9f605123800c1b0cdf8c458be3fb19c05e9a81f723e51200ef531b02e689ee"}, +] + +[package.dependencies] +jina-hubble-sdk = ">=0.24.0" +numpy = "*" +rich = ">=12.0.0" + +[package.extras] +annlite = ["annlite"] +benchmark = ["h5py", "matplotlib", "pandas", "seaborn"] +common = ["Pillow", "fastapi", "lz4", "matplotlib", "protobuf (>=3.13.0)", "pydantic (>=1.9.0)", "requests", "uvicorn"] +elasticsearch = ["elasticsearch (>=8.2.0)"] +full = ["Pillow", "av", "fastapi", "grpcio (>=1.46.0,<1.48.1)", "grpcio-health-checking (>=1.46.0,<1.48.1)", "grpcio-reflection (>=1.46.0,<1.48.1)", "ipython", "lz4", "matplotlib", "protobuf (>=3.13.0)", "pydantic (>=1.9.0)", "requests", "scipy", "strawberry-graphql", "trimesh[easy]", "uvicorn"] +milvus = ["pymilvus (>=2.1.0,<2.2.0)"] +opensearch = ["opensearch-py (==2.0.1)"] +qdrant = ["qdrant-client (>=0.10.3,<0.11.0)"] +redis = ["redis (>=4.3.0)"] +test = ["annlite", "black (==22.3.0)", "datasets", "elasticsearch (>=8.2.0)", "jina", "jupyterlab", "mock", "onnx", "onnxruntime", "opensearch-py (==2.0.1)", "paddlepaddle", "protobuf (>=3.13.0,<=3.20.0)", "pymilvus (==2.1.3)", "pytest", "pytest-cov (==3.0.0)", "pytest-custom_exit_code", "pytest-mock", "pytest-mock", "pytest-repeat", "pytest-reraise", "pytest-timeout", "redis (>=4.3.0)", "tensorflow (==2.7.0)", "torch (==1.9.0)", "torchvision (==0.10.0)", "transformers (>=4.16.2)", "weaviate-client (>=3.9.0,<3.10.0)"] +weaviate = ["weaviate-client (>=3.9.0,<3.10.0)"] + +[[package]] +name = "docker" +version = "6.1.2" +description = "A Python library for the Docker Engine API." +category = "main" +optional = true +python-versions = ">=3.7" +files = [ + {file = "docker-6.1.2-py3-none-any.whl", hash = "sha256:134cd828f84543cbf8e594ff81ca90c38288df3c0a559794c12f2e4b634ea19e"}, + {file = "docker-6.1.2.tar.gz", hash = "sha256:dcc088adc2ec4e7cfc594e275d8bd2c9738c56c808de97476939ef67db5af8c2"}, +] + +[package.dependencies] +packaging = ">=14.0" +pywin32 = {version = ">=304", markers = "sys_platform == \"win32\""} +requests = ">=2.26.0" +urllib3 = ">=1.26.0" +websocket-client = ">=0.32.0" + +[package.extras] +ssh = ["paramiko (>=2.4.3)"] + [[package]] name = "docstring-parser" version = "0.15" @@ -883,6 +991,25 @@ files = [ {file = "duckdb-0.7.1.tar.gz", hash = "sha256:a7db6da0366b239ea1e4541fcc19556b286872f5015c9a54c2e347146e25a2ad"}, ] +[[package]] +name = "ecdsa" +version = "0.18.0" +description = "ECDSA cryptographic signature library (pure python)" +category = "main" +optional = true +python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "ecdsa-0.18.0-py2.py3-none-any.whl", hash = "sha256:80600258e7ed2f16b9aa1d7c295bd70194109ad5a30fdee0eaeefef1d4c559dd"}, + {file = "ecdsa-0.18.0.tar.gz", hash = "sha256:190348041559e21b22a1d65cee485282ca11a6f81d503fddb84d5017e9ed1e49"}, +] + +[package.dependencies] +six = ">=1.9.0" + +[package.extras] +gmpy = ["gmpy"] +gmpy2 = ["gmpy2"] + [[package]] name = "et-xmlfile" version = "1.1.0" @@ -1269,6 +1396,100 @@ files = [ docs = ["Sphinx", "docutils (<0.18)"] test = ["objgraph", "psutil"] +[[package]] +name = "grpcio" +version = "1.47.5" +description = "HTTP/2-based RPC framework" +category = "main" +optional = true +python-versions = ">=3.6" +files = [ + {file = "grpcio-1.47.5-cp310-cp310-linux_armv7l.whl", hash = "sha256:acc73289d0c44650aa1f21eccfa967f5623b01c3b5e2b4596fe5f9c5bf10956d"}, + {file = "grpcio-1.47.5-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:f3174c798959998876d546944523a558f78a9b9feb22a2cbaaa3822f2e158653"}, + {file = "grpcio-1.47.5-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:64401ee6d54b4d5869bcba4be3cae9f2e335c44a39ba1e29991ad22cfe2abacb"}, + {file = "grpcio-1.47.5-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:39a07eb5e7ec9277e5d124fb0e2d4f51ddbaadc2abdd27e8bbf1716dcf45e581"}, + {file = "grpcio-1.47.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:874b138ca95a6375ae6f6a12c10a348827c9aa8fbd05d025b87b5e050ab55b46"}, + {file = "grpcio-1.47.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:90539369afba42fc921cdda9d5f697a421f05a2e82ba58342ffbe88aa586019e"}, + {file = "grpcio-1.47.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:2b18f970514bbc76547928e26d0cec06996ce3f947a3634b3adbe79d0e48e980"}, + {file = "grpcio-1.47.5-cp310-cp310-win32.whl", hash = "sha256:44c52923be0c4a0f662de43644679c6356960c38c4edf44864c23b998693c7cc"}, + {file = "grpcio-1.47.5-cp310-cp310-win_amd64.whl", hash = "sha256:07761f427551fced386db8c78701d6a167b2a682aa8df808303dd0a0d44bf6c9"}, + {file = "grpcio-1.47.5-cp36-cp36m-linux_armv7l.whl", hash = "sha256:10eb026bf75568de06933366f0340d2b4b207425c74a5640aa1812b8b69e7d9d"}, + {file = "grpcio-1.47.5-cp36-cp36m-macosx_10_10_universal2.whl", hash = "sha256:4f8e7fba6b1150a63aebd04d03be779de4ea4c4a8b28869e7a3c8f0b3ec59edc"}, + {file = "grpcio-1.47.5-cp36-cp36m-manylinux_2_17_aarch64.whl", hash = "sha256:36d93b19c214bc654fc50ae65cce84b8f7698159191b9d3f21f9ad92ae7bc325"}, + {file = "grpcio-1.47.5-cp36-cp36m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4e59f916bf58528e55893743151c6bd9f0a393fddfe411a6fffd29a300e6acf2"}, + {file = "grpcio-1.47.5-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:18f8b2d316a3be464eb2a20afa7026a235a07a0094be879876611206d8026679"}, + {file = "grpcio-1.47.5-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:0c3076957cd2aea34fe69384453315fd765948eb6cb73a12f332277308d04b76"}, + {file = "grpcio-1.47.5-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:007f5ad07d2f3a4a422c1df589a0d25e918b96d8f6069cb6f0254386a5f09262"}, + {file = "grpcio-1.47.5-cp36-cp36m-win32.whl", hash = "sha256:01ac149a5ca9512277b1d2fe85687099f3e442c6f9f924eae003a6700735e23e"}, + {file = "grpcio-1.47.5-cp36-cp36m-win_amd64.whl", hash = "sha256:a32ccc88950f2be619157201161e70a5e5ed9e2427662bb2e60f1a8cea7d0db6"}, + {file = "grpcio-1.47.5-cp37-cp37m-linux_armv7l.whl", hash = "sha256:ec71f15258e086acadb13ec06e4e4c54eb0f5455cd4c618997f847874d5ff9ea"}, + {file = "grpcio-1.47.5-cp37-cp37m-macosx_10_10_universal2.whl", hash = "sha256:4bbf5a63497dbd5e44c4335cab153796a4274be17ca40ec971a7749c3f4fef6a"}, + {file = "grpcio-1.47.5-cp37-cp37m-manylinux_2_17_aarch64.whl", hash = "sha256:11e1bc97e88232201256b718c63a8a1fd86ec6fca3a501293be5c5e423de9d56"}, + {file = "grpcio-1.47.5-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e568d84fed80713d2fa3221552beee27ed8034f7eff52bb7871bf5ffe4d4ca78"}, + {file = "grpcio-1.47.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cb4c838de8e1e7194d3f9a679fd76cc44a1dbe81f18bd39ee233c72347d772bf"}, + {file = "grpcio-1.47.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:a74c19baf2f8127b44b3f58e2a5801a17992dae9a20197b4a8fa26e2ea79742b"}, + {file = "grpcio-1.47.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e369ed5ecff11ef85666cabbb5736495604e052c8dc2c03a2104f99dfd0a59e3"}, + {file = "grpcio-1.47.5-cp37-cp37m-win32.whl", hash = "sha256:ccb741fab5117aea981d4ac341d2ce1e588f515f83091807d4e2bb388ed59edd"}, + {file = "grpcio-1.47.5-cp37-cp37m-win_amd64.whl", hash = "sha256:af9d3b075dfcbc343d44b0e98725ba6d56dc0669e61905a4e71e8f4409cfefbd"}, + {file = "grpcio-1.47.5-cp38-cp38-linux_armv7l.whl", hash = "sha256:cac6847a4b9a7e7a1f270a71fef1c17c2e8a6b411c0ca48080ce1e08d284aded"}, + {file = "grpcio-1.47.5-cp38-cp38-macosx_10_10_universal2.whl", hash = "sha256:54a3e17d155b6fb141e1fbb7c47d30556bec4c940b66ff4d9513536e2e214d4a"}, + {file = "grpcio-1.47.5-cp38-cp38-manylinux_2_17_aarch64.whl", hash = "sha256:d1873c0b84a0ffb129f75e7c8be45d2cae427baf0b090d15b9ff46c1841c3f53"}, + {file = "grpcio-1.47.5-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e209df91cf8dfb335c2e26784702b0e12c20dc4de7b9b6d2cccd968146155f06"}, + {file = "grpcio-1.47.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:350e2627684f93f8b59af9c76a03eeb4aa145ecc589569137d4518486f4f1727"}, + {file = "grpcio-1.47.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:23754807314c5aa4c26eb1c50aaf506801a2f7825951100280d2c013b127436f"}, + {file = "grpcio-1.47.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:503c3fa0045f3ef80aa1ad082eac6a888081da2e1cd793f281ed499831e4c498"}, + {file = "grpcio-1.47.5-cp38-cp38-win32.whl", hash = "sha256:a4eecfbe994c88996461bd1459e43ea460952d4147f53e8c18e089764e6808f5"}, + {file = "grpcio-1.47.5-cp38-cp38-win_amd64.whl", hash = "sha256:941927ae4d589a2fef5c22b9c47df9e5e613c737bd750bafc3a9547cc506017c"}, + {file = "grpcio-1.47.5-cp39-cp39-linux_armv7l.whl", hash = "sha256:9891c77e69bd4109c25c1bea51d78fbc5ba2fcd9445bf99225bb8fb03d849913"}, + {file = "grpcio-1.47.5-cp39-cp39-macosx_10_10_universal2.whl", hash = "sha256:61e83778d85dbbbd7446451ec28b7261e9ebba489cc8c262dfe8fedc119f769b"}, + {file = "grpcio-1.47.5-cp39-cp39-manylinux_2_17_aarch64.whl", hash = "sha256:21ccfc0e989531cbdc93c54a7581ea5f7c46bf585016d9320b4be042f1e02374"}, + {file = "grpcio-1.47.5-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bea35a0114a39827ffe59f73950d242f95d59a9ac2009ae8da7b065c06f0a57f"}, + {file = "grpcio-1.47.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:97e75b9e52eeb9d1335aaeecf581cb3cea7fc4bafd7bd675c83f208a386a42a8"}, + {file = "grpcio-1.47.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:1fb86f95228827b55e860278d142326af4489c0f4220975780daff325fc87172"}, + {file = "grpcio-1.47.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c9b83183525afe58dd9e7bb249f9e55df326e3c3834d09ea476c7a6bb12f73ee"}, + {file = "grpcio-1.47.5-cp39-cp39-win32.whl", hash = "sha256:00bff7492875ab04ec5ed3d92550d8f8aa423151e187b79684c8a22c7a6f1670"}, + {file = "grpcio-1.47.5-cp39-cp39-win_amd64.whl", hash = "sha256:2b32adae820cc0347e5e44efe91b661b436dbca73f25c5763cadb1cafd1dca10"}, + {file = "grpcio-1.47.5.tar.gz", hash = "sha256:b62b8bea0c94b4603bb4c8332d8a814375120bea3c2dbeb71397213bde5ea832"}, +] + +[package.dependencies] +six = ">=1.5.2" + +[package.extras] +protobuf = ["grpcio-tools (>=1.47.5)"] + +[[package]] +name = "grpcio-health-checking" +version = "1.47.5" +description = "Standard Health Checking Service for gRPC" +category = "main" +optional = true +python-versions = ">=3.6" +files = [ + {file = "grpcio-health-checking-1.47.5.tar.gz", hash = "sha256:74f36ef2ff704c46965bd74cdea51afc0bbcde641134c9d09ecb5063391db516"}, + {file = "grpcio_health_checking-1.47.5-py3-none-any.whl", hash = "sha256:659b83138cb2b7db71777044d0caf58bab4f958fce972900f8577ebb4edca29d"}, +] + +[package.dependencies] +grpcio = ">=1.47.5" +protobuf = ">=3.12.0" + +[[package]] +name = "grpcio-reflection" +version = "1.47.5" +description = "Standard Protobuf Reflection Service for gRPC" +category = "main" +optional = true +python-versions = ">=3.6" +files = [ + {file = "grpcio-reflection-1.47.5.tar.gz", hash = "sha256:ac391ec327861f16bc870638101fee80799eccf39c5b09e9ddd776d6854b9873"}, + {file = "grpcio_reflection-1.47.5-py3-none-any.whl", hash = "sha256:8cfd222f2116b7e1bcd55bd2a1fcb168c5a9cd20310151d6278563f516e8ae1e"}, +] + +[package.dependencies] +grpcio = ">=1.47.5" +protobuf = ">=3.12.0" + [[package]] name = "gunicorn" version = "20.1.0" @@ -1476,14 +1697,14 @@ files = [ [[package]] name = "importlib-metadata" -version = "6.6.0" +version = "6.0.1" description = "Read metadata from Python packages" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "importlib_metadata-6.6.0-py3-none-any.whl", hash = "sha256:43dd286a2cd8995d5eaef7fee2066340423b818ed3fd70adf0bad5f1fac53fed"}, - {file = "importlib_metadata-6.6.0.tar.gz", hash = "sha256:92501cdf9cc66ebd3e612f1b4f0c0765dfa42f0fa38ffb319b6bd84dd675d705"}, + {file = "importlib_metadata-6.0.1-py3-none-any.whl", hash = "sha256:1543daade821c89b1c4a55986c326f36e54f2e6ca3bad96be4563d0acb74dcd4"}, + {file = "importlib_metadata-6.0.1.tar.gz", hash = "sha256:950127d57e35a806d520817d3e92eec3f19fdae9f0cd99da77a407c5aabefba3"}, ] [package.dependencies] @@ -1599,6 +1820,29 @@ qtconsole = ["qtconsole"] test = ["pytest (<7.1)", "pytest-asyncio", "testpath"] test-extra = ["curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.21)", "pandas", "pytest (<7.1)", "pytest-asyncio", "testpath", "trio"] +[[package]] +name = "jcloud" +version = "0.2.8" +description = "Simplify deploying and managing Jina projects on Jina Cloud" +category = "main" +optional = true +python-versions = "*" +files = [ + {file = "jcloud-0.2.8.tar.gz", hash = "sha256:cdd30c85c0a857573651ebc329f52a8de9e43c3e0f276dc85975914006295639"}, +] + +[package.dependencies] +aiohttp = ">=3.8.0" +jina-hubble-sdk = ">=0.26.10" +packaging = "*" +python-dateutil = "*" +python-dotenv = "*" +pyyaml = "*" +rich = ">=12.0.0" + +[package.extras] +test = ["black (==22.3.0)", "jina (>=3.7.0)", "mock", "pytest", "pytest-asyncio", "pytest-cov", "pytest-custom_exit_code", "pytest-env", "pytest-mock", "pytest-repeat", "pytest-reraise", "pytest-timeout"] + [[package]] name = "jedi" version = "0.18.2" @@ -1619,6 +1863,150 @@ docs = ["Jinja2 (==2.11.3)", "MarkupSafe (==1.1.1)", "Pygments (==2.8.1)", "alab qa = ["flake8 (==3.8.3)", "mypy (==0.782)"] testing = ["Django (<3.1)", "attrs", "colorama", "docopt", "pytest (<7.0.0)"] +[[package]] +name = "jina" +version = "3.15.2" +description = "Build multimodal AI services via cloud native technologies ยท Neural Search ยท Generative AI ยท MLOps" +category = "main" +optional = true +python-versions = "*" +files = [ + {file = "jina-3.15.2.tar.gz", hash = "sha256:41c3fbe14736edf34e69b0245410554347b209aa01f4cf8e2c65d6e3972ba0b0"}, +] + +[package.dependencies] +aiofiles = "*" +aiohttp = "*" +aiostream = "*" +docarray = ">=0.16.4,<0.30.0" +docker = "*" +fastapi = ">=0.76.0" +filelock = "*" +grpcio = ">=1.46.0,<1.48.1" +grpcio-health-checking = ">=1.46.0,<1.48.1" +grpcio-reflection = ">=1.46.0,<1.48.1" +jcloud = ">=0.0.35" +jina-hubble-sdk = ">=0.30.4" +numpy = "*" +opentelemetry-api = ">=1.12.0" +opentelemetry-exporter-otlp = ">=1.12.0" +opentelemetry-exporter-otlp-proto-grpc = ">=1.13.0" +opentelemetry-exporter-prometheus = ">=1.12.0rc1" +opentelemetry-instrumentation-aiohttp-client = ">=0.33b0" +opentelemetry-instrumentation-fastapi = ">=0.33b0" +opentelemetry-instrumentation-grpc = ">=0.35b0" +opentelemetry-sdk = ">=1.14.0" +packaging = ">=20.0" +pathspec = "*" +prometheus_client = ">=0.12.0" +protobuf = ">=3.19.0" +pydantic = "*" +python-multipart = "*" +pyyaml = ">=5.3.1" +requests = "*" +urllib3 = "<2.0.0" +uvicorn = {version = "*", extras = ["standard"]} +uvloop = {version = "*", markers = "platform_system != \"Windows\""} +websockets = "*" + +[package.extras] +aiofiles = ["aiofiles"] +aiohttp = ["aiohttp"] +aiostream = ["aiostream"] +all = ["Pillow", "aiofiles", "aiohttp", "aiostream", "black (==22.3.0)", "bs4", "coverage (==6.2)", "docarray (>=0.16.4,<0.30.0)", "docker", "fastapi (>=0.76.0)", "filelock", "flaky", "grpcio (>=1.46.0,<1.48.1)", "grpcio-health-checking (>=1.46.0,<1.48.1)", "grpcio-reflection (>=1.46.0,<1.48.1)", "jcloud (>=0.0.35)", "jina-hubble-sdk (>=0.30.4)", "jsonschema", "kubernetes (>=18.20.0)", "mock", "numpy", "opentelemetry-api (>=1.12.0)", "opentelemetry-exporter-otlp (>=1.12.0)", "opentelemetry-exporter-otlp-proto-grpc (>=1.13.0)", "opentelemetry-exporter-prometheus (>=1.12.0rc1)", "opentelemetry-instrumentation-aiohttp-client (>=0.33b0)", "opentelemetry-instrumentation-fastapi (>=0.33b0)", "opentelemetry-instrumentation-grpc (>=0.35b0)", "opentelemetry-sdk (>=1.14.0)", "opentelemetry-test-utils (>=0.33b0)", "packaging (>=20.0)", "pathspec", "portforward (>=0.2.4,<0.4.3)", "prometheus-api-client (>=0.5.1)", "prometheus_client (>=0.12.0)", "protobuf (>=3.19.0)", "psutil", "pydantic", "pytest", "pytest-asyncio", "pytest-cov (==3.0.0)", "pytest-custom_exit_code", "pytest-kind (==22.11.1)", "pytest-lazy-fixture", "pytest-mock", "pytest-repeat", "pytest-reraise", "pytest-timeout", "python-multipart", "pyyaml (>=5.3.1)", "requests", "requests-mock", "scipy (>=1.6.1)", "sgqlc", "strawberry-graphql (>=0.96.0)", "tensorflow (>=2.0)", "torch", "urllib3 (<2.0.0)", "uvicorn[standard]", "uvloop", "watchfiles (>=0.18.0)", "websockets"] +black = ["black (==22.3.0)"] +bs4 = ["bs4"] +cicd = ["bs4", "jsonschema", "portforward (>=0.2.4,<0.4.3)", "sgqlc", "strawberry-graphql (>=0.96.0)", "tensorflow (>=2.0)", "torch"] +core = ["aiostream", "docarray (>=0.16.4,<0.30.0)", "grpcio (>=1.46.0,<1.48.1)", "grpcio-health-checking (>=1.46.0,<1.48.1)", "grpcio-reflection (>=1.46.0,<1.48.1)", "jcloud (>=0.0.35)", "jina-hubble-sdk (>=0.30.4)", "numpy", "opentelemetry-api (>=1.12.0)", "opentelemetry-instrumentation-grpc (>=0.35b0)", "packaging (>=20.0)", "protobuf (>=3.19.0)", "pyyaml (>=5.3.1)", "urllib3 (<2.0.0)"] +coverage = ["coverage (==6.2)"] +devel = ["aiofiles", "aiohttp", "docker", "fastapi (>=0.76.0)", "filelock", "opentelemetry-exporter-otlp (>=1.12.0)", "opentelemetry-exporter-otlp-proto-grpc (>=1.13.0)", "opentelemetry-exporter-prometheus (>=1.12.0rc1)", "opentelemetry-instrumentation-aiohttp-client (>=0.33b0)", "opentelemetry-instrumentation-fastapi (>=0.33b0)", "opentelemetry-sdk (>=1.14.0)", "pathspec", "prometheus_client (>=0.12.0)", "pydantic", "python-multipart", "requests", "sgqlc", "strawberry-graphql (>=0.96.0)", "uvicorn[standard]", "uvloop", "watchfiles (>=0.18.0)", "websockets"] +docarray = ["docarray (>=0.16.4,<0.30.0)"] +docker = ["docker"] +fastapi = ["fastapi (>=0.76.0)"] +filelock = ["filelock"] +flaky = ["flaky"] +grpcio = ["grpcio (>=1.46.0,<1.48.1)"] +grpcio-health-checking = ["grpcio-health-checking (>=1.46.0,<1.48.1)"] +grpcio-reflection = ["grpcio-reflection (>=1.46.0,<1.48.1)"] +jcloud = ["jcloud (>=0.0.35)"] +jina-hubble-sdk = ["jina-hubble-sdk (>=0.30.4)"] +jsonschema = ["jsonschema"] +kubernetes = ["kubernetes (>=18.20.0)"] +mock = ["mock"] +numpy = ["numpy"] +opentelemetry-api = ["opentelemetry-api (>=1.12.0)"] +opentelemetry-exporter-otlp = ["opentelemetry-exporter-otlp (>=1.12.0)"] +opentelemetry-exporter-otlp-proto-grpc = ["opentelemetry-exporter-otlp-proto-grpc (>=1.13.0)"] +opentelemetry-exporter-prometheus = ["opentelemetry-exporter-prometheus (>=1.12.0rc1)"] +opentelemetry-instrumentation-aiohttp-client = ["opentelemetry-instrumentation-aiohttp-client (>=0.33b0)"] +opentelemetry-instrumentation-fastapi = ["opentelemetry-instrumentation-fastapi (>=0.33b0)"] +opentelemetry-instrumentation-grpc = ["opentelemetry-instrumentation-grpc (>=0.35b0)"] +opentelemetry-sdk = ["opentelemetry-sdk (>=1.14.0)"] +opentelemetry-test-utils = ["opentelemetry-test-utils (>=0.33b0)"] +packaging = ["packaging (>=20.0)"] +pathspec = ["pathspec"] +perf = ["opentelemetry-exporter-otlp (>=1.12.0)", "opentelemetry-exporter-otlp-proto-grpc (>=1.13.0)", "opentelemetry-exporter-prometheus (>=1.12.0rc1)", "opentelemetry-instrumentation-aiohttp-client (>=0.33b0)", "opentelemetry-instrumentation-fastapi (>=0.33b0)", "opentelemetry-sdk (>=1.14.0)", "prometheus_client (>=0.12.0)", "uvloop"] +pillow = ["Pillow"] +portforward = ["portforward (>=0.2.4,<0.4.3)"] +prometheus-api-client = ["prometheus-api-client (>=0.5.1)"] +prometheus-client = ["prometheus_client (>=0.12.0)"] +protobuf = ["protobuf (>=3.19.0)"] +psutil = ["psutil"] +pydantic = ["pydantic"] +pytest = ["pytest"] +pytest-asyncio = ["pytest-asyncio"] +pytest-cov = ["pytest-cov (==3.0.0)"] +pytest-custom-exit-code = ["pytest-custom_exit_code"] +pytest-kind = ["pytest-kind (==22.11.1)"] +pytest-lazy-fixture = ["pytest-lazy-fixture"] +pytest-mock = ["pytest-mock"] +pytest-repeat = ["pytest-repeat"] +pytest-reraise = ["pytest-reraise"] +pytest-timeout = ["pytest-timeout"] +python-multipart = ["python-multipart"] +pyyaml = ["pyyaml (>=5.3.1)"] +requests = ["requests"] +requests-mock = ["requests-mock"] +scipy = ["scipy (>=1.6.1)"] +sgqlc = ["sgqlc"] +standard = ["aiofiles", "aiohttp", "docker", "fastapi (>=0.76.0)", "filelock", "opentelemetry-exporter-otlp (>=1.12.0)", "opentelemetry-exporter-prometheus (>=1.12.0rc1)", "opentelemetry-instrumentation-aiohttp-client (>=0.33b0)", "opentelemetry-instrumentation-fastapi (>=0.33b0)", "opentelemetry-sdk (>=1.14.0)", "pathspec", "prometheus_client (>=0.12.0)", "pydantic", "python-multipart", "requests", "uvicorn[standard]", "uvloop", "websockets"] +standrad = ["opentelemetry-exporter-otlp-proto-grpc (>=1.13.0)"] +strawberry-graphql = ["strawberry-graphql (>=0.96.0)"] +tensorflow = ["tensorflow (>=2.0)"] +test = ["Pillow", "black (==22.3.0)", "coverage (==6.2)", "flaky", "kubernetes (>=18.20.0)", "mock", "opentelemetry-test-utils (>=0.33b0)", "prometheus-api-client (>=0.5.1)", "psutil", "pytest", "pytest-asyncio", "pytest-cov (==3.0.0)", "pytest-custom_exit_code", "pytest-kind (==22.11.1)", "pytest-lazy-fixture", "pytest-mock", "pytest-repeat", "pytest-reraise", "pytest-timeout", "requests-mock", "scipy (>=1.6.1)"] +torch = ["torch"] +urllib3 = ["urllib3 (<2.0.0)"] +"uvicorn[standard" = ["uvicorn[standard]"] +uvloop = ["uvloop"] +watchfiles = ["watchfiles (>=0.18.0)"] +websockets = ["websockets"] + +[[package]] +name = "jina-hubble-sdk" +version = "0.36.0" +description = "SDK for Hubble API at Jina AI." +category = "main" +optional = true +python-versions = ">=3.7.0" +files = [ + {file = "jina-hubble-sdk-0.36.0.tar.gz", hash = "sha256:ba1a72c7a5c14963fdad9af1ff4c3bba26a03ddcced08111bd11a95b153249ec"}, + {file = "jina_hubble_sdk-0.36.0-py3-none-any.whl", hash = "sha256:56db142147d7c72142ed1b6505020c3b4d8070b1603d07ff796e56d491dde294"}, +] + +[package.dependencies] +aiohttp = "*" +docker = "*" +filelock = "*" +importlib-metadata = "*" +pathspec = "*" +python-jose = "*" +pyyaml = "*" +requests = "*" +rich = "*" + +[package.extras] +full = ["aiohttp", "black (==22.3.0)", "docker", "filelock", "flake8 (==4.0.1)", "importlib-metadata", "isort (==5.10.1)", "mock (==4.0.3)", "pathspec", "pytest (==7.0.0)", "pytest-asyncio (==0.19.0)", "pytest-cov (==3.0.0)", "pytest-mock (==3.7.0)", "python-jose", "pyyaml", "requests", "rich"] + [[package]] name = "jinja2" version = "3.1.2" @@ -1732,6 +2120,53 @@ llms = ["anthropic (>=0.2.6,<0.3.0)", "cohere (>=3,<4)", "huggingface_hub (>=0,< openai = ["openai (>=0,<1)"] qdrant = ["qdrant-client (>=1.1.2,<2.0.0)"] +[[package]] +name = "langchain-serve" +version = "0.0.31" +description = "Langchain Serve - serve your langchain apps on Jina AI Cloud." +category = "main" +optional = true +python-versions = "*" +files = [ + {file = "langchain-serve-0.0.31.tar.gz", hash = "sha256:1328ff71a82e854f2478eda3fd7bdeac86e75f7c75fa25fe2e2e2a96aebcab08"}, +] + +[package.dependencies] +click = "*" +jcloud = ">=0.2.8" +jina = "3.15.2" +jina-hubble-sdk = "*" +langchain = "*" +nest-asyncio = "*" +pandasai = "*" +requests = "*" +textual = "*" +toml = "*" + +[package.extras] +test = ["psutil", "pytest", "pytest-asyncio"] + +[[package]] +name = "linkify-it-py" +version = "2.0.2" +description = "Links recognition library with FULL unicode support." +category = "main" +optional = true +python-versions = ">=3.7" +files = [ + {file = "linkify-it-py-2.0.2.tar.gz", hash = "sha256:19f3060727842c254c808e99d465c80c49d2c7306788140987a1a7a29b0d6ad2"}, + {file = "linkify_it_py-2.0.2-py3-none-any.whl", hash = "sha256:a3a24428f6c96f27370d7fe61d2ac0be09017be5190d68d8658233171f1b6541"}, +] + +[package.dependencies] +uc-micro-py = "*" + +[package.extras] +benchmark = ["pytest", "pytest-benchmark"] +dev = ["black", "flake8", "isort", "pre-commit", "pyproject-flake8"] +doc = ["myst-parser", "sphinx", "sphinx-book-theme"] +test = ["coverage", "pytest", "pytest-cov"] + [[package]] name = "llama-cpp-python" version = "0.1.50" @@ -1920,6 +2355,8 @@ files = [ ] [package.dependencies] +linkify-it-py = {version = ">=1,<3", optional = true, markers = "extra == \"linkify\""} +mdit-py-plugins = {version = "*", optional = true, markers = "extra == \"plugins\""} mdurl = ">=0.1,<1.0" [package.extras] @@ -2043,6 +2480,26 @@ files = [ [package.dependencies] traitlets = "*" +[[package]] +name = "mdit-py-plugins" +version = "0.3.5" +description = "Collection of plugins for markdown-it-py" +category = "main" +optional = true +python-versions = ">=3.7" +files = [ + {file = "mdit-py-plugins-0.3.5.tar.gz", hash = "sha256:eee0adc7195e5827e17e02d2a258a2ba159944a0748f59c5099a4a27f78fcf6a"}, + {file = "mdit_py_plugins-0.3.5-py3-none-any.whl", hash = "sha256:ca9a0714ea59a24b2b044a1831f48d817dd0c817e84339f20e7889f392d77c4e"}, +] + +[package.dependencies] +markdown-it-py = ">=1.0.0,<3.0.0" + +[package.extras] +code-style = ["pre-commit"] +rtd = ["attrs", "myst-parser (>=0.16.1,<0.17.0)", "sphinx-book-theme (>=0.1.0,<0.2.0)"] +testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] + [[package]] name = "mdurl" version = "0.1.2" @@ -2250,7 +2707,7 @@ files = [ name = "nest-asyncio" version = "1.5.6" description = "Patch asyncio to allow nested event loops" -category = "dev" +category = "main" optional = false python-versions = ">=3.5" files = [ @@ -2448,6 +2905,268 @@ files = [ [package.dependencies] et-xmlfile = "*" +[[package]] +name = "opentelemetry-api" +version = "1.17.0" +description = "OpenTelemetry Python API" +category = "main" +optional = true +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_api-1.17.0-py3-none-any.whl", hash = "sha256:b41d9b2a979607b75d2683b9bbf97062a683d190bc696969fb2122fa60aeaabc"}, + {file = "opentelemetry_api-1.17.0.tar.gz", hash = "sha256:3480fcf6b783be5d440a226a51db979ccd7c49a2e98d1c747c991031348dcf04"}, +] + +[package.dependencies] +deprecated = ">=1.2.6" +importlib-metadata = ">=6.0.0,<6.1.0" +setuptools = ">=16.0" + +[[package]] +name = "opentelemetry-exporter-otlp" +version = "1.17.0" +description = "OpenTelemetry Collector Exporters" +category = "main" +optional = true +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_exporter_otlp-1.17.0-py3-none-any.whl", hash = "sha256:9708d2b74c9205a7bd9b46e24acec0e3b362465d9a77b62347ea0459d4358044"}, + {file = "opentelemetry_exporter_otlp-1.17.0.tar.gz", hash = "sha256:d0fa02b512127b44493c75d12a2dc2557bf251b7f76b354cfaa58b0f820d04ae"}, +] + +[package.dependencies] +opentelemetry-exporter-otlp-proto-grpc = "1.17.0" +opentelemetry-exporter-otlp-proto-http = "1.17.0" + +[[package]] +name = "opentelemetry-exporter-otlp-proto-grpc" +version = "1.17.0" +description = "OpenTelemetry Collector Protobuf over gRPC Exporter" +category = "main" +optional = true +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_exporter_otlp_proto_grpc-1.17.0-py3-none-any.whl", hash = "sha256:192d781b668a74edb49152b8b5f4f7e25bcb4307a9cf4b2dfcf87e68feac98bd"}, + {file = "opentelemetry_exporter_otlp_proto_grpc-1.17.0.tar.gz", hash = "sha256:f01476ae89484bc6210e50d7a4d93c293b3a12aff562253b94f588a85af13f70"}, +] + +[package.dependencies] +backoff = {version = ">=1.10.0,<3.0.0", markers = "python_version >= \"3.7\""} +googleapis-common-protos = ">=1.52,<2.0" +grpcio = ">=1.0.0,<2.0.0" +opentelemetry-api = ">=1.15,<2.0" +opentelemetry-proto = "1.17.0" +opentelemetry-sdk = ">=1.17.0,<1.18.0" + +[package.extras] +test = ["pytest-grpc"] + +[[package]] +name = "opentelemetry-exporter-otlp-proto-http" +version = "1.17.0" +description = "OpenTelemetry Collector Protobuf over HTTP Exporter" +category = "main" +optional = true +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_exporter_otlp_proto_http-1.17.0-py3-none-any.whl", hash = "sha256:81959249b75bd36c3b73c885a9ce36aa21e8022618e8e95fa41ae69609f0c799"}, + {file = "opentelemetry_exporter_otlp_proto_http-1.17.0.tar.gz", hash = "sha256:329984da861ee2cc42c4bc5ae1b80092fb76a0ea5a24b3519bc3b52572197fec"}, +] + +[package.dependencies] +backoff = {version = ">=1.10.0,<3.0.0", markers = "python_version >= \"3.7\""} +googleapis-common-protos = ">=1.52,<2.0" +opentelemetry-api = ">=1.15,<2.0" +opentelemetry-proto = "1.17.0" +opentelemetry-sdk = ">=1.17.0,<1.18.0" +requests = ">=2.7,<3.0" + +[package.extras] +test = ["responses (==0.22.0)"] + +[[package]] +name = "opentelemetry-exporter-prometheus" +version = "1.12.0rc1" +description = "Prometheus Metric Exporter for OpenTelemetry" +category = "main" +optional = true +python-versions = ">=3.6" +files = [ + {file = "opentelemetry-exporter-prometheus-1.12.0rc1.tar.gz", hash = "sha256:f10c6c243d69d5b63f755885b36a4ce8ef2cdf3e737c4e6bf00f32e87668f0a9"}, + {file = "opentelemetry_exporter_prometheus-1.12.0rc1-py3-none-any.whl", hash = "sha256:1f0c8f93d62e1575313966ceb8abf11e9a46e1839fda9ee4269b06d40494280f"}, +] + +[package.dependencies] +opentelemetry-api = ">=1.10.0" +opentelemetry-sdk = ">=1.10.0" +prometheus-client = ">=0.5.0,<1.0.0" + +[[package]] +name = "opentelemetry-instrumentation" +version = "0.38b0" +description = "Instrumentation Tools & Auto Instrumentation for OpenTelemetry Python" +category = "main" +optional = true +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_instrumentation-0.38b0-py3-none-any.whl", hash = "sha256:48eed87e5db9d2cddd57a8ea359bd15318560c0ffdd80d90a5fc65816e15b7f4"}, + {file = "opentelemetry_instrumentation-0.38b0.tar.gz", hash = "sha256:3dbe93248eec7652d5725d3c6d2f9dd048bb8fda6b0505aadbc99e51638d833c"}, +] + +[package.dependencies] +opentelemetry-api = ">=1.4,<2.0" +setuptools = ">=16.0" +wrapt = ">=1.0.0,<2.0.0" + +[[package]] +name = "opentelemetry-instrumentation-aiohttp-client" +version = "0.38b0" +description = "OpenTelemetry aiohttp client instrumentation" +category = "main" +optional = true +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_instrumentation_aiohttp_client-0.38b0-py3-none-any.whl", hash = "sha256:093987f5c96518ac6999eb7480af168655bc3538752ae67d4d9a5807eaad1ee0"}, + {file = "opentelemetry_instrumentation_aiohttp_client-0.38b0.tar.gz", hash = "sha256:9c3e637e742b5d8e5c8a76fae4f3812dde5e58f85598d119abd0149cb1c82ec0"}, +] + +[package.dependencies] +opentelemetry-api = ">=1.12,<2.0" +opentelemetry-instrumentation = "0.38b0" +opentelemetry-semantic-conventions = "0.38b0" +opentelemetry-util-http = "0.38b0" +wrapt = ">=1.0.0,<2.0.0" + +[package.extras] +instruments = ["aiohttp (>=3.0,<4.0)"] +test = ["opentelemetry-instrumentation-aiohttp-client[instruments]"] + +[[package]] +name = "opentelemetry-instrumentation-asgi" +version = "0.38b0" +description = "ASGI instrumentation for OpenTelemetry" +category = "main" +optional = true +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_instrumentation_asgi-0.38b0-py3-none-any.whl", hash = "sha256:c5bba11505008a3cd1b2c42b72f85f3f4f5af50ab931eddd0b01bde376dc5971"}, + {file = "opentelemetry_instrumentation_asgi-0.38b0.tar.gz", hash = "sha256:32d1034c253de6048d0d0166b304f9125267ca9329e374202ebe011a206eba53"}, +] + +[package.dependencies] +asgiref = ">=3.0,<4.0" +opentelemetry-api = ">=1.12,<2.0" +opentelemetry-instrumentation = "0.38b0" +opentelemetry-semantic-conventions = "0.38b0" +opentelemetry-util-http = "0.38b0" + +[package.extras] +instruments = ["asgiref (>=3.0,<4.0)"] +test = ["opentelemetry-instrumentation-asgi[instruments]", "opentelemetry-test-utils (==0.38b0)"] + +[[package]] +name = "opentelemetry-instrumentation-fastapi" +version = "0.38b0" +description = "OpenTelemetry FastAPI Instrumentation" +category = "main" +optional = true +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_instrumentation_fastapi-0.38b0-py3-none-any.whl", hash = "sha256:91139586732e437b1c3d5cf838dc5be910bce27b4b679612112be03fcc4fa2aa"}, + {file = "opentelemetry_instrumentation_fastapi-0.38b0.tar.gz", hash = "sha256:8946fd414084b305ad67556a1907e2d4a497924d023effc5ea3b4b1b0c55b256"}, +] + +[package.dependencies] +opentelemetry-api = ">=1.12,<2.0" +opentelemetry-instrumentation = "0.38b0" +opentelemetry-instrumentation-asgi = "0.38b0" +opentelemetry-semantic-conventions = "0.38b0" +opentelemetry-util-http = "0.38b0" + +[package.extras] +instruments = ["fastapi (>=0.58,<1.0)"] +test = ["httpx (>=0.22,<1.0)", "opentelemetry-instrumentation-fastapi[instruments]", "opentelemetry-test-utils (==0.38b0)", "requests (>=2.23,<3.0)"] + +[[package]] +name = "opentelemetry-instrumentation-grpc" +version = "0.38b0" +description = "OpenTelemetry gRPC instrumentation" +category = "main" +optional = true +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_instrumentation_grpc-0.38b0-py3-none-any.whl", hash = "sha256:64978d158f233c45df809d927f62a79e0bbb1c433d63ae5f7b38133a515397d8"}, + {file = "opentelemetry_instrumentation_grpc-0.38b0.tar.gz", hash = "sha256:d6a45e4c64aa4a2f3c29b6ca673b04d88e8ef4c2d0273e9b23209f9248f30325"}, +] + +[package.dependencies] +opentelemetry-api = ">=1.12,<2.0" +opentelemetry-instrumentation = "0.38b0" +opentelemetry-sdk = ">=1.12,<2.0" +opentelemetry-semantic-conventions = "0.38b0" +wrapt = ">=1.0.0,<2.0.0" + +[package.extras] +instruments = ["grpcio (>=1.27,<2.0)"] +test = ["opentelemetry-instrumentation-grpc[instruments]", "opentelemetry-sdk (>=1.12,<2.0)", "opentelemetry-test-utils (==0.38b0)", "protobuf (>=3.13,<4.0)"] + +[[package]] +name = "opentelemetry-proto" +version = "1.17.0" +description = "OpenTelemetry Python Proto" +category = "main" +optional = true +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_proto-1.17.0-py3-none-any.whl", hash = "sha256:c7c0f748668102598e84ca4d51975f87ebf66865aa7469fc2c5e8bdaab813e93"}, + {file = "opentelemetry_proto-1.17.0.tar.gz", hash = "sha256:8501fdc3bc76c03a2ed11603a4d9fce6e5a97eeaebd7a20ad84bba7bd79cc9f8"}, +] + +[package.dependencies] +protobuf = ">=3.19,<5.0" + +[[package]] +name = "opentelemetry-sdk" +version = "1.17.0" +description = "OpenTelemetry Python SDK" +category = "main" +optional = true +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_sdk-1.17.0-py3-none-any.whl", hash = "sha256:07424cbcc8c012bc120ed573d5443e7322f3fb393512e72866c30111070a8c37"}, + {file = "opentelemetry_sdk-1.17.0.tar.gz", hash = "sha256:99bb9a787006774f865a4b24f8179900347d03a214c362a6cb70191f77dd6132"}, +] + +[package.dependencies] +opentelemetry-api = "1.17.0" +opentelemetry-semantic-conventions = "0.38b0" +setuptools = ">=16.0" +typing-extensions = ">=3.7.4" + +[[package]] +name = "opentelemetry-semantic-conventions" +version = "0.38b0" +description = "OpenTelemetry Semantic Conventions" +category = "main" +optional = true +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_semantic_conventions-0.38b0-py3-none-any.whl", hash = "sha256:b0ba36e8b70bfaab16ee5a553d809309cc11ff58aec3d2550d451e79d45243a7"}, + {file = "opentelemetry_semantic_conventions-0.38b0.tar.gz", hash = "sha256:37f09e47dd5fc316658bf9ee9f37f9389b21e708faffa4a65d6a3de484d22309"}, +] + +[[package]] +name = "opentelemetry-util-http" +version = "0.38b0" +description = "Web util for OpenTelemetry" +category = "main" +optional = true +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_util_http-0.38b0-py3-none-any.whl", hash = "sha256:8e5f0451eeb5307b2c628dd799886adc5e113fb13a7207c29c672e8d168eabd8"}, + {file = "opentelemetry_util_http-0.38b0.tar.gz", hash = "sha256:85eb032b6129c4d7620583acf574e99fe2e73c33d60e256b54af436f76ceb5ae"}, +] + [[package]] name = "packaging" version = "23.1" @@ -2524,6 +3243,18 @@ files = [ [package.dependencies] types-pytz = ">=2022.1.1" +[[package]] +name = "pandasai" +version = "0.0.3" +description = "A wrapper around pandas to make it conversational" +category = "main" +optional = true +python-versions = ">=3.9" +files = [ + {file = "pandasai-0.0.3-py3-none-any.whl", hash = "sha256:a43b511a28a8a9ab0aad79e02c8a8f135e5947072946a766c132eb8b55aca83b"}, + {file = "pandasai-0.0.3.tar.gz", hash = "sha256:de99096327639af21093a3f3624c8594c452769f4d47532054cb647369d72f30"}, +] + [[package]] name = "parso" version = "0.8.3" @@ -2544,7 +3275,7 @@ testing = ["docopt", "pytest (<6.0.0)"] name = "pathspec" version = "0.11.1" description = "Utility library for gitignore style pattern matching of file paths." -category = "dev" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2715,6 +3446,21 @@ dev = ["black", "flake8", "flake8-print", "isort", "pre-commit"] sentry = ["django", "sentry-sdk"] test = ["coverage", "flake8", "freezegun (==0.3.15)", "mock (>=2.0.0)", "pylint", "pytest"] +[[package]] +name = "prometheus-client" +version = "0.16.0" +description = "Python client for the Prometheus monitoring system." +category = "main" +optional = true +python-versions = ">=3.6" +files = [ + {file = "prometheus_client-0.16.0-py3-none-any.whl", hash = "sha256:0836af6eb2c8f4fed712b2f279f6c0a8bbab29f9f4aa15276b91c7cb0d1616ab"}, + {file = "prometheus_client-0.16.0.tar.gz", hash = "sha256:a03e35b359f14dd1630898543e2120addfdeacd1a6069c1367ae90fd93ad3f48"}, +] + +[package.extras] +twisted = ["twisted"] + [[package]] name = "prompt-toolkit" version = "3.0.38" @@ -3173,6 +3919,28 @@ files = [ [package.extras] cli = ["click (>=5.0)"] +[[package]] +name = "python-jose" +version = "3.3.0" +description = "JOSE implementation in Python" +category = "main" +optional = true +python-versions = "*" +files = [ + {file = "python-jose-3.3.0.tar.gz", hash = "sha256:55779b5e6ad599c6336191246e95eb2293a9ddebd555f796a65f838f07e5d78a"}, + {file = "python_jose-3.3.0-py2.py3-none-any.whl", hash = "sha256:9b1376b023f8b298536eedd47ae1089bcdb848f1535ab30555cd92002d78923a"}, +] + +[package.dependencies] +ecdsa = "!=0.15" +pyasn1 = "*" +rsa = "*" + +[package.extras] +cryptography = ["cryptography (>=3.4.0)"] +pycrypto = ["pyasn1", "pycrypto (>=2.6.0,<2.7.0)"] +pycryptodome = ["pyasn1", "pycryptodome (>=3.3.1,<4.0.0)"] + [[package]] name = "python-magic" version = "0.4.27" @@ -3185,6 +3953,21 @@ files = [ {file = "python_magic-0.4.27-py2.py3-none-any.whl", hash = "sha256:c212960ad306f700aa0d01e5d7a325d20548ff97eb9920dcd29513174f0294d3"}, ] +[[package]] +name = "python-multipart" +version = "0.0.6" +description = "A streaming multipart parser for Python" +category = "main" +optional = true +python-versions = ">=3.7" +files = [ + {file = "python_multipart-0.0.6-py3-none-any.whl", hash = "sha256:ee698bab5ef148b0a760751c261902cd096e57e10558e11aca17646b74ee1c18"}, + {file = "python_multipart-0.0.6.tar.gz", hash = "sha256:e9925a80bb668529f1b67c7fdb0a5dacdd7cbfc6fb0bff3ea443fe22bdd62132"}, +] + +[package.extras] +dev = ["atomicwrites (==1.2.1)", "attrs (==19.2.0)", "coverage (==6.5.0)", "hatch", "invoke (==1.7.3)", "more-itertools (==4.3.0)", "pbr (==4.3.0)", "pluggy (==1.0.0)", "py (==1.11.0)", "pytest (==7.2.0)", "pytest-cov (==4.0.0)", "pytest-timeout (==2.1.0)", "pyyaml (==5.1)"] + [[package]] name = "python-pptx" version = "0.6.21" @@ -3217,7 +4000,7 @@ files = [ name = "pywin32" version = "306" description = "Python for Window Extensions" -category = "dev" +category = "main" optional = false python-versions = "*" files = [ @@ -3936,6 +4719,27 @@ files = [ [package.extras] doc = ["reno", "sphinx", "tornado (>=4.5)"] +[[package]] +name = "textual" +version = "0.24.1" +description = "Modern Text User Interface framework" +category = "main" +optional = true +python-versions = ">=3.7,<4.0" +files = [ + {file = "textual-0.24.1-py3-none-any.whl", hash = "sha256:a7deb7ac5a1502424c754fe165ae13cb3890e47ddc514d3f089cb2984c336d1d"}, + {file = "textual-0.24.1.tar.gz", hash = "sha256:4c7e1f4ed12b9615c63fa3eb7cb9df68d29e0ae5b2352997958cd7ee5533f926"}, +] + +[package.dependencies] +importlib-metadata = ">=4.11.3" +markdown-it-py = {version = ">=2.1.0,<3.0.0", extras = ["linkify", "plugins"]} +rich = ">=13.3.3" +typing-extensions = ">=4.4.0,<5.0.0" + +[package.extras] +dev = ["aiohttp (>=3.8.1)", "click (>=8.1.2)", "msgpack (>=1.0.3)"] + [[package]] name = "threadpoolctl" version = "3.1.0" @@ -4049,6 +4853,18 @@ dev = ["black (==22.3)", "datasets", "numpy", "pytest", "requests"] docs = ["setuptools-rust", "sphinx", "sphinx-rtd-theme"] testing = ["black (==22.3)", "datasets", "numpy", "pytest", "requests"] +[[package]] +name = "toml" +version = "0.10.2" +description = "Python Library for Tom's Obvious, Minimal Language" +category = "main" +optional = true +python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, + {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, +] + [[package]] name = "tomli" version = "2.0.1" @@ -4378,6 +5194,21 @@ files = [ mypy-extensions = ">=0.3.0" typing-extensions = ">=3.7.4" +[[package]] +name = "uc-micro-py" +version = "1.0.2" +description = "Micro subset of unicode data files for linkify-it-py projects." +category = "main" +optional = true +python-versions = ">=3.7" +files = [ + {file = "uc-micro-py-1.0.2.tar.gz", hash = "sha256:30ae2ac9c49f39ac6dce743bd187fcd2b574b16ca095fa74cd9396795c954c54"}, + {file = "uc_micro_py-1.0.2-py3-none-any.whl", hash = "sha256:8c9110c309db9d9e87302e2f4ad2c3152770930d88ab385cd544e7a7e75f3de0"}, +] + +[package.extras] +test = ["coverage", "pytest", "pytest-cov"] + [[package]] name = "unstructured" version = "0.5.13" @@ -4432,21 +5263,20 @@ files = [ [[package]] name = "urllib3" -version = "2.0.2" +version = "1.26.15" description = "HTTP library with thread-safe connection pooling, file post, and more." category = "main" optional = false -python-versions = ">=3.7" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" files = [ - {file = "urllib3-2.0.2-py3-none-any.whl", hash = "sha256:d055c2f9d38dc53c808f6fdc8eab7360b6fdbbde02340ed25cfbcd817c62469e"}, - {file = "urllib3-2.0.2.tar.gz", hash = "sha256:61717a1095d7e155cdb737ac7bb2f4324a858a1e2e6466f6d03ff630ca68d3cc"}, + {file = "urllib3-1.26.15-py2.py3-none-any.whl", hash = "sha256:aa751d169e23c7479ce47a0cb0da579e3ede798f994f5816a74e4f4500dcea42"}, + {file = "urllib3-1.26.15.tar.gz", hash = "sha256:8a388717b9476f934a21484e8c8e61875ab60644d29b9b39e11e4b9dc1c6b305"}, ] [package.extras] -brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] -secure = ["certifi", "cryptography (>=1.9)", "idna (>=2.0.0)", "pyopenssl (>=17.1.0)", "urllib3-secure-extra"] -socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] -zstd = ["zstandard (>=0.18.0)"] +brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)", "brotlipy (>=0.6.0)"] +secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "ipaddress", "pyOpenSSL (>=0.14)", "urllib3-secure-extra"] +socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] name = "uvicorn" @@ -4566,6 +5396,23 @@ files = [ {file = "wcwidth-0.2.6.tar.gz", hash = "sha256:a5220780a404dbe3353789870978e472cfe477761f06ee55077256e509b156d0"}, ] +[[package]] +name = "websocket-client" +version = "1.5.1" +description = "WebSocket client for Python with low level API options" +category = "main" +optional = true +python-versions = ">=3.7" +files = [ + {file = "websocket-client-1.5.1.tar.gz", hash = "sha256:3f09e6d8230892547132177f575a4e3e73cfdf06526e20cc02aa1c3b47184d40"}, + {file = "websocket_client-1.5.1-py3-none-any.whl", hash = "sha256:cdf5877568b7e83aa7cf2244ab56a3213de587bbe0ce9d8b9600fc77b455d89e"}, +] + +[package.extras] +docs = ["Sphinx (>=3.4)", "sphinx-rtd-theme (>=0.5)"] +optional = ["python-socks", "wsaccel"] +test = ["websockets"] + [[package]] name = "websockets" version = "11.0.3" @@ -4661,6 +5508,91 @@ files = [ beautifulsoup4 = "*" requests = ">=2.0.0,<3.0.0" +[[package]] +name = "wrapt" +version = "1.15.0" +description = "Module for decorators, wrappers and monkey patching." +category = "main" +optional = true +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" +files = [ + {file = "wrapt-1.15.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:ca1cccf838cd28d5a0883b342474c630ac48cac5df0ee6eacc9c7290f76b11c1"}, + {file = "wrapt-1.15.0-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:e826aadda3cae59295b95343db8f3d965fb31059da7de01ee8d1c40a60398b29"}, + {file = "wrapt-1.15.0-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:5fc8e02f5984a55d2c653f5fea93531e9836abbd84342c1d1e17abc4a15084c2"}, + {file = "wrapt-1.15.0-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:96e25c8603a155559231c19c0349245eeb4ac0096fe3c1d0be5c47e075bd4f46"}, + {file = "wrapt-1.15.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:40737a081d7497efea35ab9304b829b857f21558acfc7b3272f908d33b0d9d4c"}, + {file = "wrapt-1.15.0-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:f87ec75864c37c4c6cb908d282e1969e79763e0d9becdfe9fe5473b7bb1e5f09"}, + {file = "wrapt-1.15.0-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:1286eb30261894e4c70d124d44b7fd07825340869945c79d05bda53a40caa079"}, + {file = "wrapt-1.15.0-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:493d389a2b63c88ad56cdc35d0fa5752daac56ca755805b1b0c530f785767d5e"}, + {file = "wrapt-1.15.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:58d7a75d731e8c63614222bcb21dd992b4ab01a399f1f09dd82af17bbfc2368a"}, + {file = "wrapt-1.15.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:21f6d9a0d5b3a207cdf7acf8e58d7d13d463e639f0c7e01d82cdb671e6cb7923"}, + {file = "wrapt-1.15.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ce42618f67741d4697684e501ef02f29e758a123aa2d669e2d964ff734ee00ee"}, + {file = "wrapt-1.15.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:41d07d029dd4157ae27beab04d22b8e261eddfc6ecd64ff7000b10dc8b3a5727"}, + {file = "wrapt-1.15.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:54accd4b8bc202966bafafd16e69da9d5640ff92389d33d28555c5fd4f25ccb7"}, + {file = "wrapt-1.15.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2fbfbca668dd15b744418265a9607baa970c347eefd0db6a518aaf0cfbd153c0"}, + {file = "wrapt-1.15.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:76e9c727a874b4856d11a32fb0b389afc61ce8aaf281ada613713ddeadd1cfec"}, + {file = "wrapt-1.15.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e20076a211cd6f9b44a6be58f7eeafa7ab5720eb796975d0c03f05b47d89eb90"}, + {file = "wrapt-1.15.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a74d56552ddbde46c246b5b89199cb3fd182f9c346c784e1a93e4dc3f5ec9975"}, + {file = "wrapt-1.15.0-cp310-cp310-win32.whl", hash = "sha256:26458da5653aa5b3d8dc8b24192f574a58984c749401f98fff994d41d3f08da1"}, + {file = "wrapt-1.15.0-cp310-cp310-win_amd64.whl", hash = "sha256:75760a47c06b5974aa5e01949bf7e66d2af4d08cb8c1d6516af5e39595397f5e"}, + {file = "wrapt-1.15.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ba1711cda2d30634a7e452fc79eabcadaffedf241ff206db2ee93dd2c89a60e7"}, + {file = "wrapt-1.15.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:56374914b132c702aa9aa9959c550004b8847148f95e1b824772d453ac204a72"}, + {file = "wrapt-1.15.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a89ce3fd220ff144bd9d54da333ec0de0399b52c9ac3d2ce34b569cf1a5748fb"}, + {file = "wrapt-1.15.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3bbe623731d03b186b3d6b0d6f51865bf598587c38d6f7b0be2e27414f7f214e"}, + {file = "wrapt-1.15.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3abbe948c3cbde2689370a262a8d04e32ec2dd4f27103669a45c6929bcdbfe7c"}, + {file = "wrapt-1.15.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:b67b819628e3b748fd3c2192c15fb951f549d0f47c0449af0764d7647302fda3"}, + {file = "wrapt-1.15.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:7eebcdbe3677e58dd4c0e03b4f2cfa346ed4049687d839adad68cc38bb559c92"}, + {file = "wrapt-1.15.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:74934ebd71950e3db69960a7da29204f89624dde411afbfb3b4858c1409b1e98"}, + {file = "wrapt-1.15.0-cp311-cp311-win32.whl", hash = "sha256:bd84395aab8e4d36263cd1b9308cd504f6cf713b7d6d3ce25ea55670baec5416"}, + {file = "wrapt-1.15.0-cp311-cp311-win_amd64.whl", hash = "sha256:a487f72a25904e2b4bbc0817ce7a8de94363bd7e79890510174da9d901c38705"}, + {file = "wrapt-1.15.0-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:4ff0d20f2e670800d3ed2b220d40984162089a6e2c9646fdb09b85e6f9a8fc29"}, + {file = "wrapt-1.15.0-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:9ed6aa0726b9b60911f4aed8ec5b8dd7bf3491476015819f56473ffaef8959bd"}, + {file = "wrapt-1.15.0-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:896689fddba4f23ef7c718279e42f8834041a21342d95e56922e1c10c0cc7afb"}, + {file = "wrapt-1.15.0-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:75669d77bb2c071333417617a235324a1618dba66f82a750362eccbe5b61d248"}, + {file = "wrapt-1.15.0-cp35-cp35m-win32.whl", hash = "sha256:fbec11614dba0424ca72f4e8ba3c420dba07b4a7c206c8c8e4e73f2e98f4c559"}, + {file = "wrapt-1.15.0-cp35-cp35m-win_amd64.whl", hash = "sha256:fd69666217b62fa5d7c6aa88e507493a34dec4fa20c5bd925e4bc12fce586639"}, + {file = "wrapt-1.15.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:b0724f05c396b0a4c36a3226c31648385deb6a65d8992644c12a4963c70326ba"}, + {file = "wrapt-1.15.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bbeccb1aa40ab88cd29e6c7d8585582c99548f55f9b2581dfc5ba68c59a85752"}, + {file = "wrapt-1.15.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:38adf7198f8f154502883242f9fe7333ab05a5b02de7d83aa2d88ea621f13364"}, + {file = "wrapt-1.15.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:578383d740457fa790fdf85e6d346fda1416a40549fe8db08e5e9bd281c6a475"}, + {file = "wrapt-1.15.0-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:a4cbb9ff5795cd66f0066bdf5947f170f5d63a9274f99bdbca02fd973adcf2a8"}, + {file = "wrapt-1.15.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:af5bd9ccb188f6a5fdda9f1f09d9f4c86cc8a539bd48a0bfdc97723970348418"}, + {file = "wrapt-1.15.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:b56d5519e470d3f2fe4aa7585f0632b060d532d0696c5bdfb5e8319e1d0f69a2"}, + {file = "wrapt-1.15.0-cp36-cp36m-win32.whl", hash = "sha256:77d4c1b881076c3ba173484dfa53d3582c1c8ff1f914c6461ab70c8428b796c1"}, + {file = "wrapt-1.15.0-cp36-cp36m-win_amd64.whl", hash = "sha256:077ff0d1f9d9e4ce6476c1a924a3332452c1406e59d90a2cf24aeb29eeac9420"}, + {file = "wrapt-1.15.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5c5aa28df055697d7c37d2099a7bc09f559d5053c3349b1ad0c39000e611d317"}, + {file = "wrapt-1.15.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3a8564f283394634a7a7054b7983e47dbf39c07712d7b177b37e03f2467a024e"}, + {file = "wrapt-1.15.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:780c82a41dc493b62fc5884fb1d3a3b81106642c5c5c78d6a0d4cbe96d62ba7e"}, + {file = "wrapt-1.15.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e169e957c33576f47e21864cf3fc9ff47c223a4ebca8960079b8bd36cb014fd0"}, + {file = "wrapt-1.15.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:b02f21c1e2074943312d03d243ac4388319f2456576b2c6023041c4d57cd7019"}, + {file = "wrapt-1.15.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:f2e69b3ed24544b0d3dbe2c5c0ba5153ce50dcebb576fdc4696d52aa22db6034"}, + {file = "wrapt-1.15.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d787272ed958a05b2c86311d3a4135d3c2aeea4fc655705f074130aa57d71653"}, + {file = "wrapt-1.15.0-cp37-cp37m-win32.whl", hash = "sha256:02fce1852f755f44f95af51f69d22e45080102e9d00258053b79367d07af39c0"}, + {file = "wrapt-1.15.0-cp37-cp37m-win_amd64.whl", hash = "sha256:abd52a09d03adf9c763d706df707c343293d5d106aea53483e0ec8d9e310ad5e"}, + {file = "wrapt-1.15.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cdb4f085756c96a3af04e6eca7f08b1345e94b53af8921b25c72f096e704e145"}, + {file = "wrapt-1.15.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:230ae493696a371f1dbffaad3dafbb742a4d27a0afd2b1aecebe52b740167e7f"}, + {file = "wrapt-1.15.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63424c681923b9f3bfbc5e3205aafe790904053d42ddcc08542181a30a7a51bd"}, + {file = "wrapt-1.15.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d6bcbfc99f55655c3d93feb7ef3800bd5bbe963a755687cbf1f490a71fb7794b"}, + {file = "wrapt-1.15.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c99f4309f5145b93eca6e35ac1a988f0dc0a7ccf9ccdcd78d3c0adf57224e62f"}, + {file = "wrapt-1.15.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:b130fe77361d6771ecf5a219d8e0817d61b236b7d8b37cc045172e574ed219e6"}, + {file = "wrapt-1.15.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:96177eb5645b1c6985f5c11d03fc2dbda9ad24ec0f3a46dcce91445747e15094"}, + {file = "wrapt-1.15.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:d5fe3e099cf07d0fb5a1e23d399e5d4d1ca3e6dfcbe5c8570ccff3e9208274f7"}, + {file = "wrapt-1.15.0-cp38-cp38-win32.whl", hash = "sha256:abd8f36c99512755b8456047b7be10372fca271bf1467a1caa88db991e7c421b"}, + {file = "wrapt-1.15.0-cp38-cp38-win_amd64.whl", hash = "sha256:b06fa97478a5f478fb05e1980980a7cdf2712015493b44d0c87606c1513ed5b1"}, + {file = "wrapt-1.15.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2e51de54d4fb8fb50d6ee8327f9828306a959ae394d3e01a1ba8b2f937747d86"}, + {file = "wrapt-1.15.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0970ddb69bba00670e58955f8019bec4a42d1785db3faa043c33d81de2bf843c"}, + {file = "wrapt-1.15.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:76407ab327158c510f44ded207e2f76b657303e17cb7a572ffe2f5a8a48aa04d"}, + {file = "wrapt-1.15.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cd525e0e52a5ff16653a3fc9e3dd827981917d34996600bbc34c05d048ca35cc"}, + {file = "wrapt-1.15.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9d37ac69edc5614b90516807de32d08cb8e7b12260a285ee330955604ed9dd29"}, + {file = "wrapt-1.15.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:078e2a1a86544e644a68422f881c48b84fef6d18f8c7a957ffd3f2e0a74a0d4a"}, + {file = "wrapt-1.15.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:2cf56d0e237280baed46f0b5316661da892565ff58309d4d2ed7dba763d984b8"}, + {file = "wrapt-1.15.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:7dc0713bf81287a00516ef43137273b23ee414fe41a3c14be10dd95ed98a2df9"}, + {file = "wrapt-1.15.0-cp39-cp39-win32.whl", hash = "sha256:46ed616d5fb42f98630ed70c3529541408166c22cdfd4540b88d5f21006b0eff"}, + {file = "wrapt-1.15.0-cp39-cp39-win_amd64.whl", hash = "sha256:eef4d64c650f33347c1f9266fa5ae001440b232ad9b98f1f43dfe7a79435c0a6"}, + {file = "wrapt-1.15.0-py3-none-any.whl", hash = "sha256:64b1df0f83706b4ef4cfb4fb0e4c2669100fd7ecacfb59e091fad300d4e04640"}, + {file = "wrapt-1.15.0.tar.gz", hash = "sha256:d06730c6aed78cee4126234cf2d071e01b44b915e725a6cb439a879ec9754a3a"}, +] + [[package]] name = "xlsxwriter" version = "3.1.0" @@ -4836,7 +5768,10 @@ cffi = {version = ">=1.11", markers = "platform_python_implementation == \"PyPy\ [package.extras] cffi = ["cffi (>=1.11)"] +[extras] +production = [] + [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "be5c3e25247d4a0c313de54d07f4a027253877a5b8fbbf7830030a43a02c2911" +content-hash = "f685a353d95f5d41a5ee1b738a4182116d971aca51775dcda6c0be2b74b5fd53" From 2eec5fb3a72b49aed8f9b3765fff2e5b5e8a299a Mon Sep 17 00:00:00 2001 From: Deepankar Mahapatro Date: Tue, 16 May 2023 15:15:52 +0530 Subject: [PATCH 10/50] build: make langchain-serve optional --- poetry.lock | 2 +- pyproject.toml | 2 +- src/backend/langflow/__main__.py | 2 +- src/backend/langflow/lcserve.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index c2f718c86..aaac91fe1 100644 --- a/poetry.lock +++ b/poetry.lock @@ -5769,7 +5769,7 @@ cffi = {version = ">=1.11", markers = "platform_python_implementation == \"PyPy\ cffi = ["cffi (>=1.11)"] [extras] -production = [] +production = ["langchain-serve"] [metadata] lock-version = "2.0" diff --git a/pyproject.toml b/pyproject.toml index 224606d5b..c30d7c7de 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ websockets = "^11.0.2" tiktoken = "^0.3.3" wikipedia = "^1.4.0" gptcache = "^0.1.23" -langchain-serve = {version = "^0.0.31", optional = true} +langchain-serve = { version = "^0.0.31", optional = true } [tool.poetry.group.dev.dependencies] black = "^23.1.0" diff --git a/src/backend/langflow/__main__.py b/src/backend/langflow/__main__.py index 685c9cbe0..e6ca9b9de 100644 --- a/src/backend/langflow/__main__.py +++ b/src/backend/langflow/__main__.py @@ -80,7 +80,7 @@ def jcloud(): import click try: - from lcserve.__main__ import serve_on_jcloud + from lcserve.__main__ import serve_on_jcloud # type: ignore except ImportError: click.secho( "๐Ÿšจ Please install langchain-serve to deploy Langflow server on Jina AI Cloud using `pip install langchain-serve`", diff --git a/src/backend/langflow/lcserve.py b/src/backend/langflow/lcserve.py index 8b84d7fef..ede7ccdd4 100644 --- a/src/backend/langflow/lcserve.py +++ b/src/backend/langflow/lcserve.py @@ -11,4 +11,4 @@ app.mount( "/", StaticFiles(directory=static_files_dir, html=True), name="static", -) \ No newline at end of file +) From d982897a4140b08678a3c33970a56bd2ecd0039f Mon Sep 17 00:00:00 2001 From: Deepankar Mahapatro Date: Tue, 16 May 2023 20:18:17 +0530 Subject: [PATCH 11/50] ci: test push trigger --- .github/workflows/test-push.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/test-push.yml diff --git a/.github/workflows/test-push.yml b/.github/workflows/test-push.yml new file mode 100644 index 000000000..4ee4aefb8 --- /dev/null +++ b/.github/workflows/test-push.yml @@ -0,0 +1,20 @@ +name: test-push + +on: + workflow_dispatch: + + +jobs: + trigger-image-push-lc-serve: + permissions: + contents: write + runs-on: ubuntu-latest + steps: + - name: Trigger build and push on langchain-serve + uses: peter-evans/repository-dispatch@v2 + with: + repository: jina-ai/langchain-serve + event-type: langflow-push + client-payload: '{"push_token": "${{ env.LANGFLOW_PUSH_TOKEN }}", "branch": "dev"}' + env: + LANGFLOW_PUSH_TOKEN: ${{ secrets.LCSERVE_PUSH_TOKEN }} From 3fcc4708c025828b1ae1a284b7ef8199c7b87e92 Mon Sep 17 00:00:00 2001 From: Deepankar Mahapatro Date: Tue, 16 May 2023 21:12:06 +0530 Subject: [PATCH 12/50] ci: update test-push.yml --- .github/workflows/test-push.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test-push.yml b/.github/workflows/test-push.yml index 4ee4aefb8..ce7a271c1 100644 --- a/.github/workflows/test-push.yml +++ b/.github/workflows/test-push.yml @@ -13,8 +13,10 @@ jobs: - name: Trigger build and push on langchain-serve uses: peter-evans/repository-dispatch@v2 with: + token: ${{ envs.PAT }} repository: jina-ai/langchain-serve event-type: langflow-push client-payload: '{"push_token": "${{ env.LANGFLOW_PUSH_TOKEN }}", "branch": "dev"}' env: + PAT: ${{ secrets.DEEPANKAR_GITHUB_TOKEN }} LANGFLOW_PUSH_TOKEN: ${{ secrets.LCSERVE_PUSH_TOKEN }} From 7030be8132710fe6c46d07cfeb5593f535786b02 Mon Sep 17 00:00:00 2001 From: Deepankar Mahapatro Date: Tue, 16 May 2023 21:12:55 +0530 Subject: [PATCH 13/50] ci: update test-push.yml --- .github/workflows/test-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-push.yml b/.github/workflows/test-push.yml index ce7a271c1..9593d6dc4 100644 --- a/.github/workflows/test-push.yml +++ b/.github/workflows/test-push.yml @@ -13,7 +13,7 @@ jobs: - name: Trigger build and push on langchain-serve uses: peter-evans/repository-dispatch@v2 with: - token: ${{ envs.PAT }} + token: ${{ env.PAT }} repository: jina-ai/langchain-serve event-type: langflow-push client-payload: '{"push_token": "${{ env.LANGFLOW_PUSH_TOKEN }}", "branch": "dev"}' From de82a1b35fef6c0e5261777c748aaade95eb8c3b Mon Sep 17 00:00:00 2001 From: Deepankar Mahapatro Date: Tue, 16 May 2023 21:17:24 +0530 Subject: [PATCH 14/50] ci: update test-push.yml --- .github/workflows/test-push.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-push.yml b/.github/workflows/test-push.yml index 9593d6dc4..5edaef99e 100644 --- a/.github/workflows/test-push.yml +++ b/.github/workflows/test-push.yml @@ -13,10 +13,7 @@ jobs: - name: Trigger build and push on langchain-serve uses: peter-evans/repository-dispatch@v2 with: - token: ${{ env.PAT }} + token: ${{ secrets.DEEPANKAR_GITHUB_TOKEN }} repository: jina-ai/langchain-serve event-type: langflow-push - client-payload: '{"push_token": "${{ env.LANGFLOW_PUSH_TOKEN }}", "branch": "dev"}' - env: - PAT: ${{ secrets.DEEPANKAR_GITHUB_TOKEN }} - LANGFLOW_PUSH_TOKEN: ${{ secrets.LCSERVE_PUSH_TOKEN }} + client-payload: '{"push_token": "${{ secrets.LCSERVE_PUSH_TOKEN }}", "branch": "dev"}' From 1614c6f24b596e3d4699437dec0a68f214f11efb Mon Sep 17 00:00:00 2001 From: Deepankar Mahapatro Date: Tue, 16 May 2023 21:21:06 +0530 Subject: [PATCH 15/50] ci: trigger workflow during release --- .github/workflows/release.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3955f2bb5..9c39e91c9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,3 +47,11 @@ jobs: POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }} run: | poetry publish + + - name: Trigger build and push on langchain-serve + uses: peter-evans/repository-dispatch@v2 + with: + token: ${{ secrets.DEEPANKAR_GITHUB_TOKEN }} # TODO: repo authors need to create a PAT and add it to secrets + repository: jina-ai/langchain-serve + event-type: langflow-push + client-payload: '{"push_token": "${{ secrets.LCSERVE_PUSH_TOKEN }}", "branch": "dev"}' # TODO: repo authors need to store `LCSERVE_PUSH_TOKEN` in secrets From 4abc2cac74f1fb52b40a5d7f7684ed0d0a4dd3f9 Mon Sep 17 00:00:00 2001 From: Deepankar Mahapatro Date: Tue, 16 May 2023 21:23:51 +0530 Subject: [PATCH 16/50] ci: trigger workflow during release --- .github/workflows/test-push.yml | 19 ------------------- poetry.lock | 3 +-- 2 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 .github/workflows/test-push.yml diff --git a/.github/workflows/test-push.yml b/.github/workflows/test-push.yml deleted file mode 100644 index 5edaef99e..000000000 --- a/.github/workflows/test-push.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: test-push - -on: - workflow_dispatch: - - -jobs: - trigger-image-push-lc-serve: - permissions: - contents: write - runs-on: ubuntu-latest - steps: - - name: Trigger build and push on langchain-serve - uses: peter-evans/repository-dispatch@v2 - with: - token: ${{ secrets.DEEPANKAR_GITHUB_TOKEN }} - repository: jina-ai/langchain-serve - event-type: langflow-push - client-payload: '{"push_token": "${{ secrets.LCSERVE_PUSH_TOKEN }}", "branch": "dev"}' diff --git a/poetry.lock b/poetry.lock index d7ede53c9..b5469390b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -5773,5 +5773,4 @@ production = ["langchain-serve"] [metadata] lock-version = "2.0" python-versions = "^3.9" - -content-hash = "0524829f482c4eab8c25205d68dcec64084a28823de82cd3c3737e6bb74439c7" \ No newline at end of file +content-hash = "a6fa5f8b36994c9b7dfa3de4979099f2e76cb534697823b49a949c661efa3fba" From f01a2942089914ace263ffc6555e095657c6cefd Mon Sep 17 00:00:00 2001 From: Deepankar Mahapatro Date: Tue, 16 May 2023 21:44:22 +0530 Subject: [PATCH 17/50] docs: update readme about jcloud deployment --- README.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 47 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index de98f87a1..ecf851422 100644 --- a/README.md +++ b/README.md @@ -46,13 +46,56 @@ Alternatively, click the **"Open in Cloud Shell"** button below to launch Google [![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.svg)](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/logspace-ai/langflow&working_dir=scripts&shellonly=true&tutorial=walkthroughtutorial_spot.md) -### Deploy Langflow on Google Cloud Platform +### Deploy Langflow on [Jina AI Cloud](https://github.com/jina-ai/langchain-serve) -Follow our step-by-step guide to deploy Langflow on Google Cloud Platform (GCP) using Google Cloud Shell. The guide is available in the [**Langflow in Google Cloud Platform**](GCP_DEPLOYMENT.md) document. +Langflow integrates with langchain-serve to provide a one-command deployment to Jina AI Cloud. -Alternatively, click the **"Open in Cloud Shell"** button below to launch Google Cloud Shell, clone the Langflow repository, and start an **interactive tutorial** that will guide you through the process of setting up the necessary resources and deploying Langflow on your GCP project. +Start by installing `langchain-serve` with `pip install -U langchain-serve`. Then, run: -[![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.svg)](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/genome21/langflow&working_dir=scripts&shellonly=true&tutorial=walkthroughtutorial_spot.md) +```bash +langflow jcloud +``` + +```text +๐ŸŽ‰ Langflow server successfully deployed on Jina AI Cloud ๐ŸŽ‰ +๐Ÿ”— Click on the link to open the server (please allow ~1-2 minutes for the server to startup): https://.wolf.jina.ai/ +๐Ÿ“– Read more about managing the server: https://github.com/jina-ai/langchain-serve +``` + +
+ Show complete (example) output + + ```text + ๐Ÿš€ Deploying Langflow server on Jina AI Cloud + โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐ŸŽ‰ Flow is available! โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ + โ”‚ โ”‚ + โ”‚ ID langflow-e3dd8820ec โ”‚ + โ”‚ Gateway (Websocket) wss://langflow-e3dd8820ec.wolf.jina.ai โ”‚ + โ”‚ Dashboard https://dashboard.wolf.jina.ai/flow/e3dd8820ec โ”‚ + โ”‚ โ”‚ + โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ + โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ + โ”‚ App ID โ”‚ langflow-e3dd8820ec โ”‚ + โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค + โ”‚ Phase โ”‚ Serving โ”‚ + โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค + โ”‚ Endpoint โ”‚ wss://langflow-e3dd8820ec.wolf.jina.ai โ”‚ + โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค + โ”‚ App logs โ”‚ dashboards.wolf.jina.ai โ”‚ + โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค + โ”‚ Swagger UI โ”‚ https://langflow-e3dd8820ec.wolf.jina.ai/docs โ”‚ + โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค + โ”‚ OpenAPI JSON โ”‚ https://langflow-e3dd8820ec.wolf.jina.ai/openapi.json โ”‚ + โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ + + ๐ŸŽ‰ Langflow server successfully deployed on Jina AI Cloud ๐ŸŽ‰ + ๐Ÿ”— Click on the link to open the server (please allow ~1-2 minutes for the server to startup): https://langflow-e3dd8820ec.wolf.jina.ai/ + ๐Ÿ“– Read more about managing the server: https://github.com/jina-ai/langchain-serve + ``` + +
+ +> Read more about customization, cost, and management of Langflow on Jina AI Cloud in the **[langchain-serve](https://github.com/jina-ai/langchain-serve)** repository. ## ๐ŸŽจ Creating Flows From a2e5fab6376b0d848dcd4874c9b67b3ca43f76e8 Mon Sep 17 00:00:00 2001 From: Deepankar Mahapatro Date: Wed, 17 May 2023 10:24:19 +0530 Subject: [PATCH 18/50] ci: trigger workflow during release --- .github/workflows/release.yml | 4 +-- README.md | 48 ++++++++++++++++++++++++++++++-- poetry.lock | 4 +-- pyproject.toml | 2 +- src/backend/langflow/__main__.py | 7 +++-- 5 files changed, 55 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9c39e91c9..cc9e15761 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,7 +51,7 @@ jobs: - name: Trigger build and push on langchain-serve uses: peter-evans/repository-dispatch@v2 with: - token: ${{ secrets.DEEPANKAR_GITHUB_TOKEN }} # TODO: repo authors need to create a PAT and add it to secrets + token: ${{ secrets.SERVE_GITHUB_TOKEN }} repository: jina-ai/langchain-serve event-type: langflow-push - client-payload: '{"push_token": "${{ secrets.LCSERVE_PUSH_TOKEN }}", "branch": "dev"}' # TODO: repo authors need to store `LCSERVE_PUSH_TOKEN` in secrets + client-payload: '{"push_token": "${{ secrets.LCSERVE_PUSH_TOKEN }}", "branch": "dev"}' diff --git a/README.md b/README.md index ecf851422..bd377896c 100644 --- a/README.md +++ b/README.md @@ -50,10 +50,16 @@ Alternatively, click the **"Open in Cloud Shell"** button below to launch Google Langflow integrates with langchain-serve to provide a one-command deployment to Jina AI Cloud. -Start by installing `langchain-serve` with `pip install -U langchain-serve`. Then, run: +Start by installing `langchain-serve` with ```bash -langflow jcloud +pip install -U langchain-serve +``` + +Then, run: + +```bash +langflow --jcloud ``` ```text @@ -95,7 +101,43 @@ langflow jcloud -> Read more about customization, cost, and management of Langflow on Jina AI Cloud in the **[langchain-serve](https://github.com/jina-ai/langchain-serve)** repository. +#### API Usage + +You can use Langflow directly on your browser, or use the API endpoints on Jina AI Cloud to interact with the server. + +
+ Show API usage (with python) + + ```python + import json + import requests + + FLOW_PATH = "Time_traveller.json" + + # HOST = 'http://localhost:7860' + HOST = 'https://langflow-f1ed20e309.wolf.jina.ai' + API_URL = f'{HOST}/predict' + + def predict(message): + with open(FLOW_PATH, "r") as f: + json_data = json.load(f) + payload = {'exported_flow': json_data, 'message': message} + response = requests.post(API_URL, json=payload) + return response.json() + + + predict('Take me to 1920s Bangalore') + ``` + + ```json + { + "result": "Great choice! Bangalore in the 1920s was a vibrant city with a rich cultural and political scene. Here are some suggestions for things to see and do:\n\n1. Visit the Bangalore Palace - built in 1887, this stunning palace is a perfect example of Tudor-style architecture. It was home to the Maharaja of Mysore and is now open to the public.\n\n2. Attend a performance at the Ravindra Kalakshetra - this cultural center was built in the 1920s and is still a popular venue for music and dance performances.\n\n3. Explore the neighborhoods of Basavanagudi and Malleswaram - both of these areas have retained much of their old-world charm and are great places to walk around and soak up the atmosphere.\n\n4. Check out the Bangalore Club - founded in 1868, this exclusive social club was a favorite haunt of the British expat community in the 1920s.\n\n5. Attend a meeting of the Indian National Congress - founded in 1885, the INC was a major force in the Indian independence movement and held many meetings and rallies in Bangalore in the 1920s.\n\nHope you enjoy your trip to 1920s Bangalore!" + } + ``` + +
+ +> Read more about resource customization, cost, and management of Langflow apps on Jina AI Cloud in the **[langchain-serve](https://github.com/jina-ai/langchain-serve)** repository. ## ๐ŸŽจ Creating Flows diff --git a/poetry.lock b/poetry.lock index b5469390b..165eba2dd 100644 --- a/poetry.lock +++ b/poetry.lock @@ -5768,9 +5768,9 @@ cffi = {version = ">=1.11", markers = "platform_python_implementation == \"PyPy\ cffi = ["cffi (>=1.11)"] [extras] -production = ["langchain-serve"] +deploy = ["langchain-serve"] [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "a6fa5f8b36994c9b7dfa3de4979099f2e76cb534697823b49a949c661efa3fba" +content-hash = "bca5ed5cd32c5ad8d80faf99e9d988703202dd52001d2cbadaf61968a7cdebcc" diff --git a/pyproject.toml b/pyproject.toml index 972bcc229..9389b9661 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ types-pillow = "^9.5.0.2" [tool.poetry.extras] -production = ["langchain-serve"] +deploy = ["langchain-serve"] [tool.ruff] line-length = 120 diff --git a/src/backend/langflow/__main__.py b/src/backend/langflow/__main__.py index e6ca9b9de..89645aefc 100644 --- a/src/backend/langflow/__main__.py +++ b/src/backend/langflow/__main__.py @@ -33,11 +33,15 @@ def serve( config: str = typer.Option("config.yaml", help="Path to the configuration file."), log_level: str = typer.Option("info", help="Logging level."), log_file: Path = typer.Option("logs/langflow.log", help="Path to the log file."), + jcloud: bool = typer.Option(False, help="Deploy on Jina AI Cloud"), ): """ Run the Langflow server. """ + if jcloud: + return serve_on_jcloud() + configure(log_level=log_level, log_file=log_file) update_settings(config) app = create_app() @@ -69,8 +73,7 @@ def serve( LangflowApplication(app, options).run() -@app.command() -def jcloud(): +def serve_on_jcloud(): """ Deploy Langflow server on Jina AI Cloud """ From 0e200d8992dd8cef53a02c55ebae53e761facd22 Mon Sep 17 00:00:00 2001 From: Gabriel Almeida Date: Wed, 17 May 2023 12:19:24 -0300 Subject: [PATCH 19/50] fix(validate.py): return exception message in response when validation fails --- src/backend/langflow/api/validate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/langflow/api/validate.py b/src/backend/langflow/api/validate.py index de50896cb..0e2a7752c 100644 --- a/src/backend/langflow/api/validate.py +++ b/src/backend/langflow/api/validate.py @@ -54,4 +54,4 @@ def post_validate_node(node_id: str, data: dict): return json.dumps({"valid": True, "params": str(node._built_object_repr())}) except Exception as e: logger.exception(e) - return json.dumps({"valid": False}) + return json.dumps({"valid": False, "params": str(e)}) From 9411239a5b3411626f4a874326c541024560fe03 Mon Sep 17 00:00:00 2001 From: Gabriel Almeida Date: Wed, 17 May 2023 12:50:42 -0300 Subject: [PATCH 20/50] feat(GenericNode): add validation status icons and tooltips to node parameters and fix validation status state update --- .../src/CustomNodes/GenericNode/index.tsx | 252 ++++++++++-------- 1 file changed, 139 insertions(+), 113 deletions(-) diff --git a/src/frontend/src/CustomNodes/GenericNode/index.tsx b/src/frontend/src/CustomNodes/GenericNode/index.tsx index 85e7810a1..71c10c539 100644 --- a/src/frontend/src/CustomNodes/GenericNode/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/index.tsx @@ -1,4 +1,12 @@ -import { BugAntIcon, Cog6ToothIcon, ExclamationCircleIcon, InformationCircleIcon, TrashIcon } from "@heroicons/react/24/outline"; +import { + BugAntIcon, + CheckCircleIcon, + Cog6ToothIcon, + EllipsisHorizontalCircleIcon, + ExclamationCircleIcon, + InformationCircleIcon, + TrashIcon, +} from "@heroicons/react/24/outline"; import { classNames, nodeColors, nodeIcons, toNormalCase } from "../../utils"; import ParameterComponent from "./components/parameterComponent"; import { typesContext } from "../../contexts/typesContext"; @@ -12,11 +20,11 @@ import { TabsContext } from "../../contexts/tabsContext"; import { debounce } from "../../utils"; import Tooltip from "../../components/TooltipComponent"; export default function GenericNode({ - data, - selected, + data, + selected, }: { - data: NodeDataType; - selected: boolean; + data: NodeDataType; + selected: boolean; }) { const { setErrorData } = useContext(alertContext); const showError = useRef(true); @@ -30,32 +38,28 @@ export default function GenericNode({ const { reactFlowInstance } = useContext(typesContext); const [params, setParams] = useState([]); - useEffect(() => { - if (reactFlowInstance) { - setParams(Object.values(reactFlowInstance.toObject())); - } - }, [save]); + useEffect(() => { + if (reactFlowInstance) { + setParams(Object.values(reactFlowInstance.toObject())); + } + }, [save]); - const validateNode = useCallback( - debounce(async () => { - try { - const response = await fetch(`/validate/node/${data.id}`, { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify(reactFlowInstance.toObject()), - }); + const validateNode = useCallback( + debounce(async () => { + try { + const response = await fetch(`/validate/node/${data.id}`, { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify(reactFlowInstance.toObject()), + }); if (response.status === 200) { let jsonResponse = await response.json(); let jsonResponseParsed = await JSON.parse(jsonResponse); console.log(jsonResponseParsed); - if(jsonResponseParsed.valid){ - setValidationStatus(jsonResponseParsed.params); - } else { - setValidationStatus("error"); - } + setValidationStatus(jsonResponseParsed); } } catch (error) { // console.error("Error validating node:", error); @@ -70,31 +74,22 @@ export default function GenericNode({ } }, [params, validateNode]); - useEffect(() => { - if (validationStatus !== "error") { - setIsValid(true); - } else { - setIsValid(false); + if (!Icon) { + if (showError.current) { + setErrorData({ + title: data.type + ? `The ${data.type} node could not be rendered, please review your json file` + : "There was a node that can't be rendered, please review your json file", + }); + showError.current = false; } - }, [validationStatus]); - - if (!Icon) { - if (showError.current) { - setErrorData({ - title: data.type - ? `The ${data.type} node could not be rendered, please review your json file` - : "There was a node that can't be rendered, please review your json file", - }); - showError.current = false; - } - deleteNode(data.id); - return; - } + deleteNode(data.id); + return; + } return (
{data.type}
- {validationStatus && validationStatus !== "error" ? - - {validationStatus} -
}> - - - : <> -} +
+ + {validationStatus.params} +
+ ) + } + > +
+ + + +
+ +
+ + ); } From 3810589876282b20da05af25bfe7162538bb6baf Mon Sep 17 00:00:00 2001 From: Gabriel Almeida Date: Wed, 17 May 2023 12:54:10 -0300 Subject: [PATCH 21/50] format --- src/backend/langflow/api/endpoints.py | 2 +- src/backend/langflow/interface/run.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/langflow/api/endpoints.py b/src/backend/langflow/api/endpoints.py index 02a775630..021a81ca8 100644 --- a/src/backend/langflow/api/endpoints.py +++ b/src/backend/langflow/api/endpoints.py @@ -1,5 +1,5 @@ -from importlib.metadata import version import logging +from importlib.metadata import version from fastapi import APIRouter, HTTPException diff --git a/src/backend/langflow/interface/run.py b/src/backend/langflow/interface/run.py index a20587b54..ca6e0908e 100644 --- a/src/backend/langflow/interface/run.py +++ b/src/backend/langflow/interface/run.py @@ -3,12 +3,12 @@ import io from typing import Any, Dict, List, Tuple from chromadb.errors import NotEnoughElementsException # type: ignore +from langchain.schema import AgentAction from langflow.api.callback import AsyncStreamingLLMCallbackHandler, StreamingLLMCallbackHandler # type: ignore from langflow.cache.base import compute_dict_hash, load_cache, memoize_dict from langflow.graph.graph import Graph from langflow.utils.logger import logger -from langchain.schema import AgentAction def load_langchain_object(data_graph, is_first_message=False): From f6d977f1396477d10115c89a2450a94a52453947 Mon Sep 17 00:00:00 2001 From: Gabriel Almeida Date: Wed, 17 May 2023 14:46:36 -0300 Subject: [PATCH 22/50] style(nodes, GenericNode): fix indentation and add line breaks for readability --- poetry.lock | 94 +++++++++---------- src/backend/langflow/graph/nodes.py | 3 +- .../src/CustomNodes/GenericNode/index.tsx | 4 +- 3 files changed, 51 insertions(+), 50 deletions(-) diff --git a/poetry.lock b/poetry.lock index b9f7fcb52..7c2cd5754 100644 --- a/poetry.lock +++ b/poetry.lock @@ -828,59 +828,57 @@ files = [ [[package]] name = "duckdb" -version = "0.7.1" +version = "0.8.0" description = "DuckDB embedded database" category = "main" optional = false python-versions = "*" files = [ - {file = "duckdb-0.7.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:3e0170be6cc315c179169dfa3e06485ef7009ef8ce399cd2908f29105ef2c67b"}, - {file = "duckdb-0.7.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6360d41023e726646507d5479ba60960989a09f04527b36abeef3643c61d8c48"}, - {file = "duckdb-0.7.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:578c269d7aa27184e8d45421694f89deda3f41fe6bd2a8ce48b262b9fc975326"}, - {file = "duckdb-0.7.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:36aae9a923c9f78da1cf3fcf75873f62d32ea017d4cef7c706d16d3eca527ca2"}, - {file = "duckdb-0.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:630e0122a02f19bb1fafae00786350b2c31ae8422fce97c827bd3686e7c386af"}, - {file = "duckdb-0.7.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:9b9ca2d294725e523ce207bc37f28787478ae6f7a223e2cf3a213a2d498596c3"}, - {file = "duckdb-0.7.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0bd89f388205b6c99b62650169efe9a02933555ee1d46ddf79fbd0fb9e62652b"}, - {file = "duckdb-0.7.1-cp310-cp310-win32.whl", hash = "sha256:a9e987565a268fd8da9f65e54621d28f39c13105b8aee34c96643074babe6d9c"}, - {file = "duckdb-0.7.1-cp310-cp310-win_amd64.whl", hash = "sha256:5d986b5ad1307b069309f9707c0c5051323e29865aefa059eb6c3b22dc9751b6"}, - {file = "duckdb-0.7.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:54606dfd24d7181d3098030ca6858f6be52f3ccbf42fff05f7587f2d9cdf4343"}, - {file = "duckdb-0.7.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:bd9367ae650b6605ffe00412183cf0edb688a5fc9fbb03ed757e8310e7ec3b6c"}, - {file = "duckdb-0.7.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:aaf33aeb543c7816bd915cd10141866d54f92f698e1b5712de9d8b7076da19df"}, - {file = "duckdb-0.7.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2e56b0329c38c0356b40449917bab6fce6ac27d356257b9a9da613d2a0f064e0"}, - {file = "duckdb-0.7.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:604b8b476d6cc6bf91625d8c2722ef9c50c402b3d64bc518c838d6c279e6d93b"}, - {file = "duckdb-0.7.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:32a268508c6d7fdc99d5442736051de74c28a5166c4cc3dcbbf35d383299b941"}, - {file = "duckdb-0.7.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:90794406fa2111414877ee9db154fef940911f3920c312c1cf69947621737c8d"}, - {file = "duckdb-0.7.1-cp311-cp311-win32.whl", hash = "sha256:bf20c5ee62cbbf10b39ebdfd70d454ce914e70545c7cb6cb78cb5befef96328a"}, - {file = "duckdb-0.7.1-cp311-cp311-win_amd64.whl", hash = "sha256:bb2700785cab37cd1e7a76c4547a5ab0f8a7c28ad3f3e4d02a8fae52be223090"}, - {file = "duckdb-0.7.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:b09741cfa31388b8f9cdf5c5200e0995d55a5b54d2d1a75b54784e2f5c042f7f"}, - {file = "duckdb-0.7.1-cp36-cp36m-win32.whl", hash = "sha256:766e6390f7ace7f1e322085c2ca5d0ad94767bde78a38d168253d2b0b4d5cd5c"}, - {file = "duckdb-0.7.1-cp36-cp36m-win_amd64.whl", hash = "sha256:6a3f3315e2b553db3463f07324f62dfebaf3b97656a87558e59e2f1f816eaf15"}, - {file = "duckdb-0.7.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:278edb8c912d836b3b77fd1695887e1dbd736137c3912478af3608c9d7307bb0"}, - {file = "duckdb-0.7.1-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e189b558d10b58fe6ed85ce79f728e143eb4115db1e63147a44db613cd4dd0d9"}, - {file = "duckdb-0.7.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b91ec3544ee4dc9e6abbdf2669475d5adedaaea51987c67acf161673e6b7443"}, - {file = "duckdb-0.7.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:3fe3f3dbd62b76a773144eef31aa29794578c359da932e77fef04516535318ca"}, - {file = "duckdb-0.7.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:1e78c7f59325e99f0b3d9fe7c2bad4aaadf42d2c7711925cc26331d7647a91b2"}, - {file = "duckdb-0.7.1-cp37-cp37m-win32.whl", hash = "sha256:bc2a12d9f4fc8ef2fd1022d610287c9fc9972ea06b7510fc87387f1fa256a390"}, - {file = "duckdb-0.7.1-cp37-cp37m-win_amd64.whl", hash = "sha256:53e3db1bc0f445ee48b23cde47bfba08c7fa5a69976c740ec8cdf89543d2405d"}, - {file = "duckdb-0.7.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:1247cc11bac17f2585d11681329806c86295e32242f84a10a604665e697d5c81"}, - {file = "duckdb-0.7.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:5feaff16a012075b49dfa09d4cb24455938d6b0e06b08e1404ec00089119dba2"}, - {file = "duckdb-0.7.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b411a0c361eab9b26dcd0d0c7a0d1bc0ad6b214068555de7e946fbdd2619961a"}, - {file = "duckdb-0.7.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c7c76d8694ecdb579241ecfeaf03c51d640b984dbbe8e1d9f919089ebf3cdea6"}, - {file = "duckdb-0.7.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:193b896eed44d8751a755ccf002a137630020af0bc3505affa21bf19fdc90df3"}, - {file = "duckdb-0.7.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:7da132ee452c80a3784b8daffd86429fa698e1b0e3ecb84660db96d36c27ad55"}, - {file = "duckdb-0.7.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5fd08c97c3e8cb5bec3822cf78b966b489213dcaab24b25c05a99f7caf8db467"}, - {file = "duckdb-0.7.1-cp38-cp38-win32.whl", hash = "sha256:9cb956f94fa55c4782352dac7cc7572a58312bd7ce97332bb14591d6059f0ea4"}, - {file = "duckdb-0.7.1-cp38-cp38-win_amd64.whl", hash = "sha256:289a5f65213e66d320ebcd51a94787e7097b9d1c3492d01a121a2c809812bf19"}, - {file = "duckdb-0.7.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:8085ad58c9b5854ee3820804fa1797e6b3134429c1506c3faab3cb96e71b07e9"}, - {file = "duckdb-0.7.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b47c19d1f2f662a5951fc6c5f6939d0d3b96689604b529cdcffd9afdcc95bff2"}, - {file = "duckdb-0.7.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6a611f598226fd634b7190f509cc6dd668132ffe436b0a6b43847b4b32b99e4a"}, - {file = "duckdb-0.7.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6730f03b5b78f3943b752c90bdf37b62ae3ac52302282a942cc675825b4a8dc9"}, - {file = "duckdb-0.7.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fe23e938d29cd8ea6953d77dc828b7f5b95a4dbc7cd7fe5bcc3531da8cec3dba"}, - {file = "duckdb-0.7.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:feffe503c2e2a99480e1e5e15176f37796b3675e4dadad446fe7c2cc672aed3c"}, - {file = "duckdb-0.7.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:72fceb06f5bf24ad6bb5974c60d397a7a7e61b3d847507a22276de076f3392e2"}, - {file = "duckdb-0.7.1-cp39-cp39-win32.whl", hash = "sha256:c4d5217437d20d05fe23317bbc161befa1f9363f3622887cd1d2f4719b407936"}, - {file = "duckdb-0.7.1-cp39-cp39-win_amd64.whl", hash = "sha256:066885e1883464ce3b7d1fd844f9431227dcffe1ee39bfd2a05cd6d53f304557"}, - {file = "duckdb-0.7.1.tar.gz", hash = "sha256:a7db6da0366b239ea1e4541fcc19556b286872f5015c9a54c2e347146e25a2ad"}, + {file = "duckdb-0.8.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:6455aee00af30770c20f4a8c5e4347918cf59b578f49ee996a13807b12911871"}, + {file = "duckdb-0.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b8cf0622ae7f86d4ce72791f8928af4357a46824aadf1b6879c7936b3db65344"}, + {file = "duckdb-0.8.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6132e8183ca3ae08a593e43c97cb189794077dedd48546e27ce43bd6a51a9c33"}, + {file = "duckdb-0.8.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fe29e5343fa2a95f2cde4519a4f4533f4fd551a48d2d9a8ab5220d40ebf53610"}, + {file = "duckdb-0.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:945165987ca87c097dc0e578dcf47a100cad77e1c29f5dd8443d53ce159dc22e"}, + {file = "duckdb-0.8.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:673c60daf7ada1d9a8518286a6893ec45efabb64602954af5f3d98f42912fda6"}, + {file = "duckdb-0.8.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d5075fe1ff97ae62331ca5c61e3597e6e9f7682a6fdd418c23ba5c4873ed5cd1"}, + {file = "duckdb-0.8.0-cp310-cp310-win32.whl", hash = "sha256:001f5102f45d3d67f389fa8520046c8f55a99e2c6d43b8e68b38ea93261c5395"}, + {file = "duckdb-0.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:cb00800f2e1e865584b13221e0121fce9341bb3a39a93e569d563eaed281f528"}, + {file = "duckdb-0.8.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:b2707096d6df4321044fcde2c9f04da632d11a8be60957fd09d49a42fae71a29"}, + {file = "duckdb-0.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b27df1b70ae74d2c88efb5ffca8490954fdc678099509a9c4404ca30acc53426"}, + {file = "duckdb-0.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:75a97c800271b52dd0f37696d074c50576dcb4b2750b6115932a98696a268070"}, + {file = "duckdb-0.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c6b9abca7fa6713e1d031c18485343b4de99742c7e1b85c10718aa2f31a4e2c6"}, + {file = "duckdb-0.8.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:7c8dc769aaf2be0a1c57995ca657e5b92c1c56fc8437edb720ca6cab571adf14"}, + {file = "duckdb-0.8.0-cp311-cp311-win32.whl", hash = "sha256:c4207d18b42387c4a035846d8878eb967070198be8ac26fd77797ce320d1a400"}, + {file = "duckdb-0.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:0c392257547c20794c3072fcbca99a49ef0a49974005d755e93893e2b4875267"}, + {file = "duckdb-0.8.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:2832379e122020814dbe869af7b9ddf3c9f21474cf345531145b099c63ffe17e"}, + {file = "duckdb-0.8.0-cp36-cp36m-win32.whl", hash = "sha256:914896526f7caba86b170f2c4f17f11fd06540325deeb0000cb4fb24ec732966"}, + {file = "duckdb-0.8.0-cp36-cp36m-win_amd64.whl", hash = "sha256:022ebda86d0e3204cdc206e4af45aa9f0ae0668b34c2c68cf88e08355af4a372"}, + {file = "duckdb-0.8.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:96a31c0f3f4ccbf0f5b18f94319f37691205d82f80aae48c6fe04860d743eb2c"}, + {file = "duckdb-0.8.0-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a07c73c6e6a8cf4ce1a634625e0d1b17e5b817242a8a530d26ed84508dfbdc26"}, + {file = "duckdb-0.8.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:424acbd6e857531b06448d757d7c2557938dbddbff0632092090efbf413b4699"}, + {file = "duckdb-0.8.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c83cfd2a868f1acb0692b9c3fd5ef1d7da8faa1348c6eabf421fbf5d8c2f3eb8"}, + {file = "duckdb-0.8.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:5c6f6b2d8db56936f662c649539df81856b5a8cb769a31f9544edf18af2a11ff"}, + {file = "duckdb-0.8.0-cp37-cp37m-win32.whl", hash = "sha256:0bd6376b40a512172eaf4aa816813b1b9d68994292ca436ce626ccd5f77f8184"}, + {file = "duckdb-0.8.0-cp37-cp37m-win_amd64.whl", hash = "sha256:931221885bcf1e7dfce2400f11fd048a7beef566b775f1453bb1db89b828e810"}, + {file = "duckdb-0.8.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:42e7853d963d68e72403ea208bcf806b0f28c7b44db0aa85ce49bb124d56c133"}, + {file = "duckdb-0.8.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:fcc338399175be3d43366576600aef7d72e82114d415992a7a95aded98a0f3fd"}, + {file = "duckdb-0.8.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:03dd08a4624d6b581a59f9f9dbfd34902416398d16795ad19f92361cf21fd9b5"}, + {file = "duckdb-0.8.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0c7c24ea0c9d8563dbd5ad49ccb54b7a9a3c7b8c2833d35e5d32a08549cacea5"}, + {file = "duckdb-0.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cb58f6505cc0f34b4e976154302d26563d2e5d16b206758daaa04b65e55d9dd8"}, + {file = "duckdb-0.8.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ef37ac7880100c4b3f913c8483a29a13f8289313b9a07df019fadfa8e7427544"}, + {file = "duckdb-0.8.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c2a4f5ee913ca8a6a069c78f8944b9934ffdbc71fd935f9576fdcea2a6f476f1"}, + {file = "duckdb-0.8.0-cp38-cp38-win32.whl", hash = "sha256:73831c6d7aefcb5f4072cd677b9efebecbf6c578946d21710791e10a1fc41b9a"}, + {file = "duckdb-0.8.0-cp38-cp38-win_amd64.whl", hash = "sha256:faa36d2854734364d234f37d7ef4f3d763b73cd6b0f799cbc2a0e3b7e2575450"}, + {file = "duckdb-0.8.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:50a31ec237ed619e50f9ab79eb0ec5111eb9697d4475da6e0ab22c08495ce26b"}, + {file = "duckdb-0.8.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:351abb4cc2d229d043920c4bc2a4c29ca31a79fef7d7ef8f6011cf4331f297bf"}, + {file = "duckdb-0.8.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:568550a163aca6a787bef8313e358590254de3f4019025a8d68c3a61253fedc1"}, + {file = "duckdb-0.8.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2b82617f0e7f9fc080eda217090d82b42d4fad083bc9f6d58dfda9cecb7e3b29"}, + {file = "duckdb-0.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d01c9be34d272532b75e8faedda0ff77fa76d1034cde60b8f5768ae85680d6d3"}, + {file = "duckdb-0.8.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:8549d6a6bf5f00c012b6916f605416226507e733a3ffc57451682afd6e674d1b"}, + {file = "duckdb-0.8.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8d145c6d51e55743c3ed1a74cffa109d9e72f82b07e203b436cfa453c925313a"}, + {file = "duckdb-0.8.0-cp39-cp39-win32.whl", hash = "sha256:f8610dfd21e90d7b04e8598b244bf3ad68599fd6ba0daad3428c03cbfd74dced"}, + {file = "duckdb-0.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:d0f0f104d30418808bafbe9bccdcd238588a07bd246b3cff13842d60bfd8e8ba"}, + {file = "duckdb-0.8.0.tar.gz", hash = "sha256:c68da35bab5072a64ada2646a5b343da620ddc75a7a6e84aa4a1e0628a7ec18f"}, ] [[package]] diff --git a/src/backend/langflow/graph/nodes.py b/src/backend/langflow/graph/nodes.py index 79930487a..cdcfb3b88 100644 --- a/src/backend/langflow/graph/nodes.py +++ b/src/backend/langflow/graph/nodes.py @@ -143,7 +143,8 @@ class DocumentLoaderNode(Node): # This built_object is a list of documents. Maybe we should # show how many documents are in the list? if self._built_object: - return f"""{self.node_type}({len(self._built_object)} documents)\nDocuments: {self._built_object[:3]}...""" + return f"""{self.node_type}({len(self._built_object)} documents) + Documents: {self._built_object[:3]}...""" return f"{self.node_type}()" diff --git a/src/frontend/src/CustomNodes/GenericNode/index.tsx b/src/frontend/src/CustomNodes/GenericNode/index.tsx index 71c10c539..059fdfb81 100644 --- a/src/frontend/src/CustomNodes/GenericNode/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/index.tsx @@ -110,7 +110,9 @@ export default function GenericNode({ "Validating..." ) : (
- {validationStatus.params} + {validationStatus.params.split("\n").map((line, index) => ( +
{line}
+ ))}
) } From 1338fa3521f46d3bb0bbff1114c097a437c8312e Mon Sep 17 00:00:00 2001 From: Gabriel Almeida Date: Wed, 17 May 2023 15:14:06 -0300 Subject: [PATCH 23/50] refactor(embeddings/base.py): add EmbeddingFrontendNode as a property of EmbeddingCreator fix(loading.py): remove headers from params before instantiating embedding refactor(nodes.py): add EmbeddingFrontendNode and hide headers field in it --- src/backend/langflow/interface/embeddings/base.py | 8 +++++++- src/backend/langflow/interface/loading.py | 1 + src/backend/langflow/template/nodes.py | 8 ++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/backend/langflow/interface/embeddings/base.py b/src/backend/langflow/interface/embeddings/base.py index 061b1d3b5..933d8ad39 100644 --- a/src/backend/langflow/interface/embeddings/base.py +++ b/src/backend/langflow/interface/embeddings/base.py @@ -1,8 +1,10 @@ -from typing import Dict, List, Optional +from typing import Dict, List, Optional, Type from langflow.interface.base import LangChainTypeCreator from langflow.interface.custom_lists import embedding_type_to_cls_dict from langflow.settings import settings +from langflow.template.base import FrontendNode +from langflow.template.nodes import EmbeddingFrontendNode from langflow.utils.logger import logger from langflow.utils.util import build_template_from_class @@ -14,6 +16,10 @@ class EmbeddingCreator(LangChainTypeCreator): def type_to_loader_dict(self) -> Dict: return embedding_type_to_cls_dict + @property + def frontend_node_class(self) -> Type[FrontendNode]: + return EmbeddingFrontendNode + def get_signature(self, name: str) -> Optional[Dict]: """Get the signature of an embedding.""" try: diff --git a/src/backend/langflow/interface/loading.py b/src/backend/langflow/interface/loading.py index 6cd9246b8..93135067b 100644 --- a/src/backend/langflow/interface/loading.py +++ b/src/backend/langflow/interface/loading.py @@ -108,6 +108,7 @@ def instantiate_toolkit(node_type, class_object, params): def instantiate_embedding(class_object, params): params.pop("model", None) + params.pop("headers", None) try: return class_object(**params) except ValidationError: diff --git a/src/backend/langflow/template/nodes.py b/src/backend/langflow/template/nodes.py index 6ce08e57b..a4d3fa1cf 100644 --- a/src/backend/langflow/template/nodes.py +++ b/src/backend/langflow/template/nodes.py @@ -614,3 +614,11 @@ class LLMFrontendNode(FrontendNode): elif field.name in ["model_name", "temperature"]: field.advanced = False field.show = True + + +class EmbeddingFrontendNode(FrontendNode): + @staticmethod + def format_field(field: TemplateField, name: Optional[str] = None) -> None: + FrontendNode.format_field(field, name) + if field.name == "headers": + field.show = False From 601dd6d5604a8fbd58da46d948d4d09024f89a8f Mon Sep 17 00:00:00 2001 From: Deepankar Mahapatro Date: Thu, 18 May 2023 12:07:57 +0530 Subject: [PATCH 24/50] chore: update to latest lc-serve --- poetry.lock | 21 +++++---------------- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/poetry.lock b/poetry.lock index f24c630f4..1f6cbda4e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -954,7 +954,9 @@ files = [ {file = "duckdb-0.8.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:b2707096d6df4321044fcde2c9f04da632d11a8be60957fd09d49a42fae71a29"}, {file = "duckdb-0.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b27df1b70ae74d2c88efb5ffca8490954fdc678099509a9c4404ca30acc53426"}, {file = "duckdb-0.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:75a97c800271b52dd0f37696d074c50576dcb4b2750b6115932a98696a268070"}, + {file = "duckdb-0.8.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:804cac261a5e016506a6d67838a65d19b06a237f7949f1704f0e800eb708286a"}, {file = "duckdb-0.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c6b9abca7fa6713e1d031c18485343b4de99742c7e1b85c10718aa2f31a4e2c6"}, + {file = "duckdb-0.8.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:51aa6d606d49072abcfeb3be209eb559ac94c1b5e70f58ac3adbb94aca9cd69f"}, {file = "duckdb-0.8.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:7c8dc769aaf2be0a1c57995ca657e5b92c1c56fc8437edb720ca6cab571adf14"}, {file = "duckdb-0.8.0-cp311-cp311-win32.whl", hash = "sha256:c4207d18b42387c4a035846d8878eb967070198be8ac26fd77797ce320d1a400"}, {file = "duckdb-0.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:0c392257547c20794c3072fcbca99a49ef0a49974005d755e93893e2b4875267"}, @@ -2119,13 +2121,13 @@ qdrant = ["qdrant-client (>=1.1.2,<2.0.0)"] [[package]] name = "langchain-serve" -version = "0.0.31" +version = "0.0.33" description = "Langchain Serve - serve your langchain apps on Jina AI Cloud." category = "main" optional = true python-versions = "*" files = [ - {file = "langchain-serve-0.0.31.tar.gz", hash = "sha256:1328ff71a82e854f2478eda3fd7bdeac86e75f7c75fa25fe2e2e2a96aebcab08"}, + {file = "langchain-serve-0.0.33.tar.gz", hash = "sha256:89396d932c75230ddd7c802824fc766df1ac95872c1a8f2da68d0ec8a54f761a"}, ] [package.dependencies] @@ -2135,7 +2137,6 @@ jina = "3.15.2" jina-hubble-sdk = "*" langchain = "*" nest-asyncio = "*" -pandasai = "*" requests = "*" textual = "*" toml = "*" @@ -3240,18 +3241,6 @@ files = [ [package.dependencies] types-pytz = ">=2022.1.1" -[[package]] -name = "pandasai" -version = "0.0.3" -description = "A wrapper around pandas to make it conversational" -category = "main" -optional = true -python-versions = ">=3.9" -files = [ - {file = "pandasai-0.0.3-py3-none-any.whl", hash = "sha256:a43b511a28a8a9ab0aad79e02c8a8f135e5947072946a766c132eb8b55aca83b"}, - {file = "pandasai-0.0.3.tar.gz", hash = "sha256:de99096327639af21093a3f3624c8594c452769f4d47532054cb647369d72f30"}, -] - [[package]] name = "parso" version = "0.8.3" @@ -5771,4 +5760,4 @@ deploy = ["langchain-serve"] [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "bca5ed5cd32c5ad8d80faf99e9d988703202dd52001d2cbadaf61968a7cdebcc" +content-hash = "ddf4cbde95a8fba8be8376cc2de300a375b0eb16c72226df795acf7d36b53737" diff --git a/pyproject.toml b/pyproject.toml index 2e7bf6272..d2a9ddfc7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ websockets = "^11.0.2" tiktoken = "^0.3.3" wikipedia = "^1.4.0" gptcache = "^0.1.23" -langchain-serve = { version = "^0.0.31", optional = true } +langchain-serve = { version = "^0.0.33", optional = true } [tool.poetry.group.dev.dependencies] black = "^23.1.0" From 18aaede030bcbb3d631d15d50bdf196fd6261a9f Mon Sep 17 00:00:00 2001 From: Deepankar Mahapatro Date: Thu, 18 May 2023 16:55:40 +0530 Subject: [PATCH 25/50] chore: lint fix --- src/backend/langflow/__main__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/langflow/__main__.py b/src/backend/langflow/__main__.py index 89645aefc..21833d551 100644 --- a/src/backend/langflow/__main__.py +++ b/src/backend/langflow/__main__.py @@ -86,7 +86,8 @@ def serve_on_jcloud(): from lcserve.__main__ import serve_on_jcloud # type: ignore except ImportError: click.secho( - "๐Ÿšจ Please install langchain-serve to deploy Langflow server on Jina AI Cloud using `pip install langchain-serve`", + "๐Ÿšจ Please install langchain-serve to deploy Langflow server on Jina AI Cloud " + "using `pip install langchain-serve`", fg="red", ) return From e1120bba4e57e780bf7f89c87deca0c1578242f2 Mon Sep 17 00:00:00 2001 From: Gabriel Almeida Date: Fri, 19 May 2023 10:05:32 -0300 Subject: [PATCH 26/50] style(chatModal): format code with prettier This commit formats the code in the chatModal component using prettier to make it more readable and consistent. No functional changes were made. --- src/frontend/src/modals/chatModal/index.tsx | 59 ++++++++++++--------- 1 file changed, 33 insertions(+), 26 deletions(-) diff --git a/src/frontend/src/modals/chatModal/index.tsx b/src/frontend/src/modals/chatModal/index.tsx index 7f6c61cde..b310a36f9 100644 --- a/src/frontend/src/modals/chatModal/index.tsx +++ b/src/frontend/src/modals/chatModal/index.tsx @@ -1,5 +1,8 @@ import { Dialog, Transition } from "@headlessui/react"; -import { ChatBubbleOvalLeftEllipsisIcon, XMarkIcon } from "@heroicons/react/24/outline"; +import { + ChatBubbleOvalLeftEllipsisIcon, + XMarkIcon, +} from "@heroicons/react/24/outline"; import { Fragment, useContext, useEffect, useRef, useState } from "react"; import { FlowType, NodeType } from "../../types/flow"; import { alertContext } from "../../contexts/alertContext"; @@ -37,8 +40,7 @@ export default function ChatModal({ }, [open]); useEffect(() => { id.current = flow.id; - },[flow.id]) - + }, [flow.id]); var isStream = false; @@ -122,16 +124,16 @@ export default function ChatModal({ newChatHistory.push( chatItem.files ? { - isSend: !chatItem.is_bot, - message: chatItem.message, - thought: chatItem.intermediate_steps, - files: chatItem.files, - } + isSend: !chatItem.is_bot, + message: chatItem.message, + thought: chatItem.intermediate_steps, + files: chatItem.files, + } : { - isSend: !chatItem.is_bot, - message: chatItem.message, - thought: chatItem.intermediate_steps, - } + isSend: !chatItem.is_bot, + message: chatItem.message, + thought: chatItem.intermediate_steps, + } ); } } @@ -144,6 +146,9 @@ export default function ChatModal({ isStream = true; } if (data.type === "end") { + if (data.message) { + updateLastMessage({ str: data.message, end: true }); + } if (data.intermediate_steps) { updateLastMessage({ str: data.message, @@ -171,8 +176,9 @@ export default function ChatModal({ const urlWs = process.env.NODE_ENV === "development" ? `ws://localhost:7860/chat/${id.current}` - : `${window.location.protocol === "https:" ? "wss" : "ws"}://${window.location.host - }/chat/${id.current}`; + : `${window.location.protocol === "https:" ? "wss" : "ws"}://${ + window.location.host + }/chat/${id.current}`; const newWs = new WebSocket(urlWs); newWs.onopen = () => { console.log("WebSocket connection established!"); @@ -189,10 +195,9 @@ export default function ChatModal({ }; newWs.onerror = (ev) => { console.log(ev, "error"); - if(flow.id===""){ + if (flow.id === "") { connectWS(); - } - else{ + } else { setErrorData({ title: "There was an error on web connection, please: ", list: [ @@ -205,10 +210,9 @@ export default function ChatModal({ }; ws.current = newWs; } catch { - if(flow.id===""){ + if (flow.id === "") { connectWS(); - } - else{ + } else { setErrorData({ title: "There was an error on web connection, please: ", list: [ @@ -279,11 +283,12 @@ export default function ChatModal({ e.targetHandle.split("|")[2] === n.id ) ? [ - `${type} is missing ${template.display_name - ? template.display_name - : toNormalCase(template[t].name) - }.`, - ] + `${type} is missing ${ + template.display_name + ? template.display_name + : toNormalCase(template[t].name) + }.`, + ] : [] ), [] as string[] @@ -382,7 +387,9 @@ export default function ChatModal({
{chatHistory.length > 0 ? ( - chatHistory.map((c, i) => ) + chatHistory.map((c, i) => ( + + )) ) : (
From 0d432524781ec2abd4e023b90c2d13a11e2a55f0 Mon Sep 17 00:00:00 2001 From: Gabriel Almeida Date: Fri, 19 May 2023 10:06:59 -0300 Subject: [PATCH 27/50] format --- src/frontend/src/contexts/typesContext.tsx | 142 ++++++++++----------- 1 file changed, 71 insertions(+), 71 deletions(-) diff --git a/src/frontend/src/contexts/typesContext.tsx b/src/frontend/src/contexts/typesContext.tsx index 2ab1eb057..000bfa472 100644 --- a/src/frontend/src/contexts/typesContext.tsx +++ b/src/frontend/src/contexts/typesContext.tsx @@ -7,83 +7,83 @@ import { APIKindType } from "../types/api"; //context to share types adn functions from nodes to flow const initialValue: typesContextType = { - reactFlowInstance: null, - setReactFlowInstance: () => {}, - deleteNode: () => {}, - types: {}, - setTypes: () => {}, - templates: {}, - setTemplates: () => {}, - data: {}, - setData: () => {}, + reactFlowInstance: null, + setReactFlowInstance: () => {}, + deleteNode: () => {}, + types: {}, + setTypes: () => {}, + templates: {}, + setTemplates: () => {}, + data: {}, + setData: () => {}, }; export const typesContext = createContext(initialValue); export function TypesProvider({ children }: { children: ReactNode }) { - const [types, setTypes] = useState({}); - const [reactFlowInstance, setReactFlowInstance] = useState(null); - const [templates, setTemplates] = useState({}); - const [data, setData] = useState({}); + const [types, setTypes] = useState({}); + const [reactFlowInstance, setReactFlowInstance] = useState(null); + const [templates, setTemplates] = useState({}); + const [data, setData] = useState({}); - useEffect(() => { - async function getTypes(): Promise { - // Make an asynchronous API call to retrieve all data. - let result = await getAll(); + useEffect(() => { + async function getTypes(): Promise { + // Make an asynchronous API call to retrieve all data. + let result = await getAll(); - // Update the state of the component with the retrieved data. - setData(result.data); - setTemplates( - Object.keys(result.data).reduce((acc, curr) => { - Object.keys(result.data[curr]).forEach((c: keyof APIKindType) => { - acc[c] = result.data[curr][c]; - }); - return acc; - }, {}) - ); - // Set the types by reducing over the keys of the result data and updating the accumulator. - setTypes( - Object.keys(result.data).reduce((acc, curr) => { - Object.keys(result.data[curr]).forEach((c: keyof APIKindType) => { - acc[c] = curr; - // Add the base classes to the accumulator as well. - result.data[curr][c].base_classes?.forEach((b) => { - acc[b] = curr; - }); - }); - return acc; - }, {}) - ); - } - // Call the getTypes function. - getTypes(); - }, [setTypes]); + // Update the state of the component with the retrieved data. + setData(result.data); + setTemplates( + Object.keys(result.data).reduce((acc, curr) => { + Object.keys(result.data[curr]).forEach((c: keyof APIKindType) => { + acc[c] = result.data[curr][c]; + }); + return acc; + }, {}) + ); + // Set the types by reducing over the keys of the result data and updating the accumulator. + setTypes( + Object.keys(result.data).reduce((acc, curr) => { + Object.keys(result.data[curr]).forEach((c: keyof APIKindType) => { + acc[c] = curr; + // Add the base classes to the accumulator as well. + result.data[curr][c].base_classes?.forEach((b) => { + acc[b] = curr; + }); + }); + return acc; + }, {}) + ); + } + // Call the getTypes function. + getTypes(); + }, [setTypes]); - function deleteNode(idx: string) { - reactFlowInstance.setNodes( - reactFlowInstance.getNodes().filter((n: Node) => n.id !== idx) - ); - reactFlowInstance.setEdges( - reactFlowInstance - .getEdges() - .filter((ns) => ns.source !== idx && ns.target !== idx) - ); - } - return ( - - {children} - - ); + function deleteNode(idx: string) { + reactFlowInstance.setNodes( + reactFlowInstance.getNodes().filter((n: Node) => n.id !== idx) + ); + reactFlowInstance.setEdges( + reactFlowInstance + .getEdges() + .filter((ns) => ns.source !== idx && ns.target !== idx) + ); + } + return ( + + {children} + + ); } From c93c4627d0e589351b5da92f5c1c9cb85ccc5eb7 Mon Sep 17 00:00:00 2001 From: Gabriel Almeida Date: Fri, 19 May 2023 10:07:13 -0300 Subject: [PATCH 28/50] feat(typesContext.tsx): add retry logic to getAll API call This commit adds retry logic to the getAll API call in the TypesProvider component. The retry logic will attempt to make the API call up to 5 times with an increasing delay between each attempt. If the API call is successful, the state of the component will be updated with the retrieved data. If the component is unmounted before the API call resolves, the state will not be updated. --- src/frontend/src/contexts/typesContext.tsx | 92 +++++++++++++++------- 1 file changed, 63 insertions(+), 29 deletions(-) diff --git a/src/frontend/src/contexts/typesContext.tsx b/src/frontend/src/contexts/typesContext.tsx index 000bfa472..f0f765bb6 100644 --- a/src/frontend/src/contexts/typesContext.tsx +++ b/src/frontend/src/contexts/typesContext.tsx @@ -27,37 +27,71 @@ export function TypesProvider({ children }: { children: ReactNode }) { const [data, setData] = useState({}); useEffect(() => { - async function getTypes(): Promise { - // Make an asynchronous API call to retrieve all data. - let result = await getAll(); + let delay = 1000; // Start delay of 1 second + let intervalId = null; + let retryCount = 0; // Count of retry attempts + const maxRetryCount = 5; // Max retry attempts - // Update the state of the component with the retrieved data. - setData(result.data); - setTemplates( - Object.keys(result.data).reduce((acc, curr) => { - Object.keys(result.data[curr]).forEach((c: keyof APIKindType) => { - acc[c] = result.data[curr][c]; - }); - return acc; - }, {}) - ); - // Set the types by reducing over the keys of the result data and updating the accumulator. - setTypes( - Object.keys(result.data).reduce((acc, curr) => { - Object.keys(result.data[curr]).forEach((c: keyof APIKindType) => { - acc[c] = curr; - // Add the base classes to the accumulator as well. - result.data[curr][c].base_classes?.forEach((b) => { - acc[b] = curr; - }); - }); - return acc; - }, {}) - ); + // We will keep a flag to handle the case where the component is unmounted before the API call resolves. + let isMounted = true; + + async function getTypes(): Promise { + try { + const result = await getAll(); + // Make sure to only update the state if the component is still mounted. + if (isMounted) { + // Continue with your logic... + setData(result.data); + setTemplates( + Object.keys(result.data).reduce((acc, curr) => { + Object.keys(result.data[curr]).forEach((c: keyof APIKindType) => { + acc[c] = result.data[curr][c]; + }); + return acc; + }, {}) + ); + // Set the types by reducing over the keys of the result data and updating the accumulator. + setTypes( + Object.keys(result.data).reduce((acc, curr) => { + Object.keys(result.data[curr]).forEach((c: keyof APIKindType) => { + acc[c] = curr; + // Add the base classes to the accumulator as well. + result.data[curr][c].base_classes?.forEach((b) => { + acc[b] = curr; + }); + }); + return acc; + }, {}) + ); + } + // Clear the interval if successful. + clearInterval(intervalId); + } catch (error) { + retryCount++; + // On error, double the delay for the next attempt up to a maximum. + delay = Math.min(30000, delay * 2); + // Log errors but don't do anything else - the function will try again on the next interval. + console.error(error); + // Clear the old interval and start a new one with the new delay. + if (retryCount <= maxRetryCount) { + clearInterval(intervalId); + intervalId = setInterval(getTypes, delay); + } else { + console.error("Max retry attempts reached. Stopping retries."); + } + } } - // Call the getTypes function. - getTypes(); - }, [setTypes]); + + // Start the initial interval. + intervalId = setInterval(getTypes, delay); + + return () => { + // This will clear the interval when the component unmounts, or when the dependencies of the useEffect hook change. + clearInterval(intervalId); + // Indicate that the component has been unmounted. + isMounted = false; + }; + }, []); function deleteNode(idx: string) { reactFlowInstance.setNodes( From e85c918e6fe2a8fbefa219bec542d2c75cec68a4 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Fri, 19 May 2023 17:18:41 -0300 Subject: [PATCH 29/50] node updating update node template, base classes and description --- src/frontend/src/contexts/tabsContext.tsx | 48 ++++++++++++++++------- 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/src/frontend/src/contexts/tabsContext.tsx b/src/frontend/src/contexts/tabsContext.tsx index 1a06443d6..0e338aada 100644 --- a/src/frontend/src/contexts/tabsContext.tsx +++ b/src/frontend/src/contexts/tabsContext.tsx @@ -15,19 +15,19 @@ import { APITemplateType, TemplateVariableType } from "../types/api"; import { v4 as uuidv4 } from "uuid"; const TabsContextInitialValue: TabsContextType = { - save: () => {}, + save: () => { }, tabIndex: 0, - setTabIndex: (index: number) => {}, + setTabIndex: (index: number) => { }, flows: [], - removeFlow: (id: string) => {}, - addFlow: (flowData?: any) => {}, - updateFlow: (newFlow: FlowType) => {}, + removeFlow: (id: string) => { }, + addFlow: (flowData?: any) => { }, + updateFlow: (newFlow: FlowType) => { }, incrementNodeId: () => 0, - downloadFlow: (flow: FlowType) => {}, - uploadFlow: () => {}, - hardReset: () => {}, - disableCP:false, - setDisableCP:(state:boolean)=>{}, + downloadFlow: (flow: FlowType) => { }, + uploadFlow: () => { }, + hardReset: () => { }, + disableCP: false, + setDisableCP: (state: boolean) => { }, }; export const TabsContext = createContext( @@ -67,11 +67,19 @@ export function TabsProvider({ children }: { children: ReactNode }) { cookieObject.flows.forEach((flow) => { flow.data.nodes.forEach((node) => { if (Object.keys(templates[node.data.type]["template"]).length > 0) { + node.data.node.base_classes = templates[node.data.type][ + "base_classes" + ]; + flow.data.edges.forEach((edge) => { + if (edge.source === node.id) { + edge.sourceHandle = edge.sourceHandle.split("|").slice(0, 2).concat(templates[node.data.type][ + "base_classes" + ]).join("|"); + } + }) + node.data.node.description = templates[node.data.type]['description']; node.data.node.template = updateTemplate( - templates[node.data.type][ - "template" - ] as unknown as APITemplateType, - + templates[node.data.type]["template"] as unknown as APITemplateType, node.data.node.template as APITemplateType ); } @@ -173,12 +181,24 @@ export function TabsProvider({ children }: { children: ReactNode }) { if (data) { data.nodes.forEach((node) => { if (Object.keys(templates[node.data.type]["template"]).length > 0) { + node.data.node.base_classes = templates[node.data.type][ + "base_classes" + ]; + data.edges.forEach((edge) => { + if (edge.source === node.id) { + edge.sourceHandle = edge.sourceHandle.split("|").slice(0, 2).concat(templates[node.data.type][ + "base_classes" + ]).join("|"); + } + }) + node.data.node.description = templates[node.data.type]['description']; node.data.node.template = updateTemplate( templates[node.data.type]["template"] as unknown as APITemplateType, node.data.node.template as APITemplateType ); } }); + console.log(data); } // Create a new flow with a default name if no flow is provided. let newFlow: FlowType = { From a6c9c28792c339233aaef7b85b5197076ce11fc2 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Mon, 22 May 2023 00:22:05 -0300 Subject: [PATCH 30/50] removed useless comment --- src/frontend/src/contexts/typesContext.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/frontend/src/contexts/typesContext.tsx b/src/frontend/src/contexts/typesContext.tsx index f0f765bb6..aed6e3375 100644 --- a/src/frontend/src/contexts/typesContext.tsx +++ b/src/frontend/src/contexts/typesContext.tsx @@ -40,7 +40,6 @@ export function TypesProvider({ children }: { children: ReactNode }) { const result = await getAll(); // Make sure to only update the state if the component is still mounted. if (isMounted) { - // Continue with your logic... setData(result.data); setTemplates( Object.keys(result.data).reduce((acc, curr) => { From aeba16fa8a6071919dc0aef493da475d13cf83dd Mon Sep 17 00:00:00 2001 From: Gabriel Almeida Date: Mon, 22 May 2023 07:46:40 -0300 Subject: [PATCH 31/50] =?UTF-8?q?=F0=9F=94=A5=20chore(lcserve.py):=20remov?= =?UTF-8?q?e=20unused=20import=20statements=20The=20import=20statements=20?= =?UTF-8?q?for=20pathlib.Path=20and=20fastapi.staticfiles.StaticFiles=20we?= =?UTF-8?q?re=20not=20used=20in=20the=20code=20and=20were=20therefore=20re?= =?UTF-8?q?moved=20to=20improve=20code=20readability=20and=20maintainabili?= =?UTF-8?q?ty.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/lcserve.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/backend/langflow/lcserve.py b/src/backend/langflow/lcserve.py index ede7ccdd4..9419fbe70 100644 --- a/src/backend/langflow/lcserve.py +++ b/src/backend/langflow/lcserve.py @@ -1,7 +1,9 @@ # This file is used by lc-serve to load the mounted app and serve it. from pathlib import Path + from fastapi.staticfiles import StaticFiles + from langflow.main import create_app app = create_app() From 9860b12b91678e441251e363b978d6ec4db99284 Mon Sep 17 00:00:00 2001 From: Gabriel Almeida Date: Mon, 22 May 2023 08:19:59 -0300 Subject: [PATCH 32/50] remove line-clamp as it is in tailwind by default now --- src/frontend/tailwind.config.js | 49 ++++++++++++++++----------------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/src/frontend/tailwind.config.js b/src/frontend/tailwind.config.js index 63256afdf..f22629ef3 100644 --- a/src/frontend/tailwind.config.js +++ b/src/frontend/tailwind.config.js @@ -1,10 +1,7 @@ /** @type {import('tailwindcss').Config} */ import plugin from "tailwindcss/plugin"; module.exports = { - content: [ - "./index.html", - "./src/**/*.{js,ts,tsx,jsx}", - ], + content: ["./index.html", "./src/**/*.{js,ts,tsx,jsx}"], darkMode: "class", important: true, theme: { @@ -55,32 +52,32 @@ module.exports = { margin: 0, }, }, - '.password':{ - "-webkit-text-security":"disc", - "font-family": "text-security-disc" - + ".password": { + "-webkit-text-security": "disc", + "font-family": "text-security-disc", }, - '.stop': { - '-webkit-animation-play-state': 'paused', - '-moz-animation-play-state': 'paused', - 'animation-play-state': 'paused', + ".stop": { + "-webkit-animation-play-state": "paused", + "-moz-animation-play-state": "paused", + "animation-play-state": "paused", }, - '.custom-scroll':{ - '&::-webkit-scrollbar': { - 'width': '8px', + ".custom-scroll": { + "&::-webkit-scrollbar": { + width: "8px", }, - '&::-webkit-scrollbar-track': { - 'backgroundColor': '#f1f1f1', + "&::-webkit-scrollbar-track": { + backgroundColor: "#f1f1f1", }, - '&::-webkit-scrollbar-thumb': { - 'backgroundColor': '#ccc', - 'borderRadius': '999px', + "&::-webkit-scrollbar-thumb": { + backgroundColor: "#ccc", + borderRadius: "999px", }, - '&::-webkit-scrollbar-thumb:hover': { - 'backgroundColor': '#bbb' - } - } - }) - }),require('@tailwindcss/line-clamp'),require('@tailwindcss/typography'), + "&::-webkit-scrollbar-thumb:hover": { + backgroundColor: "#bbb", + }, + }, + }); + }), + require("@tailwindcss/typography"), ], }; From 4998838853bde6ed8fc2c3f8eb61d43015877d66 Mon Sep 17 00:00:00 2001 From: Gabriel Almeida Date: Mon, 22 May 2023 08:21:29 -0300 Subject: [PATCH 33/50] format --- src/frontend/src/contexts/tabsContext.tsx | 466 +++++++++++----------- 1 file changed, 235 insertions(+), 231 deletions(-) diff --git a/src/frontend/src/contexts/tabsContext.tsx b/src/frontend/src/contexts/tabsContext.tsx index 0e338aada..7cd3925ec 100644 --- a/src/frontend/src/contexts/tabsContext.tsx +++ b/src/frontend/src/contexts/tabsContext.tsx @@ -1,10 +1,10 @@ import { - createContext, - useEffect, - useState, - useRef, - ReactNode, - useContext, + createContext, + useEffect, + useState, + useRef, + ReactNode, + useContext, } from "react"; import { FlowType } from "../types/flow"; import { LangFlowState, TabsContextType } from "../types/tabs"; @@ -15,248 +15,252 @@ import { APITemplateType, TemplateVariableType } from "../types/api"; import { v4 as uuidv4 } from "uuid"; const TabsContextInitialValue: TabsContextType = { - save: () => { }, - tabIndex: 0, - setTabIndex: (index: number) => { }, - flows: [], - removeFlow: (id: string) => { }, - addFlow: (flowData?: any) => { }, - updateFlow: (newFlow: FlowType) => { }, - incrementNodeId: () => 0, - downloadFlow: (flow: FlowType) => { }, - uploadFlow: () => { }, - hardReset: () => { }, - disableCP: false, - setDisableCP: (state: boolean) => { }, + save: () => {}, + tabIndex: 0, + setTabIndex: (index: number) => {}, + flows: [], + removeFlow: (id: string) => {}, + addFlow: (flowData?: any) => {}, + updateFlow: (newFlow: FlowType) => {}, + incrementNodeId: () => 0, + downloadFlow: (flow: FlowType) => {}, + uploadFlow: () => {}, + hardReset: () => {}, + disableCP: false, + setDisableCP: (state: boolean) => {}, }; export const TabsContext = createContext( - TabsContextInitialValue + TabsContextInitialValue ); export function TabsProvider({ children }: { children: ReactNode }) { - const { setNoticeData } = useContext(alertContext); - const [tabIndex, setTabIndex] = useState(0); - const [flows, setFlows] = useState>([]); - const [id, setId] = useState(uuidv4()); - const { templates } = useContext(typesContext); + const { setNoticeData } = useContext(alertContext); + const [tabIndex, setTabIndex] = useState(0); + const [flows, setFlows] = useState>([]); + const [id, setId] = useState(uuidv4()); + const { templates } = useContext(typesContext); - const newNodeId = useRef(0); - function incrementNodeId() { - newNodeId.current = newNodeId.current + 1; - return newNodeId.current; - } - function save() { - if (flows.length !== 0) - window.localStorage.setItem( - "tabsData", - JSON.stringify({ tabIndex, flows, id, nodeId: newNodeId.current }) - ); - } - useEffect(() => { - //save tabs locally - save(); + const newNodeId = useRef(0); + function incrementNodeId() { + newNodeId.current = newNodeId.current + 1; + return newNodeId.current; + } + function save() { + if (flows.length !== 0) + window.localStorage.setItem( + "tabsData", + JSON.stringify({ tabIndex, flows, id, nodeId: newNodeId.current }) + ); + } + useEffect(() => { + //save tabs locally + save(); + }, [flows, id, tabIndex, newNodeId]); - }, [flows, id, tabIndex, newNodeId]); + useEffect(() => { + //get tabs locally saved + let cookie = window.localStorage.getItem("tabsData"); + if (cookie && Object.keys(templates).length > 0) { + let cookieObject: LangFlowState = JSON.parse(cookie); + cookieObject.flows.forEach((flow) => { + flow.data.nodes.forEach((node) => { + if (Object.keys(templates[node.data.type]["template"]).length > 0) { + node.data.node.base_classes = + templates[node.data.type]["base_classes"]; + flow.data.edges.forEach((edge) => { + if (edge.source === node.id) { + edge.sourceHandle = edge.sourceHandle + .split("|") + .slice(0, 2) + .concat(templates[node.data.type]["base_classes"]) + .join("|"); + } + }); + node.data.node.description = + templates[node.data.type]["description"]; + node.data.node.template = updateTemplate( + templates[node.data.type][ + "template" + ] as unknown as APITemplateType, + node.data.node.template as APITemplateType + ); + } + }); + }); + setTabIndex(cookieObject.tabIndex); + setFlows(cookieObject.flows); + setId(cookieObject.id); + newNodeId.current = cookieObject.nodeId; + } + }, [templates]); - useEffect(() => { - //get tabs locally saved - let cookie = window.localStorage.getItem("tabsData"); - if (cookie && Object.keys(templates).length > 0) { - let cookieObject: LangFlowState = JSON.parse(cookie); - cookieObject.flows.forEach((flow) => { - flow.data.nodes.forEach((node) => { - if (Object.keys(templates[node.data.type]["template"]).length > 0) { - node.data.node.base_classes = templates[node.data.type][ - "base_classes" - ]; - flow.data.edges.forEach((edge) => { - if (edge.source === node.id) { - edge.sourceHandle = edge.sourceHandle.split("|").slice(0, 2).concat(templates[node.data.type][ - "base_classes" - ]).join("|"); - } - }) - node.data.node.description = templates[node.data.type]['description']; - node.data.node.template = updateTemplate( - templates[node.data.type]["template"] as unknown as APITemplateType, - node.data.node.template as APITemplateType - ); - } - }); - }); - setTabIndex(cookieObject.tabIndex); - setFlows(cookieObject.flows); - setId(cookieObject.id); - newNodeId.current = cookieObject.nodeId; - } - }, [templates]); + function hardReset() { + newNodeId.current = 0; + setTabIndex(0); + setFlows([]); + setId(uuidv4()); + } - function hardReset() { - newNodeId.current = 0; - setTabIndex(0); - setFlows([]); - setId(uuidv4()); - } + /** + * Downloads the current flow as a JSON file + */ + function downloadFlow(flow: FlowType) { + // create a data URI with the current flow data + const jsonString = `data:text/json;chatset=utf-8,${encodeURIComponent( + JSON.stringify(flow) + )}`; - /** - * Downloads the current flow as a JSON file - */ - function downloadFlow(flow: FlowType) { - // create a data URI with the current flow data - const jsonString = `data:text/json;chatset=utf-8,${encodeURIComponent( - JSON.stringify(flow) - )}`; + // create a link element and set its properties + const link = document.createElement("a"); + link.href = jsonString; + link.download = `${flows[tabIndex].name}.json`; - // create a link element and set its properties - const link = document.createElement("a"); - link.href = jsonString; - link.download = `${flows[tabIndex].name}.json`; + // simulate a click on the link element to trigger the download + link.click(); + setNoticeData({ + title: "Warning: Critical data,JSON file may including API keys.", + }); + } - // simulate a click on the link element to trigger the download - link.click(); - setNoticeData({ - title: "Warning: Critical data,JSON file may including API keys.", - }); - } + /** + * Creates a file input and listens to a change event to upload a JSON flow file. + * If the file type is application/json, the file is read and parsed into a JSON object. + * The resulting JSON object is passed to the addFlow function. + */ + function uploadFlow() { + // create a file input + const input = document.createElement("input"); + input.type = "file"; + // add a change event listener to the file input + input.onchange = (e: Event) => { + // check if the file type is application/json + if ((e.target as HTMLInputElement).files[0].type === "application/json") { + // get the file from the file input + const file = (e.target as HTMLInputElement).files[0]; + // read the file as text + file.text().then((text) => { + // parse the text into a JSON object + let flow: FlowType = JSON.parse(text); - /** - * Creates a file input and listens to a change event to upload a JSON flow file. - * If the file type is application/json, the file is read and parsed into a JSON object. - * The resulting JSON object is passed to the addFlow function. - */ - function uploadFlow() { - // create a file input - const input = document.createElement("input"); - input.type = "file"; - // add a change event listener to the file input - input.onchange = (e: Event) => { - // check if the file type is application/json - if ((e.target as HTMLInputElement).files[0].type === "application/json") { - // get the file from the file input - const file = (e.target as HTMLInputElement).files[0]; - // read the file as text - file.text().then((text) => { - // parse the text into a JSON object - let flow: FlowType = JSON.parse(text); + addFlow(flow); + }); + } + }; + // trigger the file input click event to open the file dialog + input.click(); + } + /** + * Removes a flow from an array of flows based on its id. + * Updates the state of flows and tabIndex using setFlows and setTabIndex hooks. + * @param {string} id - The id of the flow to remove. + */ + function removeFlow(id: string) { + setFlows((prevState) => { + const newFlows = [...prevState]; + const index = newFlows.findIndex((flow) => flow.id === id); + if (index >= 0) { + if (index === tabIndex) { + setTabIndex(flows.length - 2); + newFlows.splice(index, 1); + } else { + let flowId = flows[tabIndex].id; + newFlows.splice(index, 1); + setTabIndex(newFlows.findIndex((flow) => flow.id === flowId)); + } + } + return newFlows; + }); + } + /** + * Add a new flow to the list of flows. + * @param flow Optional flow to add. + */ + function addFlow(flow?: FlowType) { + // Get data from the flow or set it to null if there's no flow provided. + const data = flow?.data ? flow.data : null; + const description = flow?.description ? flow.description : ""; - addFlow(flow); - }); - } - }; - // trigger the file input click event to open the file dialog - input.click(); - } - /** - * Removes a flow from an array of flows based on its id. - * Updates the state of flows and tabIndex using setFlows and setTabIndex hooks. - * @param {string} id - The id of the flow to remove. - */ - function removeFlow(id: string) { - setFlows((prevState) => { - const newFlows = [...prevState]; - const index = newFlows.findIndex((flow) => flow.id === id); - if (index >= 0) { - if (index === tabIndex) { - setTabIndex(flows.length - 2); - newFlows.splice(index, 1); - } else { - let flowId = flows[tabIndex].id; - newFlows.splice(index, 1); - setTabIndex(newFlows.findIndex((flow) => flow.id === flowId)); - } - } - return newFlows; - }); - } - /** - * Add a new flow to the list of flows. - * @param flow Optional flow to add. - */ - function addFlow(flow?: FlowType) { - // Get data from the flow or set it to null if there's no flow provided. - const data = flow?.data ? flow.data : null; - const description = flow?.description ? flow.description : ""; + if (data) { + data.nodes.forEach((node) => { + if (Object.keys(templates[node.data.type]["template"]).length > 0) { + node.data.node.base_classes = + templates[node.data.type]["base_classes"]; + data.edges.forEach((edge) => { + if (edge.source === node.id) { + edge.sourceHandle = edge.sourceHandle + .split("|") + .slice(0, 2) + .concat(templates[node.data.type]["base_classes"]) + .join("|"); + } + }); + node.data.node.description = templates[node.data.type]["description"]; + node.data.node.template = updateTemplate( + templates[node.data.type]["template"] as unknown as APITemplateType, + node.data.node.template as APITemplateType + ); + } + }); + console.log(data); + } + // Create a new flow with a default name if no flow is provided. + let newFlow: FlowType = { + description, + name: flow?.name ?? "New Flow", + id: uuidv4(), + data, + }; - if (data) { - data.nodes.forEach((node) => { - if (Object.keys(templates[node.data.type]["template"]).length > 0) { - node.data.node.base_classes = templates[node.data.type][ - "base_classes" - ]; - data.edges.forEach((edge) => { - if (edge.source === node.id) { - edge.sourceHandle = edge.sourceHandle.split("|").slice(0, 2).concat(templates[node.data.type][ - "base_classes" - ]).join("|"); - } - }) - node.data.node.description = templates[node.data.type]['description']; - node.data.node.template = updateTemplate( - templates[node.data.type]["template"] as unknown as APITemplateType, - node.data.node.template as APITemplateType - ); - } - }); - console.log(data); - } - // Create a new flow with a default name if no flow is provided. - let newFlow: FlowType = { - description, - name: flow?.name ?? "New Flow", - id: uuidv4(), - data, - }; + // Increment the ID counter. + setId(uuidv4()); - // Increment the ID counter. - setId(uuidv4()); + // Add the new flow to the list of flows. + setFlows((prevState) => { + const newFlows = [...prevState, newFlow]; + return newFlows; + }); - // Add the new flow to the list of flows. - setFlows((prevState) => { - const newFlows = [...prevState, newFlow]; - return newFlows; - }); + // Set the tab index to the new flow. + setTabIndex(flows.length); + } + /** + * Updates an existing flow with new data + * @param newFlow - The new flow object containing the updated data + */ + function updateFlow(newFlow: FlowType) { + setFlows((prevState) => { + const newFlows = [...prevState]; + const index = newFlows.findIndex((flow) => flow.id === newFlow.id); + if (index !== -1) { + newFlows[index].description = newFlow.description ?? ""; + newFlows[index].data = newFlow.data; + newFlows[index].name = newFlow.name; + } + return newFlows; + }); + } + const [disableCP, setDisableCP] = useState(false); - // Set the tab index to the new flow. - setTabIndex(flows.length); - } - /** - * Updates an existing flow with new data - * @param newFlow - The new flow object containing the updated data - */ - function updateFlow(newFlow: FlowType) { - setFlows((prevState) => { - const newFlows = [...prevState]; - const index = newFlows.findIndex((flow) => flow.id === newFlow.id); - if (index !== -1) { - newFlows[index].description = newFlow.description ?? ""; - newFlows[index].data = newFlow.data; - newFlows[index].name = newFlow.name; - } - return newFlows; - }); - } - const [disableCP, setDisableCP] = useState(false); - - return ( - - {children} - - ); + return ( + + {children} + + ); } From 5635a86f047d9624f93a1991f6f0d11a758b6e2e Mon Sep 17 00:00:00 2001 From: Gabriel Almeida Date: Mon, 22 May 2023 08:21:52 -0300 Subject: [PATCH 34/50] =?UTF-8?q?=F0=9F=90=9B=20fix(tabsContext.tsx):=20ad?= =?UTF-8?q?d=20null=20check=20for=20flow.data=20to=20prevent=20errors=20Th?= =?UTF-8?q?e=20code=20now=20checks=20if=20flow.data=20is=20null=20before?= =?UTF-8?q?=20iterating=20over=20its=20nodes.=20This=20prevents=20errors?= =?UTF-8?q?=20that=20would=20occur=20when=20flow.data=20is=20null.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/src/contexts/tabsContext.tsx | 53 +++++++++++++---------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/src/frontend/src/contexts/tabsContext.tsx b/src/frontend/src/contexts/tabsContext.tsx index 7cd3925ec..15fe9eaf6 100644 --- a/src/frontend/src/contexts/tabsContext.tsx +++ b/src/frontend/src/contexts/tabsContext.tsx @@ -64,29 +64,36 @@ export function TabsProvider({ children }: { children: ReactNode }) { if (cookie && Object.keys(templates).length > 0) { let cookieObject: LangFlowState = JSON.parse(cookie); cookieObject.flows.forEach((flow) => { - flow.data.nodes.forEach((node) => { - if (Object.keys(templates[node.data.type]["template"]).length > 0) { - node.data.node.base_classes = - templates[node.data.type]["base_classes"]; - flow.data.edges.forEach((edge) => { - if (edge.source === node.id) { - edge.sourceHandle = edge.sourceHandle - .split("|") - .slice(0, 2) - .concat(templates[node.data.type]["base_classes"]) - .join("|"); - } - }); - node.data.node.description = - templates[node.data.type]["description"]; - node.data.node.template = updateTemplate( - templates[node.data.type][ - "template" - ] as unknown as APITemplateType, - node.data.node.template as APITemplateType - ); - } - }); + // check if flow.data is null + if (flow.data) { + flow.data.nodes.forEach((node) => { + // check if node.data.type is in templates + if ( + Object.keys(templates).includes(node.data.type) && + Object.keys(templates[node.data.type]["template"]).length > 0 + ) { + node.data.node.base_classes = + templates[node.data.type]["base_classes"]; + flow.data.edges.forEach((edge) => { + if (edge.source === node.id) { + edge.sourceHandle = edge.sourceHandle + .split("|") + .slice(0, 2) + .concat(templates[node.data.type]["base_classes"]) + .join("|"); + } + }); + node.data.node.description = + templates[node.data.type]["description"]; + node.data.node.template = updateTemplate( + templates[node.data.type][ + "template" + ] as unknown as APITemplateType, + node.data.node.template as APITemplateType + ); + } + }); + } }); setTabIndex(cookieObject.tabIndex); setFlows(cookieObject.flows); From 6dcd267bfaf7e5f67c8a64f16f7ff133a87e6601 Mon Sep 17 00:00:00 2001 From: Gabriel Almeida Date: Mon, 22 May 2023 08:24:13 -0300 Subject: [PATCH 35/50] =?UTF-8?q?=F0=9F=94=96=20chore(pyproject.toml):=20u?= =?UTF-8?q?pdate=20langchain=20version=20to=200.0.176=20=F0=9F=94=96=20cho?= =?UTF-8?q?re(pyproject.toml):=20bump=20up=20package=20version=20to=200.0.?= =?UTF-8?q?75=20The=20langchain=20package=20version=20has=20been=20updated?= =?UTF-8?q?=20to=200.0.176=20to=20include=20the=20latest=20changes=20and?= =?UTF-8?q?=20improvements.=20The=20package=20version=20has=20also=20been?= =?UTF-8?q?=20bumped=20up=20to=200.0.75=20to=20reflect=20the=20changes=20m?= =?UTF-8?q?ade=20to=20the=20dependencies.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- poetry.lock | 333 ++++++++++++++++++++++++++----------------------- pyproject.toml | 4 +- 2 files changed, 178 insertions(+), 159 deletions(-) diff --git a/poetry.lock b/poetry.lock index 1f6cbda4e..20e00cee5 100644 --- a/poetry.lock +++ b/poetry.lock @@ -954,9 +954,7 @@ files = [ {file = "duckdb-0.8.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:b2707096d6df4321044fcde2c9f04da632d11a8be60957fd09d49a42fae71a29"}, {file = "duckdb-0.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b27df1b70ae74d2c88efb5ffca8490954fdc678099509a9c4404ca30acc53426"}, {file = "duckdb-0.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:75a97c800271b52dd0f37696d074c50576dcb4b2750b6115932a98696a268070"}, - {file = "duckdb-0.8.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:804cac261a5e016506a6d67838a65d19b06a237f7949f1704f0e800eb708286a"}, {file = "duckdb-0.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c6b9abca7fa6713e1d031c18485343b4de99742c7e1b85c10718aa2f31a4e2c6"}, - {file = "duckdb-0.8.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:51aa6d606d49072abcfeb3be209eb559ac94c1b5e70f58ac3adbb94aca9cd69f"}, {file = "duckdb-0.8.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:7c8dc769aaf2be0a1c57995ca657e5b92c1c56fc8437edb720ca6cab571adf14"}, {file = "duckdb-0.8.0-cp311-cp311-win32.whl", hash = "sha256:c4207d18b42387c4a035846d8878eb967070198be8ac26fd77797ce320d1a400"}, {file = "duckdb-0.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:0c392257547c20794c3072fcbca99a49ef0a49974005d755e93893e2b4875267"}, @@ -1233,14 +1231,14 @@ uritemplate = ">=3.0.1,<5" [[package]] name = "google-auth" -version = "2.17.3" +version = "2.18.1" description = "Google Authentication Library" category = "main" optional = false python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*" files = [ - {file = "google-auth-2.17.3.tar.gz", hash = "sha256:ce311e2bc58b130fddf316df57c9b3943c2a7b4f6ec31de9663a9333e4064efc"}, - {file = "google_auth-2.17.3-py2.py3-none-any.whl", hash = "sha256:f586b274d3eb7bd932ea424b1c702a30e0393a2e2bc4ca3eae8263ffd8be229f"}, + {file = "google-auth-2.18.1.tar.gz", hash = "sha256:d7a3249027e7f464fbbfd7ee8319a08ad09d2eea51578575c4bd360ffa049ccb"}, + {file = "google_auth-2.18.1-py2.py3-none-any.whl", hash = "sha256:55a395cdfd3f3dd3f649131d41f97c17b4ed8a2aac1be3502090c716314e8a37"}, ] [package.dependencies] @@ -1248,6 +1246,7 @@ cachetools = ">=2.0.0,<6.0" pyasn1-modules = ">=0.2.1" rsa = {version = ">=3.1.4,<5", markers = "python_version >= \"3.6\""} six = ">=1.9.0" +urllib3 = "<2.0" [package.extras] aiohttp = ["aiohttp (>=3.6.2,<4.0.0dev)", "requests (>=2.20.0,<3.0.0dev)"] @@ -1307,14 +1306,14 @@ grpc = ["grpcio (>=1.44.0,<2.0.0dev)"] [[package]] name = "gptcache" -version = "0.1.24" +version = "0.1.25" description = "GPTCache, a powerful caching library that can be used to speed up and lower the cost of chat applications that rely on the LLM service. GPTCache works as a memcache for AIGC applications, similar to how Redis works for traditional applications." category = "main" optional = false python-versions = ">=3.8.1" files = [ - {file = "gptcache-0.1.24-py3-none-any.whl", hash = "sha256:070aad4867ab915a7b5db3a886e9f0289e52d1cb92a407c984b0241298079750"}, - {file = "gptcache-0.1.24.tar.gz", hash = "sha256:aa591cb00898d457a50a5e0cd137d0119e86819c110ce6c7bce2adafeae0a467"}, + {file = "gptcache-0.1.25-py3-none-any.whl", hash = "sha256:3b6f81609cad2b1b804b576275327e2ddd061ca4cc879785c690985cfcb7f26f"}, + {file = "gptcache-0.1.25.tar.gz", hash = "sha256:9634fbbbc2151d12376cd53667682b912ce46812d793331d2e2d46a8a127ed9a"}, ] [package.dependencies] @@ -1822,13 +1821,13 @@ test-extra = ["curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.21)", "pa [[package]] name = "jcloud" -version = "0.2.8" +version = "0.2.10" description = "Simplify deploying and managing Jina projects on Jina Cloud" category = "main" optional = true python-versions = "*" files = [ - {file = "jcloud-0.2.8.tar.gz", hash = "sha256:cdd30c85c0a857573651ebc329f52a8de9e43c3e0f276dc85975914006295639"}, + {file = "jcloud-0.2.10.tar.gz", hash = "sha256:40f9e0f8cbef4a711d58941939e206923eb1fdd65941f7b4ded4f448cc5a927f"}, ] [package.dependencies] @@ -1983,14 +1982,14 @@ websockets = ["websockets"] [[package]] name = "jina-hubble-sdk" -version = "0.36.0" +version = "0.37.1" description = "SDK for Hubble API at Jina AI." category = "main" optional = true python-versions = ">=3.7.0" files = [ - {file = "jina-hubble-sdk-0.36.0.tar.gz", hash = "sha256:ba1a72c7a5c14963fdad9af1ff4c3bba26a03ddcced08111bd11a95b153249ec"}, - {file = "jina_hubble_sdk-0.36.0-py3-none-any.whl", hash = "sha256:56db142147d7c72142ed1b6505020c3b4d8070b1603d07ff796e56d491dde294"}, + {file = "jina-hubble-sdk-0.37.1.tar.gz", hash = "sha256:5b6bd9e13f97c8c77be822e9ae49f87a0f16ef8195011f25db2552006a5ca2a0"}, + {file = "jina_hubble_sdk-0.37.1-py3-none-any.whl", hash = "sha256:bc54a60ed120508e231fbed28b0fff394c288312d2ffa865c7865c03dbbbb502"}, ] [package.dependencies] @@ -2084,14 +2083,14 @@ test = ["ipykernel", "pre-commit", "pytest", "pytest-cov", "pytest-timeout"] [[package]] name = "langchain" -version = "0.0.170" +version = "0.0.176" description = "Building applications with LLMs through composability" category = "main" optional = false python-versions = ">=3.8.1,<4.0" files = [ - {file = "langchain-0.0.170-py3-none-any.whl", hash = "sha256:3543c14c08d39c0eef2d1a88a98161a25329720660811c546c8881d91c272c77"}, - {file = "langchain-0.0.170.tar.gz", hash = "sha256:799e047857b0b12606255e4e843c7eb3724ddb85242c97dccd49b007e40486bf"}, + {file = "langchain-0.0.176-py3-none-any.whl", hash = "sha256:b2a1958ed07d884869b4bdaa28d63a005787e7f4938d2bbe984b3662827db861"}, + {file = "langchain-0.0.176.tar.gz", hash = "sha256:25f2875d48efab9b32affbe886b85580b1a9df0fb5ae54798eb28aeafba60bec"}, ] [package.dependencies] @@ -2108,16 +2107,17 @@ SQLAlchemy = ">=1.4,<3" tenacity = ">=8.1.0,<9.0.0" [package.extras] -all = ["O365 (>=2.0.26,<3.0.0)", "aleph-alpha-client (>=2.15.0,<3.0.0)", "anthropic (>=0.2.6,<0.3.0)", "arxiv (>=1.4,<2.0)", "atlassian-python-api (>=3.36.0,<4.0.0)", "azure-cosmos (>=4.4.0b1,<5.0.0)", "azure-identity (>=1.12.0,<2.0.0)", "beautifulsoup4 (>=4,<5)", "clickhouse-connect (>=0.5.14,<0.6.0)", "cohere (>=3,<4)", "deeplake (>=3.3.0,<4.0.0)", "docarray (>=0.31.0,<0.32.0)", "duckduckgo-search (>=2.8.6,<3.0.0)", "elasticsearch (>=8,<9)", "faiss-cpu (>=1,<2)", "google-api-python-client (==2.70.0)", "google-search-results (>=2,<3)", "gptcache (>=0.1.7)", "hnswlib (>=0.7.0,<0.8.0)", "html2text (>=2020.1.16,<2021.0.0)", "huggingface_hub (>=0,<1)", "jina (>=3.14,<4.0)", "jinja2 (>=3,<4)", "jq (>=1.4.1,<2.0.0)", "lancedb (>=0.1,<0.2)", "lark (>=1.1.5,<2.0.0)", "manifest-ml (>=0.0.1,<0.0.2)", "networkx (>=2.6.3,<3.0.0)", "nlpcloud (>=1,<2)", "nltk (>=3,<4)", "nomic (>=1.0.43,<2.0.0)", "openai (>=0,<1)", "opensearch-py (>=2.0.0,<3.0.0)", "pdfminer-six (>=20221105,<20221106)", "pexpect (>=4.8.0,<5.0.0)", "pgvector (>=0.1.6,<0.2.0)", "pinecone-client (>=2,<3)", "pinecone-text (>=0.4.2,<0.5.0)", "protobuf (==3.19)", "psycopg2-binary (>=2.9.5,<3.0.0)", "pyowm (>=3.3.0,<4.0.0)", "pypdf (>=3.4.0,<4.0.0)", "pytesseract (>=0.3.10,<0.4.0)", "pyvespa (>=0.33.0,<0.34.0)", "qdrant-client (>=1.1.2,<2.0.0)", "redis (>=4,<5)", "sentence-transformers (>=2,<3)", "spacy (>=3,<4)", "steamship (>=2.16.9,<3.0.0)", "tensorflow-text (>=2.11.0,<3.0.0)", "tiktoken (>=0.3.2,<0.4.0)", "torch (>=1,<3)", "transformers (>=4,<5)", "weaviate-client (>=3,<4)", "wikipedia (>=1,<2)", "wolframalpha (==5.0.0)"] +all = ["O365 (>=2.0.26,<3.0.0)", "aleph-alpha-client (>=2.15.0,<3.0.0)", "anthropic (>=0.2.6,<0.3.0)", "arxiv (>=1.4,<2.0)", "atlassian-python-api (>=3.36.0,<4.0.0)", "azure-cosmos (>=4.4.0b1,<5.0.0)", "azure-identity (>=1.12.0,<2.0.0)", "beautifulsoup4 (>=4,<5)", "clickhouse-connect (>=0.5.14,<0.6.0)", "cohere (>=3,<4)", "deeplake (>=3.3.0,<4.0.0)", "docarray (>=0.31.0,<0.32.0)", "duckduckgo-search (>=2.8.6,<3.0.0)", "elasticsearch (>=8,<9)", "faiss-cpu (>=1,<2)", "google-api-python-client (==2.70.0)", "google-search-results (>=2,<3)", "gptcache (>=0.1.7)", "hnswlib (>=0.7.0,<0.8.0)", "html2text (>=2020.1.16,<2021.0.0)", "huggingface_hub (>=0,<1)", "jina (>=3.14,<4.0)", "jinja2 (>=3,<4)", "jq (>=1.4.1,<2.0.0)", "lancedb (>=0.1,<0.2)", "lark (>=1.1.5,<2.0.0)", "lxml (>=4.9.2,<5.0.0)", "manifest-ml (>=0.0.1,<0.0.2)", "networkx (>=2.6.3,<3.0.0)", "nlpcloud (>=1,<2)", "nltk (>=3,<4)", "nomic (>=1.0.43,<2.0.0)", "openai (>=0,<1)", "opensearch-py (>=2.0.0,<3.0.0)", "pdfminer-six (>=20221105,<20221106)", "pexpect (>=4.8.0,<5.0.0)", "pgvector (>=0.1.6,<0.2.0)", "pinecone-client (>=2,<3)", "pinecone-text (>=0.4.2,<0.5.0)", "protobuf (==3.19.6)", "psycopg2-binary (>=2.9.5,<3.0.0)", "pyowm (>=3.3.0,<4.0.0)", "pypdf (>=3.4.0,<4.0.0)", "pytesseract (>=0.3.10,<0.4.0)", "pyvespa (>=0.33.0,<0.34.0)", "qdrant-client (>=1.1.2,<2.0.0)", "redis (>=4,<5)", "sentence-transformers (>=2,<3)", "spacy (>=3,<4)", "steamship (>=2.16.9,<3.0.0)", "tensorflow-text (>=2.11.0,<3.0.0)", "tiktoken (>=0.3.2,<0.4.0)", "torch (>=1,<3)", "transformers (>=4,<5)", "weaviate-client (>=3,<4)", "wikipedia (>=1,<2)", "wolframalpha (==5.0.0)"] azure = ["azure-core (>=1.26.4,<2.0.0)", "azure-cosmos (>=4.4.0b1,<5.0.0)", "azure-identity (>=1.12.0,<2.0.0)", "openai (>=0,<1)"] cohere = ["cohere (>=3,<4)"] embeddings = ["sentence-transformers (>=2,<3)"] -extended-testing = ["jq (>=1.4.1,<2.0.0)", "lxml (>=4.9.2,<5.0.0)", "pdfminer-six (>=20221105,<20221106)", "pypdf (>=3.4.0,<4.0.0)", "tqdm (>=4.48.0)"] -hnswlib = ["docarray (>=0.31.0,<0.32.0)", "hnswlib (>=0.7.0,<0.8.0)", "protobuf (==3.19)"] +extended-testing = ["atlassian-python-api (>=3.36.0,<4.0.0)", "beautifulsoup4 (>=4,<5)", "chardet (>=5.1.0,<6.0.0)", "gql (>=3.4.1,<4.0.0)", "html2text (>=2020.1.16,<2021.0.0)", "jq (>=1.4.1,<2.0.0)", "lxml (>=4.9.2,<5.0.0)", "pandas (>=2.0.1,<3.0.0)", "pdfminer-six (>=20221105,<20221106)", "psychicapi (>=0.2,<0.3)", "pymupdf (>=1.22.3,<2.0.0)", "pypdf (>=3.4.0,<4.0.0)", "pypdfium2 (>=4.10.0,<5.0.0)", "requests-toolbelt (>=1.0.0,<2.0.0)", "telethon (>=1.28.5,<2.0.0)", "tqdm (>=4.48.0)", "zep-python (>=0.25,<0.26)"] +hnswlib = ["docarray (>=0.31.0,<0.32.0)", "hnswlib (>=0.7.0,<0.8.0)", "protobuf (==3.19.6)"] in-memory-store = ["docarray (>=0.31.0,<0.32.0)"] llms = ["anthropic (>=0.2.6,<0.3.0)", "cohere (>=3,<4)", "huggingface_hub (>=0,<1)", "manifest-ml (>=0.0.1,<0.0.2)", "nlpcloud (>=1,<2)", "openai (>=0,<1)", "torch (>=1,<3)", "transformers (>=4,<5)"] openai = ["openai (>=0,<1)", "tiktoken (>=0.3.2,<0.4.0)"] qdrant = ["qdrant-client (>=1.1.2,<2.0.0)"] +text-helpers = ["chardet (>=5.1.0,<6.0.0)"] [[package]] name = "langchain-serve" @@ -2852,14 +2852,14 @@ files = [ [[package]] name = "openai" -version = "0.27.6" +version = "0.27.7" description = "Python client library for the OpenAI API" category = "main" optional = false python-versions = ">=3.7.1" files = [ - {file = "openai-0.27.6-py3-none-any.whl", hash = "sha256:1f07ed06f1cfc6c25126107193726fe4cf476edcc4e1485cd9eb708f068f2606"}, - {file = "openai-0.27.6.tar.gz", hash = "sha256:63ca9f6ac619daef8c1ddec6d987fe6aa1c87a9bfdce31ff253204d077222375"}, + {file = "openai-0.27.7-py3-none-any.whl", hash = "sha256:788fb7fa85bf7caac6c1ed7eea5984254a1bdaf09ef485acf0e5718c8b2dc25a"}, + {file = "openai-0.27.7.tar.gz", hash = "sha256:bca95fd4c3054ef38924def096396122130454442ec52005915ecf8269626b1d"}, ] [package.dependencies] @@ -2905,14 +2905,14 @@ et-xmlfile = "*" [[package]] name = "opentelemetry-api" -version = "1.17.0" +version = "1.18.0" description = "OpenTelemetry Python API" category = "main" optional = true python-versions = ">=3.7" files = [ - {file = "opentelemetry_api-1.17.0-py3-none-any.whl", hash = "sha256:b41d9b2a979607b75d2683b9bbf97062a683d190bc696969fb2122fa60aeaabc"}, - {file = "opentelemetry_api-1.17.0.tar.gz", hash = "sha256:3480fcf6b783be5d440a226a51db979ccd7c49a2e98d1c747c991031348dcf04"}, + {file = "opentelemetry_api-1.18.0-py3-none-any.whl", hash = "sha256:d05bcc94ec239fd76fd90d784c5e3ad081a8a1ac2ffc8a2c83a49ace052d1492"}, + {file = "opentelemetry_api-1.18.0.tar.gz", hash = "sha256:2bbf29739fcef268c419e3bf1735566c2e7f81026c14bcc78b62a0b97f8ecf2f"}, ] [package.dependencies] @@ -2922,61 +2922,80 @@ setuptools = ">=16.0" [[package]] name = "opentelemetry-exporter-otlp" -version = "1.17.0" +version = "1.18.0" description = "OpenTelemetry Collector Exporters" category = "main" optional = true python-versions = ">=3.7" files = [ - {file = "opentelemetry_exporter_otlp-1.17.0-py3-none-any.whl", hash = "sha256:9708d2b74c9205a7bd9b46e24acec0e3b362465d9a77b62347ea0459d4358044"}, - {file = "opentelemetry_exporter_otlp-1.17.0.tar.gz", hash = "sha256:d0fa02b512127b44493c75d12a2dc2557bf251b7f76b354cfaa58b0f820d04ae"}, + {file = "opentelemetry_exporter_otlp-1.18.0-py3-none-any.whl", hash = "sha256:2b8d18aa3f8fa360df2fe6c274132cf38939a02f8aa621d6ed060a920aa9e4c6"}, + {file = "opentelemetry_exporter_otlp-1.18.0.tar.gz", hash = "sha256:cafcf7f28debbcc22e06d52cdc4f65a118f17b730dabe8f9d4b87587e95b1481"}, ] [package.dependencies] -opentelemetry-exporter-otlp-proto-grpc = "1.17.0" -opentelemetry-exporter-otlp-proto-http = "1.17.0" +opentelemetry-exporter-otlp-proto-grpc = "1.18.0" +opentelemetry-exporter-otlp-proto-http = "1.18.0" + +[[package]] +name = "opentelemetry-exporter-otlp-proto-common" +version = "1.18.0" +description = "OpenTelemetry Protobuf encoding" +category = "main" +optional = true +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_exporter_otlp_proto_common-1.18.0-py3-none-any.whl", hash = "sha256:276073ccc8c6e6570fe05ca8ca0de77d662bc89bc614ec8bfbc855112f7e25e3"}, + {file = "opentelemetry_exporter_otlp_proto_common-1.18.0.tar.gz", hash = "sha256:4d9883d6929aabe75e485950bbe8b149a14d95e50b1570426832daa6913b0871"}, +] + +[package.dependencies] +opentelemetry-proto = "1.18.0" [[package]] name = "opentelemetry-exporter-otlp-proto-grpc" -version = "1.17.0" +version = "1.18.0" description = "OpenTelemetry Collector Protobuf over gRPC Exporter" category = "main" optional = true python-versions = ">=3.7" files = [ - {file = "opentelemetry_exporter_otlp_proto_grpc-1.17.0-py3-none-any.whl", hash = "sha256:192d781b668a74edb49152b8b5f4f7e25bcb4307a9cf4b2dfcf87e68feac98bd"}, - {file = "opentelemetry_exporter_otlp_proto_grpc-1.17.0.tar.gz", hash = "sha256:f01476ae89484bc6210e50d7a4d93c293b3a12aff562253b94f588a85af13f70"}, + {file = "opentelemetry_exporter_otlp_proto_grpc-1.18.0-py3-none-any.whl", hash = "sha256:c773bc9df2c9d6464f0d5936963399b2fc440f0616c1277f29512d540ad7e0a2"}, + {file = "opentelemetry_exporter_otlp_proto_grpc-1.18.0.tar.gz", hash = "sha256:8eddfde4267da876871e62f1b58369986bdb7e47e43032c498f1ea807d7191c4"}, ] [package.dependencies] backoff = {version = ">=1.10.0,<3.0.0", markers = "python_version >= \"3.7\""} +deprecated = ">=1.2.6" googleapis-common-protos = ">=1.52,<2.0" grpcio = ">=1.0.0,<2.0.0" opentelemetry-api = ">=1.15,<2.0" -opentelemetry-proto = "1.17.0" -opentelemetry-sdk = ">=1.17.0,<1.18.0" +opentelemetry-exporter-otlp-proto-common = "1.18.0" +opentelemetry-proto = "1.18.0" +opentelemetry-sdk = ">=1.18.0,<1.19.0" [package.extras] test = ["pytest-grpc"] [[package]] name = "opentelemetry-exporter-otlp-proto-http" -version = "1.17.0" +version = "1.18.0" description = "OpenTelemetry Collector Protobuf over HTTP Exporter" category = "main" optional = true python-versions = ">=3.7" files = [ - {file = "opentelemetry_exporter_otlp_proto_http-1.17.0-py3-none-any.whl", hash = "sha256:81959249b75bd36c3b73c885a9ce36aa21e8022618e8e95fa41ae69609f0c799"}, - {file = "opentelemetry_exporter_otlp_proto_http-1.17.0.tar.gz", hash = "sha256:329984da861ee2cc42c4bc5ae1b80092fb76a0ea5a24b3519bc3b52572197fec"}, + {file = "opentelemetry_exporter_otlp_proto_http-1.18.0-py3-none-any.whl", hash = "sha256:c22110705473f1c61bd4d74ded3b8bd3fac66ffbe7d9ba376267d8539919ed90"}, + {file = "opentelemetry_exporter_otlp_proto_http-1.18.0.tar.gz", hash = "sha256:d9a2118558decf9e9a2d6573ad9d33876f3a44d7dc43f10d38a900d5a6f867d6"}, ] [package.dependencies] backoff = {version = ">=1.10.0,<3.0.0", markers = "python_version >= \"3.7\""} +deprecated = ">=1.2.6" googleapis-common-protos = ">=1.52,<2.0" opentelemetry-api = ">=1.15,<2.0" -opentelemetry-proto = "1.17.0" -opentelemetry-sdk = ">=1.17.0,<1.18.0" +opentelemetry-exporter-otlp-proto-common = "1.18.0" +opentelemetry-proto = "1.18.0" +opentelemetry-sdk = ">=1.18.0,<1.19.0" requests = ">=2.7,<3.0" [package.extras] @@ -3001,14 +3020,14 @@ prometheus-client = ">=0.5.0,<1.0.0" [[package]] name = "opentelemetry-instrumentation" -version = "0.38b0" +version = "0.39b0" description = "Instrumentation Tools & Auto Instrumentation for OpenTelemetry Python" category = "main" optional = true python-versions = ">=3.7" files = [ - {file = "opentelemetry_instrumentation-0.38b0-py3-none-any.whl", hash = "sha256:48eed87e5db9d2cddd57a8ea359bd15318560c0ffdd80d90a5fc65816e15b7f4"}, - {file = "opentelemetry_instrumentation-0.38b0.tar.gz", hash = "sha256:3dbe93248eec7652d5725d3c6d2f9dd048bb8fda6b0505aadbc99e51638d833c"}, + {file = "opentelemetry_instrumentation-0.39b0-py3-none-any.whl", hash = "sha256:fcfd74413159fe797e343104f7e85a3f8146713634debcac10a057ac7f1eb011"}, + {file = "opentelemetry_instrumentation-0.39b0.tar.gz", hash = "sha256:2a6d1f386aa769dc763e6f2c6b483f50c4024f1bc76a78b57f05ae05970ce5f4"}, ] [package.dependencies] @@ -3018,21 +3037,21 @@ wrapt = ">=1.0.0,<2.0.0" [[package]] name = "opentelemetry-instrumentation-aiohttp-client" -version = "0.38b0" +version = "0.39b0" description = "OpenTelemetry aiohttp client instrumentation" category = "main" optional = true python-versions = ">=3.7" files = [ - {file = "opentelemetry_instrumentation_aiohttp_client-0.38b0-py3-none-any.whl", hash = "sha256:093987f5c96518ac6999eb7480af168655bc3538752ae67d4d9a5807eaad1ee0"}, - {file = "opentelemetry_instrumentation_aiohttp_client-0.38b0.tar.gz", hash = "sha256:9c3e637e742b5d8e5c8a76fae4f3812dde5e58f85598d119abd0149cb1c82ec0"}, + {file = "opentelemetry_instrumentation_aiohttp_client-0.39b0-py3-none-any.whl", hash = "sha256:315adf314f35532677b7ae2abd9a663ec86df7183594605592f0e89e599d86ca"}, + {file = "opentelemetry_instrumentation_aiohttp_client-0.39b0.tar.gz", hash = "sha256:20fd66f4aa757728e48efae1351d9eed98d6e352595933f47ca042df9d83fc78"}, ] [package.dependencies] opentelemetry-api = ">=1.12,<2.0" -opentelemetry-instrumentation = "0.38b0" -opentelemetry-semantic-conventions = "0.38b0" -opentelemetry-util-http = "0.38b0" +opentelemetry-instrumentation = "0.39b0" +opentelemetry-semantic-conventions = "0.39b0" +opentelemetry-util-http = "0.39b0" wrapt = ">=1.0.0,<2.0.0" [package.extras] @@ -3041,83 +3060,83 @@ test = ["opentelemetry-instrumentation-aiohttp-client[instruments]"] [[package]] name = "opentelemetry-instrumentation-asgi" -version = "0.38b0" +version = "0.39b0" description = "ASGI instrumentation for OpenTelemetry" category = "main" optional = true python-versions = ">=3.7" files = [ - {file = "opentelemetry_instrumentation_asgi-0.38b0-py3-none-any.whl", hash = "sha256:c5bba11505008a3cd1b2c42b72f85f3f4f5af50ab931eddd0b01bde376dc5971"}, - {file = "opentelemetry_instrumentation_asgi-0.38b0.tar.gz", hash = "sha256:32d1034c253de6048d0d0166b304f9125267ca9329e374202ebe011a206eba53"}, + {file = "opentelemetry_instrumentation_asgi-0.39b0-py3-none-any.whl", hash = "sha256:cb9cbf56e32be12b0e5e70c21cf27999f10920afc73110457f4e4b0ec4078c5f"}, + {file = "opentelemetry_instrumentation_asgi-0.39b0.tar.gz", hash = "sha256:28b76aa6b9fe41fcfa52214c2e554a79cc371927d13c40b22e7a02aff35760eb"}, ] [package.dependencies] asgiref = ">=3.0,<4.0" opentelemetry-api = ">=1.12,<2.0" -opentelemetry-instrumentation = "0.38b0" -opentelemetry-semantic-conventions = "0.38b0" -opentelemetry-util-http = "0.38b0" +opentelemetry-instrumentation = "0.39b0" +opentelemetry-semantic-conventions = "0.39b0" +opentelemetry-util-http = "0.39b0" [package.extras] instruments = ["asgiref (>=3.0,<4.0)"] -test = ["opentelemetry-instrumentation-asgi[instruments]", "opentelemetry-test-utils (==0.38b0)"] +test = ["opentelemetry-instrumentation-asgi[instruments]", "opentelemetry-test-utils (==0.39b0)"] [[package]] name = "opentelemetry-instrumentation-fastapi" -version = "0.38b0" +version = "0.39b0" description = "OpenTelemetry FastAPI Instrumentation" category = "main" optional = true python-versions = ">=3.7" files = [ - {file = "opentelemetry_instrumentation_fastapi-0.38b0-py3-none-any.whl", hash = "sha256:91139586732e437b1c3d5cf838dc5be910bce27b4b679612112be03fcc4fa2aa"}, - {file = "opentelemetry_instrumentation_fastapi-0.38b0.tar.gz", hash = "sha256:8946fd414084b305ad67556a1907e2d4a497924d023effc5ea3b4b1b0c55b256"}, + {file = "opentelemetry_instrumentation_fastapi-0.39b0-py3-none-any.whl", hash = "sha256:33223b46393ef63229d35c4e0903e900674d3dfc65ada49fbfd51db8742295cb"}, + {file = "opentelemetry_instrumentation_fastapi-0.39b0.tar.gz", hash = "sha256:02d4d583a0a62efc9a94d489f1a736ca2905fb6f7d445ac686608de51d7e375b"}, ] [package.dependencies] opentelemetry-api = ">=1.12,<2.0" -opentelemetry-instrumentation = "0.38b0" -opentelemetry-instrumentation-asgi = "0.38b0" -opentelemetry-semantic-conventions = "0.38b0" -opentelemetry-util-http = "0.38b0" +opentelemetry-instrumentation = "0.39b0" +opentelemetry-instrumentation-asgi = "0.39b0" +opentelemetry-semantic-conventions = "0.39b0" +opentelemetry-util-http = "0.39b0" [package.extras] instruments = ["fastapi (>=0.58,<1.0)"] -test = ["httpx (>=0.22,<1.0)", "opentelemetry-instrumentation-fastapi[instruments]", "opentelemetry-test-utils (==0.38b0)", "requests (>=2.23,<3.0)"] +test = ["httpx (>=0.22,<1.0)", "opentelemetry-instrumentation-fastapi[instruments]", "opentelemetry-test-utils (==0.39b0)", "requests (>=2.23,<3.0)"] [[package]] name = "opentelemetry-instrumentation-grpc" -version = "0.38b0" +version = "0.39b0" description = "OpenTelemetry gRPC instrumentation" category = "main" optional = true python-versions = ">=3.7" files = [ - {file = "opentelemetry_instrumentation_grpc-0.38b0-py3-none-any.whl", hash = "sha256:64978d158f233c45df809d927f62a79e0bbb1c433d63ae5f7b38133a515397d8"}, - {file = "opentelemetry_instrumentation_grpc-0.38b0.tar.gz", hash = "sha256:d6a45e4c64aa4a2f3c29b6ca673b04d88e8ef4c2d0273e9b23209f9248f30325"}, + {file = "opentelemetry_instrumentation_grpc-0.39b0-py3-none-any.whl", hash = "sha256:1ab7a1e4a43efd8e827d1666065253fdc4dca76ca7bcf43417fe7523999e3145"}, + {file = "opentelemetry_instrumentation_grpc-0.39b0.tar.gz", hash = "sha256:766ea59ff2677301e5354d2113a635c20e462611ecd4b5fb764121759d945bb2"}, ] [package.dependencies] opentelemetry-api = ">=1.12,<2.0" -opentelemetry-instrumentation = "0.38b0" +opentelemetry-instrumentation = "0.39b0" opentelemetry-sdk = ">=1.12,<2.0" -opentelemetry-semantic-conventions = "0.38b0" +opentelemetry-semantic-conventions = "0.39b0" wrapt = ">=1.0.0,<2.0.0" [package.extras] instruments = ["grpcio (>=1.27,<2.0)"] -test = ["opentelemetry-instrumentation-grpc[instruments]", "opentelemetry-sdk (>=1.12,<2.0)", "opentelemetry-test-utils (==0.38b0)", "protobuf (>=3.13,<4.0)"] +test = ["opentelemetry-instrumentation-grpc[instruments]", "opentelemetry-sdk (>=1.12,<2.0)", "opentelemetry-test-utils (==0.39b0)", "protobuf (>=3.13,<4.0)"] [[package]] name = "opentelemetry-proto" -version = "1.17.0" +version = "1.18.0" description = "OpenTelemetry Python Proto" category = "main" optional = true python-versions = ">=3.7" files = [ - {file = "opentelemetry_proto-1.17.0-py3-none-any.whl", hash = "sha256:c7c0f748668102598e84ca4d51975f87ebf66865aa7469fc2c5e8bdaab813e93"}, - {file = "opentelemetry_proto-1.17.0.tar.gz", hash = "sha256:8501fdc3bc76c03a2ed11603a4d9fce6e5a97eeaebd7a20ad84bba7bd79cc9f8"}, + {file = "opentelemetry_proto-1.18.0-py3-none-any.whl", hash = "sha256:34d1c49283f0246a58761d9322d5a79702a09afda0bb181bb6378ed26862e446"}, + {file = "opentelemetry_proto-1.18.0.tar.gz", hash = "sha256:4f38d01049c3926b9fd09833574bfb5e172d84c8ca85e2ab7f4b5a198d75aeef"}, ] [package.dependencies] @@ -3125,44 +3144,44 @@ protobuf = ">=3.19,<5.0" [[package]] name = "opentelemetry-sdk" -version = "1.17.0" +version = "1.18.0" description = "OpenTelemetry Python SDK" category = "main" optional = true python-versions = ">=3.7" files = [ - {file = "opentelemetry_sdk-1.17.0-py3-none-any.whl", hash = "sha256:07424cbcc8c012bc120ed573d5443e7322f3fb393512e72866c30111070a8c37"}, - {file = "opentelemetry_sdk-1.17.0.tar.gz", hash = "sha256:99bb9a787006774f865a4b24f8179900347d03a214c362a6cb70191f77dd6132"}, + {file = "opentelemetry_sdk-1.18.0-py3-none-any.whl", hash = "sha256:a097cc1e0db6ff33b4d250a9350dc17975d24a22aa667fca2866e60c51306723"}, + {file = "opentelemetry_sdk-1.18.0.tar.gz", hash = "sha256:cd3230930a2ab288b1df149d261e9cd2bd48dee54ad18465a777831cb6779e90"}, ] [package.dependencies] -opentelemetry-api = "1.17.0" -opentelemetry-semantic-conventions = "0.38b0" +opentelemetry-api = "1.18.0" +opentelemetry-semantic-conventions = "0.39b0" setuptools = ">=16.0" typing-extensions = ">=3.7.4" [[package]] name = "opentelemetry-semantic-conventions" -version = "0.38b0" +version = "0.39b0" description = "OpenTelemetry Semantic Conventions" category = "main" optional = true python-versions = ">=3.7" files = [ - {file = "opentelemetry_semantic_conventions-0.38b0-py3-none-any.whl", hash = "sha256:b0ba36e8b70bfaab16ee5a553d809309cc11ff58aec3d2550d451e79d45243a7"}, - {file = "opentelemetry_semantic_conventions-0.38b0.tar.gz", hash = "sha256:37f09e47dd5fc316658bf9ee9f37f9389b21e708faffa4a65d6a3de484d22309"}, + {file = "opentelemetry_semantic_conventions-0.39b0-py3-none-any.whl", hash = "sha256:0dd7a9dc0dfde2335f643705bba8f7c44182c797bc208b7601f0b8e8211cfd5c"}, + {file = "opentelemetry_semantic_conventions-0.39b0.tar.gz", hash = "sha256:06a9f198574e0dab6ebc072b59d89092cf9f115638a8a02157586769b6b7a69a"}, ] [[package]] name = "opentelemetry-util-http" -version = "0.38b0" +version = "0.39b0" description = "Web util for OpenTelemetry" category = "main" optional = true python-versions = ">=3.7" files = [ - {file = "opentelemetry_util_http-0.38b0-py3-none-any.whl", hash = "sha256:8e5f0451eeb5307b2c628dd799886adc5e113fb13a7207c29c672e8d168eabd8"}, - {file = "opentelemetry_util_http-0.38b0.tar.gz", hash = "sha256:85eb032b6129c4d7620583acf574e99fe2e73c33d60e256b54af436f76ceb5ae"}, + {file = "opentelemetry_util_http-0.39b0-py3-none-any.whl", hash = "sha256:587c3f8931b8a1e910a04fd736e8ff1386fe25c09dc92dc85104679112221483"}, + {file = "opentelemetry_util_http-0.39b0.tar.gz", hash = "sha256:1a78e53e97c8f0b05216dbe4d93836ae5f5f94ba877003e56d065f089373f0ce"}, ] [[package]] @@ -3464,25 +3483,25 @@ wcwidth = "*" [[package]] name = "protobuf" -version = "4.23.0" +version = "4.23.1" description = "" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "protobuf-4.23.0-cp310-abi3-win32.whl", hash = "sha256:6c16657d6717a0c62d5d740cb354fbad1b0d8cb811669e06fc1caa0ff4799ddd"}, - {file = "protobuf-4.23.0-cp310-abi3-win_amd64.whl", hash = "sha256:baca40d067dddd62141a129f244703160d278648b569e90bb0e3753067644711"}, - {file = "protobuf-4.23.0-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:2b94bd6df92d71bd1234a2ffe7ce96ddf6d10cf637a18d6b55ad0a89fbb7fc21"}, - {file = "protobuf-4.23.0-cp37-abi3-manylinux2014_aarch64.whl", hash = "sha256:9f5a0fbfcdcc364f3986f9ed9f8bb1328fb84114fd790423ff3d7fdb0f85c2d1"}, - {file = "protobuf-4.23.0-cp37-abi3-manylinux2014_x86_64.whl", hash = "sha256:ebde3a023b8e11bfa6c890ef34cd6a8b47d586f26135e86c21344fe433daf2e2"}, - {file = "protobuf-4.23.0-cp37-cp37m-win32.whl", hash = "sha256:7cb5b9a05ce52c6a782bb97de52679bd3438ff2b7460eff5da348db65650f227"}, - {file = "protobuf-4.23.0-cp37-cp37m-win_amd64.whl", hash = "sha256:6fe180b56e1169d72ecc4acbd39186339aed20af5384531b8e8979b02bbee159"}, - {file = "protobuf-4.23.0-cp38-cp38-win32.whl", hash = "sha256:d5a35ff54e3f62e8fc7be02bb0d2fbc212bba1a5a9cc2748090690093996f07b"}, - {file = "protobuf-4.23.0-cp38-cp38-win_amd64.whl", hash = "sha256:e62fb869762b4ba18666370e2f8a18f17f8ab92dd4467295c6d38be6f8fef60b"}, - {file = "protobuf-4.23.0-cp39-cp39-win32.whl", hash = "sha256:03eee35b60317112a72d19c54d0bff7bc58ff12fea4cd7b018232bd99758ffdf"}, - {file = "protobuf-4.23.0-cp39-cp39-win_amd64.whl", hash = "sha256:36f5370a930cb77c8ad2f4135590c672d0d2c72d4a707c7d0058dce4b4b4a598"}, - {file = "protobuf-4.23.0-py3-none-any.whl", hash = "sha256:9744e934ea5855d12191040ea198eaf704ac78665d365a89d9572e3b627c2688"}, - {file = "protobuf-4.23.0.tar.gz", hash = "sha256:5f1eba1da2a2f3f7df469fccddef3cc060b8a16cfe3cc65961ad36b4dbcf59c5"}, + {file = "protobuf-4.23.1-cp310-abi3-win32.whl", hash = "sha256:410bcc0a5b279f634d3e16082ce221dfef7c3392fac723500e2e64d1806dd2be"}, + {file = "protobuf-4.23.1-cp310-abi3-win_amd64.whl", hash = "sha256:32e78beda26d7a101fecf15d7a4a792278a0d26a31bc327ff05564a9d68ab8ee"}, + {file = "protobuf-4.23.1-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:f9510cac91e764e86acd74e2b7f7bc5e6127a7f3fb646d7c8033cfb84fd1176a"}, + {file = "protobuf-4.23.1-cp37-abi3-manylinux2014_aarch64.whl", hash = "sha256:346990f634272caac1f09efbcfbbacb23098b1f606d172534c6fa2d9758bb436"}, + {file = "protobuf-4.23.1-cp37-abi3-manylinux2014_x86_64.whl", hash = "sha256:3ce113b3f3362493bddc9069c2163a38f240a9ed685ff83e7bcb756b05e1deb0"}, + {file = "protobuf-4.23.1-cp37-cp37m-win32.whl", hash = "sha256:2036a3a1e7fc27f973fa0a7888dce712393af644f4695385f117886abc792e39"}, + {file = "protobuf-4.23.1-cp37-cp37m-win_amd64.whl", hash = "sha256:3b8905eafe4439076e1f58e9d1fa327025fd2777cf90f14083092ae47f77b0aa"}, + {file = "protobuf-4.23.1-cp38-cp38-win32.whl", hash = "sha256:5b9cd6097e6acae48a68cb29b56bc79339be84eca65b486910bb1e7a30e2b7c1"}, + {file = "protobuf-4.23.1-cp38-cp38-win_amd64.whl", hash = "sha256:decf119d54e820f298ee6d89c72d6b289ea240c32c521f00433f9dc420595f38"}, + {file = "protobuf-4.23.1-cp39-cp39-win32.whl", hash = "sha256:91fac0753c3c4951fbb98a93271c43cc7cf3b93cf67747b3e600bb1e5cc14d61"}, + {file = "protobuf-4.23.1-cp39-cp39-win_amd64.whl", hash = "sha256:ac50be82491369a9ec3710565777e4da87c6d2e20404e0abb1f3a8f10ffd20f0"}, + {file = "protobuf-4.23.1-py3-none-any.whl", hash = "sha256:65f0ac96ef67d7dd09b19a46aad81a851b6f85f89725577f16de38f2d68ad477"}, + {file = "protobuf-4.23.1.tar.gz", hash = "sha256:95789b569418a3e32a53f43d7763be3d490a831e9c08042539462b6d972c2d7e"}, ] [[package]] @@ -3785,14 +3804,14 @@ diagrams = ["jinja2", "railroad-diagrams"] [[package]] name = "pypdf" -version = "3.8.1" +version = "3.9.0" description = "A pure-python PDF library capable of splitting, merging, cropping, and transforming PDF files" category = "main" optional = false python-versions = ">=3.6" files = [ - {file = "pypdf-3.8.1-py3-none-any.whl", hash = "sha256:0c34620e4bbceaf9632b6b7a8ec6d4a4d5b0cdee6e39bdb86dc91a8c44cb0f19"}, - {file = "pypdf-3.8.1.tar.gz", hash = "sha256:761ad6dc33abb78d358b4ae42206c5f185798f8b537be9b8fdecd9ee834a894d"}, + {file = "pypdf-3.9.0-py3-none-any.whl", hash = "sha256:a2a0859483687deb01c29180587a5028bc3595402001107c870085a1976131e3"}, + {file = "pypdf-3.9.0.tar.gz", hash = "sha256:06136b9ed99525159482a1397a49f3fc0fd55ffd700d1ad4393e3f42d192a035"}, ] [package.dependencies] @@ -4507,19 +4526,19 @@ files = [ [[package]] name = "setuptools" -version = "67.7.2" +version = "67.8.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "setuptools-67.7.2-py3-none-any.whl", hash = "sha256:23aaf86b85ca52ceb801d32703f12d77517b2556af839621c641fca11287952b"}, - {file = "setuptools-67.7.2.tar.gz", hash = "sha256:f104fa03692a2602fa0fec6c6a9e63b6c8a968de13e17c026957dd1f53d80990"}, + {file = "setuptools-67.8.0-py3-none-any.whl", hash = "sha256:5df61bf30bb10c6f756eb19e7c9f3b473051f48db77fddbe06ff2ca307df9a6f"}, + {file = "setuptools-67.8.0.tar.gz", hash = "sha256:62642358adc77ffa87233bc4d2354c4b2682d214048f500964dbe760ccedf102"}, ] [package.extras] docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8 (<5)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pip-run (>=8.8)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pip-run (>=8.8)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] [[package]] @@ -4560,53 +4579,53 @@ files = [ [[package]] name = "sqlalchemy" -version = "2.0.13" +version = "2.0.15" description = "Database Abstraction Library" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "SQLAlchemy-2.0.13-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7ad24c85f2a1caf0cd1ae8c2fdb668777a51a02246d9039420f94bd7dbfd37ed"}, - {file = "SQLAlchemy-2.0.13-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:db24d2738add6db19d66ca820479d2f8f96d3f5a13c223f27fa28dd2f268a4bd"}, - {file = "SQLAlchemy-2.0.13-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:72746ec17a7d9c5acf2c57a6e6190ceba3dad7127cd85bb17f24e90acc0e8e3f"}, - {file = "SQLAlchemy-2.0.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:755f653d693f9b8f4286d987aec0d4279821bf8d179a9de8e8a5c685e77e57d6"}, - {file = "SQLAlchemy-2.0.13-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e0d20f27edfd6f35b388da2bdcd7769e4ffa374fef8994980ced26eb287e033a"}, - {file = "SQLAlchemy-2.0.13-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:37de4010f53f452e94e5ed6684480432cfe6a7a8914307ef819cd028b05b98d5"}, - {file = "SQLAlchemy-2.0.13-cp310-cp310-win32.whl", hash = "sha256:31f72bb300eed7bfdb373c7c046121d84fa0ae6f383089db9505ff553ac27cef"}, - {file = "SQLAlchemy-2.0.13-cp310-cp310-win_amd64.whl", hash = "sha256:ec2f525273528425ed2f51861b7b88955160cb95dddb17af0914077040aff4a5"}, - {file = "SQLAlchemy-2.0.13-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2424a84f131901fbb20a99844d47b38b517174c6e964c8efb15ea6bb9ced8c2b"}, - {file = "SQLAlchemy-2.0.13-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4f9832815257969b3ca9bf0501351e4c02c8d60cbd3ec9f9070d5b0f8852900e"}, - {file = "SQLAlchemy-2.0.13-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a30e4db983faa5145e00ef6eaf894a2d503b3221dbf40a595f3011930d3d0bac"}, - {file = "SQLAlchemy-2.0.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f717944aee40e9f48776cf85b523bb376aa2d9255a268d6d643c57ab387e7264"}, - {file = "SQLAlchemy-2.0.13-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:9119795d2405eb23bf7e6707e228fe38124df029494c1b3576459aa3202ea432"}, - {file = "SQLAlchemy-2.0.13-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:2ad9688debf1f0ae9c6e0706a4e2d33b1a01281317cee9bd1d7eef8020c5baac"}, - {file = "SQLAlchemy-2.0.13-cp311-cp311-win32.whl", hash = "sha256:c61b89803a87a3b2a394089a7dadb79a6c64c89f2e8930cc187fec43b319f8d2"}, - {file = "SQLAlchemy-2.0.13-cp311-cp311-win_amd64.whl", hash = "sha256:0aa2cbde85a6eab9263ab480f19e8882d022d30ebcdc14d69e6a8d7c07b0a871"}, - {file = "SQLAlchemy-2.0.13-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:9ad883ac4f5225999747f0849643c4d0ec809d9ffe0ddc81a81dd3e68d0af463"}, - {file = "SQLAlchemy-2.0.13-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e481e54db8cec1457ee7c05f6d2329e3298a304a70d3b5e2e82e77170850b385"}, - {file = "SQLAlchemy-2.0.13-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b4e08e3831671008888bad5d160d757ef35ce34dbb73b78c3998d16aa1334c97"}, - {file = "SQLAlchemy-2.0.13-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:f234ba3bb339ad17803009c8251f5ee65dcf283a380817fe486823b08b26383d"}, - {file = "SQLAlchemy-2.0.13-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:375b7ba88f261dbd79d044f20cbcd919d88befb63f26af9d084614f10cdf97a6"}, - {file = "SQLAlchemy-2.0.13-cp37-cp37m-win32.whl", hash = "sha256:9136d596111c742d061c0f99bab95c5370016c4101a32e72c2b634ad5e0757e6"}, - {file = "SQLAlchemy-2.0.13-cp37-cp37m-win_amd64.whl", hash = "sha256:7612a7366a0855a04430363fb4ab392dc6818aaece0b2e325ff30ee77af9b21f"}, - {file = "SQLAlchemy-2.0.13-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:49c138856035cb97f0053e5e57ba90ec936b28a0b8b0020d44965c7b0c0bf03a"}, - {file = "SQLAlchemy-2.0.13-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a5e9e78332a5d841422b88b8c490dfd7f761e64b3430249b66c05d02f72ceab0"}, - {file = "SQLAlchemy-2.0.13-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fd0febae872a4042da44e972c070f0fd49a85a0a7727ab6b85425f74348be14e"}, - {file = "SQLAlchemy-2.0.13-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:566a0ac347cf4632f551e7b28bbd0d215af82e6ffaa2556f565a3b6b51dc3f81"}, - {file = "SQLAlchemy-2.0.13-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:e5e5dc300a0ca8755ada1569f5caccfcdca28607dfb98b86a54996b288a8ebd3"}, - {file = "SQLAlchemy-2.0.13-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:a25b4c4fdd633501233924f873e6f6cd8970732859ecfe4ecfb60635881f70be"}, - {file = "SQLAlchemy-2.0.13-cp38-cp38-win32.whl", hash = "sha256:6777673d346071451bf7cccf8d0499024f1bd6a835fc90b4fe7af50373d92ce6"}, - {file = "SQLAlchemy-2.0.13-cp38-cp38-win_amd64.whl", hash = "sha256:2f0a355264af0952570f18457102984e1f79510f856e5e0ae652e63316d1ca23"}, - {file = "SQLAlchemy-2.0.13-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d93ebbff3dcf05274843ad8cf650b48ee634626e752c5d73614e5ec9df45f0ce"}, - {file = "SQLAlchemy-2.0.13-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fec56c7d1b6a22c8f01557de3975d962ee40270b81b60d1cfdadf2a105d10e84"}, - {file = "SQLAlchemy-2.0.13-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0eb14a386a5b610305bec6639b35540b47f408b0a59f75999199aed5b3d40079"}, - {file = "SQLAlchemy-2.0.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e2f3b5236079bc3e318a92bab2cc3f669cc32127075ab03ff61cacbae1c392b8"}, - {file = "SQLAlchemy-2.0.13-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:bf1aae95e80acea02a0a622e1c12d3fefc52ffd0fe7bda70a30d070373fbb6c3"}, - {file = "SQLAlchemy-2.0.13-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:cdf80359b641185ae7e580afb9f88cf560298f309a38182972091165bfe1225d"}, - {file = "SQLAlchemy-2.0.13-cp39-cp39-win32.whl", hash = "sha256:f463598f9e51ccc04f0fe08500f9a0c3251a7086765350be418598b753b5561d"}, - {file = "SQLAlchemy-2.0.13-cp39-cp39-win_amd64.whl", hash = "sha256:881cc388dded44ae6e17a1666364b98bd76bcdc71b869014ae725f06ba298e0e"}, - {file = "SQLAlchemy-2.0.13-py3-none-any.whl", hash = "sha256:0d6979c9707f8b82366ba34b38b5a6fe32f75766b2e901f9820e271e95384070"}, - {file = "SQLAlchemy-2.0.13.tar.gz", hash = "sha256:8d97b37b4e60073c38bcf94e289e3be09ef9be870de88d163f16e08f2b9ded1a"}, + {file = "SQLAlchemy-2.0.15-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:78303719c6f72af97814b0072ad18bee72e70adca8d95cf8fecd59c5e1ddb040"}, + {file = "SQLAlchemy-2.0.15-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9d810b4aacd5ef4e293aa4ea01f19fca53999e9edcfc4a8ef1146238b30bdc28"}, + {file = "SQLAlchemy-2.0.15-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3fb5d09f1d51480f711b69fe28ad42e4f8b08600a85ab2473baee669e1257800"}, + {file = "SQLAlchemy-2.0.15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:51b19887c96d405599880da6a7cbdf8545a7e78ec5683e46a43bac8885e32d0f"}, + {file = "SQLAlchemy-2.0.15-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d6b17cb86908e7f88be14007d6afe7d2ab11966e373044137f96a6a4d83eb21c"}, + {file = "SQLAlchemy-2.0.15-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:df25052b92bd514357a9b370d74f240db890ea79aaa428fb893520e10ee5bc18"}, + {file = "SQLAlchemy-2.0.15-cp310-cp310-win32.whl", hash = "sha256:55ec62ddc0200b4fee94d11abbec7aa25948d5d21cb8df8807f4bdd3c51ba44b"}, + {file = "SQLAlchemy-2.0.15-cp310-cp310-win_amd64.whl", hash = "sha256:ae1d8deb391ab39cc8f0d5844e588a115ae3717e607d91482023917f920f777f"}, + {file = "SQLAlchemy-2.0.15-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4670ce853cb25f72115a1bbe366ae13cf3f28fc5c87222df14f8d3d55d51816e"}, + {file = "SQLAlchemy-2.0.15-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:cea7c4a3dfc2ca61f88a2b1ddd6b0bfbd116c9b1a361b3b66fd826034b833142"}, + {file = "SQLAlchemy-2.0.15-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6f5784dfb2d45c19cde03c45c04a54bf47428610106197ed6e6fa79f33bc63d3"}, + {file = "SQLAlchemy-2.0.15-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9b31ebde27575b3b0708673ec14f0c305c4564d995b545148ab7ac0f4d9b847a"}, + {file = "SQLAlchemy-2.0.15-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:6b42913a0259267e9ee335da0c36498077799e59c5e332d506e72b4f32de781d"}, + {file = "SQLAlchemy-2.0.15-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:6a3f8020e013e9b3b7941dcf20b0fc8f7429daaf7158760846731cbd8caa5e45"}, + {file = "SQLAlchemy-2.0.15-cp311-cp311-win32.whl", hash = "sha256:88ab245ed2c96265441ed2818977be28c840cfa5204ba167425d6c26eb67b7e7"}, + {file = "SQLAlchemy-2.0.15-cp311-cp311-win_amd64.whl", hash = "sha256:5cc48a7fda2b5c5b8860494d6c575db3a101a68416492105fed6591dc8a2728a"}, + {file = "SQLAlchemy-2.0.15-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:f6fd3c88ea4b170d13527e93be1945e69facd917661d3725a63470eb683fbffe"}, + {file = "SQLAlchemy-2.0.15-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1e885dacb167077df15af2f9ccdacbd7f5dd0d538a6d74b94074f2cefc7bb589"}, + {file = "SQLAlchemy-2.0.15-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:201a99f922ac8c780b3929128fbd9df901418877c70e160e19adb05665e51c31"}, + {file = "SQLAlchemy-2.0.15-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:e17fdcb8971e77c439113642ca8861f9465e21fc693bd3916654ceef3ac26883"}, + {file = "SQLAlchemy-2.0.15-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:db269f67ed17b07e80aaa8fba1f650c0d84aa0bdd9d5352e4ac38d5bf47ac568"}, + {file = "SQLAlchemy-2.0.15-cp37-cp37m-win32.whl", hash = "sha256:994a75b197662e0608b6a76935d7c345f7fd874eac0b7093d561033db61b0e8c"}, + {file = "SQLAlchemy-2.0.15-cp37-cp37m-win_amd64.whl", hash = "sha256:4d61731a35eddb0f667774fe15e5a4831e444d066081d1e809e1b8a0e3f97cae"}, + {file = "SQLAlchemy-2.0.15-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f7f994a53c0e6b44a2966fd6bfc53e37d34b7dca34e75b6be295de6db598255e"}, + {file = "SQLAlchemy-2.0.15-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:79bfe728219239bdc493950ea4a4d15b02138ecb304771f9024d0d6f5f4e3706"}, + {file = "SQLAlchemy-2.0.15-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1d6320a1d175447dce63618ec997a53836de48ed3b44bbe952f0b4b399b19941"}, + {file = "SQLAlchemy-2.0.15-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6f80a9c9a9af0e4bd5080cc0955ce70274c28e9b931ad7e0fb07021afcd32af6"}, + {file = "SQLAlchemy-2.0.15-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:4a75fdb9a84072521bb2ebd31eefe1165d4dccea3039dda701a864f4b5daa17f"}, + {file = "SQLAlchemy-2.0.15-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:21c89044fc48a25c2184eba332edeffbbf9367913bb065cd31538235d828f06f"}, + {file = "SQLAlchemy-2.0.15-cp38-cp38-win32.whl", hash = "sha256:1a0754c2d9f0c7982bec0a31138e495ed1f6b8435d7e677c45be60ec18370acf"}, + {file = "SQLAlchemy-2.0.15-cp38-cp38-win_amd64.whl", hash = "sha256:bc5c2b0da46c26c5f73f700834f871d0723e1e882641932468d56833bab09775"}, + {file = "SQLAlchemy-2.0.15-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:670ecf74ee2e70b917028a06446ad26ff9b1195e84b09c3139c215123d57dc30"}, + {file = "SQLAlchemy-2.0.15-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d14282bf5b4de87f922db3c70858953fd081ef4f05dba6cca3dd705daffe1cc9"}, + {file = "SQLAlchemy-2.0.15-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:256b2b9660e51ad7055a9835b12717416cf7288afcf465107413917b6bb2316f"}, + {file = "SQLAlchemy-2.0.15-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:810199d1c5b43603a9e815ae9487aef3ab1ade7ed9c0c485e12519358929fbfe"}, + {file = "SQLAlchemy-2.0.15-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:536c86ec81ca89291d533ff41a3a05f9e4e88e01906dcee0751fc7082f3e8d6c"}, + {file = "SQLAlchemy-2.0.15-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:435f6807fa6a0597d84741470f19db204a7d34625ea121abd63e8d95f673f0c4"}, + {file = "SQLAlchemy-2.0.15-cp39-cp39-win32.whl", hash = "sha256:da7381a883aee20b7d2ffda17d909b38134b6a625920e65239a1c681881df800"}, + {file = "SQLAlchemy-2.0.15-cp39-cp39-win_amd64.whl", hash = "sha256:788d1772fb8dcd12091ca82809eef504ce0f2c423e45284bc351b872966ff554"}, + {file = "SQLAlchemy-2.0.15-py3-none-any.whl", hash = "sha256:933d30273861fe61f014ce2a7e3c364915f5efe9ed250ec1066ca6ea5942c0bd"}, + {file = "SQLAlchemy-2.0.15.tar.gz", hash = "sha256:2e940a8659ef870ae10e0d9e2a6d5aaddf0ff6e91f7d0d7732afc9e8c4be9bbc"}, ] [package.dependencies] @@ -4707,14 +4726,14 @@ doc = ["reno", "sphinx", "tornado (>=4.5)"] [[package]] name = "textual" -version = "0.24.1" +version = "0.26.0" description = "Modern Text User Interface framework" category = "main" optional = true python-versions = ">=3.7,<4.0" files = [ - {file = "textual-0.24.1-py3-none-any.whl", hash = "sha256:a7deb7ac5a1502424c754fe165ae13cb3890e47ddc514d3f089cb2984c336d1d"}, - {file = "textual-0.24.1.tar.gz", hash = "sha256:4c7e1f4ed12b9615c63fa3eb7cb9df68d29e0ae5b2352997958cd7ee5533f926"}, + {file = "textual-0.26.0-py3-none-any.whl", hash = "sha256:1efd04e9f61b3e95fd1c65436d3262f99e3f86cdeb524d13045bb551eb615c02"}, + {file = "textual-0.26.0.tar.gz", hash = "sha256:78094c83017d2836b726513abdf434cc034a0e68cc45e63b3b056c9b8b7fa673"}, ] [package.dependencies] @@ -5384,14 +5403,14 @@ files = [ [[package]] name = "websocket-client" -version = "1.5.1" +version = "1.5.2" description = "WebSocket client for Python with low level API options" category = "main" optional = true python-versions = ">=3.7" files = [ - {file = "websocket-client-1.5.1.tar.gz", hash = "sha256:3f09e6d8230892547132177f575a4e3e73cfdf06526e20cc02aa1c3b47184d40"}, - {file = "websocket_client-1.5.1-py3-none-any.whl", hash = "sha256:cdf5877568b7e83aa7cf2244ab56a3213de587bbe0ce9d8b9600fc77b455d89e"}, + {file = "websocket-client-1.5.2.tar.gz", hash = "sha256:c7d67c13b928645f259d9b847ab5b57fd2d127213ca41ebd880de1f553b7c23b"}, + {file = "websocket_client-1.5.2-py3-none-any.whl", hash = "sha256:f8c64e28cd700e7ba1f04350d66422b6833b82a796b525a51e740b8cc8dab4b1"}, ] [package.extras] @@ -5581,14 +5600,14 @@ files = [ [[package]] name = "xlsxwriter" -version = "3.1.0" +version = "3.1.1" description = "A Python module for creating Excel XLSX files." category = "main" optional = false python-versions = ">=3.6" files = [ - {file = "XlsxWriter-3.1.0-py3-none-any.whl", hash = "sha256:b70a147d36235d1ee835cfd037396f789db1f76740a0e5c917d54137169341de"}, - {file = "XlsxWriter-3.1.0.tar.gz", hash = "sha256:02913b50b74c00f165933d5da3e3a02cab4204cb4932722a1b342c5c71034122"}, + {file = "XlsxWriter-3.1.1-py3-none-any.whl", hash = "sha256:b50e3bd905d7dafa6ea45210e2cc5600b4ccd104a0d3a4d4d7cf813b78426440"}, + {file = "XlsxWriter-3.1.1.tar.gz", hash = "sha256:03459ee76f664470c4c63a8977cab624fb259d0fc1faac64dc9cc6f3cc08f945"}, ] [[package]] @@ -5760,4 +5779,4 @@ deploy = ["langchain-serve"] [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "ddf4cbde95a8fba8be8376cc2de300a375b0eb16c72226df795acf7d36b53737" +content-hash = "0ab60d05d829739ee29dd813743d302353765846cefa71b64ade9778039f0c7c" diff --git a/pyproject.toml b/pyproject.toml index d2a9ddfc7..4fb16f63c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "langflow" -version = "0.0.74" +version = "0.0.75" description = "A Python package with a built-in web application" authors = ["Logspace "] maintainers = [ @@ -29,7 +29,7 @@ google-search-results = "^2.4.1" google-api-python-client = "^2.79.0" typer = "^0.7.0" gunicorn = "^20.1.0" -langchain = "^0.0.170" +langchain = "^0.0.176" openai = "^0.27.2" types-pyyaml = "^6.0.12.8" dill = "^0.3.6" From 3c3576e0ade185a8d0dbbced5c68c1e5c2f50377 Mon Sep 17 00:00:00 2001 From: Gabriel Almeida Date: Mon, 22 May 2023 08:39:03 -0300 Subject: [PATCH 36/50] Format --- src/frontend/src/App.tsx | 289 +++++++++++++++++++-------------------- 1 file changed, 144 insertions(+), 145 deletions(-) diff --git a/src/frontend/src/App.tsx b/src/frontend/src/App.tsx index e0d19fd40..69b41fdf4 100644 --- a/src/frontend/src/App.tsx +++ b/src/frontend/src/App.tsx @@ -16,153 +16,152 @@ import CrashErrorComponent from "./components/CrashErrorComponent"; import { TabsContext } from "./contexts/tabsContext"; export default function App() { + let { setCurrent, setShowSideBar, setIsStackedOpen } = + useContext(locationContext); + let location = useLocation(); + useEffect(() => { + setCurrent(location.pathname.replace(/\/$/g, "").split("/")); + setShowSideBar(true); + setIsStackedOpen(true); + }, [location.pathname, setCurrent, setIsStackedOpen, setShowSideBar]); + const { hardReset } = useContext(TabsContext); + const { + errorData, + errorOpen, + setErrorOpen, + noticeData, + noticeOpen, + setNoticeOpen, + successData, + successOpen, + setSuccessOpen, + } = useContext(alertContext); - let { setCurrent, setShowSideBar, setIsStackedOpen } = - useContext(locationContext); - let location = useLocation(); - useEffect(() => { - setCurrent(location.pathname.replace(/\/$/g, "").split("/")); - setShowSideBar(true); - setIsStackedOpen(true); - }, [location.pathname, setCurrent, setIsStackedOpen, setShowSideBar]); - const { hardReset } = useContext(TabsContext); - const { - errorData, - errorOpen, - setErrorOpen, - noticeData, - noticeOpen, - setNoticeOpen, - successData, - successOpen, - setSuccessOpen, - } = useContext(alertContext); + // Initialize state variable for the list of alerts + const [alertsList, setAlertsList] = useState< + Array<{ + type: string; + data: { title: string; list?: Array; link?: string }; + id: string; + }> + >([]); - // Initialize state variable for the list of alerts - const [alertsList, setAlertsList] = useState< - Array<{ - type: string; - data: { title: string; list?: Array; link?: string }; - id: string; - }> - >([]); + // Use effect hook to update alertsList when a new alert is added + useEffect(() => { + // If there is an error alert open with data, add it to the alertsList + if (errorOpen && errorData) { + setErrorOpen(false); + setAlertsList((old) => { + let newAlertsList = [ + ...old, + { type: "error", data: _.cloneDeep(errorData), id: _.uniqueId() }, + ]; + return newAlertsList; + }); + } + // If there is a notice alert open with data, add it to the alertsList + else if (noticeOpen && noticeData) { + setNoticeOpen(false); + setAlertsList((old) => { + let newAlertsList = [ + ...old, + { type: "notice", data: _.cloneDeep(noticeData), id: _.uniqueId() }, + ]; + return newAlertsList; + }); + } + // If there is a success alert open with data, add it to the alertsList + else if (successOpen && successData) { + setSuccessOpen(false); + setAlertsList((old) => { + let newAlertsList = [ + ...old, + { type: "success", data: _.cloneDeep(successData), id: _.uniqueId() }, + ]; + return newAlertsList; + }); + } + }, [ + _, + errorData, + errorOpen, + noticeData, + noticeOpen, + setErrorOpen, + setNoticeOpen, + setSuccessOpen, + successData, + successOpen, + ]); - // Use effect hook to update alertsList when a new alert is added - useEffect(() => { - // If there is an error alert open with data, add it to the alertsList - if (errorOpen && errorData) { - setErrorOpen(false); - setAlertsList((old) => { - let newAlertsList = [ - ...old, - { type: "error", data: _.cloneDeep(errorData), id: _.uniqueId() }, - ]; - return newAlertsList; - }); - } - // If there is a notice alert open with data, add it to the alertsList - else if (noticeOpen && noticeData) { - setNoticeOpen(false); - setAlertsList((old) => { - let newAlertsList = [ - ...old, - { type: "notice", data: _.cloneDeep(noticeData), id: _.uniqueId() }, - ]; - return newAlertsList; - }); - } - // If there is a success alert open with data, add it to the alertsList - else if (successOpen && successData) { - setSuccessOpen(false); - setAlertsList((old) => { - let newAlertsList = [ - ...old, - { type: "success", data: _.cloneDeep(successData), id: _.uniqueId() }, - ]; - return newAlertsList; - }); - } - }, [ - _, - errorData, - errorOpen, - noticeData, - noticeOpen, - setErrorOpen, - setNoticeOpen, - setSuccessOpen, - successData, - successOpen, - ]); + const removeAlert = (id: string) => { + setAlertsList((prevAlertsList) => + prevAlertsList.filter((alert) => alert.id !== id) + ); + }; - const removeAlert = (id: string) => { - setAlertsList((prevAlertsList) => - prevAlertsList.filter((alert) => alert.id !== id) - ); - }; - - return ( - //need parent component with width and height -
-
- { - window.localStorage.removeItem("tabsData"); - window.localStorage.clear(); - hardReset(); - window.location.href = window.location.href; - }} - FallbackComponent={CrashErrorComponent} - > -
- - {/* Main area */} -
- {/* Primary column */} -
- -
-
-
-
-
-
- {alertsList.map((alert) => ( -
- {alert.type === "error" ? ( - - ) : alert.type === "notice" ? ( - - ) : ( - - )} -
- ))} -
- - Created by Logspace - -
- ); + return ( + //need parent component with width and height +
+
+ { + window.localStorage.removeItem("tabsData"); + window.localStorage.clear(); + hardReset(); + window.location.href = window.location.href; + }} + FallbackComponent={CrashErrorComponent} + > +
+ + {/* Main area */} +
+ {/* Primary column */} +
+ +
+
+
+
+
+
+ {alertsList.map((alert) => ( +
+ {alert.type === "error" ? ( + + ) : alert.type === "notice" ? ( + + ) : ( + + )} +
+ ))} +
+ + Created by Logspace + +
+ ); } From 13403de3fcf14c17376393a17b8d1364960cac90 Mon Sep 17 00:00:00 2001 From: Gabriel Almeida Date: Mon, 22 May 2023 08:39:39 -0300 Subject: [PATCH 37/50] =?UTF-8?q?=F0=9F=9A=80=20feat(App.tsx):=20add=20ver?= =?UTF-8?q?sion=20number=20to=20the=20footer=20The=20version=20number=20is?= =?UTF-8?q?=20now=20displayed=20in=20the=20footer=20of=20the=20application?= =?UTF-8?q?.=20The=20version=20number=20is=20fetched=20from=20the=20server?= =?UTF-8?q?=20using=20the=20/version=20endpoint=20and=20displayed=20in=20t?= =?UTF-8?q?he=20footer.=20This=20allows=20users=20to=20easily=20identify?= =?UTF-8?q?=20which=20version=20of=20the=20application=20they=20are=20usin?= =?UTF-8?q?g.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/src/App.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/App.tsx b/src/frontend/src/App.tsx index 69b41fdf4..de2d5dc68 100644 --- a/src/frontend/src/App.tsx +++ b/src/frontend/src/App.tsx @@ -46,6 +46,15 @@ export default function App() { }> >([]); + // Initialize state variable for the version + const [version, setVersion] = useState(""); + useEffect(() => { + fetch("/version") + .then((res) => res.json()) + .then((data) => { + setVersion(data.version); + }); + }, []); // Use effect hook to update alertsList when a new alert is added useEffect(() => { // If there is an error alert open with data, add it to the alertsList @@ -158,9 +167,10 @@ export default function App() { - Created by Logspace + {version &&
โ›“๏ธ LangFlow v{version}
} +
Created by Logspace
); From 802e5ec31aac89162200b69a3748a6efca208563 Mon Sep 17 00:00:00 2001 From: Gabriel Almeida Date: Mon, 22 May 2023 16:44:36 -0300 Subject: [PATCH 38/50] Format --- .../src/modals/chatModal/chatInput/index.tsx | 96 ++++++++++--------- 1 file changed, 49 insertions(+), 47 deletions(-) diff --git a/src/frontend/src/modals/chatModal/chatInput/index.tsx b/src/frontend/src/modals/chatModal/chatInput/index.tsx index 1bea659ca..2fb600068 100644 --- a/src/frontend/src/modals/chatModal/chatInput/index.tsx +++ b/src/frontend/src/modals/chatModal/chatInput/index.tsx @@ -3,53 +3,55 @@ import { classNames } from "../../../utils"; import { useRef } from "react"; export default function ChatInput({ - lockChat, - chatValue, - sendMessage, - setChatValue, + lockChat, + chatValue, + sendMessage, + setChatValue, }: { - lockChat: boolean; - chatValue: string; - sendMessage: Function; - setChatValue: Function; + lockChat: boolean; + chatValue: string; + sendMessage: Function; + setChatValue: Function; }) { - const inputRef = useRef(null); - return ( - <> -