diff --git a/poetry.lock b/poetry.lock index 2242e976f..0760411e8 100644 --- a/poetry.lock +++ b/poetry.lock @@ -150,21 +150,21 @@ files = [ [[package]] name = "anthropic" -version = "0.3.1" +version = "0.3.2" description = "Client library for the anthropic API" category = "main" optional = false python-versions = ">=3.7,<4.0" files = [ - {file = "anthropic-0.3.1-py3-none-any.whl", hash = "sha256:bbb534e81018aa756fc4cc79b76b802871c99743a309aa3278f955999aa62d08"}, - {file = "anthropic-0.3.1.tar.gz", hash = "sha256:6714ae9192721278189bc619364b52bf42fd00d35f22172b9f8e4090382399ed"}, + {file = "anthropic-0.3.2-py3-none-any.whl", hash = "sha256:43ad86df406bf91419e3c651e20dcc69ae273c932c92c26973a1621a72ff1d86"}, + {file = "anthropic-0.3.2.tar.gz", hash = "sha256:f968e970bb0dfa38b1ec59db7bb4162fd1e0f2bef95c3203e926effe62bfcf38"}, ] [package.dependencies] anyio = ">=3.5.0" distro = ">=1.7.0" httpx = ">=0.23.0" -pydantic = ">=1.9.0" +pydantic = ">=1.9.0,<2.0.0" tokenizers = ">=0.13.0" typing-extensions = ">=4.1.1" @@ -973,14 +973,14 @@ tests = ["pytest"] [[package]] name = "dataclasses-json" -version = "0.5.8" +version = "0.5.9" description = "Easily serialize dataclasses to and from JSON" category = "main" optional = false python-versions = ">=3.6" files = [ - {file = "dataclasses-json-0.5.8.tar.gz", hash = "sha256:6572ac08ad9340abcb74fd8c4c8e9752db2a182a402c8e871d0a8aa119e3804e"}, - {file = "dataclasses_json-0.5.8-py3-none-any.whl", hash = "sha256:65b167c15fdf9bde27569c09ac18dd39bf1cc5b7998525024cb4678d2653946c"}, + {file = "dataclasses-json-0.5.9.tar.gz", hash = "sha256:e9ac87b73edc0141aafbce02b44e93553c3123ad574958f0fe52a534b6707e8e"}, + {file = "dataclasses_json-0.5.9-py3-none-any.whl", hash = "sha256:1280542631df1c375b7bc92e5b86d39e06c44760d7e3571a537b3b8acabf2f0c"}, ] [package.dependencies] @@ -989,7 +989,7 @@ marshmallow-enum = ">=1.5.1,<2.0.0" typing-inspect = ">=0.4.0" [package.extras] -dev = ["flake8", "hypothesis", "ipython", "mypy (>=0.710)", "portray", "pytest (>=7.2.0)", "simplejson", "types-dataclasses"] +dev = ["flake8", "hypothesis", "ipython", "mypy (>=0.710)", "portray", "pytest (>=7.2.0)", "setuptools", "simplejson", "twine", "types-dataclasses", "wheel"] [[package]] name = "debugpy" @@ -2998,14 +2998,14 @@ test = ["psutil", "pytest", "pytest-asyncio"] [[package]] name = "langchainplus-sdk" -version = "0.0.17" +version = "0.0.19" description = "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform." category = "main" optional = false python-versions = ">=3.8.1,<4.0" files = [ - {file = "langchainplus_sdk-0.0.17-py3-none-any.whl", hash = "sha256:899675fe850bb0829691ce7643d5c3b4425de1535b6f2d6ce1e5f5457ffb05bf"}, - {file = "langchainplus_sdk-0.0.17.tar.gz", hash = "sha256:6520c864a23dcadbe6fb7233a117347f6acc32725a97758e59354704c50de303"}, + {file = "langchainplus_sdk-0.0.19-py3-none-any.whl", hash = "sha256:2ee028280ad87063676efa1a0da1aa7801e8becf55b340c29e95cc536c2647f3"}, + {file = "langchainplus_sdk-0.0.19.tar.gz", hash = "sha256:8ec11f07c0ce35b164eb3bd7217bfdb9f7c20263508751b1e9e5e12c9960bf45"}, ] [package.dependencies] @@ -4406,78 +4406,66 @@ files = [ [[package]] name = "pillow" -version = "9.5.0" +version = "10.0.0" description = "Python Imaging Library (Fork)" category = "main" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "Pillow-9.5.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:ace6ca218308447b9077c14ea4ef381ba0b67ee78d64046b3f19cf4e1139ad16"}, - {file = "Pillow-9.5.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d3d403753c9d5adc04d4694d35cf0391f0f3d57c8e0030aac09d7678fa8030aa"}, - {file = "Pillow-9.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5ba1b81ee69573fe7124881762bb4cd2e4b6ed9dd28c9c60a632902fe8db8b38"}, - {file = "Pillow-9.5.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fe7e1c262d3392afcf5071df9afa574544f28eac825284596ac6db56e6d11062"}, - {file = "Pillow-9.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f36397bf3f7d7c6a3abdea815ecf6fd14e7fcd4418ab24bae01008d8d8ca15e"}, - {file = "Pillow-9.5.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:252a03f1bdddce077eff2354c3861bf437c892fb1832f75ce813ee94347aa9b5"}, - {file = "Pillow-9.5.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:85ec677246533e27770b0de5cf0f9d6e4ec0c212a1f89dfc941b64b21226009d"}, - {file = "Pillow-9.5.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b416f03d37d27290cb93597335a2f85ed446731200705b22bb927405320de903"}, - {file = "Pillow-9.5.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:1781a624c229cb35a2ac31cc4a77e28cafc8900733a864870c49bfeedacd106a"}, - {file = "Pillow-9.5.0-cp310-cp310-win32.whl", hash = "sha256:8507eda3cd0608a1f94f58c64817e83ec12fa93a9436938b191b80d9e4c0fc44"}, - {file = "Pillow-9.5.0-cp310-cp310-win_amd64.whl", hash = "sha256:d3c6b54e304c60c4181da1c9dadf83e4a54fd266a99c70ba646a9baa626819eb"}, - {file = "Pillow-9.5.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:7ec6f6ce99dab90b52da21cf0dc519e21095e332ff3b399a357c187b1a5eee32"}, - {file = "Pillow-9.5.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:560737e70cb9c6255d6dcba3de6578a9e2ec4b573659943a5e7e4af13f298f5c"}, - {file = "Pillow-9.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:96e88745a55b88a7c64fa49bceff363a1a27d9a64e04019c2281049444a571e3"}, - {file = "Pillow-9.5.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d9c206c29b46cfd343ea7cdfe1232443072bbb270d6a46f59c259460db76779a"}, - {file = "Pillow-9.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cfcc2c53c06f2ccb8976fb5c71d448bdd0a07d26d8e07e321c103416444c7ad1"}, - {file = "Pillow-9.5.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:a0f9bb6c80e6efcde93ffc51256d5cfb2155ff8f78292f074f60f9e70b942d99"}, - {file = "Pillow-9.5.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:8d935f924bbab8f0a9a28404422da8af4904e36d5c33fc6f677e4c4485515625"}, - {file = "Pillow-9.5.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:fed1e1cf6a42577953abbe8e6cf2fe2f566daebde7c34724ec8803c4c0cda579"}, - {file = "Pillow-9.5.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c1170d6b195555644f0616fd6ed929dfcf6333b8675fcca044ae5ab110ded296"}, - {file = "Pillow-9.5.0-cp311-cp311-win32.whl", hash = "sha256:54f7102ad31a3de5666827526e248c3530b3a33539dbda27c6843d19d72644ec"}, - {file = "Pillow-9.5.0-cp311-cp311-win_amd64.whl", hash = "sha256:cfa4561277f677ecf651e2b22dc43e8f5368b74a25a8f7d1d4a3a243e573f2d4"}, - {file = "Pillow-9.5.0-cp311-cp311-win_arm64.whl", hash = "sha256:965e4a05ef364e7b973dd17fc765f42233415974d773e82144c9bbaaaea5d089"}, - {file = "Pillow-9.5.0-cp312-cp312-win32.whl", hash = "sha256:22baf0c3cf0c7f26e82d6e1adf118027afb325e703922c8dfc1d5d0156bb2eeb"}, - {file = "Pillow-9.5.0-cp312-cp312-win_amd64.whl", hash = "sha256:432b975c009cf649420615388561c0ce7cc31ce9b2e374db659ee4f7d57a1f8b"}, - {file = "Pillow-9.5.0-cp37-cp37m-macosx_10_10_x86_64.whl", hash = "sha256:5d4ebf8e1db4441a55c509c4baa7a0587a0210f7cd25fcfe74dbbce7a4bd1906"}, - {file = "Pillow-9.5.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:375f6e5ee9620a271acb6820b3d1e94ffa8e741c0601db4c0c4d3cb0a9c224bf"}, - {file = "Pillow-9.5.0-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:99eb6cafb6ba90e436684e08dad8be1637efb71c4f2180ee6b8f940739406e78"}, - {file = "Pillow-9.5.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2dfaaf10b6172697b9bceb9a3bd7b951819d1ca339a5ef294d1f1ac6d7f63270"}, - {file = "Pillow-9.5.0-cp37-cp37m-manylinux_2_28_aarch64.whl", hash = "sha256:763782b2e03e45e2c77d7779875f4432e25121ef002a41829d8868700d119392"}, - {file = "Pillow-9.5.0-cp37-cp37m-manylinux_2_28_x86_64.whl", hash = "sha256:35f6e77122a0c0762268216315bf239cf52b88865bba522999dc38f1c52b9b47"}, - {file = "Pillow-9.5.0-cp37-cp37m-win32.whl", hash = "sha256:aca1c196f407ec7cf04dcbb15d19a43c507a81f7ffc45b690899d6a76ac9fda7"}, - {file = "Pillow-9.5.0-cp37-cp37m-win_amd64.whl", hash = "sha256:322724c0032af6692456cd6ed554bb85f8149214d97398bb80613b04e33769f6"}, - {file = "Pillow-9.5.0-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:a0aa9417994d91301056f3d0038af1199eb7adc86e646a36b9e050b06f526597"}, - {file = "Pillow-9.5.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:f8286396b351785801a976b1e85ea88e937712ee2c3ac653710a4a57a8da5d9c"}, - {file = "Pillow-9.5.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c830a02caeb789633863b466b9de10c015bded434deb3ec87c768e53752ad22a"}, - {file = "Pillow-9.5.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fbd359831c1657d69bb81f0db962905ee05e5e9451913b18b831febfe0519082"}, - {file = "Pillow-9.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f8fc330c3370a81bbf3f88557097d1ea26cd8b019d6433aa59f71195f5ddebbf"}, - {file = "Pillow-9.5.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:7002d0797a3e4193c7cdee3198d7c14f92c0836d6b4a3f3046a64bd1ce8df2bf"}, - {file = "Pillow-9.5.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:229e2c79c00e85989a34b5981a2b67aa079fd08c903f0aaead522a1d68d79e51"}, - {file = "Pillow-9.5.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:9adf58f5d64e474bed00d69bcd86ec4bcaa4123bfa70a65ce72e424bfb88ed96"}, - {file = "Pillow-9.5.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:662da1f3f89a302cc22faa9f14a262c2e3951f9dbc9617609a47521c69dd9f8f"}, - {file = "Pillow-9.5.0-cp38-cp38-win32.whl", hash = "sha256:6608ff3bf781eee0cd14d0901a2b9cc3d3834516532e3bd673a0a204dc8615fc"}, - {file = "Pillow-9.5.0-cp38-cp38-win_amd64.whl", hash = "sha256:e49eb4e95ff6fd7c0c402508894b1ef0e01b99a44320ba7d8ecbabefddcc5569"}, - {file = "Pillow-9.5.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:482877592e927fd263028c105b36272398e3e1be3269efda09f6ba21fd83ec66"}, - {file = "Pillow-9.5.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3ded42b9ad70e5f1754fb7c2e2d6465a9c842e41d178f262e08b8c85ed8a1d8e"}, - {file = "Pillow-9.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c446d2245ba29820d405315083d55299a796695d747efceb5717a8b450324115"}, - {file = "Pillow-9.5.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8aca1152d93dcc27dc55395604dcfc55bed5f25ef4c98716a928bacba90d33a3"}, - {file = "Pillow-9.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:608488bdcbdb4ba7837461442b90ea6f3079397ddc968c31265c1e056964f1ef"}, - {file = "Pillow-9.5.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:60037a8db8750e474af7ffc9faa9b5859e6c6d0a50e55c45576bf28be7419705"}, - {file = "Pillow-9.5.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:07999f5834bdc404c442146942a2ecadd1cb6292f5229f4ed3b31e0a108746b1"}, - {file = "Pillow-9.5.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:a127ae76092974abfbfa38ca2d12cbeddcdeac0fb71f9627cc1135bedaf9d51a"}, - {file = "Pillow-9.5.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:489f8389261e5ed43ac8ff7b453162af39c3e8abd730af8363587ba64bb2e865"}, - {file = "Pillow-9.5.0-cp39-cp39-win32.whl", hash = "sha256:9b1af95c3a967bf1da94f253e56b6286b50af23392a886720f563c547e48e964"}, - {file = "Pillow-9.5.0-cp39-cp39-win_amd64.whl", hash = "sha256:77165c4a5e7d5a284f10a6efaa39a0ae8ba839da344f20b111d62cc932fa4e5d"}, - {file = "Pillow-9.5.0-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:833b86a98e0ede388fa29363159c9b1a294b0905b5128baf01db683672f230f5"}, - {file = "Pillow-9.5.0-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:aaf305d6d40bd9632198c766fb64f0c1a83ca5b667f16c1e79e1661ab5060140"}, - {file = "Pillow-9.5.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0852ddb76d85f127c135b6dd1f0bb88dbb9ee990d2cd9aa9e28526c93e794fba"}, - {file = "Pillow-9.5.0-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:91ec6fe47b5eb5a9968c79ad9ed78c342b1f97a091677ba0e012701add857829"}, - {file = "Pillow-9.5.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:cb841572862f629b99725ebaec3287fc6d275be9b14443ea746c1dd325053cbd"}, - {file = "Pillow-9.5.0-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:c380b27d041209b849ed246b111b7c166ba36d7933ec6e41175fd15ab9eb1572"}, - {file = "Pillow-9.5.0-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7c9af5a3b406a50e313467e3565fc99929717f780164fe6fbb7704edba0cebbe"}, - {file = "Pillow-9.5.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5671583eab84af046a397d6d0ba25343c00cd50bce03787948e0fff01d4fd9b1"}, - {file = "Pillow-9.5.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:84a6f19ce086c1bf894644b43cd129702f781ba5751ca8572f08aa40ef0ab7b7"}, - {file = "Pillow-9.5.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:1e7723bd90ef94eda669a3c2c19d549874dd5badaeefabefd26053304abe5799"}, - {file = "Pillow-9.5.0.tar.gz", hash = "sha256:bf548479d336726d7a0eceb6e767e179fbde37833ae42794602631a070d630f1"}, + {file = "Pillow-10.0.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:1f62406a884ae75fb2f818694469519fb685cc7eaff05d3451a9ebe55c646891"}, + {file = "Pillow-10.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d5db32e2a6ccbb3d34d87c87b432959e0db29755727afb37290e10f6e8e62614"}, + {file = "Pillow-10.0.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:edf4392b77bdc81f36e92d3a07a5cd072f90253197f4a52a55a8cec48a12483b"}, + {file = "Pillow-10.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:520f2a520dc040512699f20fa1c363eed506e94248d71f85412b625026f6142c"}, + {file = "Pillow-10.0.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:8c11160913e3dd06c8ffdb5f233a4f254cb449f4dfc0f8f4549eda9e542c93d1"}, + {file = "Pillow-10.0.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:a74ba0c356aaa3bb8e3eb79606a87669e7ec6444be352870623025d75a14a2bf"}, + {file = "Pillow-10.0.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d5d0dae4cfd56969d23d94dc8e89fb6a217be461c69090768227beb8ed28c0a3"}, + {file = "Pillow-10.0.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:22c10cc517668d44b211717fd9775799ccec4124b9a7f7b3635fc5386e584992"}, + {file = "Pillow-10.0.0-cp310-cp310-win_amd64.whl", hash = "sha256:dffe31a7f47b603318c609f378ebcd57f1554a3a6a8effbc59c3c69f804296de"}, + {file = "Pillow-10.0.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:9fb218c8a12e51d7ead2a7c9e101a04982237d4855716af2e9499306728fb485"}, + {file = "Pillow-10.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d35e3c8d9b1268cbf5d3670285feb3528f6680420eafe35cccc686b73c1e330f"}, + {file = "Pillow-10.0.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3ed64f9ca2f0a95411e88a4efbd7a29e5ce2cea36072c53dd9d26d9c76f753b3"}, + {file = "Pillow-10.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b6eb5502f45a60a3f411c63187db83a3d3107887ad0d036c13ce836f8a36f1d"}, + {file = "Pillow-10.0.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:c1fbe7621c167ecaa38ad29643d77a9ce7311583761abf7836e1510c580bf3dd"}, + {file = "Pillow-10.0.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:cd25d2a9d2b36fcb318882481367956d2cf91329f6892fe5d385c346c0649629"}, + {file = "Pillow-10.0.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:3b08d4cc24f471b2c8ca24ec060abf4bebc6b144cb89cba638c720546b1cf538"}, + {file = "Pillow-10.0.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d737a602fbd82afd892ca746392401b634e278cb65d55c4b7a8f48e9ef8d008d"}, + {file = "Pillow-10.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:3a82c40d706d9aa9734289740ce26460a11aeec2d9c79b7af87bb35f0073c12f"}, + {file = "Pillow-10.0.0-cp312-cp312-macosx_10_10_x86_64.whl", hash = "sha256:d80cf684b541685fccdd84c485b31ce73fc5c9b5d7523bf1394ce134a60c6883"}, + {file = "Pillow-10.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:76de421f9c326da8f43d690110f0e79fe3ad1e54be811545d7d91898b4c8493e"}, + {file = "Pillow-10.0.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:81ff539a12457809666fef6624684c008e00ff6bf455b4b89fd00a140eecd640"}, + {file = "Pillow-10.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce543ed15570eedbb85df19b0a1a7314a9c8141a36ce089c0a894adbfccb4568"}, + {file = "Pillow-10.0.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:685ac03cc4ed5ebc15ad5c23bc555d68a87777586d970c2c3e216619a5476223"}, + {file = "Pillow-10.0.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:d72e2ecc68a942e8cf9739619b7f408cc7b272b279b56b2c83c6123fcfa5cdff"}, + {file = "Pillow-10.0.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d50b6aec14bc737742ca96e85d6d0a5f9bfbded018264b3b70ff9d8c33485551"}, + {file = "Pillow-10.0.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:00e65f5e822decd501e374b0650146063fbb30a7264b4d2744bdd7b913e0cab5"}, + {file = "Pillow-10.0.0-cp312-cp312-win_amd64.whl", hash = "sha256:f31f9fdbfecb042d046f9d91270a0ba28368a723302786c0009ee9b9f1f60199"}, + {file = "Pillow-10.0.0-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:349930d6e9c685c089284b013478d6f76e3a534e36ddfa912cde493f235372f3"}, + {file = "Pillow-10.0.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:3a684105f7c32488f7153905a4e3015a3b6c7182e106fe3c37fbb5ef3e6994c3"}, + {file = "Pillow-10.0.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b4f69b3700201b80bb82c3a97d5e9254084f6dd5fb5b16fc1a7b974260f89f43"}, + {file = "Pillow-10.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3f07ea8d2f827d7d2a49ecf1639ec02d75ffd1b88dcc5b3a61bbb37a8759ad8d"}, + {file = "Pillow-10.0.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:040586f7d37b34547153fa383f7f9aed68b738992380ac911447bb78f2abe530"}, + {file = "Pillow-10.0.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:f88a0b92277de8e3ca715a0d79d68dc82807457dae3ab8699c758f07c20b3c51"}, + {file = "Pillow-10.0.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:c7cf14a27b0d6adfaebb3ae4153f1e516df54e47e42dcc073d7b3d76111a8d86"}, + {file = "Pillow-10.0.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:3400aae60685b06bb96f99a21e1ada7bc7a413d5f49bce739828ecd9391bb8f7"}, + {file = "Pillow-10.0.0-cp38-cp38-win_amd64.whl", hash = "sha256:dbc02381779d412145331789b40cc7b11fdf449e5d94f6bc0b080db0a56ea3f0"}, + {file = "Pillow-10.0.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:9211e7ad69d7c9401cfc0e23d49b69ca65ddd898976d660a2fa5904e3d7a9baa"}, + {file = "Pillow-10.0.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:faaf07ea35355b01a35cb442dd950d8f1bb5b040a7787791a535de13db15ed90"}, + {file = "Pillow-10.0.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c9f72a021fbb792ce98306ffb0c348b3c9cb967dce0f12a49aa4c3d3fdefa967"}, + {file = "Pillow-10.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9f7c16705f44e0504a3a2a14197c1f0b32a95731d251777dcb060aa83022cb2d"}, + {file = "Pillow-10.0.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:76edb0a1fa2b4745fb0c99fb9fb98f8b180a1bbceb8be49b087e0b21867e77d3"}, + {file = "Pillow-10.0.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:368ab3dfb5f49e312231b6f27b8820c823652b7cd29cfbd34090565a015e99ba"}, + {file = "Pillow-10.0.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:608bfdee0d57cf297d32bcbb3c728dc1da0907519d1784962c5f0c68bb93e5a3"}, + {file = "Pillow-10.0.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5c6e3df6bdd396749bafd45314871b3d0af81ff935b2d188385e970052091017"}, + {file = "Pillow-10.0.0-cp39-cp39-win_amd64.whl", hash = "sha256:7be600823e4c8631b74e4a0d38384c73f680e6105a7d3c6824fcf226c178c7e6"}, + {file = "Pillow-10.0.0-pp310-pypy310_pp73-macosx_10_10_x86_64.whl", hash = "sha256:92be919bbc9f7d09f7ae343c38f5bb21c973d2576c1d45600fce4b74bafa7ac0"}, + {file = "Pillow-10.0.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f8182b523b2289f7c415f589118228d30ac8c355baa2f3194ced084dac2dbba"}, + {file = "Pillow-10.0.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:38250a349b6b390ee6047a62c086d3817ac69022c127f8a5dc058c31ccef17f3"}, + {file = "Pillow-10.0.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:88af2003543cc40c80f6fca01411892ec52b11021b3dc22ec3bc9d5afd1c5334"}, + {file = "Pillow-10.0.0-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:c189af0545965fa8d3b9613cfdb0cd37f9d71349e0f7750e1fd704648d475ed2"}, + {file = "Pillow-10.0.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce7b031a6fc11365970e6a5686d7ba8c63e4c1cf1ea143811acbb524295eabed"}, + {file = "Pillow-10.0.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:db24668940f82321e746773a4bc617bfac06ec831e5c88b643f91f122a785684"}, + {file = "Pillow-10.0.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:efe8c0681042536e0d06c11f48cebe759707c9e9abf880ee213541c5b46c5bf3"}, + {file = "Pillow-10.0.0.tar.gz", hash = "sha256:9c82b5b3e043c7af0d95792d0d20ccf68f61a1fec6b3530e718b688422727396"}, ] [package.extras] @@ -7175,14 +7163,14 @@ test = ["coverage", "pytest", "pytest-cov"] [[package]] name = "unstructured" -version = "0.7.11" +version = "0.7.12" description = "A library that prepares raw documents for downstream ML tasks." category = "main" optional = false python-versions = ">=3.7.0" files = [ - {file = "unstructured-0.7.11-py3-none-any.whl", hash = "sha256:1974828f7e8b5e0935c52b468bd5879a962122ed41433db9d36ec1ccbb3b9f78"}, - {file = "unstructured-0.7.11.tar.gz", hash = "sha256:0cd7119f2b3a5d60fa4df50c0cd8b24c9c5fbdc1baa4daf0a6d8daf05d616a2b"}, + {file = "unstructured-0.7.12-py3-none-any.whl", hash = "sha256:6dec4f23574e213f30bccb680a4fb84c95617092ce4abf5d8955cc71af402fef"}, + {file = "unstructured-0.7.12.tar.gz", hash = "sha256:3dcddea34f52e1070f38fd10063b3b0f64bc4cbe5b778d6b86b5d33262d625cd"}, ] [package.dependencies] @@ -7209,6 +7197,7 @@ xlrd = "*" [package.extras] azure = ["adlfs", "fsspec"] discord = ["discord-py"] +dropbox = ["dropboxdrivefs", "fsspec"] gcs = ["fsspec", "gcsfs"] github = ["pygithub (==1.58.2)"] gitlab = ["python-gitlab"] diff --git a/pyproject.toml b/pyproject.toml index 81212f002..a9df0a27a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "langflow" -version = "0.2.8" +version = "0.2.10" description = "A Python package with a built-in web application" authors = ["Logspace "] maintainers = [ diff --git a/src/backend/langflow/__main__.py b/src/backend/langflow/__main__.py index 9980a5d2f..322c6b6a9 100644 --- a/src/backend/langflow/__main__.py +++ b/src/backend/langflow/__main__.py @@ -271,7 +271,7 @@ def run_langflow(host, port, log_level, options, app): except KeyboardInterrupt: pass except Exception as e: - logger.error(e) + logger.exception(e) sys.exit(1) diff --git a/src/backend/langflow/config.yaml b/src/backend/langflow/config.yaml index aa1206d59..3745b9e22 100644 --- a/src/backend/langflow/config.yaml +++ b/src/backend/langflow/config.yaml @@ -59,6 +59,8 @@ documentloaders: documentation: "https://python.langchain.com/docs/modules/data_connection/document_loaders/how_to/html" UnstructuredMarkdownLoader: documentation: "https://python.langchain.com/docs/modules/data_connection/document_loaders/how_to/markdown" + PyPDFDirectoryLoader: + documentation: "https://python.langchain.com/docs/modules/data_connection/document_loaders/how_to/pdf" PyPDFLoader: documentation: "https://python.langchain.com/docs/modules/data_connection/document_loaders/how_to/pdf" UnstructuredPowerPointLoader: diff --git a/src/backend/langflow/database/base.py b/src/backend/langflow/database/base.py index 69f8b993b..a0efcdd2a 100644 --- a/src/backend/langflow/database/base.py +++ b/src/backend/langflow/database/base.py @@ -1,6 +1,6 @@ from langflow.settings import settings from sqlmodel import SQLModel, Session, create_engine - +from langflow.utils.logger import logger if settings.database_url.startswith("sqlite"): connect_args = {"check_same_thread": False} @@ -10,7 +10,9 @@ engine = create_engine(settings.database_url, connect_args=connect_args) def create_db_and_tables(): + logger.debug("Creating database and tables") SQLModel.metadata.create_all(engine) + logger.debug("Database and tables created") def get_session(): diff --git a/src/backend/langflow/interface/initialize/loading.py b/src/backend/langflow/interface/initialize/loading.py index f214ab74b..9c618b1cd 100644 --- a/src/backend/langflow/interface/initialize/loading.py +++ b/src/backend/langflow/interface/initialize/loading.py @@ -100,6 +100,8 @@ def instantiate_llm(node_type, class_object, params: Dict): def instantiate_memory(node_type, class_object, params): try: + if "retriever" in params and hasattr(params["retriever"], "as_retriever"): + params["retriever"] = params["retriever"].as_retriever() return class_object(**params) # I want to catch a specific attribute error that happens # when the object does not have a cursor attribute diff --git a/src/backend/langflow/interface/run.py b/src/backend/langflow/interface/run.py index a3efe2b0c..ff888487f 100644 --- a/src/backend/langflow/interface/run.py +++ b/src/backend/langflow/interface/run.py @@ -62,6 +62,10 @@ def update_memory_keys(langchain_object, possible_new_mem_key): if key not in [langchain_object.memory.memory_key, possible_new_mem_key] ][0] - langchain_object.memory.input_key = input_key - langchain_object.memory.output_key = output_key - langchain_object.memory.memory_key = possible_new_mem_key + keys = [input_key, output_key, possible_new_mem_key] + attrs = ["input_key", "output_key", "memory_key"] + for key, attr in zip(keys, attrs): + try: + setattr(langchain_object.memory, attr, key) + except ValueError as exc: + logger.debug(f"{langchain_object.memory} has no attribute {attr} ({exc})") diff --git a/src/backend/langflow/processing/base.py b/src/backend/langflow/processing/base.py index 97b0d5be0..b332eac7c 100644 --- a/src/backend/langflow/processing/base.py +++ b/src/backend/langflow/processing/base.py @@ -51,5 +51,6 @@ async def get_result_and_steps(langchain_object, message: str, **kwargs): ) thought = format_actions(intermediate_steps) if intermediate_steps else "" except Exception as exc: + logger.exception(exc) raise ValueError(f"Error: {str(exc)}") from exc return result, thought diff --git a/src/backend/langflow/settings.py b/src/backend/langflow/settings.py index d2de4f671..b2571780e 100644 --- a/src/backend/langflow/settings.py +++ b/src/backend/langflow/settings.py @@ -2,6 +2,7 @@ import os import yaml from pydantic import BaseSettings, root_validator +from langflow.utils.logger import logger class Settings(BaseSettings): @@ -20,10 +21,21 @@ class Settings(BaseSettings): textsplitters: dict = {} utilities: dict = {} dev: bool = False - database_url: str = "sqlite:///./langflow.db" + database_url: str cache: str = "InMemoryCache" remove_api_keys: bool = False + @root_validator(pre=True) + def set_database_url(cls, values): + if "database_url" not in values: + logger.debug("No database_url provided, trying DATABASE_URL env variable") + if database_url := os.getenv("DATABASE_URL"): + values["database_url"] = database_url + else: + logger.debug("No DATABASE_URL env variable, using sqlite database") + values["database_url"] = "sqlite:///./langflow.db" + return values + class Config: validate_assignment = True extra = "ignore" diff --git a/src/backend/langflow/template/frontend_node/documentloaders.py b/src/backend/langflow/template/frontend_node/documentloaders.py index 501aa361e..5a43634a2 100644 --- a/src/backend/langflow/template/frontend_node/documentloaders.py +++ b/src/backend/langflow/template/frontend_node/documentloaders.py @@ -120,29 +120,23 @@ class DocumentLoaderFrontNode(FrontendNode): "DirectoryLoader", "ReadTheDocsLoader", "NotionDirectoryLoader", + "PyPDFDirectoryLoader", }: name = "path" display_name = "Local directory" if name: - self.template.add_field( - TemplateField( - field_type="str", - required=True, - show=True, - name=name, - value="", - display_name=display_name, - ) - ) if self.template.type_name in {"DirectoryLoader"}: + for field in build_directory_loader_fields(): + self.template.add_field(field) + else: self.template.add_field( TemplateField( field_type="str", required=True, show=True, - name="glob", - value="**/*.txt", - display_name="glob", + name=name, + value="", + display_name=display_name, ) ) # add a metadata field of type dict @@ -165,3 +159,101 @@ class DocumentLoaderFrontNode(FrontendNode): field.show = True field.advanced = False field.show = True + + +def build_directory_loader_fields(): + # if loader_kwargs is None: + # loader_kwargs = {} + # self.path = path + # self.glob = glob + # self.load_hidden = load_hidden + # self.loader_cls = loader_cls + # self.loader_kwargs = loader_kwargs + # self.silent_errors = silent_errors + # self.recursive = recursive + # self.show_progress = show_progress + # self.use_multithreading = use_multithreading + # self.max_concurrency = max_concurrency + # Based on the above fields, we can build the following fields: + # path, glob, load_hidden, silent_errors, recursive, show_progress, use_multithreading, max_concurrency + # path + path = TemplateField( + field_type="str", + required=True, + show=True, + name="path", + value="", + display_name="Local directory", + advanced=False, + ) + # glob + glob = TemplateField( + field_type="str", + required=True, + show=True, + name="glob", + value="**/*.txt", + display_name="glob", + advanced=False, + ) + # load_hidden + load_hidden = TemplateField( + field_type="bool", + required=False, + show=True, + name="load_hidden", + value="False", + display_name="Load hidden files", + advanced=True, + ) + # silent_errors + silent_errors = TemplateField( + field_type="bool", + required=False, + show=True, + name="silent_errors", + value="False", + display_name="Silent errors", + advanced=True, + ) + # recursive + recursive = TemplateField( + field_type="bool", + required=False, + show=True, + name="recursive", + value="True", + display_name="Recursive", + advanced=True, + ) + + # use_multithreading + use_multithreading = TemplateField( + field_type="bool", + required=False, + show=True, + name="use_multithreading", + value="True", + display_name="Use multithreading", + advanced=True, + ) + # max_concurrency + max_concurrency = TemplateField( + field_type="int", + required=False, + show=True, + name="max_concurrency", + value=10, + display_name="Max concurrency", + advanced=True, + ) + + return ( + path, + glob, + load_hidden, + silent_errors, + recursive, + use_multithreading, + max_concurrency, + ) diff --git a/src/backend/langflow/template/frontend_node/memories.py b/src/backend/langflow/template/frontend_node/memories.py index 37177c72e..6d490212f 100644 --- a/src/backend/langflow/template/frontend_node/memories.py +++ b/src/backend/langflow/template/frontend_node/memories.py @@ -37,16 +37,17 @@ class MemoryFrontendNode(FrontendNode): value="", ) ) - self.template.add_field( - TemplateField( - field_type="str", - required=False, - show=True, - name="output_key", - advanced=True, - value="", + if self.template.type_name not in {"VectorStoreRetrieverMemory"}: + self.template.add_field( + TemplateField( + field_type="str", + required=False, + show=True, + name="output_key", + advanced=True, + value="", + ) ) - ) @staticmethod def format_field(field: TemplateField, name: Optional[str] = None) -> None: diff --git a/src/frontend/src/constants.tsx b/src/frontend/src/constants.tsx index ed2d5b021..e855cdaa2 100644 --- a/src/frontend/src/constants.tsx +++ b/src/frontend/src/constants.tsx @@ -194,257 +194,6 @@ export const NAV_DISPLAY_STYLE = export const BUTTON_DIV_STYLE = " flex gap-2 "; (" focus:ring-1 focus:ring-offset-1 focus:ring-ring focus:outline-none "); -/** - * Default description for the flow - * @constant - */ -export const DESCRIPTIONS: string[] = [ - "Chain the Words, Master Language!", - "Language Architect at Work!", - "Empowering Language Engineering.", - "Craft Language Connections Here.", - "Create, Connect, Converse.", - "Smart Chains, Smarter Conversations.", - "Bridging Prompts for Brilliance.", - "Language Models, Unleashed.", - "Your Hub for Text Generation.", - "Promptly Ingenious!", - "Building Linguistic Labyrinths.", - "LangFlow: Create, Chain, Communicate.", - "Connect the Dots, Craft Language.", - "Interactive Language Weaving.", - "Generate, Innovate, Communicate.", - "Conversation Catalyst Engine.", - "Language Chainlink Master.", - "Design Dialogues with LangFlow.", - "Nurture NLP Nodes Here.", - "Conversational Cartography Unlocked.", - "Design, Develop, Dialogize.", -]; - -/** - * Adjectives for the name of the flow - * @constant - * - */ -export const ADJECTIVES: string[] = [ - "admiring", - "adoring", - "agitated", - "amazing", - "angry", - "awesome", - "backstabbing", - "berserk", - "big", - "boring", - "clever", - "cocky", - "compassionate", - "condescending", - "cranky", - "desperate", - "determined", - "distracted", - "dreamy", - "drunk", - "ecstatic", - "elated", - "elegant", - "evil", - "fervent", - "focused", - "furious", - "gigantic", - "gloomy", - "goofy", - "grave", - "happy", - "high", - "hopeful", - "hungry", - "insane", - "jolly", - "jovial", - "kickass", - "lonely", - "loving", - "mad", - "modest", - "naughty", - "nauseous", - "nostalgic", - "pedantic", - "pensive", - "prickly", - "reverent", - "romantic", - "sad", - "serene", - "sharp", - "sick", - "silly", - "sleepy", - "small", - "stoic", - "stupefied", - "suspicious", - "tender", - "thirsty", - "tiny", - "trusting", -]; - -/** - * Nouns for the name of the flow - * @constant - * - */ -export const NOUNS: string[] = [ - "albattani", - "allen", - "almeida", - "archimedes", - "ardinghelli", - "aryabhata", - "austin", - "babbage", - "banach", - "bardeen", - "bartik", - "bassi", - "bell", - "bhabha", - "bhaskara", - "blackwell", - "bohr", - "booth", - "borg", - "bose", - "boyd", - "brahmagupta", - "brattain", - "brown", - "carson", - "chandrasekhar", - "colden", - "cori", - "cray", - "curie", - "darwin", - "davinci", - "dijkstra", - "dubinsky", - "easley", - "einstein", - "elion", - "engelbart", - "euclid", - "euler", - "fermat", - "fermi", - "feynman", - "franklin", - "galileo", - "gates", - "goldberg", - "goldstine", - "goldwasser", - "golick", - "goodall", - "hamilton", - "hawking", - "heisenberg", - "heyrovsky", - "hodgkin", - "hoover", - "hopper", - "hugle", - "hypatia", - "jang", - "jennings", - "jepsen", - "joliot", - "jones", - "kalam", - "kare", - "keller", - "khorana", - "kilby", - "kirch", - "knuth", - "kowalevski", - "lalande", - "lamarr", - "leakey", - "leavitt", - "lichterman", - "liskov", - "lovelace", - "lumiere", - "mahavira", - "mayer", - "mccarthy", - "mcclintock", - "mclean", - "mcnulty", - "meitner", - "meninsky", - "mestorf", - "minsky", - "mirzakhani", - "morse", - "murdock", - "newton", - "nobel", - "noether", - "northcutt", - "noyce", - "panini", - "pare", - "pasteur", - "payne", - "perlman", - "pike", - "poincare", - "poitras", - "ptolemy", - "raman", - "ramanujan", - "ride", - "ritchie", - "roentgen", - "rosalind", - "saha", - "sammet", - "shaw", - "shirley", - "shockley", - "sinoussi", - "snyder", - "spence", - "stallman", - "stonebraker", - "swanson", - "swartz", - "swirles", - "tesla", - "thompson", - "torvalds", - "turing", - "varahamihira", - "visvesvaraya", - "volhard", - "wescoff", - "williams", - "wilson", - "wing", - "wozniak", - "wright", - "yalow", - "yonath", -]; - /** * Header text for user projects * @constant diff --git a/src/frontend/src/flow_constants.tsx b/src/frontend/src/flow_constants.tsx new file mode 100644 index 000000000..e9cf0478b --- /dev/null +++ b/src/frontend/src/flow_constants.tsx @@ -0,0 +1,364 @@ +/** + * Default description for the flow + * @constant + */ +export const DESCRIPTIONS: string[] = [ + "Chain the Words, Master Language!", + "Language Architect at Work!", + "Empowering Language Engineering.", + "Craft Language Connections Here.", + "Create, Connect, Converse.", + "Smart Chains, Smarter Conversations.", + "Bridging Prompts for Brilliance.", + "Language Models, Unleashed.", + "Your Hub for Text Generation.", + "Promptly Ingenious!", + "Building Linguistic Labyrinths.", + "Create, Chain, Communicate.", + "Connect the Dots, Craft Language.", + "Interactive Language Weaving.", + "Generate, Innovate, Communicate.", + "Conversation Catalyst Engine.", + "Language Chainlink Master.", + "Design Dialogues with LangFlow.", + "Nurture NLP Nodes Here.", + "Conversational Cartography Unlocked.", + "Design, Develop, Dialogize.", + "Unleashing Linguistic Creativity.", + "Graph Your Way to Great Conversations.", + "The Power of Language at Your Fingertips.", + "Sculpting Language with Precision.", + "Where Language Meets Logic.", + "Building Intelligent Interactions.", + "Your Passport to Linguistic Landscapes.", + "Create, Curate, Communicate with LangFlow.", + "Flow into the Future of Language.", + "Mapping Meaningful Conversations.", + "Unravel the Art of Articulation.", + "Language Engineering Excellence.", + "Navigate the Networks of Conversation.", + "Crafting Conversations, One Node at a Time.", + "The Pinnacle of Prompt Generation.", + "Language Models, Mapped and Mastered.", + "Powerful Prompts, Perfectly Positioned.", + "Innovation in Interaction with LangFlow.", + "Your Toolkit for Text Generation.", + "Unfolding Linguistic Possibilities.", + "Building Powerful Solutions with Language Models.", + "Uncover Business Opportunities with NLP.", + "Harness the Power of Conversational AI.", + "Transform Your Business with Smart Dialogues.", + "Craft Meaningful Interactions, Generate Value.", + "Unleashing Business Potential through Language Engineering.", + "Empowering Enterprises with Intelligent Interactions.", + "Driving Innovation in Business Communication.", + "Catalyzing Business Growth through Conversational AI.", + "Text Generation Meets Business Transformation.", + "Navigate the Linguistic Landscape, Discover Opportunities.", + "Create Powerful Connections, Boost Business Value.", + "Empowering Communication, Enabling Opportunities.", + "Advanced NLP for Groundbreaking Business Solutions.", + "Innovation in Interaction, Revolution in Revenue.", + "Maximize Impact with Intelligent Conversations.", + "Beyond Text Generation - Unleashing Business Opportunities.", + "Unlock the Power of AI in Your Business Conversations.", + "Crafting Dialogues that Drive Business Success.", + "Engineered for Excellence, Built for Business.", +]; + +/** + * Adjectives for the name of the flow + * @constant + * + */ +export const ADJECTIVES: string[] = [ + "admiring", + "adoring", + "agitated", + "amazing", + "angry", + "awesome", + "backstabbing", + "berserk", + "big", + "boring", + "clever", + "cocky", + "compassionate", + "condescending", + "cranky", + "desperate", + "determined", + "distracted", + "dreamy", + "drunk", + "ecstatic", + "elated", + "elegant", + "evil", + "fervent", + "focused", + "furious", + "gigantic", + "gloomy", + "goofy", + "grave", + "happy", + "high", + "hopeful", + "hungry", + "insane", + "jolly", + "jovial", + "kickass", + "lonely", + "loving", + "mad", + "modest", + "naughty", + "nauseous", + "nostalgic", + "pedantic", + "pensive", + "prickly", + "reverent", + "romantic", + "sad", + "serene", + "sharp", + "sick", + "silly", + "sleepy", + "small", + "stoic", + "stupefied", + "suspicious", + "tender", + "thirsty", + "tiny", + "trusting", + "bubbly", + "charming", + "cheerful", + "comical", + "dazzling", + "delighted", + "dynamic", + "effervescent", + "enthusiastic", + "exuberant", + "fluffy", + "friendly", + "funky", + "giddy", + "giggly", + "gleeful", + "goofy", + "graceful", + "grinning", + "hilarious", + "inquisitive", + "joyous", + "jubilant", + "lively", + "mirthful", + "mischievous", + "optimistic", + "peppy", + "perky", + "playful", + "quirky", + "radiant", + "sassy", + "silly", + "spirited", + "sprightly", + "twinkly", + "upbeat", + "vibrant", + "witty", + "zany", + "zealous", +]; +/** + * Nouns for the name of the flow + * @constant + * + */ +export const NOUNS: string[] = [ + "albattani", + "allen", + "almeida", + "archimedes", + "ardinghelli", + "aryabhata", + "austin", + "babbage", + "banach", + "bardeen", + "bartik", + "bassi", + "bell", + "bhabha", + "bhaskara", + "blackwell", + "bohr", + "booth", + "borg", + "bose", + "boyd", + "brahmagupta", + "brattain", + "brown", + "carson", + "chandrasekhar", + "colden", + "cori", + "cray", + "curie", + "darwin", + "davinci", + "dijkstra", + "dubinsky", + "easley", + "einstein", + "elion", + "engelbart", + "euclid", + "euler", + "fermat", + "fermi", + "feynman", + "franklin", + "galileo", + "gates", + "goldberg", + "goldstine", + "goldwasser", + "golick", + "goodall", + "hamilton", + "hawking", + "heisenberg", + "heyrovsky", + "hodgkin", + "hoover", + "hopper", + "hugle", + "hypatia", + "jang", + "jennings", + "jepsen", + "joliot", + "jones", + "kalam", + "kare", + "keller", + "khorana", + "kilby", + "kirch", + "knuth", + "kowalevski", + "lalande", + "lamarr", + "leakey", + "leavitt", + "lichterman", + "liskov", + "lovelace", + "lumiere", + "mahavira", + "mayer", + "mccarthy", + "mcclintock", + "mclean", + "mcnulty", + "meitner", + "meninsky", + "mestorf", + "minsky", + "mirzakhani", + "morse", + "murdock", + "newton", + "nobel", + "noether", + "northcutt", + "noyce", + "panini", + "pare", + "pasteur", + "payne", + "perlman", + "pike", + "poincare", + "poitras", + "ptolemy", + "raman", + "ramanujan", + "ride", + "ritchie", + "roentgen", + "rosalind", + "saha", + "sammet", + "shaw", + "shirley", + "shockley", + "sinoussi", + "snyder", + "spence", + "stallman", + "stonebraker", + "swanson", + "swartz", + "swirles", + "tesla", + "thompson", + "torvalds", + "turing", + "varahamihira", + "visvesvaraya", + "volhard", + "wescoff", + "williams", + "wilson", + "wing", + "wozniak", + "wright", + "yalow", + "yonath", + "coulomb", + "degrasse", + "dewey", + "edison", + "eratosthenes", + "faraday", + "galton", + "gauss", + "herschel", + "hubble", + "joule", + "kaku", + "kepler", + "khayyam", + "lavoisier", + "maxwell", + "mendel", + "mendeleev", + "ohm", + "pascal", + "planck", + "riemann", + "schrodinger", + "sagan", + "tesla", + "tyson", + "volta", + "watt", + "weber", + "wien", + "zoBell", + "zuse", + "carroll", +]; diff --git a/src/frontend/src/utils.ts b/src/frontend/src/utils.ts index cb800ce78..2ce076783 100644 --- a/src/frontend/src/utils.ts +++ b/src/frontend/src/utils.ts @@ -24,7 +24,7 @@ import { SlackIcon } from "./icons/Slack"; import { PineconeIcon } from "./icons/Pinecone"; import clsx, { ClassValue } from "clsx"; import { twMerge } from "tailwind-merge"; -import { ADJECTIVES, DESCRIPTIONS, NOUNS } from "./constants"; +import { ADJECTIVES, DESCRIPTIONS, NOUNS } from "./flow_constants"; import { ComponentType, SVGProps } from "react"; import { Cpu, diff --git a/tests/data/complex_example.json b/tests/data/complex_example.json index d7d0d44c6..b4e688fc7 100644 --- a/tests/data/complex_example.json +++ b/tests/data/complex_example.json @@ -1,743 +1 @@ -{ - "name": "New Flow", - "id": "0", - "data": { - "nodes": [ - { - "width": 384, - "height": 351, - "id": "dndnode_3", - "type": "genericNode", - "position": { - "x": 612.9299322834961, - "y": 194.75070242078417 - }, - "data": { - "type": "ZeroShotAgent", - "node": { - "template": { - "_type": "zero-shot-react-description", - "llm_chain": { - "type": "LLMChain", - "required": true, - "placeholder": "", - "list": false, - "show": true, - "password": false, - "multiline": false - }, - "allowed_tools": { - "type": "Tool", - "required": false, - "placeholder": "", - "list": true, - "show": true, - "password": false, - "multiline": false, - "value": null - }, - "return_values": { - "type": "str", - "required": false, - "placeholder": "", - "list": true, - "show": false, - "password": false, - "multiline": false, - "value": [ - "output" - ] - } - }, - "description": "Agent for the MRKL chain.", - "base_classes": [ - "Agent", - "function" - ] - }, - "id": "dndnode_3", - "value": null - }, - "selected": false, - "positionAbsolute": { - "x": 612.9299322834961, - "y": 194.75070242078417 - }, - "dragging": false - }, - { - "width": 384, - "height": 463, - "id": "dndnode_27", - "type": "genericNode", - "position": { - "x": 86.29922452047686, - "y": 39.132143332238115 - }, - "data": { - "type": "Tool", - "node": { - "template": { - "name": { - "type": "str", - "required": true, - "list": false, - "show": true, - "placeholder": "", - "value": "Uppercase", - "password": false, - "multiline": false - }, - "description": { - "type": "str", - "required": true, - "list": false, - "show": true, - "placeholder": "", - "value": "Returns an uppercase version of the text passed.", - "password": false, - "multiline": false - }, - "func": { - "type": "function", - "required": true, - "list": false, - "show": true, - "value": "", - "multiline": false, - "password": false - }, - "_type": "Tool" - }, - "name": "Tool", - "func": "", - "description": "", - "base_classes": [ - "Tool" - ] - }, - "id": "dndnode_27", - "value": null - }, - "selected": false, - "positionAbsolute": { - "x": 86.29922452047686, - "y": 39.132143332238115 - }, - "dragging": false - }, - { - "width": 384, - "height": 463, - "id": "dndnode_28", - "type": "genericNode", - "position": { - "x": 1134.4549802672202, - "y": 287.9885910233929 - }, - "data": { - "type": "Tool", - "node": { - "template": { - "name": { - "type": "str", - "required": true, - "list": false, - "show": true, - "placeholder": "", - "value": "", - "password": false, - "multiline": false - }, - "description": { - "type": "str", - "required": true, - "list": false, - "show": true, - "placeholder": "", - "value": "", - "password": false, - "multiline": false - }, - "func": { - "type": "function", - "required": true, - "list": false, - "show": true, - "value": "", - "multiline": false, - "password": false - }, - "_type": "Tool" - }, - "name": "Tool", - "func": "", - "description": "", - "base_classes": [ - "Tool" - ] - }, - "id": "dndnode_28", - "value": null - }, - "positionAbsolute": { - "x": 1134.4549802672202, - "y": 287.9885910233929 - }, - "selected": false, - "dragging": false - }, - { - "width": 384, - "height": 357, - "id": "dndnode_40", - "type": "genericNode", - "position": { - "x": -366.4341715850213, - "y": 136.29836646158452 - }, - "data": { - "type": "PythonFunctionTool", - "node": { - "template": { - "code": { - "required": true, - "placeholder": "", - "show": true, - "multiline": true, - "value": "\ndef upper_case(text: str) -> str:\n return text.upper()\n", - "name": "code", - "type": "str", - "list": false - }, - "description": { - "required": true, - "placeholder": "", - "show": true, - "multiline": true, - "value": "My description", - "name": "description", - "type": "str", - "list": false - }, - "name": { - "required": true, - "placeholder": "", - "show": true, - "multiline": true, - "value": "My Tool", - "name": "name", - "type": "str", - "list": false - }, - "_type": "python_function" - }, - "description": "Python function to be executed.", - "base_classes": [ - "function" - ] - }, - "id": "dndnode_40", - "value": null - }, - "selected": false, - "positionAbsolute": { - "x": -366.4341715850213, - "y": 136.29836646158452 - }, - "dragging": false - }, - { - "width": 384, - "height": 351, - "id": "dndnode_41", - "type": "genericNode", - "position": { - "x": 1642.7653281427417, - "y": 69.01105573790835 - }, - "data": { - "type": "ZeroShotAgent", - "node": { - "template": { - "_type": "zero-shot-react-description", - "llm_chain": { - "type": "LLMChain", - "required": true, - "placeholder": "", - "list": false, - "show": true, - "password": false, - "multiline": false - }, - "allowed_tools": { - "type": "Tool", - "required": false, - "placeholder": "", - "list": true, - "show": true, - "password": false, - "multiline": false, - "value": null - }, - "return_values": { - "type": "str", - "required": false, - "placeholder": "", - "list": true, - "show": false, - "password": false, - "multiline": false, - "value": [ - "output" - ] - } - }, - "description": "Agent for the MRKL chain.", - "base_classes": [ - "Agent", - "function" - ] - }, - "id": "dndnode_41", - "value": null - }, - "selected": false, - "positionAbsolute": { - "x": 1642.7653281427417, - "y": 69.01105573790835 - }, - "dragging": false - }, - { - "width": 384, - "height": 529, - "id": "dndnode_42", - "type": "genericNode", - "position": { - "x": -379.23467185725826, - "y": -551.3889442620921 - }, - "data": { - "type": "ZeroShotPrompt", - "node": { - "template": { - "prefix": { - "required": false, - "placeholder": "", - "show": true, - "multiline": true, - "value": "Answer the following questions as best you can. You have access to the following tools:", - "name": "prefix", - "type": "str", - "list": false - }, - "suffix": { - "required": true, - "placeholder": "", - "show": true, - "multiline": true, - "value": "Begin!\n\nQuestion: {input}\nThought:{agent_scratchpad}", - "name": "suffix", - "type": "str", - "list": false - }, - "format_instructions": { - "required": false, - "placeholder": "", - "show": true, - "multiline": true, - "value": "Use the following format:\n\nQuestion: the input question you must answer\nThought: you should always think about what to do\nAction: the action to take, should be one of [{tool_names}]\nAction Input: the input to the action\nObservation: the result of the action\n... (this Thought/Action/Action Input/Observation can repeat N times)\nThought: I now know the final answer\nFinal Answer: the final answer to the original input question", - "name": "format_instructions", - "type": "str", - "list": false - }, - "_type": "ZeroShotPrompt" - }, - "description": "Prompt template for Zero Shot Agent.", - "base_classes": [ - "BasePromptTemplate" - ] - }, - "id": "dndnode_42", - "value": null - }, - "selected": false, - "positionAbsolute": { - "x": -379.23467185725826, - "y": -551.3889442620921 - }, - "dragging": false - }, - { - "width": 384, - "height": 391, - "id": "dndnode_43", - "type": "genericNode", - "position": { - "x": 100.76532814274174, - "y": -437.78894426209195 - }, - "data": { - "type": "LLMChain", - "node": { - "template": { - "_type": "llm_chain", - "memory": { - "type": "BaseMemory", - "required": false, - "placeholder": "", - "list": false, - "show": true, - "password": false, - "multiline": false, - "value": null - }, - "verbose": { - "type": "bool", - "required": false, - "placeholder": "", - "list": false, - "show": false, - "password": false, - "multiline": false, - "value": false - }, - "prompt": { - "type": "BasePromptTemplate", - "required": true, - "placeholder": "", - "list": false, - "show": true, - "password": false, - "multiline": false - }, - "llm": { - "type": "BaseLanguageModel", - "required": true, - "placeholder": "", - "list": false, - "show": true, - "password": false, - "multiline": false - }, - "output_key": { - "type": "str", - "required": false, - "placeholder": "", - "list": false, - "show": false, - "password": true, - "multiline": false, - "value": "text" - } - }, - "description": "Chain to run queries against LLMs.", - "base_classes": [ - "Chain" - ] - }, - "id": "dndnode_43", - "value": null - }, - "selected": false, - "positionAbsolute": { - "x": 100.76532814274174, - "y": -437.78894426209195 - }, - "dragging": false - }, - { - "width": 384, - "height": 477, - "id": "dndnode_44", - "type": "genericNode", - "position": { - "x": -841.2346718572583, - "y": 368.6110557379079 - }, - "data": { - "type": "OpenAI", - "node": { - "template": { - "_type": "openai", - "cache": { - "type": "bool", - "required": false, - "placeholder": "", - "list": false, - "show": false, - "password": false, - "multiline": false, - "value": null - }, - "verbose": { - "type": "bool", - "required": false, - "placeholder": "", - "list": false, - "show": false, - "password": false, - "multiline": false, - "value": null - }, - "client": { - "type": "Any", - "required": false, - "placeholder": "", - "list": false, - "show": false, - "password": false, - "multiline": false, - "value": null - }, - "model_name": { - "type": "str", - "required": false, - "placeholder": "", - "list": false, - "show": true, - "password": false, - "multiline": false, - "value": "text-davinci-003", - "options": [ - "text-davinci-003", - "text-davinci-002", - "text-curie-001", - "text-babbage-001", - "text-ada-001" - ] - }, - "temperature": { - "type": "float", - "required": false, - "placeholder": "", - "list": false, - "show": true, - "password": false, - "multiline": false, - "value": 0.7 - }, - "max_tokens": { - "type": "int", - "required": false, - "placeholder": "", - "list": false, - "show": false, - "password": true, - "multiline": false, - "value": 256 - }, - "top_p": { - "type": "float", - "required": false, - "placeholder": "", - "list": false, - "show": false, - "password": false, - "multiline": false, - "value": 1 - }, - "frequency_penalty": { - "type": "float", - "required": false, - "placeholder": "", - "list": false, - "show": false, - "password": false, - "multiline": false, - "value": 0 - }, - "presence_penalty": { - "type": "float", - "required": false, - "placeholder": "", - "list": false, - "show": false, - "password": false, - "multiline": false, - "value": 0 - }, - "n": { - "type": "int", - "required": false, - "placeholder": "", - "list": false, - "show": false, - "password": false, - "multiline": false, - "value": 1 - }, - "best_of": { - "type": "int", - "required": false, - "placeholder": "", - "list": false, - "show": false, - "password": false, - "multiline": false, - "value": 1 - }, - "model_kwargs": { - "type": "dict[str, Any]", - "required": false, - "placeholder": "", - "list": false, - "show": false, - "password": false, - "multiline": false, - "value": null - }, - "openai_api_key": { - "type": "str", - "required": false, - "placeholder": "", - "list": false, - "show": true, - "password": true, - "multiline": false, - "value": "sk-" - }, - "batch_size": { - "type": "int", - "required": false, - "placeholder": "", - "list": false, - "show": false, - "password": false, - "multiline": false, - "value": 20 - }, - "request_timeout": { - "type": "Union[float, Tuple[float, float], NoneType]", - "required": false, - "placeholder": "", - "list": false, - "show": false, - "password": false, - "multiline": false, - "value": null - }, - "logit_bias": { - "type": "dict[str, float]", - "required": false, - "placeholder": "", - "list": false, - "show": false, - "password": false, - "multiline": false, - "value": null - }, - "max_retries": { - "type": "int", - "required": false, - "placeholder": "", - "list": false, - "show": false, - "password": false, - "multiline": false, - "value": 6 - }, - "streaming": { - "type": "bool", - "required": false, - "placeholder": "", - "list": false, - "show": false, - "password": false, - "multiline": false, - "value": false - } - }, - "description": "Generic OpenAI class that uses model name.", - "base_classes": [ - "BaseOpenAI", - "BaseLLM", - "BaseLanguageModel" - ] - }, - "id": "dndnode_44", - "value": null - }, - "selected": false, - "positionAbsolute": { - "x": -841.2346718572583, - "y": 368.6110557379079 - }, - "dragging": false - } - ], - "edges": [ - { - "source": "dndnode_27", - "sourceHandle": "Tool|dndnode_27|Tool", - "target": "dndnode_3", - "targetHandle": "Tool|allowed_tools|dndnode_3", - "className": "animate-pulse", - "id": "reactflow__edge-dndnode_27Tool|dndnode_27|Tool-dndnode_3Tool|allowed_tools|dndnode_3" - }, - { - "source": "dndnode_3", - "sourceHandle": "ZeroShotAgent|dndnode_3|Agent|function", - "target": "dndnode_28", - "targetHandle": "function|func|dndnode_28", - "className": "animate-pulse", - "id": "reactflow__edge-dndnode_3ZeroShotAgent|dndnode_3|Agent|function-dndnode_28function|func|dndnode_28" - }, - { - "source": "dndnode_40", - "sourceHandle": "PythonFunction|dndnode_40|function", - "target": "dndnode_27", - "targetHandle": "function|func|dndnode_27", - "className": "animate-pulse", - "id": "reactflow__edge-dndnode_40PythonFunction|dndnode_40|function-dndnode_27function|func|dndnode_27" - }, - { - "source": "dndnode_28", - "sourceHandle": "Tool|dndnode_28|Tool", - "target": "dndnode_41", - "targetHandle": "Tool|allowed_tools|dndnode_41", - "className": "animate-pulse", - "id": "reactflow__edge-dndnode_28Tool|dndnode_28|Tool-dndnode_41Tool|allowed_tools|dndnode_41" - }, - { - "source": "dndnode_42", - "sourceHandle": "ZeroShotPrompt|dndnode_42|BasePromptTemplate", - "target": "dndnode_43", - "targetHandle": "BasePromptTemplate|prompt|dndnode_43", - "className": "animate-pulse", - "id": "reactflow__edge-dndnode_42ZeroShotPrompt|dndnode_42|BasePromptTemplate-dndnode_43BasePromptTemplate|prompt|dndnode_43" - }, - { - "source": "dndnode_44", - "sourceHandle": "OpenAI|dndnode_44|BaseOpenAI|BaseLLM|BaseLanguageModel", - "target": "dndnode_43", - "targetHandle": "BaseLanguageModel|llm|dndnode_43", - "className": "animate-pulse", - "id": "reactflow__edge-dndnode_44OpenAI|dndnode_44|BaseOpenAI|BaseLLM|BaseLanguageModel-dndnode_43BaseLanguageModel|llm|dndnode_43" - }, - { - "source": "dndnode_43", - "sourceHandle": "LLMChain|dndnode_43|Chain", - "target": "dndnode_3", - "targetHandle": "LLMChain|llm_chain|dndnode_3", - "className": "animate-pulse", - "id": "reactflow__edge-dndnode_43LLMChain|dndnode_43|Chain-dndnode_3LLMChain|llm_chain|dndnode_3" - }, - { - "source": "dndnode_43", - "sourceHandle": "LLMChain|dndnode_43|Chain", - "target": "dndnode_41", - "targetHandle": "LLMChain|llm_chain|dndnode_41", - "className": "animate-pulse", - "id": "reactflow__edge-dndnode_43LLMChain|dndnode_43|Chain-dndnode_41LLMChain|llm_chain|dndnode_41" - } - ], - "viewport": { - "x": 250.11733592862913, - "y": 349.94447213104604, - "zoom": 0.5 - } - }, - "chat": [] -} \ No newline at end of file +{"description":"Chain the Words, Master Language!","name":"complex_example","data":{"nodes":[{"width":384,"height":267,"id":"ZeroShotAgent-UQytQ","type":"genericNode","position":{"x":1444.3029693177525,"y":769.2195451536553},"data":{"type":"ZeroShotAgent","node":{"template":{"allowed_tools":{"required":false,"placeholder":"","show":true,"multiline":false,"password":false,"name":"allowed_tools","advanced":false,"info":"","type":"Tool","list":true},"llm_chain":{"required":true,"placeholder":"","show":true,"multiline":false,"password":false,"name":"llm_chain","advanced":false,"info":"","type":"LLMChain","list":false},"output_parser":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"output_parser","advanced":false,"info":"","type":"AgentOutputParser","list":false},"_type":"ZeroShotAgent"},"description":"Agent for the MRKL chain.","base_classes":["BaseSingleActionAgent","ZeroShotAgent","Agent","function"],"display_name":"ZeroShotAgent","documentation":"https://python.langchain.com/docs/modules/agents/how_to/custom_mrkl_agent"},"id":"ZeroShotAgent-UQytQ","value":null},"selected":false,"positionAbsolute":{"x":1444.3029693177525,"y":769.2195451536553},"dragging":false},{"width":384,"height":267,"id":"ZeroShotAgent-4Yl9Q","type":"genericNode","position":{"x":2507.5134255411913,"y":703.4268189022047},"data":{"type":"ZeroShotAgent","node":{"template":{"allowed_tools":{"required":false,"placeholder":"","show":true,"multiline":false,"password":false,"name":"allowed_tools","advanced":false,"info":"","type":"Tool","list":true},"llm_chain":{"required":true,"placeholder":"","show":true,"multiline":false,"password":false,"name":"llm_chain","advanced":false,"info":"","type":"LLMChain","list":false},"output_parser":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"output_parser","advanced":false,"info":"","type":"AgentOutputParser","list":false},"_type":"ZeroShotAgent"},"description":"Agent for the MRKL chain.","base_classes":["BaseSingleActionAgent","ZeroShotAgent","Agent","function"],"display_name":"ZeroShotAgent","documentation":"https://python.langchain.com/docs/modules/agents/how_to/custom_mrkl_agent"},"id":"ZeroShotAgent-4Yl9Q","value":null},"selected":false,"positionAbsolute":{"x":2507.5134255411913,"y":703.4268189022047},"dragging":false},{"width":384,"height":475,"id":"Tool-Ssk4g","type":"genericNode","position":{"x":1990.4155792278825,"y":894.4563316029999},"data":{"type":"Tool","node":{"template":{"func":{"required":true,"placeholder":"","show":true,"multiline":true,"password":false,"name":"func","advanced":false,"info":"","type":"function","list":false},"description":{"required":true,"placeholder":"","show":true,"multiline":true,"value":"AgentTool","password":false,"name":"description","advanced":false,"info":"","type":"str","list":false},"name":{"required":true,"placeholder":"","show":true,"multiline":true,"value":"AgentTool","password":false,"name":"name","advanced":false,"info":"","type":"str","list":false},"return_direct":{"required":true,"placeholder":"","show":true,"multiline":false,"value":false,"password":false,"name":"return_direct","advanced":false,"info":"","type":"bool","list":false},"_type":"Tool"},"description":"Converts a chain, agent or function into a tool.","base_classes":["Tool"],"display_name":"Tool","documentation":""},"id":"Tool-Ssk4g","value":null},"selected":false,"positionAbsolute":{"x":1990.4155792278825,"y":894.4563316029999},"dragging":false},{"width":384,"height":513,"id":"PythonFunctionTool-qSfC8","type":"genericNode","position":{"x":881.9234666781165,"y":717.4260855419674},"data":{"type":"PythonFunctionTool","node":{"template":{"code":{"required":true,"placeholder":"","show":true,"multiline":true,"value":"\ndef python_function(text: str) -> str:\n \"\"\"This is a default python function that returns the input text\"\"\"\n return text\n","password":false,"name":"code","advanced":false,"info":"","type":"code","list":false},"description":{"required":true,"placeholder":"","show":true,"multiline":true,"value":"Uppercases","password":false,"name":"description","advanced":false,"info":"","type":"str","list":false},"name":{"required":true,"placeholder":"","show":true,"multiline":false,"value":"Uppercase","password":false,"name":"name","advanced":false,"info":"","type":"str","list":false},"return_direct":{"required":true,"placeholder":"","show":true,"multiline":false,"value":false,"password":false,"name":"return_direct","advanced":false,"info":"","type":"bool","list":false},"_type":"PythonFunctionTool"},"description":"Python function to be executed.","base_classes":["Tool"],"display_name":"PythonFunctionTool","documentation":""},"id":"PythonFunctionTool-qSfC8","value":null},"selected":false,"dragging":false,"positionAbsolute":{"x":881.9234666781165,"y":717.4260855419674}},{"width":384,"height":307,"id":"LLMChain-5pPr3","type":"genericNode","position":{"x":952.8848633792611,"y":205.91268432121848},"data":{"type":"LLMChain","node":{"template":{"callbacks":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"callbacks","advanced":false,"info":"","type":"langchain.callbacks.base.BaseCallbackHandler","list":true},"llm":{"required":true,"placeholder":"","show":true,"multiline":false,"password":false,"name":"llm","advanced":false,"info":"","type":"BaseLanguageModel","list":false},"memory":{"required":false,"placeholder":"","show":true,"multiline":false,"password":false,"name":"memory","advanced":false,"info":"","type":"BaseMemory","list":false},"output_parser":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"output_parser","advanced":false,"info":"","type":"BaseLLMOutputParser","list":false},"prompt":{"required":true,"placeholder":"","show":true,"multiline":false,"password":false,"name":"prompt","advanced":false,"info":"","type":"BasePromptTemplate","list":false},"llm_kwargs":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"llm_kwargs","advanced":false,"info":"","type":"code","list":false},"output_key":{"required":true,"placeholder":"","show":true,"multiline":false,"value":"text","password":false,"name":"output_key","advanced":true,"info":"","type":"str","list":false},"return_final_only":{"required":false,"placeholder":"","show":false,"multiline":false,"value":true,"password":false,"name":"return_final_only","advanced":false,"info":"","type":"bool","list":false},"tags":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"tags","advanced":false,"info":"","type":"str","list":true},"verbose":{"required":false,"placeholder":"","show":true,"multiline":false,"value":false,"password":false,"name":"verbose","advanced":true,"info":"","type":"bool","list":false},"_type":"LLMChain"},"description":"Chain to run queries against LLMs.","base_classes":["LLMChain","Chain","function"],"display_name":"LLMChain","documentation":"https://python.langchain.com/docs/modules/chains/foundational/llm_chain"},"id":"LLMChain-5pPr3","value":null},"selected":false,"positionAbsolute":{"x":952.8848633792611,"y":205.91268432121848},"dragging":false},{"width":384,"height":421,"id":"ZeroShotPrompt-KeA26","type":"genericNode","position":{"x":284.2531445624355,"y":99.41468159745108},"data":{"type":"ZeroShotPrompt","node":{"template":{"format_instructions":{"required":true,"placeholder":"","show":true,"multiline":true,"value":"Use the following format:\n\nQuestion: the input question you must answer\nThought: you should always think about what to do\nAction: the action to take, should be one of [{tool_names}]\nAction Input: the input to the action\nObservation: the result of the action\n... (this Thought/Action/Action Input/Observation can repeat N times)\nThought: I now know the final answer\nFinal Answer: the final answer to the original input question","password":false,"name":"format_instructions","advanced":false,"info":"","type":"prompt","list":false},"prefix":{"required":false,"placeholder":"","show":true,"multiline":true,"value":"Answer the following questions as best you can. You have access to the following tools:","password":false,"name":"prefix","advanced":false,"info":"","type":"prompt","list":false},"suffix":{"required":true,"placeholder":"","show":true,"multiline":true,"value":"Begin!\n\nQuestion: {input}\nThought:{agent_scratchpad}","password":false,"name":"suffix","advanced":false,"info":"","type":"prompt","list":false},"_type":"ZeroShotPrompt"},"description":"Prompt template for Zero Shot Agent.","base_classes":["BasePromptTemplate"],"display_name":"ZeroShotPrompt","documentation":"https://python.langchain.com/docs/modules/agents/how_to/custom_mrkl_agent"},"id":"ZeroShotPrompt-KeA26","value":null},"selected":false,"positionAbsolute":{"x":284.2531445624355,"y":99.41468159745108},"dragging":false},{"width":384,"height":611,"id":"OpenAI-YKFjJ","type":"genericNode","position":{"x":151.61242562883945,"y":646.4646888408231},"data":{"type":"OpenAI","node":{"template":{"allowed_special":{"required":false,"placeholder":"","show":false,"multiline":false,"value":[],"password":false,"name":"allowed_special","advanced":false,"info":"","type":"Literal'all'","list":true},"callbacks":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"callbacks","advanced":false,"info":"","type":"langchain.callbacks.base.BaseCallbackHandler","list":true},"disallowed_special":{"required":false,"placeholder":"","show":false,"multiline":false,"value":"all","password":false,"name":"disallowed_special","advanced":false,"info":"","type":"Literal'all'","list":false},"batch_size":{"required":false,"placeholder":"","show":false,"multiline":false,"value":20,"password":false,"name":"batch_size","advanced":false,"info":"","type":"int","list":false},"best_of":{"required":false,"placeholder":"","show":false,"multiline":false,"value":1,"password":false,"name":"best_of","advanced":false,"info":"","type":"int","list":false},"cache":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"cache","advanced":false,"info":"","type":"bool","list":false},"client":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"client","advanced":false,"info":"","type":"Any","list":false},"frequency_penalty":{"required":false,"placeholder":"","show":false,"multiline":false,"value":0,"password":false,"name":"frequency_penalty","advanced":false,"info":"","type":"float","list":false},"logit_bias":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"logit_bias","advanced":false,"info":"","type":"code","list":false},"max_retries":{"required":false,"placeholder":"","show":false,"multiline":false,"value":6,"password":false,"name":"max_retries","advanced":false,"info":"","type":"int","list":false},"max_tokens":{"required":false,"placeholder":"","show":true,"multiline":false,"value":"","password":true,"name":"max_tokens","advanced":false,"info":"","type":"int","list":false},"model_kwargs":{"required":false,"placeholder":"","show":true,"multiline":false,"password":false,"name":"model_kwargs","advanced":true,"info":"","type":"code","list":false},"model_name":{"required":false,"placeholder":"","show":true,"multiline":false,"value":"text-davinci-003","password":false,"options":["text-davinci-003","text-davinci-002","text-curie-001","text-babbage-001","text-ada-001"],"name":"model_name","advanced":false,"info":"","type":"str","list":true},"n":{"required":false,"placeholder":"","show":false,"multiline":false,"value":1,"password":false,"name":"n","advanced":false,"info":"","type":"int","list":false},"openai_api_base":{"required":false,"placeholder":"","show":true,"multiline":false,"password":false,"name":"openai_api_base","display_name":"OpenAI API Base","advanced":false,"info":"\nThe base URL of the OpenAI API. Defaults to https://api.openai.com/v1.\n\nYou can change this to use other APIs like JinaChat, LocalAI and Prem.\n","type":"str","list":false},"openai_api_key":{"required":false,"placeholder":"","show":true,"multiline":false,"value":"","password":true,"name":"openai_api_key","display_name":"OpenAI API Key","advanced":false,"info":"","type":"str","list":false},"openai_organization":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"openai_organization","display_name":"OpenAI Organization","advanced":false,"info":"","type":"str","list":false},"openai_proxy":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"openai_proxy","display_name":"OpenAI Proxy","advanced":false,"info":"","type":"str","list":false},"presence_penalty":{"required":false,"placeholder":"","show":false,"multiline":false,"value":0,"password":false,"name":"presence_penalty","advanced":false,"info":"","type":"float","list":false},"request_timeout":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"request_timeout","advanced":false,"info":"","type":"float","list":false},"streaming":{"required":false,"placeholder":"","show":false,"multiline":false,"value":false,"password":false,"name":"streaming","advanced":false,"info":"","type":"bool","list":false},"tags":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"tags","advanced":false,"info":"","type":"str","list":true},"temperature":{"required":false,"placeholder":"","show":true,"multiline":false,"value":0.7,"password":false,"name":"temperature","advanced":false,"info":"","type":"float","list":false},"tiktoken_model_name":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"tiktoken_model_name","advanced":false,"info":"","type":"str","list":false},"top_p":{"required":false,"placeholder":"","show":false,"multiline":false,"value":1,"password":false,"name":"top_p","advanced":false,"info":"","type":"float","list":false},"verbose":{"required":false,"placeholder":"","show":false,"multiline":false,"password":false,"name":"verbose","advanced":false,"info":"","type":"bool","list":false},"_type":"OpenAI"},"description":"Wrapper around OpenAI large language models.","base_classes":["BaseOpenAI","BaseLLM","OpenAI","BaseLanguageModel"],"display_name":"OpenAI","documentation":"https://python.langchain.com/docs/modules/model_io/models/llms/integrations/openai"},"id":"OpenAI-YKFjJ","value":null},"selected":false,"positionAbsolute":{"x":151.61242562883945,"y":646.4646888408231},"dragging":false}],"edges":[{"source":"Tool-Ssk4g","sourceHandle":"Tool|Tool-Ssk4g|Tool","target":"ZeroShotAgent-4Yl9Q","targetHandle":"Tool|allowed_tools|ZeroShotAgent-4Yl9Q","style":{"stroke":"inherit"},"className":"stroke-gray-900 dark:stroke-gray-200","animated":false,"id":"reactflow__edge-Tool-Ssk4gTool|Tool-Ssk4g|Tool-ZeroShotAgent-4Yl9QTool|allowed_tools|ZeroShotAgent-4Yl9Q","selected":false},{"source":"ZeroShotAgent-UQytQ","sourceHandle":"ZeroShotAgent|ZeroShotAgent-UQytQ|BaseSingleActionAgent|ZeroShotAgent|Agent|function","target":"Tool-Ssk4g","targetHandle":"function|func|Tool-Ssk4g","style":{"stroke":"inherit"},"className":"stroke-gray-900 dark:stroke-gray-200","animated":false,"id":"reactflow__edge-ZeroShotAgent-UQytQZeroShotAgent|ZeroShotAgent-UQytQ|BaseSingleActionAgent|ZeroShotAgent|Agent|function-Tool-Ssk4gfunction|func|Tool-Ssk4g","selected":false},{"source":"PythonFunctionTool-qSfC8","sourceHandle":"PythonFunctionTool|PythonFunctionTool-qSfC8|Tool","target":"ZeroShotAgent-UQytQ","targetHandle":"Tool|allowed_tools|ZeroShotAgent-UQytQ","style":{"stroke":"inherit"},"className":"stroke-gray-900 dark:stroke-gray-200","animated":false,"id":"reactflow__edge-PythonFunctionTool-qSfC8PythonFunctionTool|PythonFunctionTool-qSfC8|Tool-ZeroShotAgent-UQytQTool|allowed_tools|ZeroShotAgent-UQytQ","selected":false},{"source":"ZeroShotPrompt-KeA26","sourceHandle":"ZeroShotPrompt|ZeroShotPrompt-KeA26|BasePromptTemplate","target":"LLMChain-5pPr3","targetHandle":"BasePromptTemplate|prompt|LLMChain-5pPr3","style":{"stroke":"inherit"},"className":"stroke-gray-900 dark:stroke-gray-200","animated":false,"id":"reactflow__edge-ZeroShotPrompt-KeA26ZeroShotPrompt|ZeroShotPrompt-KeA26|BasePromptTemplate-LLMChain-5pPr3BasePromptTemplate|prompt|LLMChain-5pPr3","selected":false},{"source":"OpenAI-YKFjJ","sourceHandle":"OpenAI|OpenAI-YKFjJ|BaseOpenAI|BaseLLM|OpenAI|BaseLanguageModel","target":"LLMChain-5pPr3","targetHandle":"BaseLanguageModel|llm|LLMChain-5pPr3","style":{"stroke":"inherit"},"className":"stroke-gray-900 dark:stroke-gray-200","animated":false,"id":"reactflow__edge-OpenAI-YKFjJOpenAI|OpenAI-YKFjJ|BaseOpenAI|BaseLLM|OpenAI|BaseLanguageModel-LLMChain-5pPr3BaseLanguageModel|llm|LLMChain-5pPr3","selected":false},{"source":"LLMChain-5pPr3","sourceHandle":"LLMChain|LLMChain-5pPr3|LLMChain|Chain|function","target":"ZeroShotAgent-4Yl9Q","targetHandle":"LLMChain|llm_chain|ZeroShotAgent-4Yl9Q","style":{"stroke":"inherit"},"className":"stroke-gray-900 dark:stroke-gray-200","animated":false,"id":"reactflow__edge-LLMChain-5pPr3LLMChain|LLMChain-5pPr3|LLMChain|Chain|function-ZeroShotAgent-4Yl9QLLMChain|llm_chain|ZeroShotAgent-4Yl9Q","selected":false},{"source":"LLMChain-5pPr3","sourceHandle":"LLMChain|LLMChain-5pPr3|LLMChain|Chain|function","target":"ZeroShotAgent-UQytQ","targetHandle":"LLMChain|llm_chain|ZeroShotAgent-UQytQ","style":{"stroke":"inherit"},"className":"stroke-gray-900 dark:stroke-gray-200","animated":false,"id":"reactflow__edge-LLMChain-5pPr3LLMChain|LLMChain-5pPr3|LLMChain|Chain|function-ZeroShotAgent-UQytQLLMChain|llm_chain|ZeroShotAgent-UQytQ","selected":false}],"viewport":{"x":-77.90141289801102,"y":58.94201890632064,"zoom":0.3906639400861592}},"id":"e5213457-cb4c-48b5-b2bf-a6bc5b63f625"} \ No newline at end of file