From 1d22e8c97a97b18a98f2d36ef4507dea74dfba4b Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Mon, 3 Jul 2023 09:12:59 -0300 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=94=A7=20chore(chat.py):=20add=20miss?= =?UTF-8?q?ing=20build=20step=20for=20root=20node=20in=20graph=20?= =?UTF-8?q?=F0=9F=93=9D=20docs(chat.py):=20explain=20the=20need=20for=20bu?= =?UTF-8?q?ilding=20the=20root=20node=20before=20the=20rest=20of=20the=20g?= =?UTF-8?q?raph=20The=20root=20node=20in=20the=20graph=20was=20not=20being?= =?UTF-8?q?=20built=20before=20the=20rest=20of=20the=20graph,=20which=20ca?= =?UTF-8?q?used=20issues=20when=20certain=20nodes=20required=20parameters?= =?UTF-8?q?=20that=20were=20not=20connected=20to=20them.=20By=20adding=20t?= =?UTF-8?q?he=20missing=20build=20step=20for=20the=20root=20node,=20we=20e?= =?UTF-8?q?nsure=20that=20all=20necessary=20connections=20and=20parameters?= =?UTF-8?q?=20are=20properly=20set=20up=20before=20building=20the=20rest?= =?UTF-8?q?=20of=20the=20graph.=20This=20improves=20the=20overall=20functi?= =?UTF-8?q?onality=20and=20reliability=20of=20the=20chat=20module.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/api/v1/chat.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/backend/langflow/api/v1/chat.py b/src/backend/langflow/api/v1/chat.py index bf1b52058..e47c31694 100644 --- a/src/backend/langflow/api/v1/chat.py +++ b/src/backend/langflow/api/v1/chat.py @@ -113,6 +113,14 @@ async def stream_build(flow_id: str): number_of_nodes = len(graph.nodes) flow_data_store[flow_id]["status"] = BuildStatus.IN_PROGRESS + # To deal with the ZeroShotAgent case + # we need to build the root node first + # and then the rest of the graph + # This is a big problem because certain nodes require + # params that are not connected to it. + # We should consider connecting the tools to the ZeroShotPrompt + graph.build() + for i, vertex in enumerate(graph.generator_build(), 1): try: log_dict = { From 7d7db02fb660dbb22844ffedaceca833e7c4ec95 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Mon, 3 Jul 2023 09:17:01 -0300 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=94=96=20chore(pyproject.toml):=20upd?= =?UTF-8?q?ate=20package=20version=20to=200.2.11=20=E2=AC=86=EF=B8=8F=20ch?= =?UTF-8?q?ore(pyproject.toml):=20update=20fastapi=20dependency=20to=20ver?= =?UTF-8?q?sion=200.99.0=20The=20package=20version=20has=20been=20updated?= =?UTF-8?q?=20from=200.2.10=20to=200.2.11.=20This=20change=20reflects=20th?= =?UTF-8?q?e=20new=20version=20of=20the=20package.=20Additionally,=20the?= =?UTF-8?q?=20fastapi=20dependency=20has=20been=20updated=20from=20version?= =?UTF-8?q?=200.98.0=20to=200.99.0=20to=20ensure=20compatibility=20with=20?= =?UTF-8?q?the=20latest=20version=20of=20fastapi.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- poetry.lock | 21 +++++++++++---------- pyproject.toml | 4 ++-- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/poetry.lock b/poetry.lock index 0760411e8..7c08dfd02 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1294,14 +1294,14 @@ files = [ [[package]] name = "exceptiongroup" -version = "1.1.1" +version = "1.1.2" description = "Backport of PEP 654 (exception groups)" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "exceptiongroup-1.1.1-py3-none-any.whl", hash = "sha256:232c37c63e4f682982c8b6459f33a8981039e5fb8756b2074364e5055c498c9e"}, - {file = "exceptiongroup-1.1.1.tar.gz", hash = "sha256:d484c3090ba2889ae2928419117447a14daf3c1231d5e30d0aae34f354f01785"}, + {file = "exceptiongroup-1.1.2-py3-none-any.whl", hash = "sha256:e346e69d186172ca7cf029c8c1d16235aa0e04035e5750b4b95039e65204328f"}, + {file = "exceptiongroup-1.1.2.tar.gz", hash = "sha256:12c3e887d6485d16943a309616de20ae5582633e0a2eda17f4e10fd61c1e8af5"}, ] [package.extras] @@ -1374,19 +1374,20 @@ importlib-resources = {version = ">=5.0", markers = "python_version < \"3.10\""} [[package]] name = "fastapi" -version = "0.98.0" +version = "0.99.1" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "fastapi-0.98.0-py3-none-any.whl", hash = "sha256:f4165fb1fe3610c52cb1b8282c1480de9c34bc270f56a965aa93a884c350d605"}, - {file = "fastapi-0.98.0.tar.gz", hash = "sha256:0d3c18886f652038262b5898fec6b09f4ca92ee23e9d9b1d1d24e429f84bf27b"}, + {file = "fastapi-0.99.1-py3-none-any.whl", hash = "sha256:976df7bab51ac7beda9f68c4513b8c4490b5c1135c72aafd0a5ee4023ec5282e"}, + {file = "fastapi-0.99.1.tar.gz", hash = "sha256:ac78f717cd80d657bd183f94d33b9bda84aa376a46a9dab513586b8eef1dc6fc"}, ] [package.dependencies] pydantic = ">=1.7.4,<1.8 || >1.8,<1.8.1 || >1.8.1,<2.0.0" starlette = ">=0.27.0,<0.28.0" +typing-extensions = ">=4.5.0" [package.extras] all = ["email-validator (>=1.1.1)", "httpx (>=0.23.0)", "itsdangerous (>=1.1.0)", "jinja2 (>=2.11.2)", "orjson (>=3.2.1)", "python-multipart (>=0.0.5)", "pyyaml (>=5.3.1)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0)", "uvicorn[standard] (>=0.12.0)"] @@ -5218,14 +5219,14 @@ diagrams = ["jinja2", "railroad-diagrams"] [[package]] name = "pypdf" -version = "3.11.1" +version = "3.12.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.11.1-py3-none-any.whl", hash = "sha256:2afc8914355a784fb184f60ae82fe10f9b992aa0733b705f0746966e470f98bd"}, - {file = "pypdf-3.11.1.tar.gz", hash = "sha256:198c4d0231525d0b730cbbd11a5fc7d9a2e410dfc8ae2928c8de000b7ef149c5"}, + {file = "pypdf-3.12.0-py3-none-any.whl", hash = "sha256:826ad4681660394d7a5742fe8380168cf13058e27b826b7f5b798e994cb77b38"}, + {file = "pypdf-3.12.0.tar.gz", hash = "sha256:cebac920db0698369f49c389018858a5436862bf3c45b64b10c55c008878db95"}, ] [package.dependencies] @@ -7830,4 +7831,4 @@ deploy = ["langchain-serve"] [metadata] lock-version = "2.0" python-versions = ">=3.9,<3.11" -content-hash = "3b615d7e85c445b293174b2cb1d395e375edce224c0da51e03c3767c4892e662" +content-hash = "814dc6b89b345e3ea08c7b7dc1fb29e3f8484070e3ad67030eb67566b33f12b0" diff --git a/pyproject.toml b/pyproject.toml index a9df0a27a..d02b284cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "langflow" -version = "0.2.10" +version = "0.2.11" description = "A Python package with a built-in web application" authors = ["Logspace "] maintainers = [ @@ -23,7 +23,7 @@ langflow = "langflow.__main__:main" [tool.poetry.dependencies] python = ">=3.9,<3.11" -fastapi = "^0.98.0" +fastapi = "^0.99.0" uvicorn = "^0.22.0" beautifulsoup4 = "^4.12.2" google-search-results = "^2.4.1"