From b16b9d687becfce6e2fc301d702bf63d2d8110b8 Mon Sep 17 00:00:00 2001 From: Gabriel Ferreira Rosalino Date: Sun, 28 May 2023 02:10:31 -0300 Subject: [PATCH 01/12] feat: SlackDirectoryLoader --- src/backend/langflow/config.yaml | 1 + src/backend/langflow/interface/document_loaders/base.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/backend/langflow/config.yaml b/src/backend/langflow/config.yaml index b1da1b622..9f069d2f4 100644 --- a/src/backend/langflow/config.yaml +++ b/src/backend/langflow/config.yaml @@ -42,6 +42,7 @@ documentloaders: - IMSDbLoader - GitbookLoader - ReadTheDocsLoader + - SlackDirectoryLoader embeddings: - OpenAIEmbeddings - HuggingFaceEmbeddings diff --git a/src/backend/langflow/interface/document_loaders/base.py b/src/backend/langflow/interface/document_loaders/base.py index aab017c0f..35a7c7add 100644 --- a/src/backend/langflow/interface/document_loaders/base.py +++ b/src/backend/langflow/interface/document_loaders/base.py @@ -89,6 +89,9 @@ class DocumentLoaderCreator(LangChainTypeCreator): "UnstructuredWordDocumentLoader": build_file_path_template( suffixes=[".docx", ".doc"], fileTypes=["docx", "doc"] ), + "SlackDirectoryLoader": build_file_path_template( + suffixes=[".zip"], fileTypes=["zip"] + ), } if name in file_path_templates: From c2027898de8d1500c36aa7547d1a23c09b58519f Mon Sep 17 00:00:00 2001 From: Gabriel Almeida Date: Sun, 28 May 2023 17:14:49 -0300 Subject: [PATCH 02/12] =?UTF-8?q?=F0=9F=90=9B=20fix(config.yaml):=20add=20?= =?UTF-8?q?CTransformers=20to=20the=20list=20of=20supported=20llms=20?= =?UTF-8?q?=F0=9F=90=9B=20fix(utils.py):=20fix=20setting=20of=20streaming?= =?UTF-8?q?=20option=20for=20llm=20=F0=9F=8E=A8=20style(llms.py):=20add=20?= =?UTF-8?q?model=5Ffile=20and=20model=5Ftype=20fields=20to=20the=20list=20?= =?UTF-8?q?of=20non-advanced=20fields=20The=20first=20change=20adds=20CTra?= =?UTF-8?q?nsformers=20to=20the=20list=20of=20supported=20llms=20in=20the?= =?UTF-8?q?=20config.yaml=20file.=20The=20second=20change=20fixes=20a=20bu?= =?UTF-8?q?g=20in=20the=20try=5Fsetting=5Fstreaming=5Foptions=20function?= =?UTF-8?q?=20in=20utils.py=20where=20the=20streaming=20option=20was=20not?= =?UTF-8?q?=20being=20set=20correctly.=20The=20third=20change=20is=20a=20s?= =?UTF-8?q?tyle=20change=20that=20adds=20the=20model=5Ffile=20and=20model?= =?UTF-8?q?=5Ftype=20fields=20to=20the=20list=20of=20non-advanced=20fields?= =?UTF-8?q?=20in=20the=20LLMFrontendNode=20class=20in=20llms.py.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/config.yaml | 4 ++-- src/backend/langflow/interface/utils.py | 4 ++-- src/backend/langflow/template/frontend_node/llms.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/backend/langflow/config.yaml b/src/backend/langflow/config.yaml index b1da1b622..18bdaf9e2 100644 --- a/src/backend/langflow/config.yaml +++ b/src/backend/langflow/config.yaml @@ -45,13 +45,13 @@ documentloaders: embeddings: - OpenAIEmbeddings - HuggingFaceEmbeddings - llms: - OpenAI # - AzureOpenAI - ChatOpenAI - HuggingFaceHub - LlamaCpp + - CTransformers memories: - ConversationBufferMemory - ConversationSummaryMemory @@ -113,7 +113,7 @@ vectorstores: - Qdrant - Weaviate wrappers: - - RequestsWrapper # Wait more tests + - RequestsWrapper # - ChatPromptTemplate # - SystemMessagePromptTemplate # - HumanMessagePromptTemplate diff --git a/src/backend/langflow/interface/utils.py b/src/backend/langflow/interface/utils.py index 7368fda3e..2b7c5acd1 100644 --- a/src/backend/langflow/interface/utils.py +++ b/src/backend/langflow/interface/utils.py @@ -44,7 +44,7 @@ def try_setting_streaming_options(langchain_object, websocket): langchain_object.llm_chain, "llm" ): llm = langchain_object.llm_chain.llm - if isinstance(llm, BaseLanguageModel): - llm.streaming = bool(hasattr(llm, "streaming")) + if isinstance(llm, BaseLanguageModel) and hasattr(llm, "streaming"): + llm.streaming = True return langchain_object diff --git a/src/backend/langflow/template/frontend_node/llms.py b/src/backend/langflow/template/frontend_node/llms.py index 4dc32dff1..272770e2e 100644 --- a/src/backend/langflow/template/frontend_node/llms.py +++ b/src/backend/langflow/template/frontend_node/llms.py @@ -43,7 +43,7 @@ class LLMFrontendNode(FrontendNode): field.field_type = "code" field.advanced = True field.show = True - elif field.name in ["model_name", "temperature"]: + elif field.name in ["model_name", "temperature", "model_file", "model_type"]: field.advanced = False field.show = True From f315d78f14871b99c94ec389cecc69f5e31c978f Mon Sep 17 00:00:00 2001 From: Gabriel Almeida Date: Sun, 28 May 2023 17:15:10 -0300 Subject: [PATCH 03/12] =?UTF-8?q?=F0=9F=94=BA=20chore(pyproject.toml):=20u?= =?UTF-8?q?pdate=20langchain=20dependency=20from=200.0.176=20to=200.0.183?= =?UTF-8?q?=20=E2=9C=A8=20feat(pyproject.toml):=20add=20ctransformers=20de?= =?UTF-8?q?pendency=20to=20support=20text=20classification=20tasks=20The?= =?UTF-8?q?=20langchain=20dependency=20has=20been=20updated=20to=20version?= =?UTF-8?q?=200.0.183=20to=20ensure=20that=20the=20latest=20features=20and?= =?UTF-8?q?=20bug=20fixes=20are=20available.=20The=20ctransformers=20depen?= =?UTF-8?q?dency=20has=20been=20added=20to=20support=20text=20classificati?= =?UTF-8?q?on=20tasks.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- poetry.lock | 37 +++++++++++++++++++++++++++---------- pyproject.toml | 3 ++- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/poetry.lock b/poetry.lock index aad835dc1..201830ac9 100644 --- a/poetry.lock +++ b/poetry.lock @@ -876,6 +876,24 @@ test = ["iso8601", "pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-co test-randomorder = ["pytest-randomly"] tox = ["tox"] +[[package]] +name = "ctransformers" +version = "0.2.2" +description = "Python bindings for the Transformer models implemented in C/C++ using GGML library." +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "ctransformers-0.2.2-py3-none-any.whl", hash = "sha256:bf682dd0293dd87911c9a9a1169a4873ff55baebc16d465c6029c77f11b18cf6"}, + {file = "ctransformers-0.2.2.tar.gz", hash = "sha256:1fc36b3fde36d9fd3cb69e48993315bb1f5f54ae552720eb909dc4b3a131c743"}, +] + +[package.dependencies] +huggingface-hub = "*" + +[package.extras] +tests = ["pytest"] + [[package]] name = "dataclasses-json" version = "0.5.7" @@ -2293,14 +2311,14 @@ test = ["ipykernel", "pre-commit", "pytest", "pytest-cov", "pytest-timeout"] [[package]] name = "langchain" -version = "0.0.176" +version = "0.0.183" description = "Building applications with LLMs through composability" category = "main" optional = false python-versions = ">=3.8.1,<4.0" files = [ - {file = "langchain-0.0.176-py3-none-any.whl", hash = "sha256:b2a1958ed07d884869b4bdaa28d63a005787e7f4938d2bbe984b3662827db861"}, - {file = "langchain-0.0.176.tar.gz", hash = "sha256:25f2875d48efab9b32affbe886b85580b1a9df0fb5ae54798eb28aeafba60bec"}, + {file = "langchain-0.0.183-py3-none-any.whl", hash = "sha256:d98e56bf5189599f6500d59908f85b5a6cdf65545e34b41165c7c98beb1ccd0e"}, + {file = "langchain-0.0.183.tar.gz", hash = "sha256:ec9712ae9d11b14f02e703f123d9493f82d49fd80e86df4ff4014df2af06aeca"}, ] [package.dependencies] @@ -2317,14 +2335,13 @@ 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)", "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)"] +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-ai-formrecognizer (>=3.2.1,<4.0.0)", "azure-ai-vision (>=0.11.1b1,<0.12.0)", "azure-cognitiveservices-speech (>=1.28.0,<2.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[hnswlib] (>=0.32.0,<0.33.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)", "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)", "langkit (>=0.0.1.dev3,<0.1.0)", "lark (>=1.1.5,<2.0.0)", "lxml (>=4.9.2,<5.0.0)", "manifest-ml (>=0.0.1,<0.0.2)", "momento (>=1.5.0,<2.0.0)", "neo4j (>=5.8.1,<6.0.0)", "networkx (>=2.6.3,<3.0.0)", "nlpcloud (>=1,<2)", "nltk (>=3,<4)", "nomic (>=1.0.43,<2.0.0)", "openai (>=0,<1)", "openlm (>=0.0.5,<0.0.6)", "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)", "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)", "requests-toolbelt (>=1.0.0,<2.0.0)", "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-ai-formrecognizer (>=3.2.1,<4.0.0)", "azure-ai-vision (>=0.11.1b1,<0.12.0)", "azure-cognitiveservices-speech (>=1.28.0,<2.0.0)", "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)"] +docarray = ["docarray[hnswlib] (>=0.32.0,<0.33.0)"] embeddings = ["sentence-transformers (>=2,<3)"] -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)"] +extended-testing = ["atlassian-python-api (>=3.36.0,<4.0.0)", "beautifulsoup4 (>=4,<5)", "bibtexparser (>=1.4.0,<2.0.0)", "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)", "scikit-learn (>=1.2.2,<2.0.0)", "telethon (>=1.28.5,<2.0.0)", "tqdm (>=4.48.0)", "zep-python (>=0.30,<0.31)"] +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)", "openlm (>=0.0.5,<0.0.6)", "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)"] @@ -6133,4 +6150,4 @@ deploy = ["langchain-serve"] [metadata] lock-version = "2.0" python-versions = ">=3.9,<3.12" -content-hash = "abbb024a67e3326821999f9a0a6164b13e877b0b72d1cd6912ca694c83fffa22" +content-hash = "76ed90caa5b359e5c367272e7db37230e8dea200e7171f1ccfc2015eacebe1b0" diff --git a/pyproject.toml b/pyproject.toml index 1cb6f3581..f261aea9b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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.176" +langchain = "^0.0.183" openai = "^0.27.2" types-pyyaml = "^6.0.12.8" dill = "^0.3.6" @@ -55,6 +55,7 @@ websockets = "^11.0.3" weaviate-client = "^3.19.2" jina = "3.15.2" sentence-transformers = "^2.2.2" +ctransformers = "^0.2.2" [tool.poetry.group.dev.dependencies] black = "^23.1.0" From 38cc3af18d4cda467c4a9952007054ee857e4809 Mon Sep 17 00:00:00 2001 From: Gabriel Almeida Date: Mon, 29 May 2023 14:35:18 -0300 Subject: [PATCH 04/12] =?UTF-8?q?=F0=9F=94=BA=20chore(pyproject.toml):=20u?= =?UTF-8?q?pdate=20langchain=20and=20langchain-serve=20dependencies=20The?= =?UTF-8?q?=20langchain=20and=20langchain-serve=20dependencies=20have=20be?= =?UTF-8?q?en=20updated=20to=20versions=200.0.184=20and=200.0.38=20respect?= =?UTF-8?q?ively.=20This=20update=20may=20include=20bug=20fixes,=20perform?= =?UTF-8?q?ance=20improvements,=20or=20new=20features.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- poetry.lock | 26 ++++++++++++++------------ pyproject.toml | 4 ++-- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/poetry.lock b/poetry.lock index ba2611506..af757d4b6 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2311,14 +2311,14 @@ test = ["ipykernel", "pre-commit", "pytest", "pytest-cov", "pytest-timeout"] [[package]] name = "langchain" -version = "0.0.183" +version = "0.0.184" description = "Building applications with LLMs through composability" category = "main" optional = false python-versions = ">=3.8.1,<4.0" files = [ - {file = "langchain-0.0.183-py3-none-any.whl", hash = "sha256:d98e56bf5189599f6500d59908f85b5a6cdf65545e34b41165c7c98beb1ccd0e"}, - {file = "langchain-0.0.183.tar.gz", hash = "sha256:ec9712ae9d11b14f02e703f123d9493f82d49fd80e86df4ff4014df2af06aeca"}, + {file = "langchain-0.0.184-py3-none-any.whl", hash = "sha256:819513b3acbd32ad24a55e48e0cabc8f60e09bb4293ca5b655d18e6d24353940"}, + {file = "langchain-0.0.184.tar.gz", hash = "sha256:e02a73b5cac889e761fc11c12297d4479a9727287c51a251ca2669a8a79ae348"}, ] [package.dependencies] @@ -2348,13 +2348,13 @@ text-helpers = ["chardet (>=5.1.0,<6.0.0)"] [[package]] name = "langchain-serve" -version = "0.0.33" +version = "0.0.38" description = "Langchain Serve - serve your langchain apps on Jina AI Cloud." category = "main" optional = true python-versions = "*" files = [ - {file = "langchain-serve-0.0.33.tar.gz", hash = "sha256:89396d932c75230ddd7c802824fc766df1ac95872c1a8f2da68d0ec8a54f761a"}, + {file = "langchain-serve-0.0.38.tar.gz", hash = "sha256:649b8e26eebe6b33960c081b388fb7118acbfdc00f97dd935a580ab88aca53d6"}, ] [package.dependencies] @@ -2367,6 +2367,8 @@ nest-asyncio = "*" requests = "*" textual = "*" toml = "*" +typing_extensions = "4.5.0" +typing-inspect = "0.8.0" [package.extras] test = ["psutil", "pytest", "pytest-asyncio"] @@ -5490,14 +5492,14 @@ files = [ [[package]] name = "types-requests" -version = "2.31.0.0" +version = "2.31.0.1" description = "Typing stubs for requests" category = "dev" optional = false python-versions = "*" files = [ - {file = "types-requests-2.31.0.0.tar.gz", hash = "sha256:c1c29d20ab8d84dff468d7febfe8e0cb0b4664543221b386605e14672b44ea25"}, - {file = "types_requests-2.31.0.0-py3-none-any.whl", hash = "sha256:7c5cea7940f8e92ec560bbc468f65bf684aa3dcf0554a6f8c4710f5f708dc598"}, + {file = "types-requests-2.31.0.1.tar.gz", hash = "sha256:3de667cffa123ce698591de0ad7db034a5317457a596eb0b4944e5a9d9e8d1ac"}, + {file = "types_requests-2.31.0.1-py3-none-any.whl", hash = "sha256:afb06ef8f25ba83d59a1d424bd7a5a939082f94b94e90ab5e6116bd2559deaa3"}, ] [package.dependencies] @@ -5529,14 +5531,14 @@ files = [ [[package]] name = "typing-inspect" -version = "0.9.0" +version = "0.8.0" description = "Runtime inspection utilities for typing module." category = "main" optional = false python-versions = "*" files = [ - {file = "typing_inspect-0.9.0-py3-none-any.whl", hash = "sha256:9ee6fc59062311ef8547596ab6b955e1b8aa46242d854bfc78f4f6b0eff35f9f"}, - {file = "typing_inspect-0.9.0.tar.gz", hash = "sha256:b23fc42ff6f6ef6954e4852c1fb512cdd18dbea03134f91f856a95ccc9461f78"}, + {file = "typing_inspect-0.8.0-py3-none-any.whl", hash = "sha256:5fbf9c1e65d4fa01e701fe12a5bca6c6e08a4ffd5bc60bfac028253a447c5188"}, + {file = "typing_inspect-0.8.0.tar.gz", hash = "sha256:8b1ff0c400943b6145df8119c41c244ca8207f1f10c9c057aeed1560e4806e3d"}, ] [package.dependencies] @@ -6150,4 +6152,4 @@ deploy = ["langchain-serve"] [metadata] lock-version = "2.0" python-versions = ">=3.9,<3.12" -content-hash = "e27db1a183064e9181241ce688ee70a4fee4b5df7d3ebf4b6c13eae8fffe4dcc" +content-hash = "c51c9c7aa21fbe949ea9218412f9979064c4dd8a7fa23da76347a35333306a6e" diff --git a/pyproject.toml b/pyproject.toml index 22795ef37..3a753e3b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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.183" +langchain = "^0.0.184" openai = "^0.27.7" types-pyyaml = "^6.0.12.8" dill = "^0.3.6" @@ -49,7 +49,7 @@ psycopg2-binary = "^2.9.6" pyarrow = "^11.0.0" tiktoken = "^0.3.3" wikipedia = "^1.4.0" -langchain-serve = { version = "^0.0.33", optional = true } +langchain-serve = { version = "^0.0.38", optional = true } qdrant-client = "^1.2.0" websockets = "^11.0.3" weaviate-client = "^3.19.2" From 20a438428f93a596d8a93ce3a84e79f742ce4d77 Mon Sep 17 00:00:00 2001 From: Gabriel Almeida Date: Mon, 29 May 2023 14:35:41 -0300 Subject: [PATCH 05/12] =?UTF-8?q?=F0=9F=94=A7=20chore(frontend):=20format?= =?UTF-8?q?=20code=20with=20prettier=20The=20changes=20in=20this=20commit?= =?UTF-8?q?=20are=20purely=20cosmetic,=20as=20the=20code=20has=20been=20fo?= =?UTF-8?q?rmatted=20with=20prettier=20to=20improve=20its=20readability=20?= =?UTF-8?q?and=20consistency.=20No=20functional=20changes=20have=20been=20?= =?UTF-8?q?made.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/CustomNodes/GenericNode/index.tsx | 10 +++- .../src/modals/genericModal/index.tsx | 55 ++++++++++--------- .../extraSidebarComponent/index.tsx | 2 +- src/frontend/src/utils.ts | 53 ++++++++++-------- 4 files changed, 66 insertions(+), 54 deletions(-) diff --git a/src/frontend/src/CustomNodes/GenericNode/index.tsx b/src/frontend/src/CustomNodes/GenericNode/index.tsx index 64665bf73..572210728 100644 --- a/src/frontend/src/CustomNodes/GenericNode/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/index.tsx @@ -11,7 +11,13 @@ import { ExclamationCircleIcon, } from "@heroicons/react/24/solid"; -import { classNames, nodeColors, nodeIcons, toNormalCase, toTitleCase } from "../../utils"; +import { + classNames, + nodeColors, + nodeIcons, + toNormalCase, + toTitleCase, +} from "../../utils"; import ParameterComponent from "./components/parameterComponent"; import { typesContext } from "../../contexts/typesContext"; import { useContext, useState, useEffect, useRef, Fragment } from "react"; @@ -106,7 +112,7 @@ export default function GenericNode({ }} /> -
{data.type}
+
{data.type}
void; value: string; @@ -121,40 +121,41 @@ export default function PromptAreaModal({ switch (myModalType) { case 1: setModalOpen(false); - break; + break; case 2: checkPrompt(myValue) - .then((apiReturn) => { - if (apiReturn.data) { - let inputVariables = - apiReturn.data.input_variables; - if (inputVariables.length === 0) { + .then((apiReturn) => { + if (apiReturn.data) { + let inputVariables = + apiReturn.data.input_variables; + if (inputVariables.length === 0) { + setErrorData({ + title: + "The template you are attempting to use does not contain any variables for data entry.", + }); + } else { + setSuccessData({ + title: "Prompt is ready", + }); + setModalOpen(false); + setValue(myValue); + } + } else { setErrorData({ title: - "The template you are attempting to use does not contain any variables for data entry.", + "Something went wrong, please try again", }); - } else { - setSuccessData({ - title: "Prompt is ready", - }); - setModalOpen(false); - setValue(myValue); } - } else { - setErrorData({ - title: "Something went wrong, please try again", + }) + .catch((error) => { + return setErrorData({ + title: + "There is something wrong with this prompt, please review it", + list: [error.response.data.detail], }); - } - }) - .catch((error) => { - return setErrorData({ - title: - "There is something wrong with this prompt, please review it", - list: [error.response.data.detail], }); - }); - break; - + break; + default: break; } diff --git a/src/frontend/src/pages/FlowPage/components/extraSidebarComponent/index.tsx b/src/frontend/src/pages/FlowPage/components/extraSidebarComponent/index.tsx index 41f98f299..1a9e721f7 100644 --- a/src/frontend/src/pages/FlowPage/components/extraSidebarComponent/index.tsx +++ b/src/frontend/src/pages/FlowPage/components/extraSidebarComponent/index.tsx @@ -34,7 +34,7 @@ export default function ExtraSidebar() { {Object.keys(data[d]) .sort() .map((t: string, k) => ( - 21 ? t : ''} placement="right"> + 21 ? t : ""} placement="right">
) { export enum TypeModal { TEXT = 1, - PROMPT = 2 + PROMPT = 2, } export const textColors = { @@ -499,33 +499,38 @@ export const programmingLanguages: languageMap = { }; export function toTitleCase(str: string) { - let result = str - .split("_") - .map((word, index) => { - if (index === 0) { + let result = str + .split("_") + .map((word, index) => { + if (index === 0) { + return checkUpperWords( + word[0].toUpperCase() + word.slice(1).toLowerCase() + ); + } + return checkUpperWords(word.toLowerCase()); + }) + .join(" "); - return checkUpperWords(word[0].toUpperCase() + word.slice(1).toLowerCase()); - } - return checkUpperWords(word.toLowerCase()); - }) - .join(" "); - - return result - .split("-") - .map((word, index) => { - if (index === 0) { - return checkUpperWords(word[0].toUpperCase() + word.slice(1).toLowerCase()); - } - return checkUpperWords(word.toLowerCase()); - }) - .join(" "); + return result + .split("-") + .map((word, index) => { + if (index === 0) { + return checkUpperWords( + word[0].toUpperCase() + word.slice(1).toLowerCase() + ); + } + return checkUpperWords(word.toLowerCase()); + }) + .join(" "); } export const upperCaseWords: string[] = ["llm", "uri"]; export function checkUpperWords(str: string) { - const words = str.split(' ').map((word) => { - return upperCaseWords.includes(word.toLowerCase()) ? word.toUpperCase() : word[0].toUpperCase() + word.slice(1).toLowerCase(); + const words = str.split(" ").map((word) => { + return upperCaseWords.includes(word.toLowerCase()) + ? word.toUpperCase() + : word[0].toUpperCase() + word.slice(1).toLowerCase(); }); - return words.join(' '); -} \ No newline at end of file + return words.join(" "); +} From 3614296fd84b832b78c6eaae0de4607785901f3a Mon Sep 17 00:00:00 2001 From: Gabriel Almeida Date: Mon, 29 May 2023 15:49:01 -0300 Subject: [PATCH 06/12] =?UTF-8?q?=F0=9F=9A=80=20feat(langflow):=20add=20su?= =?UTF-8?q?pport=20for=20extra=20fields=20in=20VectorStoreFrontendNode=20?= =?UTF-8?q?=E2=9C=A8=20feat(template):=20add=20method=20to=20add=20fields?= =?UTF-8?q?=20to=20a=20template=20The=20VectorStoreFrontendNode=20now=20su?= =?UTF-8?q?pports=20adding=20extra=20fields=20to=20its=20template.=20The?= =?UTF-8?q?=20add=5Fextra=5Ffields=20method=20is=20called=20after=20the=20?= =?UTF-8?q?node=20is=20loaded=20and=20adds=20the=20weaviate=5Furl=20field?= =?UTF-8?q?=20to=20the=20template=20if=20the=20node=20is=20of=20type=20Wea?= =?UTF-8?q?viate.=20The=20Template=20class=20now=20has=20a=20method=20to?= =?UTF-8?q?=20add=20fields=20to=20a=20template.=20This=20method=20is=20use?= =?UTF-8?q?d=20by=20the=20VectorStoreFrontendNode=20to=20add=20the=20weavi?= =?UTF-8?q?ate=5Furl=20field=20to=20its=20template.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/interface/base.py | 53 ++++++++++--------- .../langflow/template/frontend_node/base.py | 3 ++ .../template/frontend_node/vectorstores.py | 15 ++++++ .../langflow/template/template/base.py | 3 ++ 4 files changed, 49 insertions(+), 25 deletions(-) diff --git a/src/backend/langflow/interface/base.py b/src/backend/langflow/interface/base.py index 48d6dccc4..08cbc6681 100644 --- a/src/backend/langflow/interface/base.py +++ b/src/backend/langflow/interface/base.py @@ -53,30 +53,33 @@ class LangChainTypeCreator(BaseModel, ABC): signature = self.get_signature(name) if signature is None: logger.error(f"Node {name} not loaded") - return None - if isinstance(signature, FrontendNode): return signature - fields = [ - TemplateField( - name=key, - field_type=value["type"], - required=value.get("required", False), - placeholder=value.get("placeholder", ""), - is_list=value.get("list", False), - show=value.get("show", True), - multiline=value.get("multiline", False), - value=value.get("value", None), - suffixes=value.get("suffixes", []), - file_types=value.get("fileTypes", []), - content=value.get("content", None), + if not isinstance(signature, FrontendNode): + fields = [ + TemplateField( + name=key, + field_type=value["type"], + required=value.get("required", False), + placeholder=value.get("placeholder", ""), + is_list=value.get("list", False), + show=value.get("show", True), + multiline=value.get("multiline", False), + value=value.get("value", None), + suffixes=value.get("suffixes", []), + file_types=value.get("fileTypes", []), + content=value.get("content", None), + ) + for key, value in signature["template"].items() + if key != "_type" + ] + template = Template(type_name=name, fields=fields) + signature = self.frontend_node_class( + template=template, + description=signature.get("description", ""), + base_classes=signature["base_classes"], + name=name, ) - for key, value in signature["template"].items() - if key != "_type" - ] - template = Template(type_name=name, fields=fields) - return self.frontend_node_class( - template=template, - description=signature.get("description", ""), - base_classes=signature["base_classes"], - name=name, - ) + + signature.add_extra_fields() + + return signature diff --git a/src/backend/langflow/template/frontend_node/base.py b/src/backend/langflow/template/frontend_node/base.py index 2714cd4ae..cb762f28e 100644 --- a/src/backend/langflow/template/frontend_node/base.py +++ b/src/backend/langflow/template/frontend_node/base.py @@ -24,6 +24,9 @@ class FrontendNode(BaseModel): } } + def add_extra_fields(self) -> None: + pass + @staticmethod def format_field(field: TemplateField, name: Optional[str] = None) -> None: """Formats a given field based on its attributes and value.""" diff --git a/src/backend/langflow/template/frontend_node/vectorstores.py b/src/backend/langflow/template/frontend_node/vectorstores.py index 76f623852..1aefaf10c 100644 --- a/src/backend/langflow/template/frontend_node/vectorstores.py +++ b/src/backend/langflow/template/frontend_node/vectorstores.py @@ -5,6 +5,21 @@ from langflow.template.frontend_node.base import FrontendNode class VectorStoreFrontendNode(FrontendNode): + def add_extra_fields(self) -> None: + if self.template.type_name == "Weaviate": + extra_field = TemplateField( + name="weaviate_url", + field_type="str", + required=True, + placeholder="http://localhost:8080", + show=True, + advanced=False, + multiline=False, + value="http://localhost:8080", + ) + + self.template.add_field(extra_field) + @staticmethod def format_field(field: TemplateField, name: Optional[str] = None) -> None: FrontendNode.format_field(field, name) diff --git a/src/backend/langflow/template/template/base.py b/src/backend/langflow/template/template/base.py index 9279f5efb..52d53007b 100644 --- a/src/backend/langflow/template/template/base.py +++ b/src/backend/langflow/template/template/base.py @@ -23,3 +23,6 @@ class Template(BaseModel): result = {field.name: field.to_dict() for field in self.fields} result["_type"] = self.type_name # type: ignore return result + + def add_field(self, field: TemplateField) -> None: + self.fields.append(field) From 2a07f6368f12c51d5fa693e0ebdcc70f216b98aa Mon Sep 17 00:00:00 2001 From: GMS Date: Mon, 29 May 2023 20:40:17 +0100 Subject: [PATCH 07/12] Add Cohere LLM --- poetry.lock | 61 +++++++++++++++----------------- pyproject.toml | 1 + src/backend/langflow/config.yaml | 2 ++ 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/poetry.lock b/poetry.lock index af757d4b6..80995acba 100644 --- a/poetry.lock +++ b/poetry.lock @@ -717,6 +717,23 @@ pandas = ["pandas"] sqlalchemy = ["sqlalchemy (>1.3.21,<1.4)"] superset = ["apache-superset (>=1.4.1)"] +[[package]] +name = "cohere" +version = "4.6.0" +description = "" +category = "main" +optional = false +python-versions = ">=3.7,<4.0" +files = [ + {file = "cohere-4.6.0-py3-none-any.whl", hash = "sha256:fc60fa73a2d96bdb9f70da4a290d3ede320b74ac01a24c229011049d7cb3511f"}, + {file = "cohere-4.6.0.tar.gz", hash = "sha256:43218a0a40f6fc023e068732994fb631ce5d160a0bc9f9a3a22524b5932f34ea"}, +] + +[package.dependencies] +aiohttp = ">=3.0,<4.0" +backoff = ">=2.0,<3.0" +requests = ">=2.0,<3.0" + [[package]] name = "colorama" version = "0.4.6" @@ -876,24 +893,6 @@ test = ["iso8601", "pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-co test-randomorder = ["pytest-randomly"] tox = ["tox"] -[[package]] -name = "ctransformers" -version = "0.2.2" -description = "Python bindings for the Transformer models implemented in C/C++ using GGML library." -category = "main" -optional = false -python-versions = "*" -files = [ - {file = "ctransformers-0.2.2-py3-none-any.whl", hash = "sha256:bf682dd0293dd87911c9a9a1169a4873ff55baebc16d465c6029c77f11b18cf6"}, - {file = "ctransformers-0.2.2.tar.gz", hash = "sha256:1fc36b3fde36d9fd3cb69e48993315bb1f5f54ae552720eb909dc4b3a131c743"}, -] - -[package.dependencies] -huggingface-hub = "*" - -[package.extras] -tests = ["pytest"] - [[package]] name = "dataclasses-json" version = "0.5.7" @@ -2311,14 +2310,14 @@ test = ["ipykernel", "pre-commit", "pytest", "pytest-cov", "pytest-timeout"] [[package]] name = "langchain" -version = "0.0.184" +version = "0.0.183" description = "Building applications with LLMs through composability" category = "main" optional = false python-versions = ">=3.8.1,<4.0" files = [ - {file = "langchain-0.0.184-py3-none-any.whl", hash = "sha256:819513b3acbd32ad24a55e48e0cabc8f60e09bb4293ca5b655d18e6d24353940"}, - {file = "langchain-0.0.184.tar.gz", hash = "sha256:e02a73b5cac889e761fc11c12297d4479a9727287c51a251ca2669a8a79ae348"}, + {file = "langchain-0.0.183-py3-none-any.whl", hash = "sha256:d98e56bf5189599f6500d59908f85b5a6cdf65545e34b41165c7c98beb1ccd0e"}, + {file = "langchain-0.0.183.tar.gz", hash = "sha256:ec9712ae9d11b14f02e703f123d9493f82d49fd80e86df4ff4014df2af06aeca"}, ] [package.dependencies] @@ -2348,13 +2347,13 @@ text-helpers = ["chardet (>=5.1.0,<6.0.0)"] [[package]] name = "langchain-serve" -version = "0.0.38" +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.38.tar.gz", hash = "sha256:649b8e26eebe6b33960c081b388fb7118acbfdc00f97dd935a580ab88aca53d6"}, + {file = "langchain-serve-0.0.33.tar.gz", hash = "sha256:89396d932c75230ddd7c802824fc766df1ac95872c1a8f2da68d0ec8a54f761a"}, ] [package.dependencies] @@ -2367,8 +2366,6 @@ nest-asyncio = "*" requests = "*" textual = "*" toml = "*" -typing_extensions = "4.5.0" -typing-inspect = "0.8.0" [package.extras] test = ["psutil", "pytest", "pytest-asyncio"] @@ -5492,14 +5489,14 @@ files = [ [[package]] name = "types-requests" -version = "2.31.0.1" +version = "2.31.0.0" description = "Typing stubs for requests" category = "dev" optional = false python-versions = "*" files = [ - {file = "types-requests-2.31.0.1.tar.gz", hash = "sha256:3de667cffa123ce698591de0ad7db034a5317457a596eb0b4944e5a9d9e8d1ac"}, - {file = "types_requests-2.31.0.1-py3-none-any.whl", hash = "sha256:afb06ef8f25ba83d59a1d424bd7a5a939082f94b94e90ab5e6116bd2559deaa3"}, + {file = "types-requests-2.31.0.0.tar.gz", hash = "sha256:c1c29d20ab8d84dff468d7febfe8e0cb0b4664543221b386605e14672b44ea25"}, + {file = "types_requests-2.31.0.0-py3-none-any.whl", hash = "sha256:7c5cea7940f8e92ec560bbc468f65bf684aa3dcf0554a6f8c4710f5f708dc598"}, ] [package.dependencies] @@ -5531,14 +5528,14 @@ files = [ [[package]] name = "typing-inspect" -version = "0.8.0" +version = "0.9.0" description = "Runtime inspection utilities for typing module." category = "main" optional = false python-versions = "*" files = [ - {file = "typing_inspect-0.8.0-py3-none-any.whl", hash = "sha256:5fbf9c1e65d4fa01e701fe12a5bca6c6e08a4ffd5bc60bfac028253a447c5188"}, - {file = "typing_inspect-0.8.0.tar.gz", hash = "sha256:8b1ff0c400943b6145df8119c41c244ca8207f1f10c9c057aeed1560e4806e3d"}, + {file = "typing_inspect-0.9.0-py3-none-any.whl", hash = "sha256:9ee6fc59062311ef8547596ab6b955e1b8aa46242d854bfc78f4f6b0eff35f9f"}, + {file = "typing_inspect-0.9.0.tar.gz", hash = "sha256:b23fc42ff6f6ef6954e4852c1fb512cdd18dbea03134f91f856a95ccc9461f78"}, ] [package.dependencies] @@ -6152,4 +6149,4 @@ deploy = ["langchain-serve"] [metadata] lock-version = "2.0" python-versions = ">=3.9,<3.12" -content-hash = "c51c9c7aa21fbe949ea9218412f9979064c4dd8a7fa23da76347a35333306a6e" +content-hash = "ae4852378416319ee45512e200759438615dc8a4e840369176234dd04ec2a3ec" \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 3a753e3b5..0d3affef3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,6 +56,7 @@ weaviate-client = "^3.19.2" jina = "3.15.2" sentence-transformers = "^2.2.2" ctransformers = "^0.2.2" +cohere = "^4.6.0" [tool.poetry.group.dev.dependencies] diff --git a/src/backend/langflow/config.yaml b/src/backend/langflow/config.yaml index 88c0753c4..045d836f2 100644 --- a/src/backend/langflow/config.yaml +++ b/src/backend/langflow/config.yaml @@ -46,6 +46,7 @@ documentloaders: embeddings: - OpenAIEmbeddings - HuggingFaceEmbeddings + - CohereEmbeddings llms: - OpenAI # - AzureOpenAI @@ -53,6 +54,7 @@ llms: - HuggingFaceHub - LlamaCpp - CTransformers + - Cohere memories: - ConversationBufferMemory - ConversationSummaryMemory From 44d6832163c9fb99e847850834ae82fd3f0459e9 Mon Sep 17 00:00:00 2001 From: GMS Date: Mon, 29 May 2023 20:46:47 +0100 Subject: [PATCH 08/12] Poetry.lock dependencies version fixed --- poetry.lock | 301 ++++++++-------------------------------------------- 1 file changed, 45 insertions(+), 256 deletions(-) diff --git a/poetry.lock b/poetry.lock index 80995acba..f08caeada 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,10 +1,9 @@ -# This file is automatically @generated by Poetry 1.4.0 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.5.0 and should not be changed by hand. [[package]] name = "aiofiles" version = "23.1.0" description = "File support for asyncio." -category = "main" optional = false python-versions = ">=3.7,<4.0" files = [ @@ -16,7 +15,6 @@ files = [ name = "aiohttp" version = "3.8.4" description = "Async http client/server framework (asyncio)" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -125,7 +123,6 @@ speedups = ["Brotli", "aiodns", "cchardet"] name = "aiosignal" version = "1.3.1" description = "aiosignal: a list of registered asynchronous callbacks" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -140,7 +137,6 @@ frozenlist = ">=1.1.0" name = "aiostream" version = "0.4.5" description = "Generator-based operators for asynchronous iteration" -category = "main" optional = false python-versions = "*" files = [ @@ -152,7 +148,6 @@ files = [ name = "anyio" version = "3.7.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -174,7 +169,6 @@ trio = ["trio (<0.22)"] name = "appnope" version = "0.1.3" description = "Disable App Nap on macOS >= 10.9" -category = "dev" optional = false python-versions = "*" files = [ @@ -186,7 +180,6 @@ files = [ name = "argilla" version = "1.3.2" description = "Open-source tool for exploring, labeling, and monitoring data for NLP projects." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -214,7 +207,6 @@ server = ["Deprecated (>=1.2.0,<1.3.0)", "PyYAML (>=5.4.1,<6.1.0)", "aiofiles (> name = "asgiref" version = "3.7.2" description = "ASGI specs, helper code, and adapters" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -232,7 +224,6 @@ tests = ["mypy (>=0.800)", "pytest", "pytest-asyncio"] name = "asttokens" version = "2.2.1" description = "Annotate AST trees with source code positions" -category = "dev" optional = false python-versions = "*" files = [ @@ -250,7 +241,6 @@ test = ["astroid", "pytest"] name = "async-timeout" version = "4.0.2" description = "Timeout context manager for asyncio programs" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -262,7 +252,6 @@ files = [ name = "attrs" version = "23.1.0" description = "Classes Without Boilerplate" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -281,7 +270,6 @@ tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pyte name = "authlib" version = "1.2.0" description = "The ultimate Python library in building OAuth and OpenID Connect servers and clients." -category = "main" optional = false python-versions = "*" files = [ @@ -296,7 +284,6 @@ cryptography = ">=3.2" name = "backcall" version = "0.2.0" description = "Specifications for callback functions passed in to an API" -category = "dev" optional = false python-versions = "*" files = [ @@ -308,7 +295,6 @@ files = [ name = "backoff" version = "2.2.1" description = "Function decoration for backoff and retry" -category = "main" optional = false python-versions = ">=3.7,<4.0" files = [ @@ -320,7 +306,6 @@ files = [ name = "beautifulsoup4" version = "4.12.2" description = "Screen-scraping library" -category = "main" optional = false python-versions = ">=3.6.0" files = [ @@ -339,7 +324,6 @@ lxml = ["lxml"] name = "black" version = "23.3.0" description = "The uncompromising code formatter." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -389,7 +373,6 @@ uvloop = ["uvloop (>=0.15.2)"] name = "cachetools" version = "5.3.1" description = "Extensible memoizing collections and decorators" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -401,7 +384,6 @@ files = [ name = "certifi" version = "2023.5.7" description = "Python package for providing Mozilla's CA Bundle." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -413,7 +395,6 @@ files = [ name = "cffi" version = "1.15.1" description = "Foreign Function Interface for Python calling C code." -category = "main" optional = false python-versions = "*" files = [ @@ -490,7 +471,6 @@ pycparser = "*" name = "chardet" version = "5.1.0" description = "Universal encoding detector for Python 3" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -502,7 +482,6 @@ files = [ name = "charset-normalizer" version = "3.1.0" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -category = "main" optional = false python-versions = ">=3.7.0" files = [ @@ -587,7 +566,6 @@ files = [ name = "chromadb" version = "0.3.25" description = "Chroma." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -616,7 +594,6 @@ uvicorn = {version = ">=0.18.3", extras = ["standard"]} name = "click" version = "8.1.3" description = "Composable command line interface toolkit" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -631,7 +608,6 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""} name = "clickhouse-connect" version = "0.5.25" description = "ClickHouse core driver, SqlAlchemy, and Superset libraries" -category = "main" optional = false python-versions = "~=3.7" files = [ @@ -721,7 +697,6 @@ superset = ["apache-superset (>=1.4.1)"] name = "cohere" version = "4.6.0" description = "" -category = "main" optional = false python-versions = ">=3.7,<4.0" files = [ @@ -738,7 +713,6 @@ requests = ">=2.0,<3.0" name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ @@ -750,7 +724,6 @@ files = [ name = "coloredlogs" version = "15.0.1" description = "Colored terminal output for Python's logging module" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -768,7 +741,6 @@ cron = ["capturer (>=2.4)"] name = "comm" version = "0.1.3" description = "Jupyter Python Comm implementation, for usage in ipykernel, xeus-python etc." -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -788,7 +760,6 @@ typing = ["mypy (>=0.990)"] name = "coverage" version = "7.2.6" description = "Code coverage measurement for Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -855,7 +826,6 @@ toml = ["tomli"] name = "cryptography" version = "40.0.2" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -893,11 +863,27 @@ test = ["iso8601", "pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-co test-randomorder = ["pytest-randomly"] tox = ["tox"] +[[package]] +name = "ctransformers" +version = "0.2.2" +description = "Python bindings for the Transformer models implemented in C/C++ using GGML library." +optional = false +python-versions = "*" +files = [ + {file = "ctransformers-0.2.2-py3-none-any.whl", hash = "sha256:bf682dd0293dd87911c9a9a1169a4873ff55baebc16d465c6029c77f11b18cf6"}, + {file = "ctransformers-0.2.2.tar.gz", hash = "sha256:1fc36b3fde36d9fd3cb69e48993315bb1f5f54ae552720eb909dc4b3a131c743"}, +] + +[package.dependencies] +huggingface-hub = "*" + +[package.extras] +tests = ["pytest"] + [[package]] name = "dataclasses-json" version = "0.5.7" description = "Easily serialize dataclasses to and from JSON" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -917,7 +903,6 @@ dev = ["flake8", "hypothesis", "ipython", "mypy (>=0.710)", "portray", "pytest ( name = "debugpy" version = "1.6.7" description = "An implementation of the Debug Adapter Protocol for Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -945,7 +930,6 @@ files = [ name = "decorator" version = "5.1.1" description = "Decorators for Humans" -category = "main" optional = false python-versions = ">=3.5" files = [ @@ -957,7 +941,6 @@ files = [ name = "deprecated" version = "1.2.14" description = "Python @deprecated decorator to deprecate old python classes, functions or methods." -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -975,7 +958,6 @@ dev = ["PyTest", "PyTest-Cov", "bump2version (<1)", "sphinx (<2)", "tox"] name = "dill" version = "0.3.6" description = "serialize all of python" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -990,7 +972,6 @@ graph = ["objgraph (>=1.7.2)"] name = "docarray" version = "0.21.0" description = "The data structure for unstructured data" -category = "main" optional = false python-versions = "*" files = [ @@ -1019,7 +1000,6 @@ weaviate = ["weaviate-client (>=3.9.0,<3.10.0)"] name = "docker" version = "6.1.2" description = "A Python library for the Docker Engine API." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1041,7 +1021,6 @@ ssh = ["paramiko (>=2.4.3)"] name = "docstring-parser" version = "0.15" description = "Parse Python docstrings in reST, Google and Numpydoc format" -category = "main" optional = false python-versions = ">=3.6,<4.0" files = [ @@ -1053,7 +1032,6 @@ files = [ name = "duckdb" version = "0.8.0" description = "DuckDB embedded database" -category = "main" optional = false python-versions = "*" files = [ @@ -1069,7 +1047,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"}, @@ -1108,7 +1088,6 @@ files = [ name = "ecdsa" version = "0.18.0" description = "ECDSA cryptographic signature library (pure python)" -category = "main" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -1127,7 +1106,6 @@ gmpy2 = ["gmpy2"] name = "et-xmlfile" version = "1.1.0" description = "An implementation of lxml.xmlfile for the standard library" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1139,7 +1117,6 @@ files = [ name = "exceptiongroup" version = "1.1.1" description = "Backport of PEP 654 (exception groups)" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1154,7 +1131,6 @@ test = ["pytest (>=6)"] name = "executing" version = "1.2.0" description = "Get the currently executing AST node of a frame, and other information" -category = "dev" optional = false python-versions = "*" files = [ @@ -1169,7 +1145,6 @@ tests = ["asttokens", "littleutils", "pytest", "rich"] name = "fake-useragent" version = "1.1.3" description = "Up-to-date simple useragent faker with real world database" -category = "main" optional = false python-versions = "*" files = [ @@ -1184,7 +1159,6 @@ importlib-resources = {version = ">=5.0", markers = "python_version < \"3.10\""} name = "fastapi" version = "0.95.2" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1206,7 +1180,6 @@ test = ["anyio[trio] (>=3.2.1,<4.0.0)", "black (==23.1.0)", "coverage[toml] (>=6 name = "filelock" version = "3.12.0" description = "A platform independent file lock." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1222,7 +1195,6 @@ testing = ["covdefaults (>=2.3)", "coverage (>=7.2.3)", "diff-cover (>=7.5)", "p name = "flatbuffers" version = "23.5.26" description = "The FlatBuffers serialization format for Python" -category = "main" optional = false python-versions = "*" files = [ @@ -1234,7 +1206,6 @@ files = [ name = "frozenlist" version = "1.3.3" description = "A list-like structure which implements collections.abc.MutableSequence" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1318,7 +1289,6 @@ files = [ name = "google-api-core" version = "2.11.0" description = "Google API client core library" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1341,7 +1311,6 @@ grpcio-gcp = ["grpcio-gcp (>=0.2.2,<1.0dev)"] name = "google-api-python-client" version = "2.87.0" description = "Google API Client Library for Python" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1350,7 +1319,7 @@ files = [ ] [package.dependencies] -google-api-core = ">=1.31.5,<2.0.0 || >2.3.0,<3.0.0dev" +google-api-core = ">=1.31.5,<2.0.dev0 || >2.3.0,<3.0.0dev" google-auth = ">=1.19.0,<3.0.0dev" google-auth-httplib2 = ">=0.1.0" httplib2 = ">=0.15.0,<1dev" @@ -1360,7 +1329,6 @@ uritemplate = ">=3.0.1,<5" name = "google-auth" version = "2.19.0" description = "Google Authentication Library" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1386,7 +1354,6 @@ requests = ["requests (>=2.20.0,<3.0.0dev)"] name = "google-auth-httplib2" version = "0.1.0" description = "Google Authentication Library: httplib2 transport" -category = "main" optional = false python-versions = "*" files = [ @@ -1403,7 +1370,6 @@ six = "*" name = "google-search-results" version = "2.4.2" description = "Scrape and search localized results from Google, Bing, Baidu, Yahoo, Yandex, Ebay, Homedepot, youtube at scale using SerpApi.com" -category = "main" optional = false python-versions = ">=3.5" files = [ @@ -1417,7 +1383,6 @@ requests = "*" name = "googleapis-common-protos" version = "1.59.0" description = "Common protobufs used in Google APIs" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1435,7 +1400,6 @@ grpc = ["grpcio (>=1.44.0,<2.0.0dev)"] name = "greenlet" version = "2.0.2" description = "Lightweight in-process concurrent programming" -category = "main" optional = false python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*" files = [ @@ -1509,7 +1473,6 @@ test = ["objgraph", "psutil"] name = "grpcio" version = "1.47.5" description = "HTTP/2-based RPC framework" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1571,7 +1534,6 @@ protobuf = ["grpcio-tools (>=1.47.5)"] name = "grpcio-health-checking" version = "1.47.5" description = "Standard Health Checking Service for gRPC" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1587,7 +1549,6 @@ protobuf = ">=3.12.0" name = "grpcio-reflection" version = "1.47.5" description = "Standard Protobuf Reflection Service for gRPC" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1603,7 +1564,6 @@ protobuf = ">=3.12.0" name = "grpcio-tools" version = "1.47.5" description = "Protobuf code generator for gRPC" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1664,7 +1624,6 @@ setuptools = "*" name = "gunicorn" version = "20.1.0" description = "WSGI HTTP Server for UNIX" -category = "main" optional = false python-versions = ">=3.5" files = [ @@ -1685,7 +1644,6 @@ tornado = ["tornado (>=0.2)"] name = "h11" version = "0.14.0" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1697,7 +1655,6 @@ files = [ name = "h2" version = "4.1.0" description = "HTTP/2 State-Machine based protocol implementation" -category = "main" optional = false python-versions = ">=3.6.1" files = [ @@ -1713,7 +1670,6 @@ hyperframe = ">=6.0,<7" name = "hnswlib" version = "0.7.0" description = "hnswlib" -category = "main" optional = false python-versions = "*" files = [ @@ -1727,7 +1683,6 @@ numpy = "*" name = "hpack" version = "4.0.0" description = "Pure-Python HPACK header compression" -category = "main" optional = false python-versions = ">=3.6.1" files = [ @@ -1739,7 +1694,6 @@ files = [ name = "httpcore" version = "0.16.3" description = "A minimal low-level HTTP client." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1751,17 +1705,16 @@ files = [ anyio = ">=3.0,<5.0" certifi = "*" h11 = ">=0.13,<0.15" -sniffio = ">=1.0.0,<2.0.0" +sniffio = "==1.*" [package.extras] http2 = ["h2 (>=3,<5)"] -socks = ["socksio (>=1.0.0,<2.0.0)"] +socks = ["socksio (==1.*)"] [[package]] name = "httplib2" version = "0.22.0" description = "A comprehensive HTTP client library." -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -1776,7 +1729,6 @@ pyparsing = {version = ">=2.4.2,<3.0.0 || >3.0.0,<3.0.1 || >3.0.1,<3.0.2 || >3.0 name = "httptools" version = "0.5.0" description = "A collection of framework independent HTTP protocol utils." -category = "main" optional = false python-versions = ">=3.5.0" files = [ @@ -1830,7 +1782,6 @@ test = ["Cython (>=0.29.24,<0.30.0)"] name = "httpx" version = "0.23.3" description = "The next generation HTTP client." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1847,15 +1798,14 @@ sniffio = "*" [package.extras] brotli = ["brotli", "brotlicffi"] -cli = ["click (>=8.0.0,<9.0.0)", "pygments (>=2.0.0,<3.0.0)", "rich (>=10,<13)"] +cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<13)"] http2 = ["h2 (>=3,<5)"] -socks = ["socksio (>=1.0.0,<2.0.0)"] +socks = ["socksio (==1.*)"] [[package]] name = "huggingface-hub" version = "0.13.4" description = "Client library to download and publish models, datasets and other repos on the huggingface.co hub" -category = "main" optional = false python-versions = ">=3.7.0" files = [ @@ -1886,7 +1836,6 @@ typing = ["types-PyYAML", "types-requests", "types-simplejson", "types-toml", "t name = "humanfriendly" version = "10.0" description = "Human friendly output for text interfaces using Python" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -1901,7 +1850,6 @@ pyreadline3 = {version = "*", markers = "sys_platform == \"win32\" and python_ve name = "hyperframe" version = "6.0.1" description = "HTTP/2 framing layer for Python" -category = "main" optional = false python-versions = ">=3.6.1" files = [ @@ -1913,7 +1861,6 @@ files = [ name = "idna" version = "3.4" description = "Internationalized Domain Names in Applications (IDNA)" -category = "main" optional = false python-versions = ">=3.5" files = [ @@ -1925,7 +1872,6 @@ files = [ name = "importlib-metadata" version = "6.0.1" description = "Read metadata from Python packages" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1945,7 +1891,6 @@ testing = ["flake8 (<5)", "flufl.flake8", "importlib-resources (>=1.3)", "packag name = "importlib-resources" version = "5.12.0" description = "Read resources from Python packages" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1964,7 +1909,6 @@ testing = ["flake8 (<5)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-chec name = "iniconfig" version = "2.0.0" description = "brain-dead simple config-ini parsing" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1976,7 +1920,6 @@ files = [ name = "ipykernel" version = "6.23.1" description = "IPython Kernel for Jupyter" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1990,7 +1933,7 @@ comm = ">=0.1.1" debugpy = ">=1.6.5" ipython = ">=7.23.1" jupyter-client = ">=6.1.12" -jupyter-core = ">=4.12,<5.0.0 || >=5.1.0" +jupyter-core = ">=4.12,<5.0.dev0 || >=5.1.dev0" matplotlib-inline = ">=0.1" nest-asyncio = "*" packaging = "*" @@ -2010,7 +1953,6 @@ test = ["flaky", "ipyparallel", "pre-commit", "pytest (>=7.0)", "pytest-asyncio" name = "ipython" version = "8.13.2" description = "IPython: Productive Interactive Computing" -category = "dev" optional = false python-versions = ">=3.9" files = [ @@ -2050,7 +1992,6 @@ test-extra = ["curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.21)", "pa name = "jcloud" version = "0.2.10" description = "Simplify deploying and managing Jina projects on Jina Cloud" -category = "main" optional = false python-versions = "*" files = [ @@ -2073,7 +2014,6 @@ test = ["black (==22.3.0)", "jina (>=3.7.0)", "mock", "pytest", "pytest-asyncio" name = "jedi" version = "0.18.2" description = "An autocompletion tool for Python that can be used for text editors." -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -2093,7 +2033,6 @@ testing = ["Django (<3.1)", "attrs", "colorama", "docopt", "pytest (<7.0.0)"] name = "jina" version = "3.15.2" description = "Build multimodal AI services via cloud native technologies · Neural Search · Generative AI · MLOps" -category = "main" optional = false python-versions = "*" files = [ @@ -2211,7 +2150,6 @@ websockets = ["websockets"] name = "jina-hubble-sdk" version = "0.38.0" description = "SDK for Hubble API at Jina AI." -category = "main" optional = false python-versions = ">=3.7.0" files = [ @@ -2237,7 +2175,6 @@ full = ["aiohttp", "black (==22.3.0)", "docker", "filelock", "flake8 (==4.0.1)", name = "jinja2" version = "3.1.2" description = "A very fast and expressive template engine." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2255,7 +2192,6 @@ i18n = ["Babel (>=2.7)"] name = "joblib" version = "1.2.0" description = "Lightweight pipelining with Python functions" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2267,7 +2203,6 @@ files = [ name = "jupyter-client" version = "8.2.0" description = "Jupyter protocol implementation and client libraries" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -2277,7 +2212,7 @@ files = [ [package.dependencies] importlib-metadata = {version = ">=4.8.3", markers = "python_version < \"3.10\""} -jupyter-core = ">=4.12,<5.0.0 || >=5.1.0" +jupyter-core = ">=4.12,<5.0.dev0 || >=5.1.dev0" python-dateutil = ">=2.8.2" pyzmq = ">=23.0" tornado = ">=6.2" @@ -2291,7 +2226,6 @@ test = ["coverage", "ipykernel (>=6.14)", "mypy", "paramiko", "pre-commit", "pyt name = "jupyter-core" version = "5.3.0" description = "Jupyter core package. A base package on which Jupyter projects rely." -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -2310,14 +2244,13 @@ test = ["ipykernel", "pre-commit", "pytest", "pytest-cov", "pytest-timeout"] [[package]] name = "langchain" -version = "0.0.183" +version = "0.0.184" description = "Building applications with LLMs through composability" -category = "main" optional = false python-versions = ">=3.8.1,<4.0" files = [ - {file = "langchain-0.0.183-py3-none-any.whl", hash = "sha256:d98e56bf5189599f6500d59908f85b5a6cdf65545e34b41165c7c98beb1ccd0e"}, - {file = "langchain-0.0.183.tar.gz", hash = "sha256:ec9712ae9d11b14f02e703f123d9493f82d49fd80e86df4ff4014df2af06aeca"}, + {file = "langchain-0.0.184-py3-none-any.whl", hash = "sha256:819513b3acbd32ad24a55e48e0cabc8f60e09bb4293ca5b655d18e6d24353940"}, + {file = "langchain-0.0.184.tar.gz", hash = "sha256:e02a73b5cac889e761fc11c12297d4479a9727287c51a251ca2669a8a79ae348"}, ] [package.dependencies] @@ -2347,13 +2280,12 @@ text-helpers = ["chardet (>=5.1.0,<6.0.0)"] [[package]] name = "langchain-serve" -version = "0.0.33" +version = "0.0.38" description = "Langchain Serve - serve your langchain apps on Jina AI Cloud." -category = "main" optional = true python-versions = "*" files = [ - {file = "langchain-serve-0.0.33.tar.gz", hash = "sha256:89396d932c75230ddd7c802824fc766df1ac95872c1a8f2da68d0ec8a54f761a"}, + {file = "langchain-serve-0.0.38.tar.gz", hash = "sha256:649b8e26eebe6b33960c081b388fb7118acbfdc00f97dd935a580ab88aca53d6"}, ] [package.dependencies] @@ -2366,6 +2298,8 @@ nest-asyncio = "*" requests = "*" textual = "*" toml = "*" +typing_extensions = "4.5.0" +typing-inspect = "0.8.0" [package.extras] test = ["psutil", "pytest", "pytest-asyncio"] @@ -2374,7 +2308,6 @@ test = ["psutil", "pytest", "pytest-asyncio"] 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 = [ @@ -2395,7 +2328,6 @@ test = ["coverage", "pytest", "pytest-cov"] name = "llama-cpp-python" version = "0.1.55" description = "A Python wrapper for llama.cpp" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2409,7 +2341,6 @@ typing-extensions = ">=4.5.0,<5.0.0" name = "lxml" version = "4.9.2" description = "Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API." -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4.*" files = [ @@ -2502,7 +2433,6 @@ source = ["Cython (>=0.29.7)"] name = "lz4" version = "4.3.2" description = "LZ4 Bindings for Python" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2552,7 +2482,6 @@ tests = ["psutil", "pytest (!=3.3.0)", "pytest-cov"] name = "markdown" version = "3.4.3" description = "Python implementation of John Gruber's Markdown." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2570,7 +2499,6 @@ testing = ["coverage", "pyyaml"] name = "markdown-it-py" version = "2.2.0" description = "Python port of markdown-it. Markdown parsing, done right!" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2597,7 +2525,6 @@ testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] name = "markupsafe" version = "2.1.2" description = "Safely add untrusted strings to HTML/XML markup." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2657,7 +2584,6 @@ files = [ name = "marshmallow" version = "3.19.0" description = "A lightweight library for converting complex datatypes to and from native Python datatypes." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2678,7 +2604,6 @@ tests = ["pytest", "pytz", "simplejson"] name = "marshmallow-enum" version = "1.5.1" description = "Enum field for Marshmallow" -category = "main" optional = false python-versions = "*" files = [ @@ -2693,7 +2618,6 @@ marshmallow = ">=2.0.0" name = "matplotlib-inline" version = "0.1.6" description = "Inline Matplotlib backend for Jupyter" -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -2708,7 +2632,6 @@ traitlets = "*" 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 = [ @@ -2728,7 +2651,6 @@ testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] name = "mdurl" version = "0.1.2" description = "Markdown URL utilities" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2740,7 +2662,6 @@ files = [ name = "monotonic" version = "1.6" description = "An implementation of time.monotonic() for Python 2 & < 3.3" -category = "main" optional = false python-versions = "*" files = [ @@ -2752,7 +2673,6 @@ files = [ name = "mpmath" version = "1.3.0" description = "Python library for arbitrary-precision floating-point arithmetic" -category = "main" optional = false python-versions = "*" files = [ @@ -2770,7 +2690,6 @@ tests = ["pytest (>=4.6)"] name = "msg-parser" version = "1.2.0" description = "This module enables reading, parsing and converting Microsoft Outlook MSG E-Mail files." -category = "main" optional = false python-versions = ">=3.4" files = [ @@ -2788,7 +2707,6 @@ rtf = ["compressed-rtf (>=1.0.5)"] name = "multidict" version = "6.0.4" description = "multidict implementation" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2872,7 +2790,6 @@ files = [ name = "mypy" version = "1.3.0" description = "Optional static typing for Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2919,7 +2836,6 @@ reports = ["lxml"] name = "mypy-extensions" version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." -category = "main" optional = false python-versions = ">=3.5" files = [ @@ -2931,7 +2847,6 @@ files = [ name = "nest-asyncio" version = "1.5.6" description = "Patch asyncio to allow nested event loops" -category = "main" optional = false python-versions = ">=3.5" files = [ @@ -2943,7 +2858,6 @@ files = [ name = "networkx" version = "3.1" description = "Python package for creating and manipulating graphs and networks" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -2962,7 +2876,6 @@ test = ["codecov (>=2.1)", "pytest (>=7.2)", "pytest-cov (>=4.0)"] name = "nltk" version = "3.8.1" description = "Natural Language Toolkit" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2988,7 +2901,6 @@ twitter = ["twython"] name = "numexpr" version = "2.8.4" description = "Fast numerical expression evaluator for NumPy" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3031,7 +2943,6 @@ numpy = ">=1.13.3" name = "numpy" version = "1.23.5" description = "NumPy is the fundamental package for array computing with Python." -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -3069,7 +2980,6 @@ files = [ name = "olefile" version = "0.46" description = "Python package to parse, read and write Microsoft OLE2 files (Structured Storage or Compound Document, Microsoft Office)" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -3080,7 +2990,6 @@ files = [ name = "onnxruntime" version = "1.15.0" description = "ONNX Runtime is a runtime accelerator for Machine Learning models" -category = "main" optional = false python-versions = "*" files = [ @@ -3122,7 +3031,6 @@ sympy = "*" name = "openai" version = "0.27.7" description = "Python client library for the OpenAI API" -category = "main" optional = false python-versions = ">=3.7.1" files = [ @@ -3137,7 +3045,7 @@ tqdm = "*" [package.extras] datalib = ["numpy", "openpyxl (>=3.0.7)", "pandas (>=1.2.3)", "pandas-stubs (>=1.1.0.11)"] -dev = ["black (>=21.6b0,<22.0)", "pytest (>=6.0.0,<7.0.0)", "pytest-asyncio", "pytest-mock"] +dev = ["black (>=21.6b0,<22.0)", "pytest (==6.*)", "pytest-asyncio", "pytest-mock"] embeddings = ["matplotlib", "numpy", "openpyxl (>=3.0.7)", "pandas (>=1.2.3)", "pandas-stubs (>=1.1.0.11)", "plotly", "scikit-learn (>=1.0.2)", "scipy", "tenacity (>=8.0.1)"] wandb = ["numpy", "openpyxl (>=3.0.7)", "pandas (>=1.2.3)", "pandas-stubs (>=1.1.0.11)", "wandb"] @@ -3145,7 +3053,6 @@ wandb = ["numpy", "openpyxl (>=3.0.7)", "pandas (>=1.2.3)", "pandas-stubs (>=1.1 name = "openapi-schema-pydantic" version = "1.2.4" description = "OpenAPI (v3) specification schema as pydantic class" -category = "main" optional = false python-versions = ">=3.6.1" files = [ @@ -3160,7 +3067,6 @@ pydantic = ">=1.8.2" name = "openpyxl" version = "3.1.2" description = "A Python library to read/write Excel 2010 xlsx/xlsm files" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -3175,7 +3081,6 @@ et-xmlfile = "*" name = "opentelemetry-api" version = "1.18.0" description = "OpenTelemetry Python API" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3192,7 +3097,6 @@ setuptools = ">=16.0" name = "opentelemetry-exporter-otlp" version = "1.18.0" description = "OpenTelemetry Collector Exporters" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3208,7 +3112,6 @@ opentelemetry-exporter-otlp-proto-http = "1.18.0" name = "opentelemetry-exporter-otlp-proto-common" version = "1.18.0" description = "OpenTelemetry Protobuf encoding" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3223,7 +3126,6 @@ opentelemetry-proto = "1.18.0" name = "opentelemetry-exporter-otlp-proto-grpc" version = "1.18.0" description = "OpenTelemetry Collector Protobuf over gRPC Exporter" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3248,7 +3150,6 @@ test = ["pytest-grpc"] name = "opentelemetry-exporter-otlp-proto-http" version = "1.18.0" description = "OpenTelemetry Collector Protobuf over HTTP Exporter" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3273,7 +3174,6 @@ test = ["responses (==0.22.0)"] name = "opentelemetry-exporter-prometheus" version = "1.12.0rc1" description = "Prometheus Metric Exporter for OpenTelemetry" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -3290,7 +3190,6 @@ prometheus-client = ">=0.5.0,<1.0.0" name = "opentelemetry-instrumentation" version = "0.39b0" description = "Instrumentation Tools & Auto Instrumentation for OpenTelemetry Python" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3307,7 +3206,6 @@ wrapt = ">=1.0.0,<2.0.0" name = "opentelemetry-instrumentation-aiohttp-client" version = "0.39b0" description = "OpenTelemetry aiohttp client instrumentation" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3330,7 +3228,6 @@ test = ["opentelemetry-instrumentation-aiohttp-client[instruments]"] name = "opentelemetry-instrumentation-asgi" version = "0.39b0" description = "ASGI instrumentation for OpenTelemetry" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3353,7 +3250,6 @@ test = ["opentelemetry-instrumentation-asgi[instruments]", "opentelemetry-test-u name = "opentelemetry-instrumentation-fastapi" version = "0.39b0" description = "OpenTelemetry FastAPI Instrumentation" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3376,7 +3272,6 @@ test = ["httpx (>=0.22,<1.0)", "opentelemetry-instrumentation-fastapi[instrument name = "opentelemetry-instrumentation-grpc" version = "0.39b0" description = "OpenTelemetry gRPC instrumentation" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3399,7 +3294,6 @@ test = ["opentelemetry-instrumentation-grpc[instruments]", "opentelemetry-sdk (> name = "opentelemetry-proto" version = "1.18.0" description = "OpenTelemetry Python Proto" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3414,7 +3308,6 @@ protobuf = ">=3.19,<5.0" name = "opentelemetry-sdk" version = "1.18.0" description = "OpenTelemetry Python SDK" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3432,7 +3325,6 @@ typing-extensions = ">=3.7.4" name = "opentelemetry-semantic-conventions" version = "0.39b0" description = "OpenTelemetry Semantic Conventions" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3444,7 +3336,6 @@ files = [ name = "opentelemetry-util-http" version = "0.39b0" description = "Web util for OpenTelemetry" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3456,7 +3347,6 @@ files = [ name = "overrides" version = "7.3.1" description = "A decorator to automatically detect mismatch when overriding a method." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -3468,7 +3358,6 @@ files = [ name = "packaging" version = "23.1" description = "Core utilities for Python packages" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3480,7 +3369,6 @@ files = [ name = "pandas" version = "1.5.3" description = "Powerful data structures for data analysis, time series, and statistics" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -3529,7 +3417,6 @@ test = ["hypothesis (>=5.5.3)", "pytest (>=6.0)", "pytest-xdist (>=1.31)"] name = "pandas-stubs" version = "2.0.1.230501" description = "Type annotations for pandas" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -3544,7 +3431,6 @@ types-pytz = ">=2022.1.1" name = "parso" version = "0.8.3" description = "A Python Parser" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -3560,7 +3446,6 @@ testing = ["docopt", "pytest (<6.0.0)"] name = "pathspec" version = "0.11.1" description = "Utility library for gitignore style pattern matching of file paths." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3572,7 +3457,6 @@ files = [ name = "pexpect" version = "4.8.0" description = "Pexpect allows easy control of interactive console applications." -category = "dev" optional = false python-versions = "*" files = [ @@ -3587,7 +3471,6 @@ ptyprocess = ">=0.5" name = "pickleshare" version = "0.7.5" description = "Tiny 'shelve'-like database with concurrency support" -category = "dev" optional = false python-versions = "*" files = [ @@ -3599,7 +3482,6 @@ files = [ name = "pillow" version = "9.5.0" description = "Python Imaging Library (Fork)" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3679,7 +3561,6 @@ tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "pa name = "platformdirs" version = "3.5.1" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -3695,7 +3576,6 @@ test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.3.1)", "pytest- name = "pluggy" version = "1.0.0" description = "plugin and hook calling mechanisms for python" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -3711,7 +3591,6 @@ testing = ["pytest", "pytest-benchmark"] name = "portalocker" version = "2.7.0" description = "Wraps the portalocker recipe for easy usage" -category = "main" optional = false python-versions = ">=3.5" files = [ @@ -3731,7 +3610,6 @@ tests = ["pytest (>=5.4.1)", "pytest-cov (>=2.8.1)", "pytest-mypy (>=0.8.0)", "p name = "posthog" version = "3.0.1" description = "Integrate PostHog into any python application." -category = "main" optional = false python-versions = "*" files = [ @@ -3755,7 +3633,6 @@ test = ["coverage", "flake8", "freezegun (==0.3.15)", "mock (>=2.0.0)", "pylint" name = "prometheus-client" version = "0.17.0" description = "Python client for the Prometheus monitoring system." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -3770,7 +3647,6 @@ twisted = ["twisted"] name = "prompt-toolkit" version = "3.0.38" description = "Library for building powerful interactive command lines in Python" -category = "dev" optional = false python-versions = ">=3.7.0" files = [ @@ -3785,7 +3661,6 @@ wcwidth = "*" name = "protobuf" version = "3.20.3" description = "Protocol Buffers" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3817,7 +3692,6 @@ files = [ name = "psutil" version = "5.9.5" description = "Cross-platform lib for process and system monitoring in Python." -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -3844,7 +3718,6 @@ test = ["enum34", "ipaddress", "mock", "pywin32", "wmi"] name = "psycopg2-binary" version = "2.9.6" description = "psycopg2 - Python-PostgreSQL Database Adapter" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -3916,7 +3789,6 @@ files = [ name = "ptyprocess" version = "0.7.0" description = "Run a subprocess in a pseudo terminal" -category = "dev" optional = false python-versions = "*" files = [ @@ -3928,7 +3800,6 @@ files = [ name = "pure-eval" version = "0.2.2" description = "Safely evaluate AST nodes without side effects" -category = "dev" optional = false python-versions = "*" files = [ @@ -3943,7 +3814,6 @@ tests = ["pytest"] name = "pyarrow" version = "11.0.0" description = "Python library for Apache Arrow" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3981,7 +3851,6 @@ numpy = ">=1.16.6" name = "pyasn1" version = "0.5.0" description = "Pure-Python implementation of ASN.1 types and DER/BER/CER codecs (X.208)" -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" files = [ @@ -3993,7 +3862,6 @@ files = [ name = "pyasn1-modules" version = "0.3.0" description = "A collection of ASN.1-based protocols modules" -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" files = [ @@ -4008,7 +3876,6 @@ pyasn1 = ">=0.4.6,<0.6.0" name = "pycparser" version = "2.21" description = "C parser in Python" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -4020,7 +3887,6 @@ files = [ name = "pydantic" version = "1.10.8" description = "Data validation and settings management using python type hints" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -4073,7 +3939,6 @@ email = ["email-validator (>=1.0.3)"] name = "pygments" version = "2.15.1" description = "Pygments is a syntax highlighting package written in Python." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -4088,7 +3953,6 @@ plugins = ["importlib-metadata"] name = "pypandoc" version = "1.11" description = "Thin wrapper for pandoc." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -4100,7 +3964,6 @@ files = [ name = "pyparsing" version = "3.0.9" description = "pyparsing module - Classes and methods to define and execute parsing grammars" -category = "main" optional = false python-versions = ">=3.6.8" files = [ @@ -4115,7 +3978,6 @@ diagrams = ["jinja2", "railroad-diagrams"] name = "pypdf" 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 = [ @@ -4137,7 +3999,6 @@ image = ["Pillow"] name = "pyreadline3" version = "3.4.1" description = "A python implementation of GNU readline." -category = "main" optional = false python-versions = "*" files = [ @@ -4149,7 +4010,6 @@ files = [ name = "pysrt" version = "1.1.2" description = "SubRip (.srt) subtitle parser and writer" -category = "main" optional = false python-versions = "*" files = [ @@ -4163,7 +4023,6 @@ chardet = "*" name = "pytest" version = "7.3.1" description = "pytest: simple powerful testing with Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -4186,7 +4045,6 @@ testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "no name = "pytest-cov" version = "4.1.0" description = "Pytest plugin for measuring coverage." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -4205,7 +4063,6 @@ testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtuale name = "python-dateutil" version = "2.8.2" description = "Extensions to the standard Python datetime module" -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ @@ -4220,7 +4077,6 @@ six = ">=1.5" name = "python-docx" version = "0.8.11" description = "Create and update Microsoft Word .docx files." -category = "main" optional = false python-versions = "*" files = [ @@ -4234,7 +4090,6 @@ lxml = ">=2.3.2" name = "python-dotenv" version = "1.0.0" description = "Read key-value pairs from a .env file and set them as environment variables" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -4249,7 +4104,6 @@ cli = ["click (>=5.0)"] name = "python-jose" version = "3.3.0" description = "JOSE implementation in Python" -category = "main" optional = false python-versions = "*" files = [ @@ -4271,7 +4125,6 @@ pycryptodome = ["pyasn1", "pycryptodome (>=3.3.1,<4.0.0)"] name = "python-magic" version = "0.4.27" description = "File type identification using libmagic" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -4283,7 +4136,6 @@ files = [ name = "python-multipart" version = "0.0.6" description = "A streaming multipart parser for Python" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -4298,7 +4150,6 @@ dev = ["atomicwrites (==1.2.1)", "attrs (==19.2.0)", "coverage (==6.5.0)", "hatc name = "python-pptx" version = "0.6.21" description = "Generate and manipulate Open XML PowerPoint (.pptx) files" -category = "main" optional = false python-versions = "*" files = [ @@ -4314,7 +4165,6 @@ XlsxWriter = ">=0.5.7" name = "pytz" version = "2023.3" description = "World timezone definitions, modern and historical" -category = "main" optional = false python-versions = "*" files = [ @@ -4326,7 +4176,6 @@ files = [ name = "pywin32" version = "306" description = "Python for Window Extensions" -category = "main" optional = false python-versions = "*" files = [ @@ -4350,7 +4199,6 @@ files = [ name = "pyyaml" version = "6.0" description = "YAML parser and emitter for Python" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -4400,7 +4248,6 @@ files = [ name = "pyzmq" version = "25.1.0" description = "Python bindings for 0MQ" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -4490,7 +4337,6 @@ cffi = {version = "*", markers = "implementation_name == \"pypy\""} name = "qdrant-client" version = "1.2.0" description = "Client library for the Qdrant vector search engine" -category = "main" optional = false python-versions = ">=3.7,<3.12" files = [ @@ -4512,7 +4358,6 @@ urllib3 = ">=1.26.14,<2.0.0" name = "regex" version = "2023.5.5" description = "Alternative regular expression module, to replace re." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -4610,7 +4455,6 @@ files = [ name = "requests" version = "2.28.2" description = "Python HTTP for Humans." -category = "main" optional = false python-versions = ">=3.7, <4" files = [ @@ -4632,7 +4476,6 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] name = "rfc3986" version = "1.5.0" description = "Validating URI References per RFC 3986" -category = "main" optional = false python-versions = "*" files = [ @@ -4650,7 +4493,6 @@ idna2008 = ["idna"] name = "rich" version = "13.3.5" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" -category = "main" optional = false python-versions = ">=3.7.0" files = [ @@ -4669,7 +4511,6 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] name = "rsa" version = "4.9" description = "Pure-Python RSA implementation" -category = "main" optional = false python-versions = ">=3.6,<4" files = [ @@ -4684,7 +4525,6 @@ pyasn1 = ">=0.1.3" name = "ruff" version = "0.0.254" description = "An extremely fast Python linter, written in Rust." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -4711,7 +4551,6 @@ files = [ name = "scikit-learn" version = "1.2.2" description = "A set of python modules for machine learning and data mining" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -4754,7 +4593,6 @@ tests = ["black (>=22.3.0)", "flake8 (>=3.8.2)", "matplotlib (>=3.1.3)", "mypy ( name = "scipy" version = "1.10.1" description = "Fundamental algorithms for scientific computing in Python" -category = "main" optional = false python-versions = "<3.12,>=3.8" files = [ @@ -4793,7 +4631,6 @@ test = ["asv", "gmpy2", "mpmath", "pooch", "pytest", "pytest-cov", "pytest-timeo name = "sentence-transformers" version = "2.2.2" description = "Multilingual text embeddings" -category = "main" optional = false python-versions = ">=3.6.0" files = [ @@ -4816,7 +4653,6 @@ transformers = ">=4.6.0,<5.0.0" name = "sentencepiece" version = "0.1.99" description = "SentencePiece python wrapper" -category = "main" optional = false python-versions = "*" files = [ @@ -4871,7 +4707,6 @@ files = [ name = "setuptools" version = "67.8.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -4888,7 +4723,6 @@ testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs ( name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -4900,7 +4734,6 @@ files = [ name = "sniffio" version = "1.3.0" description = "Sniff out which async library your code is running under" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -4912,7 +4745,6 @@ files = [ name = "soupsieve" version = "2.4.1" description = "A modern CSS selector implementation for Beautiful Soup." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -4924,7 +4756,6 @@ files = [ name = "sqlalchemy" version = "2.0.15" description = "Database Abstraction Library" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -4972,7 +4803,7 @@ files = [ ] [package.dependencies] -greenlet = {version = "!=0.4.17", markers = "platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\""} +greenlet = {version = "!=0.4.17", markers = "platform_machine == \"win32\" or platform_machine == \"WIN32\" or platform_machine == \"AMD64\" or platform_machine == \"amd64\" or platform_machine == \"x86_64\" or platform_machine == \"ppc64le\" or platform_machine == \"aarch64\""} typing-extensions = ">=4.2.0" [package.extras] @@ -5002,7 +4833,6 @@ sqlcipher = ["sqlcipher3-binary"] name = "stack-data" version = "0.6.2" description = "Extract data from python stack frames and tracebacks for informative displays" -category = "dev" optional = false python-versions = "*" files = [ @@ -5022,7 +4852,6 @@ tests = ["cython", "littleutils", "pygments", "pytest", "typeguard"] name = "starlette" version = "0.27.0" description = "The little ASGI library that shines." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -5041,7 +4870,6 @@ full = ["httpx (>=0.22.0)", "itsdangerous", "jinja2", "python-multipart", "pyyam name = "sympy" version = "1.12" description = "Computer algebra system (CAS) in Python" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -5056,7 +4884,6 @@ mpmath = ">=0.19" name = "tenacity" version = "8.2.2" description = "Retry code until it succeeds" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -5071,7 +4898,6 @@ doc = ["reno", "sphinx", "tornado (>=4.5)"] name = "textual" version = "0.26.0" description = "Modern Text User Interface framework" -category = "main" optional = true python-versions = ">=3.7,<4.0" files = [ @@ -5092,7 +4918,6 @@ dev = ["aiohttp (>=3.8.1)", "click (>=8.1.2)", "msgpack (>=1.0.3)"] name = "threadpoolctl" version = "3.1.0" description = "threadpoolctl" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -5104,7 +4929,6 @@ files = [ name = "tiktoken" version = "0.3.3" description = "tiktoken is a fast BPE tokeniser for use with OpenAI's models" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -5150,7 +4974,6 @@ blobfile = ["blobfile (>=2)"] name = "tokenizers" version = "0.13.3" description = "Fast and Customizable Tokenizers" -category = "main" optional = false python-versions = "*" files = [ @@ -5205,7 +5028,6 @@ testing = ["black (==22.3)", "datasets", "numpy", "pytest", "requests"] 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 = [ @@ -5217,7 +5039,6 @@ files = [ name = "tomli" version = "2.0.1" description = "A lil' TOML parser" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -5229,7 +5050,6 @@ files = [ name = "torch" version = "2.0.1" description = "Tensors and Dynamic neural networks in Python with strong GPU acceleration" -category = "main" optional = false python-versions = ">=3.8.0" files = [ @@ -5269,7 +5089,6 @@ opt-einsum = ["opt-einsum (>=3.3)"] name = "torchvision" version = "0.15.2" description = "image and video datasets and models for torch deep learning" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -5297,7 +5116,7 @@ files = [ [package.dependencies] numpy = "*" -pillow = ">=5.3.0,<8.3.0 || >=8.4.0" +pillow = ">=5.3.0,<8.3.dev0 || >=8.4.dev0" requests = "*" torch = "2.0.1" @@ -5308,7 +5127,6 @@ scipy = ["scipy"] name = "tornado" version = "6.3.2" description = "Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed." -category = "dev" optional = false python-versions = ">= 3.8" files = [ @@ -5329,7 +5147,6 @@ files = [ name = "tqdm" version = "4.65.0" description = "Fast, Extensible Progress Meter" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -5350,7 +5167,6 @@ telegram = ["requests"] name = "traitlets" version = "5.9.0" description = "Traitlets Python configuration system" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -5366,7 +5182,6 @@ test = ["argcomplete (>=2.0)", "pre-commit", "pytest", "pytest-mock"] name = "transformers" version = "4.29.0" description = "State-of-the-art Machine Learning for JAX, PyTorch and TensorFlow" -category = "main" optional = false python-versions = ">=3.7.0" files = [ @@ -5434,7 +5249,6 @@ vision = ["Pillow"] name = "typer" version = "0.7.0" description = "Typer, build great CLIs. Easy to code. Based on Python type hints." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -5455,7 +5269,6 @@ test = ["black (>=22.3.0,<23.0.0)", "coverage (>=6.2,<7.0)", "isort (>=5.0.6,<6. name = "types-pillow" version = "9.5.0.4" description = "Typing stubs for Pillow" -category = "dev" optional = false python-versions = "*" files = [ @@ -5467,7 +5280,6 @@ files = [ name = "types-pytz" version = "2023.3.0.0" description = "Typing stubs for pytz" -category = "dev" optional = false python-versions = "*" files = [ @@ -5479,7 +5291,6 @@ files = [ name = "types-pyyaml" version = "6.0.12.10" description = "Typing stubs for PyYAML" -category = "main" optional = false python-versions = "*" files = [ @@ -5489,14 +5300,13 @@ files = [ [[package]] name = "types-requests" -version = "2.31.0.0" +version = "2.31.0.1" description = "Typing stubs for requests" -category = "dev" optional = false python-versions = "*" files = [ - {file = "types-requests-2.31.0.0.tar.gz", hash = "sha256:c1c29d20ab8d84dff468d7febfe8e0cb0b4664543221b386605e14672b44ea25"}, - {file = "types_requests-2.31.0.0-py3-none-any.whl", hash = "sha256:7c5cea7940f8e92ec560bbc468f65bf684aa3dcf0554a6f8c4710f5f708dc598"}, + {file = "types-requests-2.31.0.1.tar.gz", hash = "sha256:3de667cffa123ce698591de0ad7db034a5317457a596eb0b4944e5a9d9e8d1ac"}, + {file = "types_requests-2.31.0.1-py3-none-any.whl", hash = "sha256:afb06ef8f25ba83d59a1d424bd7a5a939082f94b94e90ab5e6116bd2559deaa3"}, ] [package.dependencies] @@ -5506,7 +5316,6 @@ types-urllib3 = "*" name = "types-urllib3" version = "1.26.25.13" description = "Typing stubs for urllib3" -category = "dev" optional = false python-versions = "*" files = [ @@ -5518,7 +5327,6 @@ files = [ name = "typing-extensions" version = "4.5.0" description = "Backported and Experimental Type Hints for Python 3.7+" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -5528,14 +5336,13 @@ files = [ [[package]] name = "typing-inspect" -version = "0.9.0" +version = "0.8.0" description = "Runtime inspection utilities for typing module." -category = "main" optional = false python-versions = "*" files = [ - {file = "typing_inspect-0.9.0-py3-none-any.whl", hash = "sha256:9ee6fc59062311ef8547596ab6b955e1b8aa46242d854bfc78f4f6b0eff35f9f"}, - {file = "typing_inspect-0.9.0.tar.gz", hash = "sha256:b23fc42ff6f6ef6954e4852c1fb512cdd18dbea03134f91f856a95ccc9461f78"}, + {file = "typing_inspect-0.8.0-py3-none-any.whl", hash = "sha256:5fbf9c1e65d4fa01e701fe12a5bca6c6e08a4ffd5bc60bfac028253a447c5188"}, + {file = "typing_inspect-0.8.0.tar.gz", hash = "sha256:8b1ff0c400943b6145df8119c41c244ca8207f1f10c9c057aeed1560e4806e3d"}, ] [package.dependencies] @@ -5546,7 +5353,6 @@ typing-extensions = ">=3.7.4" 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 = [ @@ -5561,7 +5367,6 @@ test = ["coverage", "pytest", "pytest-cov"] name = "unstructured" version = "0.5.13" description = "A library that prepares raw documents for downstream ML tasks." -category = "main" optional = false python-versions = ">=3.7.0" files = [ @@ -5601,7 +5406,6 @@ wikipedia = ["wikipedia"] name = "uritemplate" version = "4.1.1" description = "Implementation of RFC 6570 URI Templates" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -5613,7 +5417,6 @@ files = [ name = "urllib3" version = "1.26.16" description = "HTTP library with thread-safe connection pooling, file post, and more." -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" files = [ @@ -5630,7 +5433,6 @@ socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] name = "uvicorn" version = "0.20.0" description = "The lightning-fast ASGI server." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -5645,7 +5447,7 @@ h11 = ">=0.8" httptools = {version = ">=0.5.0", optional = true, markers = "extra == \"standard\""} python-dotenv = {version = ">=0.13", optional = true, markers = "extra == \"standard\""} pyyaml = {version = ">=5.1", optional = true, markers = "extra == \"standard\""} -uvloop = {version = ">=0.14.0,<0.15.0 || >0.15.0,<0.15.1 || >0.15.1", optional = true, markers = "sys_platform != \"win32\" and sys_platform != \"cygwin\" and platform_python_implementation != \"PyPy\" and extra == \"standard\""} +uvloop = {version = ">=0.14.0,<0.15.0 || >0.15.0,<0.15.1 || >0.15.1", optional = true, markers = "(sys_platform != \"win32\" and sys_platform != \"cygwin\") and platform_python_implementation != \"PyPy\" and extra == \"standard\""} watchfiles = {version = ">=0.13", optional = true, markers = "extra == \"standard\""} websockets = {version = ">=10.4", optional = true, markers = "extra == \"standard\""} @@ -5656,7 +5458,6 @@ standard = ["colorama (>=0.4)", "httptools (>=0.5.0)", "python-dotenv (>=0.13)", name = "uvloop" version = "0.17.0" description = "Fast implementation of asyncio event loop on top of libuv" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -5701,7 +5502,6 @@ test = ["Cython (>=0.29.32,<0.30.0)", "aiohttp", "flake8 (>=3.9.2,<3.10.0)", "my name = "validators" version = "0.20.0" description = "Python Data Validation for Humans™." -category = "main" optional = false python-versions = ">=3.4" files = [ @@ -5718,7 +5518,6 @@ test = ["flake8 (>=2.4.0)", "isort (>=4.2.2)", "pytest (>=2.2.3)"] name = "watchfiles" version = "0.19.0" description = "Simple, modern and high performance file watching and code reload in python." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -5753,7 +5552,6 @@ anyio = ">=3.0.0" name = "wcwidth" version = "0.2.6" description = "Measures the displayed width of unicode strings in a terminal" -category = "dev" optional = false python-versions = "*" files = [ @@ -5765,7 +5563,6 @@ files = [ name = "weaviate-client" version = "3.19.2" description = "A python native weaviate client" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -5786,7 +5583,6 @@ grpc = ["grpcio", "grpcio-tools"] name = "websocket-client" version = "1.5.2" description = "WebSocket client for Python with low level API options" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -5803,7 +5599,6 @@ test = ["websockets"] name = "websockets" version = "11.0.3" description = "An implementation of the WebSocket Protocol (RFC 6455 & 7692)" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -5883,7 +5678,6 @@ files = [ name = "wikipedia" version = "1.4.0" description = "Wikipedia API for Python" -category = "main" optional = false python-versions = "*" files = [ @@ -5898,7 +5692,6 @@ requests = ">=2.0.0,<3.0.0" name = "wrapt" version = "1.14.1" description = "Module for decorators, wrappers and monkey patching." -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" files = [ @@ -5972,7 +5765,6 @@ files = [ name = "xlsxwriter" version = "3.1.2" description = "A Python module for creating Excel XLSX files." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -5984,7 +5776,6 @@ files = [ name = "yarl" version = "1.9.2" description = "Yet another URL library" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -6072,7 +5863,6 @@ multidict = ">=4.0" name = "zipp" version = "3.15.0" description = "Backport of pathlib-compatible object wrapper for zip files" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -6088,7 +5878,6 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more name = "zstandard" version = "0.21.0" description = "Zstandard bindings for Python" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -6149,4 +5938,4 @@ deploy = ["langchain-serve"] [metadata] lock-version = "2.0" python-versions = ">=3.9,<3.12" -content-hash = "ae4852378416319ee45512e200759438615dc8a4e840369176234dd04ec2a3ec" \ No newline at end of file +content-hash = "6560026ff87dd44f900ee5a22caabd294ef20c2b2fbe51e06e418727927d8df2" From 35fd7dabbb2cb7d434bcf45292f5b4a575d7f8a8 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Mon, 29 May 2023 17:14:08 -0300 Subject: [PATCH 09/12] Copy Paste bug fixed --- .../GenericNode/components/parameterComponent/index.tsx | 1 + src/frontend/src/components/inputComponent/index.tsx | 4 ++++ src/frontend/src/pages/FlowPage/index.tsx | 4 +--- src/frontend/src/types/components/index.ts | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx index d582b2d5b..5668b5430 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx @@ -119,6 +119,7 @@ export default function ParameterComponent({ ) : ( { diff --git a/src/frontend/src/components/inputComponent/index.tsx b/src/frontend/src/components/inputComponent/index.tsx index c7047d494..15675d621 100644 --- a/src/frontend/src/components/inputComponent/index.tsx +++ b/src/frontend/src/components/inputComponent/index.tsx @@ -6,11 +6,13 @@ import { TabsContext } from "../../contexts/tabsContext"; export default function InputComponent({ value, onChange, + disableCopyPaste = false, disabled, password, }: InputComponentType) { const [myValue, setMyValue] = useState(value ?? ""); const [pwdVisible, setPwdVisible] = useState(false); + const {setDisableCopyPaste} = useContext(TabsContext); useEffect(() => { if (disabled) { setMyValue(""); @@ -27,6 +29,8 @@ export default function InputComponent({ > {if(disableCopyPaste) setDisableCopyPaste(true)}} + onBlur={() => {if(disableCopyPaste) setDisableCopyPaste(false)}} className={classNames( "block w-full pr-12 form-input dark:bg-gray-900 dark:border-gray-600 rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm", disabled ? " bg-gray-200 dark:bg-gray-700" : "", diff --git a/src/frontend/src/pages/FlowPage/index.tsx b/src/frontend/src/pages/FlowPage/index.tsx index 213b79ab4..91c853f9b 100644 --- a/src/frontend/src/pages/FlowPage/index.tsx +++ b/src/frontend/src/pages/FlowPage/index.tsx @@ -317,10 +317,8 @@ export default function FlowPage({ flow }: { flow: FlowType }) { onPaneClick={() => { setDisableCopyPaste(false); }} - onNodeClick={() => { - setDisableCopyPaste(true); - }} onPaneMouseLeave={() => { + console.log("saiu o mouse") setDisableCopyPaste(true); }} onNodesChange={onNodesChange} diff --git a/src/frontend/src/types/components/index.ts b/src/frontend/src/types/components/index.ts index e5fc986e8..e660e1c4d 100644 --- a/src/frontend/src/types/components/index.ts +++ b/src/frontend/src/types/components/index.ts @@ -10,6 +10,7 @@ export type InputComponentType = { disabled?: boolean; onChange: (value: string) => void; password: boolean; + disableCopyPaste?: boolean; }; export type ToggleComponentType = { enabled: boolean; From c05056c34d2c5cc9e0196144f3294e816e536d2f Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Mon, 29 May 2023 18:21:54 -0300 Subject: [PATCH 10/12] added code deleted by mistake that update base classes --- .../src/components/inputComponent/index.tsx | 10 +++++--- src/frontend/src/contexts/tabsContext.tsx | 25 +++++++++++++++++++ src/frontend/src/pages/FlowPage/index.tsx | 2 +- 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/src/frontend/src/components/inputComponent/index.tsx b/src/frontend/src/components/inputComponent/index.tsx index 15675d621..5430795e9 100644 --- a/src/frontend/src/components/inputComponent/index.tsx +++ b/src/frontend/src/components/inputComponent/index.tsx @@ -12,7 +12,7 @@ export default function InputComponent({ }: InputComponentType) { const [myValue, setMyValue] = useState(value ?? ""); const [pwdVisible, setPwdVisible] = useState(false); - const {setDisableCopyPaste} = useContext(TabsContext); + const { setDisableCopyPaste } = useContext(TabsContext); useEffect(() => { if (disabled) { setMyValue(""); @@ -29,8 +29,12 @@ export default function InputComponent({ > {if(disableCopyPaste) setDisableCopyPaste(true)}} - onBlur={() => {if(disableCopyPaste) setDisableCopyPaste(false)}} + onFocus={() => { + if (disableCopyPaste) setDisableCopyPaste(true); + }} + onBlur={() => { + if (disableCopyPaste) setDisableCopyPaste(false); + }} className={classNames( "block w-full pr-12 form-input dark:bg-gray-900 dark:border-gray-600 rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm", disabled ? " bg-gray-200 dark:bg-gray-700" : "", diff --git a/src/frontend/src/contexts/tabsContext.tsx b/src/frontend/src/contexts/tabsContext.tsx index 0c69a6931..a373ad9a7 100644 --- a/src/frontend/src/contexts/tabsContext.tsx +++ b/src/frontend/src/contexts/tabsContext.tsx @@ -87,6 +87,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" @@ -276,6 +289,18 @@ 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"]; + 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 diff --git a/src/frontend/src/pages/FlowPage/index.tsx b/src/frontend/src/pages/FlowPage/index.tsx index 91c853f9b..f1a1f3b74 100644 --- a/src/frontend/src/pages/FlowPage/index.tsx +++ b/src/frontend/src/pages/FlowPage/index.tsx @@ -318,7 +318,7 @@ export default function FlowPage({ flow }: { flow: FlowType }) { setDisableCopyPaste(false); }} onPaneMouseLeave={() => { - console.log("saiu o mouse") + console.log("saiu o mouse"); setDisableCopyPaste(true); }} onNodesChange={onNodesChange} From 3a344125854eb0d0c7808e25e9f624df2cd7aab4 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Mon, 29 May 2023 18:24:54 -0300 Subject: [PATCH 11/12] update utils with updateIds function --- src/frontend/src/utils.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/frontend/src/utils.ts b/src/frontend/src/utils.ts index 5084d1076..2c2732962 100644 --- a/src/frontend/src/utils.ts +++ b/src/frontend/src/utils.ts @@ -20,6 +20,7 @@ import { Connection, Edge, Node, ReactFlowInstance } from "reactflow"; import { FlowType } from "./types/flow"; import { APITemplateType, TemplateVariableType } from "./types/api"; import _ from "lodash"; +import { v4 as uuidv4 } from "uuid"; export function classNames(...classes: Array) { return classes.filter(Boolean).join(" "); @@ -534,3 +535,27 @@ export function checkUpperWords(str: string) { return words.join(" "); } + +export function updateIds(newFLow: FlowType, baseFlow: FlowType) { + newFLow.data.nodes.forEach((node) => { + while (baseFlow.data.nodes.some((n) => n.id === node.id)) { + const newId = uuidv4(); + newFLow.data.edges.forEach((edge) => { + if (edge.source === node.id) { + edge.source = newId; + } + if (edge.target === node.id) { + edge.target = newId; + } + const index = edge.id.split("|").findIndex((e) => e === node.id); + if (index != -1) { + let tempList = edge.id.split("|"); + tempList[index] = newId; + edge.id = tempList.concat(newId).join("|"); + } + node.id = newId; + }); + } + }); + return newFLow; +} From a33a4f418cc39778066b245df1eb2ace1dd8686a Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa Date: Mon, 29 May 2023 18:25:10 -0300 Subject: [PATCH 12/12] Adding scrollbar on overflow itens modal --- .../src/components/inputComponent/index.tsx | 10 ++++--- .../NodeModal/components/ModalField/index.tsx | 22 ++++++++++++++-- src/frontend/src/modals/NodeModal/index.tsx | 26 ++++++++++++++++--- src/frontend/src/pages/FlowPage/index.tsx | 2 +- src/frontend/src/utils.ts | 2 ++ 5 files changed, 53 insertions(+), 9 deletions(-) diff --git a/src/frontend/src/components/inputComponent/index.tsx b/src/frontend/src/components/inputComponent/index.tsx index 15675d621..5430795e9 100644 --- a/src/frontend/src/components/inputComponent/index.tsx +++ b/src/frontend/src/components/inputComponent/index.tsx @@ -12,7 +12,7 @@ export default function InputComponent({ }: InputComponentType) { const [myValue, setMyValue] = useState(value ?? ""); const [pwdVisible, setPwdVisible] = useState(false); - const {setDisableCopyPaste} = useContext(TabsContext); + const { setDisableCopyPaste } = useContext(TabsContext); useEffect(() => { if (disabled) { setMyValue(""); @@ -29,8 +29,12 @@ export default function InputComponent({ > {if(disableCopyPaste) setDisableCopyPaste(true)}} - onBlur={() => {if(disableCopyPaste) setDisableCopyPaste(false)}} + onFocus={() => { + if (disableCopyPaste) setDisableCopyPaste(true); + }} + onBlur={() => { + if (disableCopyPaste) setDisableCopyPaste(false); + }} className={classNames( "block w-full pr-12 form-input dark:bg-gray-900 dark:border-gray-600 rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm", disabled ? " bg-gray-200 dark:bg-gray-700" : "", diff --git a/src/frontend/src/modals/NodeModal/components/ModalField/index.tsx b/src/frontend/src/modals/NodeModal/components/ModalField/index.tsx index 0c19b9611..0890b25a1 100644 --- a/src/frontend/src/modals/NodeModal/components/ModalField/index.tsx +++ b/src/frontend/src/modals/NodeModal/components/ModalField/index.tsx @@ -12,7 +12,15 @@ import PromptAreaComponent from "../../../../components/promptComponent"; import CodeAreaComponent from "../../../../components/codeAreaComponent"; import { classNames } from "../../../../utils"; -export default function ModalField({ data, title, required, id, name, type }) { +export default function ModalField({ + data, + title, + required, + id, + name, + type, + index, +}) { const { save } = useContext(TabsContext); const [enabled, setEnabled] = useState( data.node.template[name]?.value ?? false @@ -30,7 +38,17 @@ export default function ModalField({ data, title, required, id, name, type }) {
+ t.charAt(0) !== "_" && + data.node.template[t].advanced && + data.node.template[t].show + ).length - + 1 === + index + ? "pb-4" + : "" )} > {display && ( diff --git a/src/frontend/src/modals/NodeModal/index.tsx b/src/frontend/src/modals/NodeModal/index.tsx index 57c5a56e3..b44dd5bf3 100644 --- a/src/frontend/src/modals/NodeModal/index.tsx +++ b/src/frontend/src/modals/NodeModal/index.tsx @@ -3,7 +3,14 @@ import { XMarkIcon } from "@heroicons/react/24/outline"; import { Fragment, useContext, useRef, useState } from "react"; import { PopUpContext } from "../../contexts/popUpContext"; import { NodeDataType } from "../../types/flow"; -import { nodeColors, nodeIcons, toNormalCase, toTitleCase } from "../../utils"; +import { + classNames, + limitScrollFieldsModal, + nodeColors, + nodeIcons, + toNormalCase, + toTitleCase, +} from "../../utils"; import { typesContext } from "../../contexts/typesContext"; import ModalField from "./components/ModalField"; @@ -84,8 +91,20 @@ export default function NodeModal({ data }: { data: NodeDataType }) {
-
-
+
+
+ t.charAt(0) !== "_" && + data.node.template[t].advanced && + data.node.template[t].show + ).length > limitScrollFieldsModal + ? "overflow-scroll overflow-x-hidden custom-scroll" + : "overflow-hidden" + )} + >
{Object.keys(data.node.template) .filter( @@ -116,6 +135,7 @@ export default function NodeModal({ data }: { data: NodeDataType }) { } name={t} type={data.node.template[t].type} + index={idx} /> ); })} diff --git a/src/frontend/src/pages/FlowPage/index.tsx b/src/frontend/src/pages/FlowPage/index.tsx index 91c853f9b..f1a1f3b74 100644 --- a/src/frontend/src/pages/FlowPage/index.tsx +++ b/src/frontend/src/pages/FlowPage/index.tsx @@ -318,7 +318,7 @@ export default function FlowPage({ flow }: { flow: FlowType }) { setDisableCopyPaste(false); }} onPaneMouseLeave={() => { - console.log("saiu o mouse") + console.log("saiu o mouse"); setDisableCopyPaste(true); }} onNodesChange={onNodesChange} diff --git a/src/frontend/src/utils.ts b/src/frontend/src/utils.ts index 5084d1076..d8595b080 100644 --- a/src/frontend/src/utils.ts +++ b/src/frontend/src/utils.ts @@ -25,6 +25,8 @@ export function classNames(...classes: Array) { return classes.filter(Boolean).join(" "); } +export const limitScrollFieldsModal = 7; + export enum TypeModal { TEXT = 1, PROMPT = 2,