From 65093fddc2414ca6b283d790e50cc38afd9a9819 Mon Sep 17 00:00:00 2001 From: Diwank Singh Tomer Date: Thu, 18 Apr 2024 19:01:45 +0530 Subject: [PATCH] feat(openapi): Update spec to include role=function + render_templates (#276) * feat(openapi): Update spec to include role=function + render_templates Signed-off-by: Diwank Singh Tomer * fix(agents-api): Fix for dependabot security alert; bump fastapi Signed-off-by: Diwank Singh Tomer * fix(sdks/python): Fix for pytype error Signed-off-by: Diwank Singh Tomer --------- Signed-off-by: Diwank Singh Tomer --- .../agents_api/autogen/openapi_model.py | 13 +- agents-api/poetry.lock | 378 +++-- agents-api/pyproject.toml | 6 +- docs/.gitbook/assets/agents-openapi.yaml | 1217 ++++++++++++----- mock_openapi.yaml | 384 +++--- openapi.yaml | 384 +++--- sdks/postman/collection.json | 4 +- sdks/python/julep/api/client.py | 10 + .../julep/api/types/chat_ml_message_role.py | 4 + sdks/python/julep/api/types/session.py | 3 + sdks/python/julep/api/types/user.py | 2 +- sdks/python/julep/api/types/user_metadata.py | 2 +- sdks/python/poetry.lock | 21 +- sdks/ts/src/api/models/ChatMLMessage.ts | 2 +- .../ts/src/api/models/CreateSessionRequest.ts | 4 + sdks/ts/src/api/models/Session.ts | 4 + sdks/ts/src/api/models/User.ts | 2 +- .../src/api/schemas/$CreateSessionRequest.ts | 4 + sdks/ts/src/api/schemas/$Session.ts | 4 + sdks/ts/src/api/schemas/$User.ts | 2 +- 20 files changed, 1689 insertions(+), 761 deletions(-) diff --git a/agents-api/agents_api/autogen/openapi_model.py b/agents-api/agents_api/autogen/openapi_model.py index 3691eef87..95268f12b 100644 --- a/agents-api/agents_api/autogen/openapi_model.py +++ b/agents-api/agents_api/autogen/openapi_model.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: openapi.yaml -# timestamp: 2024-04-11T06:53:51+00:00 +# timestamp: 2024-04-18T12:56:54+00:00 from __future__ import annotations @@ -34,7 +34,7 @@ class User(BaseModel): """ metadata: Dict[str, Any] | None = None """ - Optional metadata + (Optional) metadata """ @@ -120,6 +120,10 @@ class Session(BaseModel): """ Optional metadata """ + render_templates: bool | None = False + """ + Render system and assistant message content as jinja templates + """ class CreateSessionRequest(BaseModel): @@ -143,6 +147,10 @@ class CreateSessionRequest(BaseModel): """ Optional metadata """ + render_templates: bool | None = False + """ + Render system and assistant message content as jinja templates + """ class UpdateSessionRequest(BaseModel): @@ -220,6 +228,7 @@ class Role(str, Enum): assistant = "assistant" system = "system" function_call = "function_call" + function = "function" class ChatMLMessage(BaseModel): diff --git a/agents-api/poetry.lock b/agents-api/poetry.lock index c5f211d82..4c7130aca 100644 --- a/agents-api/poetry.lock +++ b/agents-api/poetry.lock @@ -13,24 +13,25 @@ files = [ [[package]] name = "anyio" -version = "3.7.1" +version = "4.3.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "anyio-3.7.1-py3-none-any.whl", hash = "sha256:91dee416e570e92c64041bd18b900d1d6fa78dff7048769ce5ac5ddad004fbb5"}, - {file = "anyio-3.7.1.tar.gz", hash = "sha256:44a3c9aba0f5defa43261a8b3efb97891f2bd7d804e0e1f56419befa1adfc780"}, + {file = "anyio-4.3.0-py3-none-any.whl", hash = "sha256:048e05d0f6caeed70d731f3db756d35dcc1f35747c8c403364a8332c630441b8"}, + {file = "anyio-4.3.0.tar.gz", hash = "sha256:f75253795a87df48568485fd18cdd2a3fa5c4f7c5be8e5e36637733fce06fed6"}, ] [package.dependencies] -exceptiongroup = {version = "*", markers = "python_version < \"3.11\""} +exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} idna = ">=2.8" sniffio = ">=1.1" +typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""} [package.extras] -doc = ["Sphinx", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme (>=1.2.2)", "sphinxcontrib-jquery"] -test = ["anyio[trio]", "coverage[toml] (>=4.5)", "hypothesis (>=4.0)", "mock (>=4)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] -trio = ["trio (<0.22)"] +doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] +test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] +trio = ["trio (>=0.23)"] [[package]] name = "argcomplete" @@ -46,6 +47,25 @@ files = [ [package.extras] test = ["coverage", "mypy", "pexpect", "ruff", "wheel"] +[[package]] +name = "arrow" +version = "1.3.0" +description = "Better dates & times for Python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "arrow-1.3.0-py3-none-any.whl", hash = "sha256:c728b120ebc00eb84e01882a6f5e7927a53960aa990ce7dd2b10f39005a67f80"}, + {file = "arrow-1.3.0.tar.gz", hash = "sha256:d4540617648cb5f895730f1ad8c82a65f2dad0166f57b75f3ca54759c4d67a85"}, +] + +[package.dependencies] +python-dateutil = ">=2.7.0" +types-python-dateutil = ">=2.8.10" + +[package.extras] +doc = ["doc8", "sphinx (>=7.0.0)", "sphinx-autobuild", "sphinx-autodoc-typehints", "sphinx_rtd_theme (>=1.3.0)"] +test = ["dateparser (==1.*)", "pre-commit", "pytest", "pytest-cov", "pytest-mock", "pytz (==2021.1)", "simplejson (==3.*)"] + [[package]] name = "asttokens" version = "2.4.1" @@ -99,13 +119,13 @@ tests-no-zope = ["attrs[tests-mypy]", "cloudpickle", "hypothesis", "pympler", "p [[package]] name = "beartype" -version = "0.18.2" +version = "0.18.3" description = "Unbearably fast runtime type checking in pure Python." optional = false python-versions = ">=3.8.0" files = [ - {file = "beartype-0.18.2-py3-none-any.whl", hash = "sha256:561aa7858e92289b952a6fc5faf15ea32f9519c07cdc0f4df7a01b59fc4bbeaf"}, - {file = "beartype-0.18.2.tar.gz", hash = "sha256:a6fbc0be9269889312388bfec6a9ddf41bf8fe31b68bcf9c8239db35cd38f411"}, + {file = "beartype-0.18.3-py3-none-any.whl", hash = "sha256:0131717230b04a7f1994422edaf237735febc90c0c98bd0094ce69e0a6706fff"}, + {file = "beartype-0.18.3.tar.gz", hash = "sha256:04853d78493f3c84b03956f1fa0c1e5b84c5332a760559ddc8f2cf6141ddf791"}, ] [package.extras] @@ -540,23 +560,22 @@ tests = ["asttokens (>=2.1.0)", "coverage", "coverage-enable-subprocess", "ipyth [[package]] name = "fastapi" -version = "0.103.2" +version = "0.109.2" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "fastapi-0.103.2-py3-none-any.whl", hash = "sha256:3270de872f0fe9ec809d4bd3d4d890c6d5cc7b9611d721d6438f9dacc8c4ef2e"}, - {file = "fastapi-0.103.2.tar.gz", hash = "sha256:75a11f6bfb8fc4d2bec0bd710c2d5f2829659c0e8c0afd5560fdda6ce25ec653"}, + {file = "fastapi-0.109.2-py3-none-any.whl", hash = "sha256:2c9bab24667293b501cad8dd388c05240c850b58ec5876ee3283c47d6e1e3a4d"}, + {file = "fastapi-0.109.2.tar.gz", hash = "sha256:f3817eac96fe4f65a2ebb4baa000f394e55f5fccdaf7f75250804bc58f354f73"}, ] [package.dependencies] -anyio = ">=3.7.1,<4.0.0" pydantic = ">=1.7.4,<1.8 || >1.8,<1.8.1 || >1.8.1,<2.0.0 || >2.0.0,<2.0.1 || >2.0.1,<2.1.0 || >2.1.0,<3.0.0" -starlette = ">=0.27.0,<0.28.0" -typing-extensions = ">=4.5.0" +starlette = ">=0.36.3,<0.37.0" +typing-extensions = ">=4.8.0" [package.extras] -all = ["email-validator (>=2.0.0)", "httpx (>=0.23.0)", "itsdangerous (>=1.1.0)", "jinja2 (>=2.11.2)", "orjson (>=3.2.1)", "pydantic-extra-types (>=2.0.0)", "pydantic-settings (>=2.0.0)", "python-multipart (>=0.0.5)", "pyyaml (>=5.3.1)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0)", "uvicorn[standard] (>=0.12.0)"] +all = ["email-validator (>=2.0.0)", "httpx (>=0.23.0)", "itsdangerous (>=1.1.0)", "jinja2 (>=2.11.2)", "orjson (>=3.2.1)", "pydantic-extra-types (>=2.0.0)", "pydantic-settings (>=2.0.0)", "python-multipart (>=0.0.7)", "pyyaml (>=5.3.1)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0)", "uvicorn[standard] (>=0.12.0)"] [[package]] name = "fire" @@ -638,13 +657,13 @@ requests = ["requests (>=2.20.0,<3.0.0.dev0)"] [[package]] name = "google-cloud-aiplatform" -version = "1.47.0" +version = "1.48.0" description = "Vertex AI API client library" optional = false python-versions = ">=3.8" files = [ - {file = "google-cloud-aiplatform-1.47.0.tar.gz", hash = "sha256:1c4537db09b83957bf0623fd2afb37e339f89a3afcda3efce9dce79b16ab59c7"}, - {file = "google_cloud_aiplatform-1.47.0-py2.py3-none-any.whl", hash = "sha256:454ef0c44ecaeadcffe58f565acfce49e53895fd51bb20da8af0d48202a4cb21"}, + {file = "google-cloud-aiplatform-1.48.0.tar.gz", hash = "sha256:70fa242247693092412270e26109729e0d2ef3f3fe8caf0ce823208f8dc156c7"}, + {file = "google_cloud_aiplatform-1.48.0-py2.py3-none-any.whl", hash = "sha256:bf7b0fd6b6bd9f95082c0489c3f29ba9ee560e1aaeff64a574719304eeb68c85"}, ] [package.dependencies] @@ -665,20 +684,21 @@ autologging = ["mlflow (>=1.27.0,<=2.1.1)"] cloud-profiler = ["tensorboard-plugin-profile (>=2.4.0,<3.0.0dev)", "tensorflow (>=2.4.0,<3.0.0dev)", "werkzeug (>=2.0.0,<2.1.0dev)"] datasets = ["pyarrow (>=10.0.1)", "pyarrow (>=14.0.0)", "pyarrow (>=3.0.0,<8.0dev)"] endpoint = ["requests (>=2.28.1)"] -full = ["cloudpickle (<3.0)", "cloudpickle (>=2.2.1,<3.0)", "docker (>=5.0.3)", "explainable-ai-sdk (>=1.0.0)", "fastapi (>=0.71.0,<0.103.1)", "google-cloud-bigquery", "google-cloud-bigquery-storage", "google-cloud-logging (<4.0)", "google-vizier (>=0.1.6)", "httpx (>=0.23.0,<0.25.0)", "immutabledict", "lit-nlp (==0.4.0)", "mlflow (>=1.27.0,<=2.1.1)", "nest-asyncio (>=1.0.0,<1.6.0)", "numpy (>=1.15.0)", "pandas (>=1.0.0)", "pandas (>=1.0.0,<2.2.0)", "pyarrow (>=10.0.1)", "pyarrow (>=14.0.0)", "pyarrow (>=3.0.0,<8.0dev)", "pyarrow (>=6.0.1)", "pydantic (<2)", "pydantic (<3)", "pyyaml (==5.3.1)", "ray[default] (>=2.4,<2.5.dev0 || >2.9.0,!=2.9.1,!=2.9.2,<=2.9.3)", "ray[default] (>=2.5,<=2.9.3)", "requests (>=2.28.1)", "starlette (>=0.17.1)", "tensorflow (>=2.3.0,<2.15.0)", "tensorflow (>=2.3.0,<3.0.0dev)", "urllib3 (>=1.21.1,<1.27)", "uvicorn[standard] (>=0.16.0)"] +full = ["cloudpickle (<3.0)", "cloudpickle (>=2.2.1,<3.0)", "docker (>=5.0.3)", "explainable-ai-sdk (>=1.0.0)", "fastapi (>=0.71.0,<=0.109.1)", "google-cloud-bigquery", "google-cloud-bigquery-storage", "google-cloud-logging (<4.0)", "google-vizier (>=0.1.6)", "httpx (>=0.23.0,<0.25.0)", "immutabledict", "lit-nlp (==0.4.0)", "mlflow (>=1.27.0,<=2.1.1)", "nest-asyncio (>=1.0.0,<1.6.0)", "numpy (>=1.15.0)", "pandas (>=1.0.0)", "pandas (>=1.0.0,<2.2.0)", "pyarrow (>=10.0.1)", "pyarrow (>=14.0.0)", "pyarrow (>=3.0.0,<8.0dev)", "pyarrow (>=6.0.1)", "pydantic (<2)", "pydantic (<3)", "pyyaml (>=5.3.1,<7)", "ray[default] (>=2.4,<2.5.dev0 || >2.9.0,!=2.9.1,!=2.9.2,<=2.9.3)", "ray[default] (>=2.5,<=2.9.3)", "requests (>=2.28.1)", "starlette (>=0.17.1)", "tensorflow (>=2.3.0,<3.0.0dev)", "tensorflow (>=2.3.0,<3.0.0dev)", "urllib3 (>=1.21.1,<1.27)", "uvicorn[standard] (>=0.16.0)"] langchain = ["langchain (>=0.1.13,<0.2)", "langchain-core (<0.2)", "langchain-google-vertexai (<0.2)"] +langchain-testing = ["langchain (>=0.1.13,<0.2)", "langchain-core (<0.2)", "langchain-google-vertexai (<0.2)", "pytest-xdist"] lit = ["explainable-ai-sdk (>=1.0.0)", "lit-nlp (==0.4.0)", "pandas (>=1.0.0)", "tensorflow (>=2.3.0,<3.0.0dev)"] metadata = ["numpy (>=1.15.0)", "pandas (>=1.0.0)"] -pipelines = ["pyyaml (==5.3.1)"] -prediction = ["docker (>=5.0.3)", "fastapi (>=0.71.0,<0.103.1)", "httpx (>=0.23.0,<0.25.0)", "starlette (>=0.17.1)", "uvicorn[standard] (>=0.16.0)"] +pipelines = ["pyyaml (>=5.3.1,<7)"] +prediction = ["docker (>=5.0.3)", "fastapi (>=0.71.0,<=0.109.1)", "httpx (>=0.23.0,<0.25.0)", "starlette (>=0.17.1)", "uvicorn[standard] (>=0.16.0)"] preview = ["cloudpickle (<3.0)", "google-cloud-logging (<4.0)"] private-endpoints = ["requests (>=2.28.1)", "urllib3 (>=1.21.1,<1.27)"] rapid-evaluation = ["nest-asyncio (>=1.0.0,<1.6.0)", "pandas (>=1.0.0,<2.2.0)"] ray = ["google-cloud-bigquery", "google-cloud-bigquery-storage", "immutabledict", "pandas (>=1.0.0,<2.2.0)", "pyarrow (>=6.0.1)", "pydantic (<2)", "ray[default] (>=2.4,<2.5.dev0 || >2.9.0,!=2.9.1,!=2.9.2,<=2.9.3)", "ray[default] (>=2.5,<=2.9.3)"] ray-testing = ["google-cloud-bigquery", "google-cloud-bigquery-storage", "immutabledict", "pandas (>=1.0.0,<2.2.0)", "pyarrow (>=6.0.1)", "pydantic (<2)", "pytest-xdist", "ray[default] (>=2.4,<2.5.dev0 || >2.9.0,!=2.9.1,!=2.9.2,<=2.9.3)", "ray[default] (>=2.5,<=2.9.3)", "ray[train] (>=2.4,<2.5.dev0 || >2.9.0,!=2.9.1,!=2.9.2,<=2.9.3)", "scikit-learn", "tensorflow", "torch (>=2.0.0,<2.1.0)", "xgboost", "xgboost-ray"] reasoningengine = ["cloudpickle (>=2.2.1,<3.0)", "pydantic (<3)"] -tensorboard = ["tensorflow (>=2.3.0,<2.15.0)"] -testing = ["bigframes", "cloudpickle (<3.0)", "cloudpickle (>=2.2.1,<3.0)", "docker (>=5.0.3)", "explainable-ai-sdk (>=1.0.0)", "fastapi (>=0.71.0,<0.103.1)", "google-api-core (>=2.11,<3.0.0)", "google-cloud-bigquery", "google-cloud-bigquery-storage", "google-cloud-logging (<4.0)", "google-vizier (>=0.1.6)", "grpcio-testing", "httpx (>=0.23.0,<0.25.0)", "immutabledict", "ipython", "kfp (>=2.6.0,<3.0.0)", "lit-nlp (==0.4.0)", "mlflow (>=1.27.0,<=2.1.1)", "nest-asyncio (>=1.0.0,<1.6.0)", "numpy (>=1.15.0)", "pandas (>=1.0.0)", "pandas (>=1.0.0,<2.2.0)", "pyarrow (>=10.0.1)", "pyarrow (>=14.0.0)", "pyarrow (>=3.0.0,<8.0dev)", "pyarrow (>=6.0.1)", "pydantic (<2)", "pydantic (<3)", "pyfakefs", "pytest-asyncio", "pytest-xdist", "pyyaml (==5.3.1)", "ray[default] (>=2.4,<2.5.dev0 || >2.9.0,!=2.9.1,!=2.9.2,<=2.9.3)", "ray[default] (>=2.5,<=2.9.3)", "requests (>=2.28.1)", "requests-toolbelt (<1.0.0)", "scikit-learn", "starlette (>=0.17.1)", "tensorboard-plugin-profile (>=2.4.0,<3.0.0dev)", "tensorflow (==2.13.0)", "tensorflow (==2.16.1)", "tensorflow (>=2.3.0,<2.15.0)", "tensorflow (>=2.3.0,<3.0.0dev)", "tensorflow (>=2.4.0,<3.0.0dev)", "torch (>=2.0.0,<2.1.0)", "torch (>=2.2.0)", "urllib3 (>=1.21.1,<1.27)", "uvicorn[standard] (>=0.16.0)", "werkzeug (>=2.0.0,<2.1.0dev)", "xgboost"] +tensorboard = ["tensorflow (>=2.3.0,<3.0.0dev)"] +testing = ["bigframes", "cloudpickle (<3.0)", "cloudpickle (>=2.2.1,<3.0)", "docker (>=5.0.3)", "explainable-ai-sdk (>=1.0.0)", "fastapi (>=0.71.0,<=0.109.1)", "google-api-core (>=2.11,<3.0.0)", "google-cloud-bigquery", "google-cloud-bigquery-storage", "google-cloud-logging (<4.0)", "google-vizier (>=0.1.6)", "grpcio-testing", "httpx (>=0.23.0,<0.25.0)", "immutabledict", "ipython", "kfp (>=2.6.0,<3.0.0)", "lit-nlp (==0.4.0)", "mlflow (>=1.27.0,<=2.1.1)", "nest-asyncio (>=1.0.0,<1.6.0)", "numpy (>=1.15.0)", "pandas (>=1.0.0)", "pandas (>=1.0.0,<2.2.0)", "pyarrow (>=10.0.1)", "pyarrow (>=14.0.0)", "pyarrow (>=3.0.0,<8.0dev)", "pyarrow (>=6.0.1)", "pydantic (<2)", "pydantic (<3)", "pyfakefs", "pytest-asyncio", "pytest-xdist", "pyyaml (>=5.3.1,<7)", "ray[default] (>=2.4,<2.5.dev0 || >2.9.0,!=2.9.1,!=2.9.2,<=2.9.3)", "ray[default] (>=2.5,<=2.9.3)", "requests (>=2.28.1)", "requests-toolbelt (<1.0.0)", "scikit-learn", "starlette (>=0.17.1)", "tensorboard-plugin-profile (>=2.4.0,<3.0.0dev)", "tensorflow (==2.13.0)", "tensorflow (==2.16.1)", "tensorflow (>=2.3.0,<3.0.0dev)", "tensorflow (>=2.3.0,<3.0.0dev)", "tensorflow (>=2.4.0,<3.0.0dev)", "torch (>=2.0.0,<2.1.0)", "torch (>=2.2.0)", "urllib3 (>=1.21.1,<1.27)", "uvicorn[standard] (>=0.16.0)", "werkzeug (>=2.0.0,<2.1.0dev)", "xgboost"] vizier = ["google-vizier (>=0.1.6)"] xai = ["tensorflow (>=2.3.0,<3.0.0dev)"] @@ -1180,15 +1200,63 @@ MarkupSafe = ">=2.0" [package.extras] i18n = ["Babel (>=2.7)"] +[[package]] +name = "jinja2schema" +version = "0.1.4" +description = "Type inference for Jinja2 templates." +optional = false +python-versions = "*" +files = [ + {file = "jinja2schema-0.1.4.tar.gz", hash = "sha256:236e4ee6612a0ab5a5664c453c954a2c7e42b6be986c12f7b31f34f9082043bc"}, +] + +[package.dependencies] +Jinja2 = ">=2.2" + +[[package]] +name = "jsonschema" +version = "4.21.1" +description = "An implementation of JSON Schema validation for Python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "jsonschema-4.21.1-py3-none-any.whl", hash = "sha256:7996507afae316306f9e2290407761157c6f78002dcf7419acb99822143d1c6f"}, + {file = "jsonschema-4.21.1.tar.gz", hash = "sha256:85727c00279f5fa6bedbe6238d2aa6403bedd8b4864ab11207d07df3cc1b2ee5"}, +] + +[package.dependencies] +attrs = ">=22.2.0" +jsonschema-specifications = ">=2023.03.6" +referencing = ">=0.28.4" +rpds-py = ">=0.7.1" + +[package.extras] +format = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3987", "uri-template", "webcolors (>=1.11)"] +format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "uri-template", "webcolors (>=1.11)"] + +[[package]] +name = "jsonschema-specifications" +version = "2023.12.1" +description = "The JSON Schema meta-schemas and vocabularies, exposed as a Registry" +optional = false +python-versions = ">=3.8" +files = [ + {file = "jsonschema_specifications-2023.12.1-py3-none-any.whl", hash = "sha256:87e4fdf3a94858b8a2ba2778d9ba57d8a9cafca7c7489c46ba0d30a8bc6a9c3c"}, + {file = "jsonschema_specifications-2023.12.1.tar.gz", hash = "sha256:48a76787b3e70f5ed53f1160d2b81f586e4ca6d1548c5de7085d1682674764cc"}, +] + +[package.dependencies] +referencing = ">=0.31.0" + [[package]] name = "julep" -version = "0.2.11" +version = "0.2.13" description = "Julep is a platform for creating agents with long-term memory" optional = false python-versions = "<3.14,>=3.8" files = [ - {file = "julep-0.2.11-py3-none-any.whl", hash = "sha256:31c742a8d7bb4e4ae8ded9642dc15e784e4fbd43f1f74386c2a99940014c3810"}, - {file = "julep-0.2.11.tar.gz", hash = "sha256:977eaeb1b2cd3d3192662ee76d544e8270bc8c82638efea066b203f8ec80374f"}, + {file = "julep-0.2.13-py3-none-any.whl", hash = "sha256:5a8aadfb31dc4caaab1dc0d098483eba8783042ac93461106f39a6a62f61146a"}, + {file = "julep-0.2.13.tar.gz", hash = "sha256:a2e3f7e19e350c72640df48644e8b4ef86bbf57f08e49a9650188aa876fa5b0e"}, ] [package.dependencies] @@ -1531,13 +1599,13 @@ files = [ [[package]] name = "openai" -version = "1.19.0" +version = "1.21.2" description = "The official Python library for the openai API" optional = false python-versions = ">=3.7.1" files = [ - {file = "openai-1.19.0-py3-none-any.whl", hash = "sha256:fef51776830930f98401fc867c24b969e3bc121f5326edbb72ed56cdfdc4ffd0"}, - {file = "openai-1.19.0.tar.gz", hash = "sha256:6a1c3538e1fa1907f19d82a0017d792d5180533ecfe1a8f22b4b5119d7a3f5a0"}, + {file = "openai-1.21.2-py3-none-any.whl", hash = "sha256:65f6bed84ecde0fc20e4f3b458000deb775531aa29154ff4d679e937d7e4370d"}, + {file = "openai-1.21.2.tar.gz", hash = "sha256:7b6e4d59f3686fcd94efdb2ee61052bf6c9dbb58052b5116fc0d75ba7adbf329"}, ] [package.dependencies] @@ -2185,6 +2253,21 @@ files = [ {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, ] +[[package]] +name = "referencing" +version = "0.34.0" +description = "JSON Referencing + Python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "referencing-0.34.0-py3-none-any.whl", hash = "sha256:d53ae300ceddd3169f1ffa9caf2cb7b769e92657e4fafb23d34b93679116dfd4"}, + {file = "referencing-0.34.0.tar.gz", hash = "sha256:5773bd84ef41799a5a8ca72dc34590c041eb01bf9aa02632b4a973fb0181a844"}, +] + +[package.dependencies] +attrs = ">=22.2.0" +rpds-py = ">=0.7.0" + [[package]] name = "requests" version = "2.31.0" @@ -2224,6 +2307,114 @@ pygments = ">=2.13.0,<3.0.0" [package.extras] jupyter = ["ipywidgets (>=7.5.1,<9)"] +[[package]] +name = "rpds-py" +version = "0.18.0" +description = "Python bindings to Rust's persistent data structures (rpds)" +optional = false +python-versions = ">=3.8" +files = [ + {file = "rpds_py-0.18.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:5b4e7d8d6c9b2e8ee2d55c90b59c707ca59bc30058269b3db7b1f8df5763557e"}, + {file = "rpds_py-0.18.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c463ed05f9dfb9baebef68048aed8dcdc94411e4bf3d33a39ba97e271624f8f7"}, + {file = "rpds_py-0.18.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:01e36a39af54a30f28b73096dd39b6802eddd04c90dbe161c1b8dbe22353189f"}, + {file = "rpds_py-0.18.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d62dec4976954a23d7f91f2f4530852b0c7608116c257833922a896101336c51"}, + {file = "rpds_py-0.18.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dd18772815d5f008fa03d2b9a681ae38d5ae9f0e599f7dda233c439fcaa00d40"}, + {file = "rpds_py-0.18.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:923d39efa3cfb7279a0327e337a7958bff00cc447fd07a25cddb0a1cc9a6d2da"}, + {file = "rpds_py-0.18.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:39514da80f971362f9267c600b6d459bfbbc549cffc2cef8e47474fddc9b45b1"}, + {file = "rpds_py-0.18.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a34d557a42aa28bd5c48a023c570219ba2593bcbbb8dc1b98d8cf5d529ab1434"}, + {file = "rpds_py-0.18.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:93df1de2f7f7239dc9cc5a4a12408ee1598725036bd2dedadc14d94525192fc3"}, + {file = "rpds_py-0.18.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:34b18ba135c687f4dac449aa5157d36e2cbb7c03cbea4ddbd88604e076aa836e"}, + {file = "rpds_py-0.18.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c0b5dcf9193625afd8ecc92312d6ed78781c46ecbf39af9ad4681fc9f464af88"}, + {file = "rpds_py-0.18.0-cp310-none-win32.whl", hash = "sha256:c4325ff0442a12113a6379af66978c3fe562f846763287ef66bdc1d57925d337"}, + {file = "rpds_py-0.18.0-cp310-none-win_amd64.whl", hash = "sha256:7223a2a5fe0d217e60a60cdae28d6949140dde9c3bcc714063c5b463065e3d66"}, + {file = "rpds_py-0.18.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:3a96e0c6a41dcdba3a0a581bbf6c44bb863f27c541547fb4b9711fd8cf0ffad4"}, + {file = "rpds_py-0.18.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:30f43887bbae0d49113cbaab729a112251a940e9b274536613097ab8b4899cf6"}, + {file = "rpds_py-0.18.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fcb25daa9219b4cf3a0ab24b0eb9a5cc8949ed4dc72acb8fa16b7e1681aa3c58"}, + {file = "rpds_py-0.18.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d68c93e381010662ab873fea609bf6c0f428b6d0bb00f2c6939782e0818d37bf"}, + {file = "rpds_py-0.18.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b34b7aa8b261c1dbf7720b5d6f01f38243e9b9daf7e6b8bc1fd4657000062f2c"}, + {file = "rpds_py-0.18.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2e6d75ab12b0bbab7215e5d40f1e5b738aa539598db27ef83b2ec46747df90e1"}, + {file = "rpds_py-0.18.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b8612cd233543a3781bc659c731b9d607de65890085098986dfd573fc2befe5"}, + {file = "rpds_py-0.18.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:aec493917dd45e3c69d00a8874e7cbed844efd935595ef78a0f25f14312e33c6"}, + {file = "rpds_py-0.18.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:661d25cbffaf8cc42e971dd570d87cb29a665f49f4abe1f9e76be9a5182c4688"}, + {file = "rpds_py-0.18.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:1df3659d26f539ac74fb3b0c481cdf9d725386e3552c6fa2974f4d33d78e544b"}, + {file = "rpds_py-0.18.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:a1ce3ba137ed54f83e56fb983a5859a27d43a40188ba798993812fed73c70836"}, + {file = "rpds_py-0.18.0-cp311-none-win32.whl", hash = "sha256:69e64831e22a6b377772e7fb337533c365085b31619005802a79242fee620bc1"}, + {file = "rpds_py-0.18.0-cp311-none-win_amd64.whl", hash = "sha256:998e33ad22dc7ec7e030b3df701c43630b5bc0d8fbc2267653577e3fec279afa"}, + {file = "rpds_py-0.18.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:7f2facbd386dd60cbbf1a794181e6aa0bd429bd78bfdf775436020172e2a23f0"}, + {file = "rpds_py-0.18.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1d9a5be316c15ffb2b3c405c4ff14448c36b4435be062a7f578ccd8b01f0c4d8"}, + {file = "rpds_py-0.18.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cd5bf1af8efe569654bbef5a3e0a56eca45f87cfcffab31dd8dde70da5982475"}, + {file = "rpds_py-0.18.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5417558f6887e9b6b65b4527232553c139b57ec42c64570569b155262ac0754f"}, + {file = "rpds_py-0.18.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:56a737287efecafc16f6d067c2ea0117abadcd078d58721f967952db329a3e5c"}, + {file = "rpds_py-0.18.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8f03bccbd8586e9dd37219bce4d4e0d3ab492e6b3b533e973fa08a112cb2ffc9"}, + {file = "rpds_py-0.18.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4457a94da0d5c53dc4b3e4de1158bdab077db23c53232f37a3cb7afdb053a4e3"}, + {file = "rpds_py-0.18.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0ab39c1ba9023914297dd88ec3b3b3c3f33671baeb6acf82ad7ce883f6e8e157"}, + {file = "rpds_py-0.18.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:9d54553c1136b50fd12cc17e5b11ad07374c316df307e4cfd6441bea5fb68496"}, + {file = "rpds_py-0.18.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0af039631b6de0397ab2ba16eaf2872e9f8fca391b44d3d8cac317860a700a3f"}, + {file = "rpds_py-0.18.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:84ffab12db93b5f6bad84c712c92060a2d321b35c3c9960b43d08d0f639d60d7"}, + {file = "rpds_py-0.18.0-cp312-none-win32.whl", hash = "sha256:685537e07897f173abcf67258bee3c05c374fa6fff89d4c7e42fb391b0605e98"}, + {file = "rpds_py-0.18.0-cp312-none-win_amd64.whl", hash = "sha256:e003b002ec72c8d5a3e3da2989c7d6065b47d9eaa70cd8808b5384fbb970f4ec"}, + {file = "rpds_py-0.18.0-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:08f9ad53c3f31dfb4baa00da22f1e862900f45908383c062c27628754af2e88e"}, + {file = "rpds_py-0.18.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:c0013fe6b46aa496a6749c77e00a3eb07952832ad6166bd481c74bda0dcb6d58"}, + {file = "rpds_py-0.18.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e32a92116d4f2a80b629778280103d2a510a5b3f6314ceccd6e38006b5e92dcb"}, + {file = "rpds_py-0.18.0-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e541ec6f2ec456934fd279a3120f856cd0aedd209fc3852eca563f81738f6861"}, + {file = "rpds_py-0.18.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bed88b9a458e354014d662d47e7a5baafd7ff81c780fd91584a10d6ec842cb73"}, + {file = "rpds_py-0.18.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2644e47de560eb7bd55c20fc59f6daa04682655c58d08185a9b95c1970fa1e07"}, + {file = "rpds_py-0.18.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8e8916ae4c720529e18afa0b879473049e95949bf97042e938530e072fde061d"}, + {file = "rpds_py-0.18.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:465a3eb5659338cf2a9243e50ad9b2296fa15061736d6e26240e713522b6235c"}, + {file = "rpds_py-0.18.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:ea7d4a99f3b38c37eac212dbd6ec42b7a5ec51e2c74b5d3223e43c811609e65f"}, + {file = "rpds_py-0.18.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:67071a6171e92b6da534b8ae326505f7c18022c6f19072a81dcf40db2638767c"}, + {file = "rpds_py-0.18.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:41ef53e7c58aa4ef281da975f62c258950f54b76ec8e45941e93a3d1d8580594"}, + {file = "rpds_py-0.18.0-cp38-none-win32.whl", hash = "sha256:fdea4952db2793c4ad0bdccd27c1d8fdd1423a92f04598bc39425bcc2b8ee46e"}, + {file = "rpds_py-0.18.0-cp38-none-win_amd64.whl", hash = "sha256:7cd863afe7336c62ec78d7d1349a2f34c007a3cc6c2369d667c65aeec412a5b1"}, + {file = "rpds_py-0.18.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:5307def11a35f5ae4581a0b658b0af8178c65c530e94893345bebf41cc139d33"}, + {file = "rpds_py-0.18.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:77f195baa60a54ef9d2de16fbbfd3ff8b04edc0c0140a761b56c267ac11aa467"}, + {file = "rpds_py-0.18.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:39f5441553f1c2aed4de4377178ad8ff8f9d733723d6c66d983d75341de265ab"}, + {file = "rpds_py-0.18.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9a00312dea9310d4cb7dbd7787e722d2e86a95c2db92fbd7d0155f97127bcb40"}, + {file = "rpds_py-0.18.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8f2fc11e8fe034ee3c34d316d0ad8808f45bc3b9ce5857ff29d513f3ff2923a1"}, + {file = "rpds_py-0.18.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:586f8204935b9ec884500498ccc91aa869fc652c40c093bd9e1471fbcc25c022"}, + {file = "rpds_py-0.18.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ddc2f4dfd396c7bfa18e6ce371cba60e4cf9d2e5cdb71376aa2da264605b60b9"}, + {file = "rpds_py-0.18.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5ddcba87675b6d509139d1b521e0c8250e967e63b5909a7e8f8944d0f90ff36f"}, + {file = "rpds_py-0.18.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:7bd339195d84439cbe5771546fe8a4e8a7a045417d8f9de9a368c434e42a721e"}, + {file = "rpds_py-0.18.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:d7c36232a90d4755b720fbd76739d8891732b18cf240a9c645d75f00639a9024"}, + {file = "rpds_py-0.18.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:6b0817e34942b2ca527b0e9298373e7cc75f429e8da2055607f4931fded23e20"}, + {file = "rpds_py-0.18.0-cp39-none-win32.whl", hash = "sha256:99f70b740dc04d09e6b2699b675874367885217a2e9f782bdf5395632ac663b7"}, + {file = "rpds_py-0.18.0-cp39-none-win_amd64.whl", hash = "sha256:6ef687afab047554a2d366e112dd187b62d261d49eb79b77e386f94644363294"}, + {file = "rpds_py-0.18.0-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:ad36cfb355e24f1bd37cac88c112cd7730873f20fb0bdaf8ba59eedf8216079f"}, + {file = "rpds_py-0.18.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:36b3ee798c58ace201289024b52788161e1ea133e4ac93fba7d49da5fec0ef9e"}, + {file = "rpds_py-0.18.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f8a2f084546cc59ea99fda8e070be2fd140c3092dc11524a71aa8f0f3d5a55ca"}, + {file = "rpds_py-0.18.0-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e4461d0f003a0aa9be2bdd1b798a041f177189c1a0f7619fe8c95ad08d9a45d7"}, + {file = "rpds_py-0.18.0-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8db715ebe3bb7d86d77ac1826f7d67ec11a70dbd2376b7cc214199360517b641"}, + {file = "rpds_py-0.18.0-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:793968759cd0d96cac1e367afd70c235867831983f876a53389ad869b043c948"}, + {file = "rpds_py-0.18.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:66e6a3af5a75363d2c9a48b07cb27c4ea542938b1a2e93b15a503cdfa8490795"}, + {file = "rpds_py-0.18.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6ef0befbb5d79cf32d0266f5cff01545602344eda89480e1dd88aca964260b18"}, + {file = "rpds_py-0.18.0-pp310-pypy310_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:1d4acf42190d449d5e89654d5c1ed3a4f17925eec71f05e2a41414689cda02d1"}, + {file = "rpds_py-0.18.0-pp310-pypy310_pp73-musllinux_1_2_i686.whl", hash = "sha256:a5f446dd5055667aabaee78487f2b5ab72e244f9bc0b2ffebfeec79051679984"}, + {file = "rpds_py-0.18.0-pp310-pypy310_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:9dbbeb27f4e70bfd9eec1be5477517365afe05a9b2c441a0b21929ee61048124"}, + {file = "rpds_py-0.18.0-pp38-pypy38_pp73-macosx_10_12_x86_64.whl", hash = "sha256:22806714311a69fd0af9b35b7be97c18a0fc2826e6827dbb3a8c94eac6cf7eeb"}, + {file = "rpds_py-0.18.0-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:b34ae4636dfc4e76a438ab826a0d1eed2589ca7d9a1b2d5bb546978ac6485461"}, + {file = "rpds_py-0.18.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c8370641f1a7f0e0669ddccca22f1da893cef7628396431eb445d46d893e5cd"}, + {file = "rpds_py-0.18.0-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c8362467a0fdeccd47935f22c256bec5e6abe543bf0d66e3d3d57a8fb5731863"}, + {file = "rpds_py-0.18.0-pp38-pypy38_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:11a8c85ef4a07a7638180bf04fe189d12757c696eb41f310d2426895356dcf05"}, + {file = "rpds_py-0.18.0-pp38-pypy38_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b316144e85316da2723f9d8dc75bada12fa58489a527091fa1d5a612643d1a0e"}, + {file = "rpds_py-0.18.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cf1ea2e34868f6fbf070e1af291c8180480310173de0b0c43fc38a02929fc0e3"}, + {file = "rpds_py-0.18.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e546e768d08ad55b20b11dbb78a745151acbd938f8f00d0cfbabe8b0199b9880"}, + {file = "rpds_py-0.18.0-pp38-pypy38_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:4901165d170a5fde6f589acb90a6b33629ad1ec976d4529e769c6f3d885e3e80"}, + {file = "rpds_py-0.18.0-pp38-pypy38_pp73-musllinux_1_2_i686.whl", hash = "sha256:618a3d6cae6ef8ec88bb76dd80b83cfe415ad4f1d942ca2a903bf6b6ff97a2da"}, + {file = "rpds_py-0.18.0-pp38-pypy38_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:ed4eb745efbff0a8e9587d22a84be94a5eb7d2d99c02dacf7bd0911713ed14dd"}, + {file = "rpds_py-0.18.0-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:6c81e5f372cd0dc5dc4809553d34f832f60a46034a5f187756d9b90586c2c307"}, + {file = "rpds_py-0.18.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:43fbac5f22e25bee1d482c97474f930a353542855f05c1161fd804c9dc74a09d"}, + {file = "rpds_py-0.18.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6d7faa6f14017c0b1e69f5e2c357b998731ea75a442ab3841c0dbbbfe902d2c4"}, + {file = "rpds_py-0.18.0-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:08231ac30a842bd04daabc4d71fddd7e6d26189406d5a69535638e4dcb88fe76"}, + {file = "rpds_py-0.18.0-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:044a3e61a7c2dafacae99d1e722cc2d4c05280790ec5a05031b3876809d89a5c"}, + {file = "rpds_py-0.18.0-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3f26b5bd1079acdb0c7a5645e350fe54d16b17bfc5e71f371c449383d3342e17"}, + {file = "rpds_py-0.18.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:482103aed1dfe2f3b71a58eff35ba105289b8d862551ea576bd15479aba01f66"}, + {file = "rpds_py-0.18.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1374f4129f9bcca53a1bba0bb86bf78325a0374577cf7e9e4cd046b1e6f20e24"}, + {file = "rpds_py-0.18.0-pp39-pypy39_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:635dc434ff724b178cb192c70016cc0ad25a275228f749ee0daf0eddbc8183b1"}, + {file = "rpds_py-0.18.0-pp39-pypy39_pp73-musllinux_1_2_i686.whl", hash = "sha256:bc362ee4e314870a70f4ae88772d72d877246537d9f8cb8f7eacf10884862432"}, + {file = "rpds_py-0.18.0-pp39-pypy39_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:4832d7d380477521a8c1644bbab6588dfedea5e30a7d967b5fb75977c45fd77f"}, + {file = "rpds_py-0.18.0.tar.gz", hash = "sha256:42821446ee7a76f5d9f71f9e33a4fb2ffd724bb3e7f93386150b61a43115788d"}, +] + [[package]] name = "rsa" version = "4.9" @@ -2314,56 +2505,56 @@ tornado = ["tornado (>=5)"] [[package]] name = "shapely" -version = "2.0.3" +version = "2.0.4" description = "Manipulation and analysis of geometric objects" optional = false python-versions = ">=3.7" files = [ - {file = "shapely-2.0.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:af7e9abe180b189431b0f490638281b43b84a33a960620e6b2e8d3e3458b61a1"}, - {file = "shapely-2.0.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:98040462b36ced9671e266b95c326b97f41290d9d17504a1ee4dc313a7667b9c"}, - {file = "shapely-2.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:71eb736ef2843f23473c6e37f6180f90f0a35d740ab284321548edf4e55d9a52"}, - {file = "shapely-2.0.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:881eb9dbbb4a6419667e91fcb20313bfc1e67f53dbb392c6840ff04793571ed1"}, - {file = "shapely-2.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f10d2ccf0554fc0e39fad5886c839e47e207f99fdf09547bc687a2330efda35b"}, - {file = "shapely-2.0.3-cp310-cp310-win32.whl", hash = "sha256:6dfdc077a6fcaf74d3eab23a1ace5abc50c8bce56ac7747d25eab582c5a2990e"}, - {file = "shapely-2.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:64c5013dacd2d81b3bb12672098a0b2795c1bf8190cfc2980e380f5ef9d9e4d9"}, - {file = "shapely-2.0.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:56cee3e4e8159d6f2ce32e421445b8e23154fd02a0ac271d6a6c0b266a8e3cce"}, - {file = "shapely-2.0.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:619232c8276fded09527d2a9fd91a7885ff95c0ff9ecd5e3cb1e34fbb676e2ae"}, - {file = "shapely-2.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b2a7d256db6f5b4b407dc0c98dd1b2fcf1c9c5814af9416e5498d0a2e4307a4b"}, - {file = "shapely-2.0.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e45f0c8cd4583647db3216d965d49363e6548c300c23fd7e57ce17a03f824034"}, - {file = "shapely-2.0.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13cb37d3826972a82748a450328fe02a931dcaed10e69a4d83cc20ba021bc85f"}, - {file = "shapely-2.0.3-cp311-cp311-win32.whl", hash = "sha256:9302d7011e3e376d25acd30d2d9e70d315d93f03cc748784af19b00988fc30b1"}, - {file = "shapely-2.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:6b464f2666b13902835f201f50e835f2f153f37741db88f68c7f3b932d3505fa"}, - {file = "shapely-2.0.3-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:e86e7cb8e331a4850e0c2a8b2d66dc08d7a7b301b8d1d34a13060e3a5b4b3b55"}, - {file = "shapely-2.0.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:c91981c99ade980fc49e41a544629751a0ccd769f39794ae913e53b07b2f78b9"}, - {file = "shapely-2.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:bd45d456983dc60a42c4db437496d3f08a4201fbf662b69779f535eb969660af"}, - {file = "shapely-2.0.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:882fb1ffc7577e88c1194f4f1757e277dc484ba096a3b94844319873d14b0f2d"}, - {file = "shapely-2.0.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b9f2d93bff2ea52fa93245798cddb479766a18510ea9b93a4fb9755c79474889"}, - {file = "shapely-2.0.3-cp312-cp312-win32.whl", hash = "sha256:99abad1fd1303b35d991703432c9481e3242b7b3a393c186cfb02373bf604004"}, - {file = "shapely-2.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:6f555fe3304a1f40398977789bc4fe3c28a11173196df9ece1e15c5bc75a48db"}, - {file = "shapely-2.0.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a983cc418c1fa160b7d797cfef0e0c9f8c6d5871e83eae2c5793fce6a837fad9"}, - {file = "shapely-2.0.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18bddb8c327f392189a8d5d6b9a858945722d0bb95ccbd6a077b8e8fc4c7890d"}, - {file = "shapely-2.0.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:442f4dcf1eb58c5a4e3428d88e988ae153f97ab69a9f24e07bf4af8038536325"}, - {file = "shapely-2.0.3-cp37-cp37m-win32.whl", hash = "sha256:31a40b6e3ab00a4fd3a1d44efb2482278642572b8e0451abdc8e0634b787173e"}, - {file = "shapely-2.0.3-cp37-cp37m-win_amd64.whl", hash = "sha256:59b16976c2473fec85ce65cc9239bef97d4205ab3acead4e6cdcc72aee535679"}, - {file = "shapely-2.0.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:705efbce1950a31a55b1daa9c6ae1c34f1296de71ca8427974ec2f27d57554e3"}, - {file = "shapely-2.0.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:601c5c0058a6192df704cb889439f64994708563f57f99574798721e9777a44b"}, - {file = "shapely-2.0.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:f24ecbb90a45c962b3b60d8d9a387272ed50dc010bfe605f1d16dfc94772d8a1"}, - {file = "shapely-2.0.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8c2a2989222c6062f7a0656e16276c01bb308bc7e5d999e54bf4e294ce62e76"}, - {file = "shapely-2.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42bceb9bceb3710a774ce04908fda0f28b291323da2688f928b3f213373b5aee"}, - {file = "shapely-2.0.3-cp38-cp38-win32.whl", hash = "sha256:54d925c9a311e4d109ec25f6a54a8bd92cc03481a34ae1a6a92c1fe6729b7e01"}, - {file = "shapely-2.0.3-cp38-cp38-win_amd64.whl", hash = "sha256:300d203b480a4589adefff4c4af0b13919cd6d760ba3cbb1e56275210f96f654"}, - {file = "shapely-2.0.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:083d026e97b6c1f4a9bd2a9171c7692461092ed5375218170d91705550eecfd5"}, - {file = "shapely-2.0.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:27b6e1910094d93e9627f2664121e0e35613262fc037051680a08270f6058daf"}, - {file = "shapely-2.0.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:71b2de56a9e8c0e5920ae5ddb23b923490557ac50cb0b7fa752761bf4851acde"}, - {file = "shapely-2.0.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4d279e56bbb68d218d63f3efc80c819cedcceef0e64efbf058a1df89dc57201b"}, - {file = "shapely-2.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88566d01a30f0453f7d038db46bc83ce125e38e47c5f6bfd4c9c287010e9bf74"}, - {file = "shapely-2.0.3-cp39-cp39-win32.whl", hash = "sha256:58afbba12c42c6ed44c4270bc0e22f3dadff5656d711b0ad335c315e02d04707"}, - {file = "shapely-2.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:5026b30433a70911979d390009261b8c4021ff87c7c3cbd825e62bb2ffa181bc"}, - {file = "shapely-2.0.3.tar.gz", hash = "sha256:4d65d0aa7910af71efa72fd6447e02a8e5dd44da81a983de9d736d6e6ccbe674"}, -] - -[package.dependencies] -numpy = ">=1.14,<2" + {file = "shapely-2.0.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:011b77153906030b795791f2fdfa2d68f1a8d7e40bce78b029782ade3afe4f2f"}, + {file = "shapely-2.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9831816a5d34d5170aa9ed32a64982c3d6f4332e7ecfe62dc97767e163cb0b17"}, + {file = "shapely-2.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5c4849916f71dc44e19ed370421518c0d86cf73b26e8656192fcfcda08218fbd"}, + {file = "shapely-2.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:841f93a0e31e4c64d62ea570d81c35de0f6cea224568b2430d832967536308e6"}, + {file = "shapely-2.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b4431f522b277c79c34b65da128029a9955e4481462cbf7ebec23aab61fc58"}, + {file = "shapely-2.0.4-cp310-cp310-win32.whl", hash = "sha256:92a41d936f7d6743f343be265ace93b7c57f5b231e21b9605716f5a47c2879e7"}, + {file = "shapely-2.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:30982f79f21bb0ff7d7d4a4e531e3fcaa39b778584c2ce81a147f95be1cd58c9"}, + {file = "shapely-2.0.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:de0205cb21ad5ddaef607cda9a3191eadd1e7a62a756ea3a356369675230ac35"}, + {file = "shapely-2.0.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:7d56ce3e2a6a556b59a288771cf9d091470116867e578bebced8bfc4147fbfd7"}, + {file = "shapely-2.0.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:58b0ecc505bbe49a99551eea3f2e8a9b3b24b3edd2a4de1ac0dc17bc75c9ec07"}, + {file = "shapely-2.0.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:790a168a808bd00ee42786b8ba883307c0e3684ebb292e0e20009588c426da47"}, + {file = "shapely-2.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4310b5494271e18580d61022c0857eb85d30510d88606fa3b8314790df7f367d"}, + {file = "shapely-2.0.4-cp311-cp311-win32.whl", hash = "sha256:63f3a80daf4f867bd80f5c97fbe03314348ac1b3b70fb1c0ad255a69e3749879"}, + {file = "shapely-2.0.4-cp311-cp311-win_amd64.whl", hash = "sha256:c52ed79f683f721b69a10fb9e3d940a468203f5054927215586c5d49a072de8d"}, + {file = "shapely-2.0.4-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:5bbd974193e2cc274312da16b189b38f5f128410f3377721cadb76b1e8ca5328"}, + {file = "shapely-2.0.4-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:41388321a73ba1a84edd90d86ecc8bfed55e6a1e51882eafb019f45895ec0f65"}, + {file = "shapely-2.0.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0776c92d584f72f1e584d2e43cfc5542c2f3dd19d53f70df0900fda643f4bae6"}, + {file = "shapely-2.0.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c75c98380b1ede1cae9a252c6dc247e6279403fae38c77060a5e6186c95073ac"}, + {file = "shapely-2.0.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c3e700abf4a37b7b8b90532fa6ed5c38a9bfc777098bc9fbae5ec8e618ac8f30"}, + {file = "shapely-2.0.4-cp312-cp312-win32.whl", hash = "sha256:4f2ab0faf8188b9f99e6a273b24b97662194160cc8ca17cf9d1fb6f18d7fb93f"}, + {file = "shapely-2.0.4-cp312-cp312-win_amd64.whl", hash = "sha256:03152442d311a5e85ac73b39680dd64a9892fa42bb08fd83b3bab4fe6999bfa0"}, + {file = "shapely-2.0.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:994c244e004bc3cfbea96257b883c90a86e8cbd76e069718eb4c6b222a56f78b"}, + {file = "shapely-2.0.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:05ffd6491e9e8958b742b0e2e7c346635033d0a5f1a0ea083547fcc854e5d5cf"}, + {file = "shapely-2.0.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2fbdc1140a7d08faa748256438291394967aa54b40009f54e8d9825e75ef6113"}, + {file = "shapely-2.0.4-cp37-cp37m-win32.whl", hash = "sha256:5af4cd0d8cf2912bd95f33586600cac9c4b7c5053a036422b97cfe4728d2eb53"}, + {file = "shapely-2.0.4-cp37-cp37m-win_amd64.whl", hash = "sha256:464157509ce4efa5ff285c646a38b49f8c5ef8d4b340f722685b09bb033c5ccf"}, + {file = "shapely-2.0.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:489c19152ec1f0e5c5e525356bcbf7e532f311bff630c9b6bc2db6f04da6a8b9"}, + {file = "shapely-2.0.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b79bbd648664aa6f44ef018474ff958b6b296fed5c2d42db60078de3cffbc8aa"}, + {file = "shapely-2.0.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:674d7baf0015a6037d5758496d550fc1946f34bfc89c1bf247cabdc415d7747e"}, + {file = "shapely-2.0.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6cd4ccecc5ea5abd06deeaab52fcdba372f649728050c6143cc405ee0c166679"}, + {file = "shapely-2.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fb5cdcbbe3080181498931b52a91a21a781a35dcb859da741c0345c6402bf00c"}, + {file = "shapely-2.0.4-cp38-cp38-win32.whl", hash = "sha256:55a38dcd1cee2f298d8c2ebc60fc7d39f3b4535684a1e9e2f39a80ae88b0cea7"}, + {file = "shapely-2.0.4-cp38-cp38-win_amd64.whl", hash = "sha256:ec555c9d0db12d7fd777ba3f8b75044c73e576c720a851667432fabb7057da6c"}, + {file = "shapely-2.0.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:3f9103abd1678cb1b5f7e8e1af565a652e036844166c91ec031eeb25c5ca8af0"}, + {file = "shapely-2.0.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:263bcf0c24d7a57c80991e64ab57cba7a3906e31d2e21b455f493d4aab534aaa"}, + {file = "shapely-2.0.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ddf4a9bfaac643e62702ed662afc36f6abed2a88a21270e891038f9a19bc08fc"}, + {file = "shapely-2.0.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:485246fcdb93336105c29a5cfbff8a226949db37b7473c89caa26c9bae52a242"}, + {file = "shapely-2.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8de4578e838a9409b5b134a18ee820730e507b2d21700c14b71a2b0757396acc"}, + {file = "shapely-2.0.4-cp39-cp39-win32.whl", hash = "sha256:9dab4c98acfb5fb85f5a20548b5c0abe9b163ad3525ee28822ffecb5c40e724c"}, + {file = "shapely-2.0.4-cp39-cp39-win_amd64.whl", hash = "sha256:31c19a668b5a1eadab82ff070b5a260478ac6ddad3a5b62295095174a8d26398"}, + {file = "shapely-2.0.4.tar.gz", hash = "sha256:5dc736127fac70009b8d309a0eeb74f3e08979e530cf7017f2f507ef62e6cfb8"}, +] + +[package.dependencies] +numpy = ">=1.14,<3" [package.extras] docs = ["matplotlib", "numpydoc (==1.1.*)", "sphinx", "sphinx-book-theme", "sphinx-remove-toctrees"] @@ -2423,20 +2614,20 @@ tests = ["cython", "littleutils", "pygments", "pytest", "typeguard"] [[package]] name = "starlette" -version = "0.27.0" +version = "0.36.3" description = "The little ASGI library that shines." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "starlette-0.27.0-py3-none-any.whl", hash = "sha256:918416370e846586541235ccd38a474c08b80443ed31c578a418e2209b3eef91"}, - {file = "starlette-0.27.0.tar.gz", hash = "sha256:6a6b0d042acb8d469a01eba54e9cda6cbd24ac602c4cd016723117d6a7e73b75"}, + {file = "starlette-0.36.3-py3-none-any.whl", hash = "sha256:13d429aa93a61dc40bf503e8c801db1f1bca3dc706b10ef2434a36123568f044"}, + {file = "starlette-0.36.3.tar.gz", hash = "sha256:90a671733cfb35771d8cc605e0b679d23b992f8dcfad48cc60b38cb29aeb7080"}, ] [package.dependencies] anyio = ">=3.4.0,<5" [package.extras] -full = ["httpx (>=0.22.0)", "itsdangerous", "jinja2", "python-multipart", "pyyaml"] +full = ["httpx (>=0.22.0)", "itsdangerous", "jinja2", "python-multipart (>=0.0.7)", "pyyaml"] [[package]] name = "tabulate" @@ -2567,13 +2758,24 @@ typing-extensions = ">=3.7.4.3" [[package]] name = "types-protobuf" -version = "4.25.0.20240410" +version = "4.25.0.20240417" description = "Typing stubs for protobuf" optional = false python-versions = ">=3.8" files = [ - {file = "types-protobuf-4.25.0.20240410.tar.gz", hash = "sha256:86576c2e7e691b8b75f4cabec430f7405edef411b5d191e847c91307935b1b38"}, - {file = "types_protobuf-4.25.0.20240410-py3-none-any.whl", hash = "sha256:335b2e8cf9f39c233dbf0f977a2a4fbc2c0bac720225c544cc1412a67ab1e1d3"}, + {file = "types-protobuf-4.25.0.20240417.tar.gz", hash = "sha256:c34eff17b9b3a0adb6830622f0f302484e4c089f533a46e3f147568313544352"}, + {file = "types_protobuf-4.25.0.20240417-py3-none-any.whl", hash = "sha256:e9b613227c2127e3d4881d75d93c93b4d6fd97b5f6a099a0b654a05351c8685d"}, +] + +[[package]] +name = "types-python-dateutil" +version = "2.9.0.20240316" +description = "Typing stubs for python-dateutil" +optional = false +python-versions = ">=3.8" +files = [ + {file = "types-python-dateutil-2.9.0.20240316.tar.gz", hash = "sha256:5d2f2e240b86905e40944dd787db6da9263f0deabef1076ddaed797351ec0202"}, + {file = "types_python_dateutil-2.9.0.20240316-py3-none-any.whl", hash = "sha256:6b8cb66d960771ce5ff974e9dd45e38facb81718cc1e208b10b1baccbfdbee3b"}, ] [[package]] @@ -2669,4 +2871,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = ">=3.10,<3.13" -content-hash = "3e39659c10ad100e4613d4a891a26ac590eaa40e638d727cc8ce59a65648362a" +content-hash = "b9f3ef2b2974e5df7ff1d1e74c1b984a0271e3f66e07cde9b5166efd13c56dca" diff --git a/agents-api/pyproject.toml b/agents-api/pyproject.toml index a0b477568..74b3a6ffe 100644 --- a/agents-api/pyproject.toml +++ b/agents-api/pyproject.toml @@ -8,7 +8,7 @@ packages = [{include = "agents_api"}] [tool.poetry.dependencies] python = ">=3.10,<3.13" -fastapi = "^0.103.1" +fastapi = "^0.109.1" pycozo = {extras = ["embedded"], version = "^0.7.6"} uvicorn = "^0.23.2" fire = "^0.5.0" @@ -22,6 +22,10 @@ sentry-sdk = {extras = ["fastapi"], version = "^1.38.0"} ward = "^0.68.0b0" temporalio = "^1.4.0" pydantic = "^2.5.3" +arrow = "^1.3.0" +jinja2 = "^3.1.3" +jinja2schema = "^0.1.4" +jsonschema = "^4.21.1" [tool.poetry.group.dev.dependencies] diff --git a/docs/.gitbook/assets/agents-openapi.yaml b/docs/.gitbook/assets/agents-openapi.yaml index e26ad59c8..0b446c2f2 100644 --- a/docs/.gitbook/assets/agents-openapi.yaml +++ b/docs/.gitbook/assets/agents-openapi.yaml @@ -2,23 +2,28 @@ openapi: 3.0.3 info: title: Julep Agents API description: Julep AI agents API allows creating agents with long-term memory easily. - termsOfService: "" + termsOfService: '' contact: email: developers@julep.ai + name: Julep Developers + url: https://julep.ai license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html version: 1.0.0 externalDocs: description: Find out more about spec - url: "" + url: https://docs.julep.ai servers: - url: https://api-alpha.julep.ai/api - description: "" + description: '' variables: {} tags: - name: Default - description: "" + description: '' + externalDocs: + url: https://docs.julep.ai + description: https://docs.julep.ai paths: /sessions: post: @@ -35,7 +40,7 @@ paths: description: Session options description: Session initialization options responses: - "201": + '201': content: application/json: schema: @@ -45,7 +50,8 @@ paths: - api-key: [] get: summary: List sessions - description: List sessions created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at`) + description: >- + List sessions created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at` by default) operationId: ListSessions tags: [] parameters: @@ -54,21 +60,44 @@ paths: description: Number of sessions to return schema: type: integer - exclusiveMinimum: true - exclusiveMaximum: true - default: 10 + default: 100 minimum: 1 - maximum: 100 + maximum: 1000 - in: query name: offset description: Number of sessions to skip (sorted created_at descending order) schema: type: integer - exclusiveMinimum: true default: 0 minimum: 0 + - in: query + name: metadata_filter + description: JSON object that should be used to filter objects by metadata + required: false + schema: + type: string + default: '{}' + - in: query + name: sort_by + description: 'Which field to sort by: `created_at` or `updated_at`' + schema: + type: string + enum: + - created_at + - updated_at + default: created_at + - in: query + name: order + description: >- + Which order should the sort be: `asc` (ascending) or `desc` (descending) + schema: + type: string + enum: + - asc + - desc + default: desc responses: - "200": + '200': content: application/json: schema: @@ -81,7 +110,8 @@ paths: $ref: '#/components/schemas/Session' required: - items - description: List of sessions (sorted created_at descending order) with limit+offset pagination + description: >- + List of sessions (sorted created_at descending order) with limit+offset pagination security: - api-key: [] /users: @@ -98,7 +128,7 @@ paths: $ref: '#/components/schemas/CreateUserRequest' description: User create options responses: - "201": + '201': content: application/json: schema: @@ -108,7 +138,8 @@ paths: - api-key: [] get: summary: List users - description: List users created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at`) + description: >- + List users created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at` by default) operationId: ListUsers tags: [] parameters: @@ -117,18 +148,42 @@ paths: description: Number of items to return schema: type: integer - default: 10 - exclusiveMinimum: true + default: 100 minimum: 1 - exclusiveMaximum: true - maximum: 100 + maximum: 1000 - in: query name: offset description: Number of items to skip (sorted created_at descending order) schema: type: integer + - in: query + name: metadata_filter + description: JSON object that should be used to filter objects by metadata + required: false + schema: + type: string + default: '{}' + - in: query + name: sort_by + description: 'Which field to sort by: `created_at` or `updated_at`' + schema: + type: string + enum: + - created_at + - updated_at + default: created_at + - in: query + name: order + description: >- + Which order should the sort be: `asc` (ascending) or `desc` (descending) + schema: + type: string + enum: + - asc + - desc + default: desc responses: - "200": + '200': content: application/json: schema: @@ -141,7 +196,8 @@ paths: $ref: '#/components/schemas/User' required: - items - description: List of users (sorted created_at descending order) with limit+offset pagination + description: >- + List of users (sorted created_at descending order) with limit+offset pagination security: - api-key: [] /agents: @@ -158,7 +214,7 @@ paths: $ref: '#/components/schemas/CreateAgentRequest' description: Agent create options responses: - "201": + '201': content: application/json: schema: @@ -168,7 +224,8 @@ paths: - api-key: [] get: summary: List agents - description: List agents created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at`) + description: >- + List agents created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at` by default) operationId: ListAgents tags: [] parameters: @@ -177,22 +234,46 @@ paths: description: Number of items to return schema: type: integer - default: 10 - exclusiveMinimum: true + default: 100 minimum: 1 - exclusiveMaximum: true - maximum: 100 + maximum: 1000 - in: query name: offset description: Number of items to skip (sorted created_at descending order) schema: type: integer - exclusiveMinimum: true default: 0 minimum: 0 + - in: query + name: metadata_filter + description: JSON object that should be used to filter objects by metadata + required: false + schema: + type: string + default: '{}' + - in: query + name: sort_by + description: 'Which field to sort by: `created_at` or `updated_at`' + schema: + type: string + enum: + - created_at + - updated_at + default: created_at + - in: query + name: order + description: >- + Which order should the sort be: `asc` (ascending) or `desc` (descending) + schema: + type: string + enum: + - asc + - desc + default: desc responses: - "200": - description: List of agents (sorted created_at descending order) with limit+offset pagination + '200': + description: >- + List of agents (sorted created_at descending order) with limit+offset pagination content: application/json: schema: @@ -209,12 +290,12 @@ paths: /sessions/{session_id}: get: summary: Get details of the session - description: "" + description: '' operationId: GetSession tags: [] parameters: [] responses: - "200": + '200': content: application/json: schema: @@ -223,17 +304,21 @@ paths: - api-key: [] delete: summary: Delete session - description: "" + description: '' operationId: DeleteSession tags: [] parameters: [] responses: - "202": {} + '202': + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceDeletedResponse' security: - api-key: [] put: summary: Update session parameters - description: "" + description: '' operationId: UpdateSession tags: [] parameters: [] @@ -243,7 +328,7 @@ paths: schema: $ref: '#/components/schemas/UpdateSessionRequest' responses: - "200": + '200': content: application/json: schema: @@ -253,10 +338,32 @@ paths: parameters: - in: path name: session_id - description: "" + description: '' schema: type: string + format: uuid required: true + patch: + summary: Patch Session parameters (merge instead of replace) + description: '' + operationId: PatchSession + tags: [] + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchSessionRequest' + responses: + '200': + description: '' + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceUpdatedResponse' + security: + - api-key: [] /sessions/{session_id}/suggestions: get: summary: Get autogenerated suggestions for session user and agent @@ -266,24 +373,21 @@ paths: parameters: - in: query name: limit - description: "" + description: '' schema: type: integer - default: 10 - exclusiveMinimum: true - exclusiveMaximum: true + default: 100 minimum: 1 - maximum: 100 + maximum: 1000 - in: query name: offset - description: "" + description: '' schema: type: integer default: 0 - exclusiveMinimum: true minimum: 0 responses: - "200": + '200': content: application/json: schema: @@ -299,9 +403,10 @@ paths: parameters: - in: path name: session_id - description: "" + description: '' schema: type: string + format: uuid required: true /sessions/{session_id}/history: get: @@ -312,24 +417,21 @@ paths: parameters: - in: query name: limit - description: "" + description: '' schema: type: integer - default: 10 - exclusiveMinimum: true - exclusiveMaximum: true + default: 100 minimum: 1 - maximum: 100 + maximum: 1000 - in: query name: offset - description: "" + description: '' schema: type: integer default: 0 - exclusiveMinimum: true minimum: 0 responses: - "200": + '200': content: application/json: schema: @@ -345,27 +447,43 @@ paths: parameters: - in: path name: session_id - description: "" + description: '' schema: type: string + format: uuid required: true + delete: + summary: Delete session history (does NOT delete related memories) + description: '' + operationId: DeleteSessionHistory + tags: [] + parameters: [] + responses: + '202': + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceDeletedResponse' + security: + - api-key: [] /sessions/{session_id}/chat: parameters: - in: path name: session_id - description: "" + description: '' schema: type: string + format: uuid required: true post: summary: Interact with the session - description: "" + description: '' operationId: Chat tags: [] parameters: - in: header name: Accept - description: "" + description: '' schema: type: string default: application/json @@ -378,7 +496,7 @@ paths: schema: $ref: '#/components/schemas/ChatInput' responses: - "200": + '200': content: application/json: schema: @@ -394,36 +512,28 @@ paths: parameters: - in: query name: query - description: "" + description: '' schema: type: string required: true - - in: query - name: types - description: episode, belief, entity - schema: - type: array - items: - type: string - uniqueItems: true - in: query name: user_id - description: "" + description: '' schema: type: string format: uuid - in: query name: limit - description: "" + description: '' schema: type: integer - in: query name: offset - description: "" + description: '' schema: type: integer responses: - "200": + '200': content: application/json: schema: @@ -439,19 +549,20 @@ paths: parameters: - in: path name: agent_id - description: "" + description: '' schema: type: string + format: uuid required: true /users/{user_id}: get: summary: Get details of the user - description: "" + description: '' operationId: GetUser tags: [] parameters: [] responses: - "200": + '200': content: application/json: schema: @@ -460,17 +571,21 @@ paths: - api-key: [] delete: summary: Delete user - description: "" + description: '' operationId: DeleteUser tags: [] parameters: [] responses: - "202": {} + '202': + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceDeletedResponse' security: - api-key: [] put: summary: Update user parameters - description: "" + description: '' operationId: UpdateUser tags: [] parameters: [] @@ -480,7 +595,7 @@ paths: schema: $ref: '#/components/schemas/UpdateUserRequest' responses: - "200": + '200': content: application/json: schema: @@ -490,19 +605,41 @@ paths: parameters: - in: path name: user_id - description: "" + description: '' schema: type: string + format: uuid required: true + patch: + summary: Patch User parameters (merge instead of replace) + description: '' + operationId: PatchUser + tags: [] + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchUserRequest' + responses: + '200': + description: '' + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceUpdatedResponse' + security: + - api-key: [] /agents/{agent_id}: get: summary: Get details of the agent - description: "" + description: '' operationId: GetAgent tags: [] parameters: [] responses: - "200": + '200': content: application/json: schema: @@ -511,17 +648,21 @@ paths: - api-key: [] delete: summary: Delete agent - description: "" + description: '' operationId: DeleteAgent tags: [] parameters: [] responses: - "202": {} + '202': + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceDeletedResponse' security: - api-key: [] put: summary: Update agent parameters - description: "" + description: '' operationId: UpdateAgent tags: [] parameters: [] @@ -531,7 +672,7 @@ paths: schema: $ref: '#/components/schemas/UpdateAgentRequest' responses: - "200": + '200': content: application/json: schema: @@ -541,29 +682,79 @@ paths: parameters: - in: path name: agent_id - description: "" + description: '' schema: type: string + format: uuid required: true - /agents/{agent_id}/additional_info: + patch: + summary: Patch Agent parameters (merge instead of replace) + description: '' + operationId: PatchAgent + tags: [] + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchAgentRequest' + responses: + '200': + description: '' + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceUpdatedResponse' + security: + - api-key: [] + /agents/{agent_id}/docs: get: - summary: Get additional info of the agent + summary: Get docs of the agent description: Sorted (created_at descending) - operationId: GetAgentAdditionalInfo + operationId: GetAgentDocs tags: [] parameters: - in: query name: limit - description: "" + description: '' schema: type: integer - in: query name: offset - description: "" + description: '' schema: type: integer + - in: query + name: metadata_filter + description: JSON object that should be used to filter objects by metadata + required: false + schema: + type: string + default: '{}' + - in: query + name: sort_by + description: 'Which field to sort by: `created_at` or `updated_at`' + schema: + type: string + enum: + - created_at + - updated_at + default: created_at + - in: query + name: order + description: >- + Which order should the sort be: `asc` (ascending) or `desc` (descending) + schema: + type: string + enum: + - asc + - desc + default: desc + requestBody: + content: {} responses: - "200": + '200': content: application/json: schema: @@ -573,54 +764,83 @@ paths: items: type: array items: - $ref: '#/components/schemas/AdditionalInfo' + $ref: '#/components/schemas/Doc' security: - api-key: [] parameters: - in: path name: agent_id - description: "" + description: '' schema: type: string + format: uuid required: true post: - summary: Create additional info of the agent - description: "" - operationId: CreateAgentAdditionalInfo + summary: Create doc of the agent + description: '' + operationId: CreateAgentDoc tags: [] parameters: [] requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreateAdditionalInfoRequest' + $ref: '#/components/schemas/CreateDoc' responses: - "201": + '201': content: application/json: schema: $ref: '#/components/schemas/ResourceCreatedResponse' security: - api-key: [] - /users/{user_id}/additional_info: + /users/{user_id}/docs: get: - summary: Get additional info of the user + summary: Get docs of the user description: Sorted (created_at descending) - operationId: GetUserAdditionalInfo + operationId: GetUserDocs tags: [] parameters: - in: query name: limit - description: "" + description: '' schema: type: integer - in: query name: offset - description: "" + description: '' schema: type: integer + - in: query + name: metadata_filter + description: JSON object that should be used to filter objects by metadata + required: false + schema: + type: string + default: '{}' + - in: query + name: sort_by + description: 'Which field to sort by: `created_at` or `updated_at`' + schema: + type: string + enum: + - created_at + - updated_at + default: created_at + - in: query + name: order + description: >- + Which order should the sort be: `asc` (ascending) or `desc` (descending) + schema: + type: string + enum: + - asc + - desc + default: desc + requestBody: + content: {} responses: - "200": + '200': content: application/json: schema: @@ -630,107 +850,125 @@ paths: items: type: array items: - $ref: '#/components/schemas/AdditionalInfo' + $ref: '#/components/schemas/Doc' security: - api-key: [] parameters: - in: path name: user_id - description: "" + description: '' schema: type: string + format: uuid required: true post: - summary: Create additional info of the user - description: "" - operationId: CreateUserAdditionalInfo + summary: Create doc of the user + description: '' + operationId: CreateUserDoc tags: [] parameters: [] requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreateAdditionalInfoRequest' + $ref: '#/components/schemas/CreateDoc' responses: - "201": + '201': content: application/json: schema: $ref: '#/components/schemas/ResourceCreatedResponse' security: - api-key: [] - /users/{user_id}/additional_info/{additional_info_id}: + /users/{user_id}/docs/{doc_id}: parameters: - in: path name: user_id - description: "" + description: '' schema: type: string + format: uuid required: true - in: path - name: additional_info_id - description: "" + name: doc_id + description: '' schema: type: string + format: uuid required: true delete: - summary: Delete additional info doc by id - description: "" - operationId: DeleteUserAdditionalInfo + summary: Delete doc by id + description: '' + operationId: DeleteUserDoc tags: [] parameters: [] responses: - "202": {} + '202': + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceDeletedResponse' security: - api-key: [] - /agents/{agent_id}/additional_info/{additional_info_id}: + /agents/{agent_id}/docs/{doc_id}: parameters: - in: path name: agent_id - description: "" + description: '' schema: type: string + format: uuid required: true - in: path - name: additional_info_id - description: "" + name: doc_id + description: '' schema: type: string + format: uuid required: true delete: - summary: Delete additional info doc by id - description: "" - operationId: DeleteAgentAdditionalInfo + summary: Delete doc by id + description: '' + operationId: DeleteAgentDoc tags: [] parameters: [] responses: - "202": {} + '202': + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceDeletedResponse' security: - api-key: [] /agents/{agent_id}/memories/{memory_id}: delete: summary: Delete memory of the agent by id - description: "" + description: '' operationId: DeleteAgentMemory tags: [] parameters: [] responses: - "202": - content: {} + '202': + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceDeletedResponse' security: - api-key: [] parameters: - in: path name: agent_id - description: "" + description: '' schema: type: string + format: uuid required: true - in: path name: memory_id - description: "" + description: '' schema: type: string + format: uuid required: true /agents/{agent_id}/tools: get: @@ -741,16 +979,18 @@ paths: parameters: - in: query name: limit - description: "" + description: '' schema: type: integer - in: query name: offset - description: "" + description: '' schema: type: integer + requestBody: + content: {} responses: - "200": + '200': content: application/json: schema: @@ -766,13 +1006,14 @@ paths: parameters: - in: path name: agent_id - description: "" + description: '' schema: type: string + format: uuid required: true post: summary: Create tool for the agent - description: "" + description: '' operationId: CreateAgentTool tags: [] parameters: [] @@ -782,7 +1023,7 @@ paths: schema: $ref: '#/components/schemas/CreateToolRequest' responses: - "201": + '201': content: application/json: schema: @@ -793,29 +1034,35 @@ paths: parameters: - in: path name: agent_id - description: "" + description: '' schema: type: string + format: uuid required: true - in: path name: tool_id - description: "" + description: '' schema: type: string + format: uuid required: true delete: summary: Delete tool by id - description: "" + description: '' operationId: DeleteAgentTool tags: [] parameters: [] responses: - "202": {} + '202': + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceDeletedResponse' security: - api-key: [] put: summary: Update agent tool definition - description: "" + description: '' operationId: UpdateAgentTool tags: [] parameters: [] @@ -825,13 +1072,57 @@ paths: schema: $ref: '#/components/schemas/UpdateToolRequest' responses: - "200": + '200': content: application/json: schema: $ref: '#/components/schemas/ResourceUpdatedResponse' security: - api-key: [] + patch: + summary: Patch Agent tool parameters (merge instead of replace) + description: '' + operationId: PatchAgentTool + tags: [] + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchToolRequest' + responses: + '200': + description: '' + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceUpdatedResponse' + security: + - api-key: [] + /jobs/{job_id}: + get: + summary: Get status of the job + description: '' + operationId: GetJobStatus + tags: [] + parameters: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/JobStatus' + security: + - api-key: [] + parameters: + - in: path + name: job_id + description: '' + schema: + type: string + format: uuid + required: true components: schemas: User: @@ -857,6 +1148,10 @@ components: type: string description: User id (UUID) format: uuid + metadata: + type: object + properties: {} + description: (Optional) metadata required: - id Agent: @@ -869,10 +1164,11 @@ components: about: type: string description: About the agent + default: '' instructions: type: array items: - $ref: '#/components/schemas/Instruction' + type: string description: Instruction for the agent description: List of instructions for the agent created_at: @@ -894,9 +1190,12 @@ components: type: string description: The model to use with this agent default: julep-ai/samantha-1-turbo + metadata: + type: object + properties: {} + description: Optional metadata required: - name - - about - id - model FunctionParameters: @@ -909,10 +1208,12 @@ components: properties: description: type: string - description: A description of what the function does, used by the model to choose when and how to call the function. + description: >- + A description of what the function does, used by the model to choose when and how to call the function. name: type: string - description: The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. + description: >- + The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. parameters: $ref: '#/components/schemas/FunctionParameters' description: Parameters accepeted by this function @@ -927,8 +1228,9 @@ components: enum: - function - webhook - description: Whether this tool is a `function` or a `webhook` (Only `function` tool supported right now) - definition: + description: >- + Whether this tool is a `function` or a `webhook` (Only `function` tool supported right now) + function: oneOf: - $ref: '#/components/schemas/FunctionDef' description: Function definition and parameters @@ -938,7 +1240,7 @@ components: format: uuid required: - type - - definition + - function - id Session: $schema: http://json-schema.org/draft-04/schema# @@ -961,7 +1263,8 @@ components: description: A specific situation that sets the background for this session summary: type: string - description: (null at the beginning) - generated automatically after every interaction + description: >- + (null at the beginning) - generated automatically after every interaction created_at: type: string format: date-time @@ -970,6 +1273,14 @@ components: type: string format: date-time description: Session updated at (RFC-3339 format) + metadata: + type: object + properties: {} + description: Optional metadata + render_templates: + type: boolean + description: Render system and assistant message content as jinja templates + default: false required: - id - user_id @@ -985,12 +1296,16 @@ components: about: type: string description: About the user - additional_information: + docs: type: array items: - $ref: '#/components/schemas/CreateAdditionalInfoRequest' + $ref: '#/components/schemas/CreateDoc' description: Snippet that has information about the user - description: List of additional info about user + description: List of docs about user + metadata: + type: object + properties: {} + description: (Optional) metadata description: A valid request payload for creating a user CreateSessionRequest: $schema: http://json-schema.org/draft-04/schema# @@ -998,7 +1313,7 @@ components: properties: user_id: type: string - description: User ID of user to associate with this session + description: (Optional) User ID of user to associate with this session format: uuid agent_id: type: string @@ -1007,9 +1322,16 @@ components: situation: type: string description: A specific situation that sets the background for this session + metadata: + type: object + properties: {} + description: Optional metadata + render_templates: + type: boolean + description: Render system and assistant message content as jinja templates + default: false required: - agent_id - - user_id description: A valid request payload for creating a session CreateAgentRequest: $schema: http://json-schema.org/draft-04/schema# @@ -1021,17 +1343,19 @@ components: about: type: string description: About the agent + default: '' instructions: type: array items: - $ref: '#/components/schemas/Instruction' + type: string description: Instruction description: List of instructions for the agent tools: type: array items: $ref: '#/components/schemas/CreateToolRequest' - description: A list of tools the model may call. Currently, only `function`s are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. + description: >- + A list of tools the model may call. Currently, only `function`s are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. default_settings: $ref: '#/components/schemas/AgentDefaultSettings' description: Default model settings to start every session with @@ -1039,16 +1363,18 @@ components: type: string description: Name of the model that the agent is supposed to use default: julep-ai/samantha-1-turbo - additional_info: + docs: type: array items: - $ref: '#/components/schemas/CreateAdditionalInfoRequest' + $ref: '#/components/schemas/CreateDoc' description: Snippet that has information about the agent - description: List of additional info about agent + description: List of docs about agent + metadata: + type: object + properties: {} + description: (Optional) metadata required: - name - - about - - model description: A valid request payload for creating an agent UpdateSessionRequest: $schema: http://json-schema.org/draft-04/schema# @@ -1057,9 +1383,13 @@ components: situation: type: string description: Updated situation for this session + metadata: + type: object + properties: {} + description: Optional metadata + description: A valid request payload for updating a session required: - situation - description: A valid request payload for updating a session UpdateAgentRequest: $schema: http://json-schema.org/draft-04/schema# type: object @@ -1070,7 +1400,7 @@ components: instructions: type: array items: - $ref: '#/components/schemas/Instruction' + type: string description: Instruction description: List of instructions for the agent name: @@ -1082,7 +1412,14 @@ components: default_settings: $ref: '#/components/schemas/AgentDefaultSettings' description: Default model settings to start every session with + metadata: + type: object + properties: {} + description: Optional metadata description: A valid request payload for updating an agent + required: + - about + - name UpdateUserRequest: $schema: http://json-schema.org/draft-04/schema# type: object @@ -1093,7 +1430,14 @@ components: name: type: string description: Name of the user + metadata: + type: object + properties: {} + description: Optional metadata description: A valid request payload for updating a user + required: + - about + - name Suggestion: $schema: http://json-schema.org/draft-04/schema# type: object @@ -1135,6 +1479,7 @@ components: - assistant - system - function_call + - function description: ChatML role (system|assistant|user|function_call) content: type: string @@ -1166,11 +1511,12 @@ components: - assistant - system - function_call + - auto description: ChatML role (system|assistant|user|function_call) content: type: string description: ChatML content - default: "" + default: '' name: type: string description: ChatML name @@ -1179,8 +1525,8 @@ components: default: false description: Whether to continue this message or return a new one required: - - role - content + - role ChatInputData: type: object properties: @@ -1192,17 +1538,24 @@ components: $ref: '#/components/schemas/InputChatMLMessage' tools: type: array - description: (Advanced) List of tools that are provided in addition to agent's default set of tools. Functions of same name in agent set are overriden + nullable: true + description: >- + (Advanced) List of tools that are provided in addition to agent's default set of tools. Functions of same name in agent set are overriden items: $ref: '#/components/schemas/Tool' tool_choice: - $ref: '#/components/schemas/ToolChoiceOption' - description: Can be one of existing tools given to the agent earlier or the ones included in the request + nullable: true + oneOf: + - $ref: '#/components/schemas/ToolChoiceOption' + - $ref: '#/components/schemas/NamedToolChoice' + description: >- + Can be one of existing tools given to the agent earlier or the ones included in the request required: - messages NamedToolChoice: type: object - description: Specifies a tool the model should use. Use to force the model to call a specific function. + description: >- + Specifies a tool the model should use. Use to force the model to call a specific function. properties: type: type: string @@ -1221,17 +1574,23 @@ components: - type - function ToolChoiceOption: - description: | + description: > Controls which (if any) function is called by the model. + `none` means the model will not call a function and instead generates a message. + `auto` means the model can pick between generating a message or calling a function. + Specifying a particular function via `{"type: "function", "function": {"name": "my_function"}}` forces the model to call that function. + `none` is the default when no functions are present. `auto` is the default if functions are present. + oneOf: - type: string - description: | + description: > `none` means the model will not call a function and instead generates a message. `auto` means the model can pick between generating a message or calling a function. + enum: - none - auto @@ -1239,8 +1598,9 @@ components: type: string FunctionCallOption: type: object - description: | + description: > Specifying a particular function via `{"name": "my_function"}` forces the model to call that function. + properties: name: type: string @@ -1266,7 +1626,8 @@ components: - total_tokens ChatResponse: type: object - description: Represents a chat completion response returned by model, based on the provided input. + description: >- + Represents a chat completion response returned by model, based on the provided input. properties: id: type: string @@ -1274,7 +1635,8 @@ components: format: uuid finish_reason: type: string - description: The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, `content_filter` if content was omitted due to a flag from our content filters, `tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function. + description: >- + The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, `content_filter` if content was omitted due to a flag from our content filters, `tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function. enum: - stop - length @@ -1293,132 +1655,69 @@ components: $ref: '#/components/schemas/ChatMLMessage' usage: $ref: '#/components/schemas/CompletionUsage' + jobs: + type: array + items: + type: string + format: uuid + uniqueItems: true + description: IDs (if any) of jobs created as part of this request required: - usage - response - finish_reason - id - Belief: + Memory: $schema: http://json-schema.org/draft-04/schema# type: object properties: - type: - type: string - default: belief - enum: - - belief - description: Type of memory (`belief`) - subject: - type: string - format: uuid - description: (Optional) ID of the subject user - content: - type: string - description: Content of the memory - rationale: - type: string - description: 'Rationale: Why did the model decide to form this memory' - weight: - type: number - default: 1 - exclusiveMinimum: true - exclusiveMaximum: true - minimum: 0 - maximum: 100 - description: Weight (importance) of the memory on a scale of 0-100 - sentiment: - type: number - default: 0 - exclusiveMinimum: true - minimum: -1 - exclusiveMaximum: true - maximum: 1 - description: Sentiment (valence) of the memory on a scale of -1 to 1 - created_at: - type: string - format: date-time - description: Belief created at (RFC-3339 format) - id: + agent_id: type: string - description: Belief id (UUID) format: uuid - required: - - type - - content - - created_at - - weight - - sentiment - - id - Episode: - $schema: http://json-schema.org/draft-04/schema# - type: object - properties: - type: - type: string - default: episode - enum: - - episode - description: Type of memory (`episode`) - subject: + description: ID of the agent + user_id: type: string format: uuid - description: (Optional) ID of the subject user + description: ID of the user content: type: string description: Content of the memory - weight: - type: number - default: 1 - exclusiveMinimum: true - exclusiveMaximum: true - minimum: 0 - maximum: 100 - description: Weight (importance) of the memory on a scale of 0-100 created_at: type: string format: date-time - description: Episode created at (RFC-3339 format) + description: Memory created at (RFC-3339 format) last_accessed_at: type: string format: date-time - description: Episode last accessed at (RFC-3339 format) - happened_at: + description: Memory last accessed at (RFC-3339 format) + timestamp: type: string - description: Episode happened at (RFC-3339 format) + description: Memory happened at (RFC-3339 format) format: date-time - duration: + sentiment: type: number - description: Duration of the episode (in seconds) - exclusiveMinimum: true - minimum: 0 default: 0 + minimum: -1 + maximum: 1 + description: Sentiment (valence) of the memory on a scale of -1 to 1 id: type: string - description: Episode id (UUID) + description: Memory id (UUID) format: uuid + entities: + type: array + items: + type: object + properties: {} + description: List of entities mentioned in the memory required: - type - content - created_at - - happened_at - - weight - - last_accessed_at - - id - Memory: - oneOf: - - $ref: '#/components/schemas/Belief' - - $ref: '#/components/schemas/Episode' - - $ref: '#/components/schemas/Entity' - Entity: - type: object - properties: - id: - type: string - description: Entity id (UUID) - format: uuid - description: TBD - required: - id + - agent_id + - user_id + - entities ChatSettings: type: object properties: @@ -1428,72 +1727,97 @@ components: minimum: -1 maximum: 1 nullable: true - description: (OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. + description: >- + (OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. length_penalty: type: number default: 1 minimum: 0 maximum: 2 nullable: true - description: '(Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize number of tokens generated. ' + description: "(Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize number of tokens generated. " logit_bias: type: object default: null nullable: true additionalProperties: type: integer - description: | + description: > Modify the likelihood of specified tokens appearing in the completion. + Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token. + properties: {} max_tokens: - description: | + description: > The maximum number of tokens to generate in the chat completion. + The total length of input tokens and generated tokens is limited by the model's context length. + type: integer nullable: true + default: 200 + minimum: 1 + maximum: 16384 presence_penalty: type: number default: 0 minimum: -1 maximum: 1 nullable: true - description: (OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. + description: >- + (OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. repetition_penalty: type: number default: 1 minimum: 0 maximum: 2 nullable: true - description: (Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. + description: >- + (Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. response_format: type: object - description: | + description: > An object specifying the format that the model must output. + Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is valid JSON. + **Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if `finish_reason="length"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length. + properties: type: type: string enum: - text - json_object + - regex example: json_object default: text - description: Must be one of `text` or `json_object`. + description: Must be one of `"text"`, `"regex"` or `"json_object"`. + pattern: + type: string + description: Regular expression pattern to use if `type` is `"regex"` + schema: + type: object + properties: {} + default: {} + description: JSON Schema to use if `type` is `"json_object"` seed: type: integer - minimum: -9223372036854776000 - maximum: 9223372036854776000 + minimum: -1 + maximum: 9999 nullable: true - description: | + description: > This feature is in Beta. + If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result. + Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend. + stop: description: | Up to 4 sequences where the API will stop generating further tokens. @@ -1507,8 +1831,9 @@ components: items: type: string stream: - description: | + description: > If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions). + type: boolean nullable: true default: false @@ -1516,10 +1841,11 @@ components: type: number minimum: 0 maximum: 2 - default: 1 - example: 1 + default: 0.75 + example: 0.75 nullable: true - description: What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. + description: >- + What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. top_p: type: number minimum: 0 @@ -1527,9 +1853,32 @@ components: default: 1 example: 1 nullable: true - description: Defaults to 1 An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both. - required: - - stream + description: >- + Defaults to 1 An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both. + exclusiveMinimum: true + min_p: + type: number + description: Minimum probability compared to leading token to be considered + exclusiveMaximum: true + maximum: 1 + exclusiveMinimum: false + minimum: 0 + example: 0.01 + default: 0.01 + preset: + type: string + description: >- + Generation preset name (problem_solving|conversational|fun|prose|creative|business|deterministic|code|multilingual) + enum: + - problem_solving + - conversational + - fun + - prose + - creative + - business + - deterministic + - code + - multilingual AgentDefaultSettings: type: object properties: @@ -1539,38 +1888,40 @@ components: minimum: -2 maximum: 2 nullable: true - description: (OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. - exclusiveMinimum: true - exclusiveMaximum: true + description: >- + (OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. length_penalty: type: number default: 1 minimum: 0 maximum: 2 nullable: true - description: '(Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize number of tokens generated. ' + description: "(Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize number of tokens generated. " presence_penalty: type: number default: 0 minimum: -1 maximum: 1 nullable: true - description: (OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. + description: >- + (OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. repetition_penalty: type: number default: 1 minimum: 0 maximum: 2 nullable: true - description: (Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. + description: >- + (Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. temperature: type: number minimum: 0 - maximum: 2 - default: 1 - example: 1 + maximum: 3 + default: 0.75 + example: 0.75 nullable: true - description: What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. + description: >- + What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. top_p: type: number minimum: 0 @@ -1578,13 +1929,37 @@ components: default: 1 example: 1 nullable: true - description: Defaults to 1 An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both. + description: >- + Defaults to 1 An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both. + min_p: + type: number + description: Minimum probability compared to leading token to be considered + exclusiveMaximum: true + maximum: 1 + exclusiveMinimum: false + minimum: 0 + example: 0.01 + default: 0.01 + preset: + type: string + description: >- + Generation preset name (one of: problem_solving, conversational, fun, prose, creative, business, deterministic, code, multilingual) + enum: + - problem_solving + - conversational + - fun + - prose + - creative + - business + - deterministic + - code + - multilingual ChatInput: allOf: - $ref: '#/components/schemas/ChatInputData' - $ref: '#/components/schemas/ChatSettings' - $ref: '#/components/schemas/MemoryAccessOptions' - AdditionalInfo: + Doc: type: object properties: title: @@ -1595,13 +1970,22 @@ components: description: Information content id: type: string - description: ID of additional info doc + description: ID of doc format: uuid + created_at: + type: string + description: Doc created at + format: date-time + metadata: + type: object + properties: {} + description: optional metadata required: - title - content - id - CreateAdditionalInfoRequest: + - created_at + CreateDoc: type: object properties: title: @@ -1610,6 +1994,10 @@ components: content: type: string description: Information content + metadata: + type: object + properties: {} + description: Optional metadata required: - title - content @@ -1620,22 +2008,14 @@ components: type: boolean description: Whether previous memories should be recalled or not default: true - remember: + record: type: boolean - description: Whether this interaction should be recorded in memory or not + description: Whether this interaction should be recorded in history or not default: true - Instruction: - type: object - properties: - content: - type: string - description: Content of the instruction - important: + remember: type: boolean - description: Whether this instruction should be marked as important (only up to 3 instructions per agent can be marked important) - default: false - required: - - content + description: Whether this interaction should form memories or not + default: true CreateToolRequest: type: object properties: @@ -1644,23 +2024,23 @@ components: enum: - function - webhook - description: Whether this tool is a `function` or a `webhook` (Only `function` tool supported right now) - definition: + description: >- + Whether this tool is a `function` or a `webhook` (Only `function` tool supported right now) + function: oneOf: - $ref: '#/components/schemas/FunctionDef' description: Function definition and parameters required: - type - - definition + - function UpdateToolRequest: type: object properties: - definition: - oneOf: - - $ref: '#/components/schemas/FunctionDef' + function: + $ref: '#/components/schemas/FunctionDef' description: Function definition and parameters required: - - definition + - function ResourceCreatedResponse: type: object properties: @@ -1670,6 +2050,13 @@ components: created_at: type: string format: date-time + jobs: + type: array + items: + type: string + format: uuid + uniqueItems: true + description: IDs (if any) of jobs created as part of this request required: - id - created_at @@ -1682,9 +2069,160 @@ components: updated_at: type: string format: date-time + jobs: + type: array + items: + type: string + format: uuid + description: IDs (if any) of jobs created as part of this request + uniqueItems: true required: - id - updated_at + ResourceDeletedResponse: + type: object + properties: + id: + type: string + format: uuid + deleted_at: + type: string + format: date-time + jobs: + type: array + items: + type: string + format: uuid + description: IDs (if any) of jobs created as part of this request + uniqueItems: true + required: + - id + - deleted_at + JobStatus: + $schema: http://json-schema.org/draft-04/schema# + type: object + properties: + name: + type: string + description: Name of the job + reason: + type: string + description: Reason for current state + created_at: + type: string + format: date-time + description: Job created at (RFC-3339 format) + updated_at: + type: string + format: date-time + description: Job updated at (RFC-3339 format) + id: + type: string + description: Job id (UUID) + format: uuid + has_progress: + type: boolean + default: false + description: Whether this Job supports progress updates + progress: + type: number + description: Progress percentage + default: 0 + minimum: 0 + maximum: 100 + state: + type: string + description: >- + Current state (one of: pending, in_progress, retrying, succeeded, aborted, failed) + enum: + - pending + - in_progress + - retrying + - succeeded + - aborted + - failed + - unknown + required: + - id + - name + - created_at + - state + PatchUserRequest: + $schema: http://json-schema.org/draft-04/schema# + type: object + properties: + about: + type: string + description: About the user + name: + type: string + description: Name of the user + metadata: + type: object + properties: {} + description: Optional metadata + description: A request for patching a user + PatchAgentRequest: + $schema: http://json-schema.org/draft-04/schema# + type: object + properties: + about: + type: string + description: About the agent + instructions: + type: array + items: + type: string + description: Instruction + description: List of instructions for the agent + name: + type: string + description: Name of the agent + model: + type: string + description: Name of the model that the agent is supposed to use + default_settings: + $ref: '#/components/schemas/AgentDefaultSettings' + description: Default model settings to start every session with + metadata: + type: object + properties: {} + description: Optional metadata + description: A request for patching an agent + PatchSessionRequest: + $schema: http://json-schema.org/draft-04/schema# + type: object + properties: + situation: + type: string + description: Updated situation for this session + metadata: + type: object + properties: {} + description: Optional metadata + description: A request for patching a session + PatchToolRequest: + type: object + properties: + function: + $ref: '#/components/schemas/PartialFunctionDef' + description: Function definition and parameters + required: + - function + PartialFunctionDef: + type: object + properties: + description: + type: string + description: >- + A description of what the function does, used by the model to choose when and how to call the function. + name: + type: string + description: >- + The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. + parameters: + $ref: '#/components/schemas/FunctionParameters' + description: Parameters accepeted by this function securitySchemes: api-key: type: apiKey @@ -1696,44 +2234,59 @@ components: session_id: in: path required: false - description: "" + description: '' schema: type: string + format: uuid user_id: in: path required: false - description: "" + description: '' schema: type: string + format: uuid agent_id: in: path required: false - description: "" + description: '' schema: type: string + format: uuid message_id: in: path required: false - description: "" + description: '' schema: type: string - additional_info_id: + format: uuid + doc_id: in: path required: false - description: "" + description: '' schema: type: string + format: uuid memory_id: in: path required: false - description: "" + description: '' schema: type: string + format: uuid tool_id: in: path required: false - description: "" + description: '' + schema: + type: string + format: uuid + job_id: + in: path + required: false + description: '' schema: type: string + format: uuid + requestBodies: {} security: - api-key: [] diff --git a/mock_openapi.yaml b/mock_openapi.yaml index 7666bc8f1..5c7b52d25 100644 --- a/mock_openapi.yaml +++ b/mock_openapi.yaml @@ -2,7 +2,7 @@ openapi: 3.0.3 info: title: Julep Agents API description: Julep AI agents API allows creating agents with long-term memory easily. - termsOfService: "" + termsOfService: '' contact: email: developers@julep.ai name: Julep Developers @@ -16,11 +16,11 @@ externalDocs: url: https://docs.julep.ai servers: - url: https://api-alpha.julep.ai/api - description: "" + description: '' variables: {} tags: - name: Default - description: "" + description: '' externalDocs: url: https://docs.julep.ai description: https://docs.julep.ai @@ -40,7 +40,7 @@ paths: description: Session options description: Session initialization options responses: - "201": + '201': content: application/json: schema: @@ -50,7 +50,8 @@ paths: - api-key: [] get: summary: List sessions - description: List sessions created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at` by default) + description: >- + List sessions created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at` by default) operationId: ListSessions tags: [] parameters: @@ -87,7 +88,8 @@ paths: default: created_at - in: query name: order - description: 'Which order should the sort be: `asc` (ascending) or `desc` (descending)' + description: >- + Which order should the sort be: `asc` (ascending) or `desc` (descending) schema: type: string enum: @@ -95,7 +97,7 @@ paths: - desc default: desc responses: - "200": + '200': content: application/json: schema: @@ -108,7 +110,8 @@ paths: $ref: '#/components/schemas/Session' required: - items - description: List of sessions (sorted created_at descending order) with limit+offset pagination + description: >- + List of sessions (sorted created_at descending order) with limit+offset pagination security: - api-key: [] /api/users: @@ -125,7 +128,7 @@ paths: $ref: '#/components/schemas/CreateUserRequest' description: User create options responses: - "201": + '201': content: application/json: schema: @@ -135,7 +138,8 @@ paths: - api-key: [] get: summary: List users - description: List users created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at` by default) + description: >- + List users created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at` by default) operationId: ListUsers tags: [] parameters: @@ -170,7 +174,8 @@ paths: default: created_at - in: query name: order - description: 'Which order should the sort be: `asc` (ascending) or `desc` (descending)' + description: >- + Which order should the sort be: `asc` (ascending) or `desc` (descending) schema: type: string enum: @@ -178,7 +183,7 @@ paths: - desc default: desc responses: - "200": + '200': content: application/json: schema: @@ -191,7 +196,8 @@ paths: $ref: '#/components/schemas/User' required: - items - description: List of users (sorted created_at descending order) with limit+offset pagination + description: >- + List of users (sorted created_at descending order) with limit+offset pagination security: - api-key: [] /api/agents: @@ -208,7 +214,7 @@ paths: $ref: '#/components/schemas/CreateAgentRequest' description: Agent create options responses: - "201": + '201': content: application/json: schema: @@ -218,7 +224,8 @@ paths: - api-key: [] get: summary: List agents - description: List agents created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at` by default) + description: >- + List agents created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at` by default) operationId: ListAgents tags: [] parameters: @@ -255,7 +262,8 @@ paths: default: created_at - in: query name: order - description: 'Which order should the sort be: `asc` (ascending) or `desc` (descending)' + description: >- + Which order should the sort be: `asc` (ascending) or `desc` (descending) schema: type: string enum: @@ -263,8 +271,9 @@ paths: - desc default: desc responses: - "200": - description: List of agents (sorted created_at descending order) with limit+offset pagination + '200': + description: >- + List of agents (sorted created_at descending order) with limit+offset pagination content: application/json: schema: @@ -281,12 +290,12 @@ paths: /api/sessions/{session_id}: get: summary: Get details of the session - description: "" + description: '' operationId: GetSession tags: [] parameters: [] responses: - "200": + '200': content: application/json: schema: @@ -295,12 +304,12 @@ paths: - api-key: [] delete: summary: Delete session - description: "" + description: '' operationId: DeleteSession tags: [] parameters: [] responses: - "202": + '202': content: application/json: schema: @@ -309,7 +318,7 @@ paths: - api-key: [] put: summary: Update session parameters - description: "" + description: '' operationId: UpdateSession tags: [] parameters: [] @@ -319,7 +328,7 @@ paths: schema: $ref: '#/components/schemas/UpdateSessionRequest' responses: - "200": + '200': content: application/json: schema: @@ -329,14 +338,14 @@ paths: parameters: - in: path name: session_id - description: "" + description: '' schema: type: string format: uuid required: true patch: summary: Patch Session parameters (merge instead of replace) - description: "" + description: '' operationId: PatchSession tags: [] parameters: [] @@ -346,8 +355,8 @@ paths: schema: $ref: '#/components/schemas/PatchSessionRequest' responses: - "200": - description: "" + '200': + description: '' headers: {} content: application/json: @@ -364,7 +373,7 @@ paths: parameters: - in: query name: limit - description: "" + description: '' schema: type: integer default: 100 @@ -372,13 +381,13 @@ paths: maximum: 1000 - in: query name: offset - description: "" + description: '' schema: type: integer default: 0 minimum: 0 responses: - "200": + '200': content: application/json: schema: @@ -394,7 +403,7 @@ paths: parameters: - in: path name: session_id - description: "" + description: '' schema: type: string format: uuid @@ -408,7 +417,7 @@ paths: parameters: - in: query name: limit - description: "" + description: '' schema: type: integer default: 100 @@ -416,13 +425,13 @@ paths: maximum: 1000 - in: query name: offset - description: "" + description: '' schema: type: integer default: 0 minimum: 0 responses: - "200": + '200': content: application/json: schema: @@ -438,19 +447,19 @@ paths: parameters: - in: path name: session_id - description: "" + description: '' schema: type: string format: uuid required: true delete: summary: Delete session history (does NOT delete related memories) - description: "" + description: '' operationId: DeleteSessionHistory tags: [] parameters: [] responses: - "202": + '202': content: application/json: schema: @@ -461,20 +470,20 @@ paths: parameters: - in: path name: session_id - description: "" + description: '' schema: type: string format: uuid required: true post: summary: Interact with the session - description: "" + description: '' operationId: Chat tags: [] parameters: - in: header name: Accept - description: "" + description: '' schema: type: string default: application/json @@ -487,7 +496,7 @@ paths: schema: $ref: '#/components/schemas/ChatInput' responses: - "200": + '200': content: application/json: schema: @@ -503,28 +512,28 @@ paths: parameters: - in: query name: query - description: "" + description: '' schema: type: string required: true - in: query name: user_id - description: "" + description: '' schema: type: string format: uuid - in: query name: limit - description: "" + description: '' schema: type: integer - in: query name: offset - description: "" + description: '' schema: type: integer responses: - "200": + '200': content: application/json: schema: @@ -540,7 +549,7 @@ paths: parameters: - in: path name: agent_id - description: "" + description: '' schema: type: string format: uuid @@ -548,12 +557,12 @@ paths: /api/users/{user_id}: get: summary: Get details of the user - description: "" + description: '' operationId: GetUser tags: [] parameters: [] responses: - "200": + '200': content: application/json: schema: @@ -562,12 +571,12 @@ paths: - api-key: [] delete: summary: Delete user - description: "" + description: '' operationId: DeleteUser tags: [] parameters: [] responses: - "202": + '202': content: application/json: schema: @@ -576,7 +585,7 @@ paths: - api-key: [] put: summary: Update user parameters - description: "" + description: '' operationId: UpdateUser tags: [] parameters: [] @@ -586,7 +595,7 @@ paths: schema: $ref: '#/components/schemas/UpdateUserRequest' responses: - "200": + '200': content: application/json: schema: @@ -596,14 +605,14 @@ paths: parameters: - in: path name: user_id - description: "" + description: '' schema: type: string format: uuid required: true patch: summary: Patch User parameters (merge instead of replace) - description: "" + description: '' operationId: PatchUser tags: [] parameters: [] @@ -613,8 +622,8 @@ paths: schema: $ref: '#/components/schemas/PatchUserRequest' responses: - "200": - description: "" + '200': + description: '' headers: {} content: application/json: @@ -625,12 +634,12 @@ paths: /api/agents/{agent_id}: get: summary: Get details of the agent - description: "" + description: '' operationId: GetAgent tags: [] parameters: [] responses: - "200": + '200': content: application/json: schema: @@ -639,12 +648,12 @@ paths: - api-key: [] delete: summary: Delete agent - description: "" + description: '' operationId: DeleteAgent tags: [] parameters: [] responses: - "202": + '202': content: application/json: schema: @@ -653,7 +662,7 @@ paths: - api-key: [] put: summary: Update agent parameters - description: "" + description: '' operationId: UpdateAgent tags: [] parameters: [] @@ -663,7 +672,7 @@ paths: schema: $ref: '#/components/schemas/UpdateAgentRequest' responses: - "200": + '200': content: application/json: schema: @@ -673,14 +682,14 @@ paths: parameters: - in: path name: agent_id - description: "" + description: '' schema: type: string format: uuid required: true patch: summary: Patch Agent parameters (merge instead of replace) - description: "" + description: '' operationId: PatchAgent tags: [] parameters: [] @@ -690,8 +699,8 @@ paths: schema: $ref: '#/components/schemas/PatchAgentRequest' responses: - "200": - description: "" + '200': + description: '' headers: {} content: application/json: @@ -708,12 +717,12 @@ paths: parameters: - in: query name: limit - description: "" + description: '' schema: type: integer - in: query name: offset - description: "" + description: '' schema: type: integer - in: query @@ -734,7 +743,8 @@ paths: default: created_at - in: query name: order - description: 'Which order should the sort be: `asc` (ascending) or `desc` (descending)' + description: >- + Which order should the sort be: `asc` (ascending) or `desc` (descending) schema: type: string enum: @@ -744,7 +754,7 @@ paths: requestBody: content: {} responses: - "200": + '200': content: application/json: schema: @@ -760,14 +770,14 @@ paths: parameters: - in: path name: agent_id - description: "" + description: '' schema: type: string format: uuid required: true post: summary: Create doc of the agent - description: "" + description: '' operationId: CreateAgentDoc tags: [] parameters: [] @@ -777,7 +787,7 @@ paths: schema: $ref: '#/components/schemas/CreateDoc' responses: - "201": + '201': content: application/json: schema: @@ -793,12 +803,12 @@ paths: parameters: - in: query name: limit - description: "" + description: '' schema: type: integer - in: query name: offset - description: "" + description: '' schema: type: integer - in: query @@ -819,7 +829,8 @@ paths: default: created_at - in: query name: order - description: 'Which order should the sort be: `asc` (ascending) or `desc` (descending)' + description: >- + Which order should the sort be: `asc` (ascending) or `desc` (descending) schema: type: string enum: @@ -829,7 +840,7 @@ paths: requestBody: content: {} responses: - "200": + '200': content: application/json: schema: @@ -845,14 +856,14 @@ paths: parameters: - in: path name: user_id - description: "" + description: '' schema: type: string format: uuid required: true post: summary: Create doc of the user - description: "" + description: '' operationId: CreateUserDoc tags: [] parameters: [] @@ -862,7 +873,7 @@ paths: schema: $ref: '#/components/schemas/CreateDoc' responses: - "201": + '201': content: application/json: schema: @@ -873,26 +884,26 @@ paths: parameters: - in: path name: user_id - description: "" + description: '' schema: type: string format: uuid required: true - in: path name: doc_id - description: "" + description: '' schema: type: string format: uuid required: true delete: summary: Delete doc by id - description: "" + description: '' operationId: DeleteUserDoc tags: [] parameters: [] responses: - "202": + '202': content: application/json: schema: @@ -903,26 +914,26 @@ paths: parameters: - in: path name: agent_id - description: "" + description: '' schema: type: string format: uuid required: true - in: path name: doc_id - description: "" + description: '' schema: type: string format: uuid required: true delete: summary: Delete doc by id - description: "" + description: '' operationId: DeleteAgentDoc tags: [] parameters: [] responses: - "202": + '202': content: application/json: schema: @@ -932,12 +943,12 @@ paths: /api/agents/{agent_id}/memories/{memory_id}: delete: summary: Delete memory of the agent by id - description: "" + description: '' operationId: DeleteAgentMemory tags: [] parameters: [] responses: - "202": + '202': content: application/json: schema: @@ -947,14 +958,14 @@ paths: parameters: - in: path name: agent_id - description: "" + description: '' schema: type: string format: uuid required: true - in: path name: memory_id - description: "" + description: '' schema: type: string format: uuid @@ -968,18 +979,18 @@ paths: parameters: - in: query name: limit - description: "" + description: '' schema: type: integer - in: query name: offset - description: "" + description: '' schema: type: integer requestBody: content: {} responses: - "200": + '200': content: application/json: schema: @@ -995,14 +1006,14 @@ paths: parameters: - in: path name: agent_id - description: "" + description: '' schema: type: string format: uuid required: true post: summary: Create tool for the agent - description: "" + description: '' operationId: CreateAgentTool tags: [] parameters: [] @@ -1012,7 +1023,7 @@ paths: schema: $ref: '#/components/schemas/CreateToolRequest' responses: - "201": + '201': content: application/json: schema: @@ -1023,26 +1034,26 @@ paths: parameters: - in: path name: agent_id - description: "" + description: '' schema: type: string format: uuid required: true - in: path name: tool_id - description: "" + description: '' schema: type: string format: uuid required: true delete: summary: Delete tool by id - description: "" + description: '' operationId: DeleteAgentTool tags: [] parameters: [] responses: - "202": + '202': content: application/json: schema: @@ -1051,7 +1062,7 @@ paths: - api-key: [] put: summary: Update agent tool definition - description: "" + description: '' operationId: UpdateAgentTool tags: [] parameters: [] @@ -1061,7 +1072,7 @@ paths: schema: $ref: '#/components/schemas/UpdateToolRequest' responses: - "200": + '200': content: application/json: schema: @@ -1070,7 +1081,7 @@ paths: - api-key: [] patch: summary: Patch Agent tool parameters (merge instead of replace) - description: "" + description: '' operationId: PatchAgentTool tags: [] parameters: [] @@ -1080,8 +1091,8 @@ paths: schema: $ref: '#/components/schemas/PatchToolRequest' responses: - "200": - description: "" + '200': + description: '' headers: {} content: application/json: @@ -1092,12 +1103,12 @@ paths: /api/jobs/{job_id}: get: summary: Get status of the job - description: "" + description: '' operationId: GetJobStatus tags: [] parameters: [] responses: - "200": + '200': content: application/json: schema: @@ -1107,7 +1118,7 @@ paths: parameters: - in: path name: job_id - description: "" + description: '' schema: type: string format: uuid @@ -1140,7 +1151,7 @@ components: metadata: type: object properties: {} - description: Optional metadata + description: (Optional) metadata required: - id Agent: @@ -1153,7 +1164,7 @@ components: about: type: string description: About the agent - default: "" + default: '' instructions: type: array items: @@ -1197,10 +1208,12 @@ components: properties: description: type: string - description: A description of what the function does, used by the model to choose when and how to call the function. + description: >- + A description of what the function does, used by the model to choose when and how to call the function. name: type: string - description: The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. + description: >- + The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. parameters: $ref: '#/components/schemas/FunctionParameters' description: Parameters accepeted by this function @@ -1215,7 +1228,8 @@ components: enum: - function - webhook - description: Whether this tool is a `function` or a `webhook` (Only `function` tool supported right now) + description: >- + Whether this tool is a `function` or a `webhook` (Only `function` tool supported right now) function: oneOf: - $ref: '#/components/schemas/FunctionDef' @@ -1249,7 +1263,8 @@ components: description: A specific situation that sets the background for this session summary: type: string - description: (null at the beginning) - generated automatically after every interaction + description: >- + (null at the beginning) - generated automatically after every interaction created_at: type: string format: date-time @@ -1262,6 +1277,10 @@ components: type: object properties: {} description: Optional metadata + render_templates: + type: boolean + description: Render system and assistant message content as jinja templates + default: false required: - id - user_id @@ -1307,6 +1326,10 @@ components: type: object properties: {} description: Optional metadata + render_templates: + type: boolean + description: Render system and assistant message content as jinja templates + default: false required: - agent_id description: A valid request payload for creating a session @@ -1320,7 +1343,7 @@ components: about: type: string description: About the agent - default: "" + default: '' instructions: type: array items: @@ -1331,7 +1354,8 @@ components: type: array items: $ref: '#/components/schemas/CreateToolRequest' - description: A list of tools the model may call. Currently, only `function`s are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. + description: >- + A list of tools the model may call. Currently, only `function`s are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. default_settings: $ref: '#/components/schemas/AgentDefaultSettings' description: Default model settings to start every session with @@ -1455,6 +1479,7 @@ components: - assistant - system - function_call + - function description: ChatML role (system|assistant|user|function_call) content: type: string @@ -1491,7 +1516,7 @@ components: content: type: string description: ChatML content - default: "" + default: '' name: type: string description: ChatML name @@ -1514,7 +1539,8 @@ components: tools: type: array nullable: true - description: (Advanced) List of tools that are provided in addition to agent's default set of tools. Functions of same name in agent set are overriden + description: >- + (Advanced) List of tools that are provided in addition to agent's default set of tools. Functions of same name in agent set are overriden items: $ref: '#/components/schemas/Tool' tool_choice: @@ -1522,12 +1548,14 @@ components: oneOf: - $ref: '#/components/schemas/ToolChoiceOption' - $ref: '#/components/schemas/NamedToolChoice' - description: Can be one of existing tools given to the agent earlier or the ones included in the request + description: >- + Can be one of existing tools given to the agent earlier or the ones included in the request required: - messages NamedToolChoice: type: object - description: Specifies a tool the model should use. Use to force the model to call a specific function. + description: >- + Specifies a tool the model should use. Use to force the model to call a specific function. properties: type: type: string @@ -1546,17 +1574,23 @@ components: - type - function ToolChoiceOption: - description: | + description: > Controls which (if any) function is called by the model. + `none` means the model will not call a function and instead generates a message. + `auto` means the model can pick between generating a message or calling a function. + Specifying a particular function via `{"type: "function", "function": {"name": "my_function"}}` forces the model to call that function. + `none` is the default when no functions are present. `auto` is the default if functions are present. + oneOf: - type: string - description: | + description: > `none` means the model will not call a function and instead generates a message. `auto` means the model can pick between generating a message or calling a function. + enum: - none - auto @@ -1564,8 +1598,9 @@ components: type: string FunctionCallOption: type: object - description: | + description: > Specifying a particular function via `{"name": "my_function"}` forces the model to call that function. + properties: name: type: string @@ -1591,7 +1626,8 @@ components: - total_tokens ChatResponse: type: object - description: Represents a chat completion response returned by model, based on the provided input. + description: >- + Represents a chat completion response returned by model, based on the provided input. properties: id: type: string @@ -1599,7 +1635,8 @@ components: format: uuid finish_reason: type: string - description: The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, `content_filter` if content was omitted due to a flag from our content filters, `tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function. + description: >- + The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, `content_filter` if content was omitted due to a flag from our content filters, `tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function. enum: - stop - length @@ -1690,30 +1727,35 @@ components: minimum: -1 maximum: 1 nullable: true - description: (OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. + description: >- + (OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. length_penalty: type: number default: 1 minimum: 0 maximum: 2 nullable: true - description: '(Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize number of tokens generated. ' + description: "(Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize number of tokens generated. " logit_bias: type: object default: null nullable: true additionalProperties: type: integer - description: | + description: > Modify the likelihood of specified tokens appearing in the completion. + Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token. + properties: {} max_tokens: - description: | + description: > The maximum number of tokens to generate in the chat completion. + The total length of input tokens and generated tokens is limited by the model's context length. + type: integer nullable: true default: 200 @@ -1725,22 +1767,27 @@ components: minimum: -1 maximum: 1 nullable: true - description: (OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. + description: >- + (OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. repetition_penalty: type: number default: 1 minimum: 0 maximum: 2 nullable: true - description: (Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. + description: >- + (Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. response_format: type: object - description: | + description: > An object specifying the format that the model must output. + Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is valid JSON. + **Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if `finish_reason="length"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length. + properties: type: type: string @@ -1764,10 +1811,13 @@ components: minimum: -1 maximum: 9999 nullable: true - description: | + description: > This feature is in Beta. + If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result. + Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend. + stop: description: | Up to 4 sequences where the API will stop generating further tokens. @@ -1781,8 +1831,9 @@ components: items: type: string stream: - description: | + description: > If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions). + type: boolean nullable: true default: false @@ -1793,7 +1844,8 @@ components: default: 0.75 example: 0.75 nullable: true - description: What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. + description: >- + What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. top_p: type: number minimum: 0 @@ -1801,7 +1853,8 @@ components: default: 1 example: 1 nullable: true - description: Defaults to 1 An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both. + description: >- + Defaults to 1 An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both. exclusiveMinimum: true min_p: type: number @@ -1814,7 +1867,8 @@ components: default: 0.01 preset: type: string - description: Generation preset name (problem_solving|conversational|fun|prose|creative|business|deterministic|code|multilingual) + description: >- + Generation preset name (problem_solving|conversational|fun|prose|creative|business|deterministic|code|multilingual) enum: - problem_solving - conversational @@ -1834,28 +1888,31 @@ components: minimum: -2 maximum: 2 nullable: true - description: (OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. + description: >- + (OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. length_penalty: type: number default: 1 minimum: 0 maximum: 2 nullable: true - description: '(Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize number of tokens generated. ' + description: "(Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize number of tokens generated. " presence_penalty: type: number default: 0 minimum: -1 maximum: 1 nullable: true - description: (OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. + description: >- + (OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. repetition_penalty: type: number default: 1 minimum: 0 maximum: 2 nullable: true - description: (Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. + description: >- + (Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. temperature: type: number minimum: 0 @@ -1863,7 +1920,8 @@ components: default: 0.75 example: 0.75 nullable: true - description: What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. + description: >- + What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. top_p: type: number minimum: 0 @@ -1871,7 +1929,8 @@ components: default: 1 example: 1 nullable: true - description: Defaults to 1 An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both. + description: >- + Defaults to 1 An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both. min_p: type: number description: Minimum probability compared to leading token to be considered @@ -1883,7 +1942,8 @@ components: default: 0.01 preset: type: string - description: 'Generation preset name (one of: problem_solving, conversational, fun, prose, creative, business, deterministic, code, multilingual)' + description: >- + Generation preset name (one of: problem_solving, conversational, fun, prose, creative, business, deterministic, code, multilingual) enum: - problem_solving - conversational @@ -1964,7 +2024,8 @@ components: enum: - function - webhook - description: Whether this tool is a `function` or a `webhook` (Only `function` tool supported right now) + description: >- + Whether this tool is a `function` or a `webhook` (Only `function` tool supported right now) function: oneOf: - $ref: '#/components/schemas/FunctionDef' @@ -2071,7 +2132,8 @@ components: maximum: 100 state: type: string - description: 'Current state (one of: pending, in_progress, retrying, succeeded, aborted, failed)' + description: >- + Current state (one of: pending, in_progress, retrying, succeeded, aborted, failed) enum: - pending - in_progress @@ -2152,10 +2214,12 @@ components: properties: description: type: string - description: A description of what the function does, used by the model to choose when and how to call the function. + description: >- + A description of what the function does, used by the model to choose when and how to call the function. name: type: string - description: The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. + description: >- + The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. parameters: $ref: '#/components/schemas/FunctionParameters' description: Parameters accepeted by this function @@ -2170,56 +2234,56 @@ components: session_id: in: path required: false - description: "" + description: '' schema: type: string format: uuid user_id: in: path required: false - description: "" + description: '' schema: type: string format: uuid agent_id: in: path required: false - description: "" + description: '' schema: type: string format: uuid message_id: in: path required: false - description: "" + description: '' schema: type: string format: uuid doc_id: in: path required: false - description: "" + description: '' schema: type: string format: uuid memory_id: in: path required: false - description: "" + description: '' schema: type: string format: uuid tool_id: in: path required: false - description: "" + description: '' schema: type: string format: uuid job_id: in: path required: false - description: "" + description: '' schema: type: string format: uuid diff --git a/openapi.yaml b/openapi.yaml index dfd5ac229..0b446c2f2 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -2,7 +2,7 @@ openapi: 3.0.3 info: title: Julep Agents API description: Julep AI agents API allows creating agents with long-term memory easily. - termsOfService: "" + termsOfService: '' contact: email: developers@julep.ai name: Julep Developers @@ -16,11 +16,11 @@ externalDocs: url: https://docs.julep.ai servers: - url: https://api-alpha.julep.ai/api - description: "" + description: '' variables: {} tags: - name: Default - description: "" + description: '' externalDocs: url: https://docs.julep.ai description: https://docs.julep.ai @@ -40,7 +40,7 @@ paths: description: Session options description: Session initialization options responses: - "201": + '201': content: application/json: schema: @@ -50,7 +50,8 @@ paths: - api-key: [] get: summary: List sessions - description: List sessions created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at` by default) + description: >- + List sessions created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at` by default) operationId: ListSessions tags: [] parameters: @@ -87,7 +88,8 @@ paths: default: created_at - in: query name: order - description: 'Which order should the sort be: `asc` (ascending) or `desc` (descending)' + description: >- + Which order should the sort be: `asc` (ascending) or `desc` (descending) schema: type: string enum: @@ -95,7 +97,7 @@ paths: - desc default: desc responses: - "200": + '200': content: application/json: schema: @@ -108,7 +110,8 @@ paths: $ref: '#/components/schemas/Session' required: - items - description: List of sessions (sorted created_at descending order) with limit+offset pagination + description: >- + List of sessions (sorted created_at descending order) with limit+offset pagination security: - api-key: [] /users: @@ -125,7 +128,7 @@ paths: $ref: '#/components/schemas/CreateUserRequest' description: User create options responses: - "201": + '201': content: application/json: schema: @@ -135,7 +138,8 @@ paths: - api-key: [] get: summary: List users - description: List users created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at` by default) + description: >- + List users created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at` by default) operationId: ListUsers tags: [] parameters: @@ -170,7 +174,8 @@ paths: default: created_at - in: query name: order - description: 'Which order should the sort be: `asc` (ascending) or `desc` (descending)' + description: >- + Which order should the sort be: `asc` (ascending) or `desc` (descending) schema: type: string enum: @@ -178,7 +183,7 @@ paths: - desc default: desc responses: - "200": + '200': content: application/json: schema: @@ -191,7 +196,8 @@ paths: $ref: '#/components/schemas/User' required: - items - description: List of users (sorted created_at descending order) with limit+offset pagination + description: >- + List of users (sorted created_at descending order) with limit+offset pagination security: - api-key: [] /agents: @@ -208,7 +214,7 @@ paths: $ref: '#/components/schemas/CreateAgentRequest' description: Agent create options responses: - "201": + '201': content: application/json: schema: @@ -218,7 +224,8 @@ paths: - api-key: [] get: summary: List agents - description: List agents created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at` by default) + description: >- + List agents created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at` by default) operationId: ListAgents tags: [] parameters: @@ -255,7 +262,8 @@ paths: default: created_at - in: query name: order - description: 'Which order should the sort be: `asc` (ascending) or `desc` (descending)' + description: >- + Which order should the sort be: `asc` (ascending) or `desc` (descending) schema: type: string enum: @@ -263,8 +271,9 @@ paths: - desc default: desc responses: - "200": - description: List of agents (sorted created_at descending order) with limit+offset pagination + '200': + description: >- + List of agents (sorted created_at descending order) with limit+offset pagination content: application/json: schema: @@ -281,12 +290,12 @@ paths: /sessions/{session_id}: get: summary: Get details of the session - description: "" + description: '' operationId: GetSession tags: [] parameters: [] responses: - "200": + '200': content: application/json: schema: @@ -295,12 +304,12 @@ paths: - api-key: [] delete: summary: Delete session - description: "" + description: '' operationId: DeleteSession tags: [] parameters: [] responses: - "202": + '202': content: application/json: schema: @@ -309,7 +318,7 @@ paths: - api-key: [] put: summary: Update session parameters - description: "" + description: '' operationId: UpdateSession tags: [] parameters: [] @@ -319,7 +328,7 @@ paths: schema: $ref: '#/components/schemas/UpdateSessionRequest' responses: - "200": + '200': content: application/json: schema: @@ -329,14 +338,14 @@ paths: parameters: - in: path name: session_id - description: "" + description: '' schema: type: string format: uuid required: true patch: summary: Patch Session parameters (merge instead of replace) - description: "" + description: '' operationId: PatchSession tags: [] parameters: [] @@ -346,8 +355,8 @@ paths: schema: $ref: '#/components/schemas/PatchSessionRequest' responses: - "200": - description: "" + '200': + description: '' headers: {} content: application/json: @@ -364,7 +373,7 @@ paths: parameters: - in: query name: limit - description: "" + description: '' schema: type: integer default: 100 @@ -372,13 +381,13 @@ paths: maximum: 1000 - in: query name: offset - description: "" + description: '' schema: type: integer default: 0 minimum: 0 responses: - "200": + '200': content: application/json: schema: @@ -394,7 +403,7 @@ paths: parameters: - in: path name: session_id - description: "" + description: '' schema: type: string format: uuid @@ -408,7 +417,7 @@ paths: parameters: - in: query name: limit - description: "" + description: '' schema: type: integer default: 100 @@ -416,13 +425,13 @@ paths: maximum: 1000 - in: query name: offset - description: "" + description: '' schema: type: integer default: 0 minimum: 0 responses: - "200": + '200': content: application/json: schema: @@ -438,19 +447,19 @@ paths: parameters: - in: path name: session_id - description: "" + description: '' schema: type: string format: uuid required: true delete: summary: Delete session history (does NOT delete related memories) - description: "" + description: '' operationId: DeleteSessionHistory tags: [] parameters: [] responses: - "202": + '202': content: application/json: schema: @@ -461,20 +470,20 @@ paths: parameters: - in: path name: session_id - description: "" + description: '' schema: type: string format: uuid required: true post: summary: Interact with the session - description: "" + description: '' operationId: Chat tags: [] parameters: - in: header name: Accept - description: "" + description: '' schema: type: string default: application/json @@ -487,7 +496,7 @@ paths: schema: $ref: '#/components/schemas/ChatInput' responses: - "200": + '200': content: application/json: schema: @@ -503,28 +512,28 @@ paths: parameters: - in: query name: query - description: "" + description: '' schema: type: string required: true - in: query name: user_id - description: "" + description: '' schema: type: string format: uuid - in: query name: limit - description: "" + description: '' schema: type: integer - in: query name: offset - description: "" + description: '' schema: type: integer responses: - "200": + '200': content: application/json: schema: @@ -540,7 +549,7 @@ paths: parameters: - in: path name: agent_id - description: "" + description: '' schema: type: string format: uuid @@ -548,12 +557,12 @@ paths: /users/{user_id}: get: summary: Get details of the user - description: "" + description: '' operationId: GetUser tags: [] parameters: [] responses: - "200": + '200': content: application/json: schema: @@ -562,12 +571,12 @@ paths: - api-key: [] delete: summary: Delete user - description: "" + description: '' operationId: DeleteUser tags: [] parameters: [] responses: - "202": + '202': content: application/json: schema: @@ -576,7 +585,7 @@ paths: - api-key: [] put: summary: Update user parameters - description: "" + description: '' operationId: UpdateUser tags: [] parameters: [] @@ -586,7 +595,7 @@ paths: schema: $ref: '#/components/schemas/UpdateUserRequest' responses: - "200": + '200': content: application/json: schema: @@ -596,14 +605,14 @@ paths: parameters: - in: path name: user_id - description: "" + description: '' schema: type: string format: uuid required: true patch: summary: Patch User parameters (merge instead of replace) - description: "" + description: '' operationId: PatchUser tags: [] parameters: [] @@ -613,8 +622,8 @@ paths: schema: $ref: '#/components/schemas/PatchUserRequest' responses: - "200": - description: "" + '200': + description: '' headers: {} content: application/json: @@ -625,12 +634,12 @@ paths: /agents/{agent_id}: get: summary: Get details of the agent - description: "" + description: '' operationId: GetAgent tags: [] parameters: [] responses: - "200": + '200': content: application/json: schema: @@ -639,12 +648,12 @@ paths: - api-key: [] delete: summary: Delete agent - description: "" + description: '' operationId: DeleteAgent tags: [] parameters: [] responses: - "202": + '202': content: application/json: schema: @@ -653,7 +662,7 @@ paths: - api-key: [] put: summary: Update agent parameters - description: "" + description: '' operationId: UpdateAgent tags: [] parameters: [] @@ -663,7 +672,7 @@ paths: schema: $ref: '#/components/schemas/UpdateAgentRequest' responses: - "200": + '200': content: application/json: schema: @@ -673,14 +682,14 @@ paths: parameters: - in: path name: agent_id - description: "" + description: '' schema: type: string format: uuid required: true patch: summary: Patch Agent parameters (merge instead of replace) - description: "" + description: '' operationId: PatchAgent tags: [] parameters: [] @@ -690,8 +699,8 @@ paths: schema: $ref: '#/components/schemas/PatchAgentRequest' responses: - "200": - description: "" + '200': + description: '' headers: {} content: application/json: @@ -708,12 +717,12 @@ paths: parameters: - in: query name: limit - description: "" + description: '' schema: type: integer - in: query name: offset - description: "" + description: '' schema: type: integer - in: query @@ -734,7 +743,8 @@ paths: default: created_at - in: query name: order - description: 'Which order should the sort be: `asc` (ascending) or `desc` (descending)' + description: >- + Which order should the sort be: `asc` (ascending) or `desc` (descending) schema: type: string enum: @@ -744,7 +754,7 @@ paths: requestBody: content: {} responses: - "200": + '200': content: application/json: schema: @@ -760,14 +770,14 @@ paths: parameters: - in: path name: agent_id - description: "" + description: '' schema: type: string format: uuid required: true post: summary: Create doc of the agent - description: "" + description: '' operationId: CreateAgentDoc tags: [] parameters: [] @@ -777,7 +787,7 @@ paths: schema: $ref: '#/components/schemas/CreateDoc' responses: - "201": + '201': content: application/json: schema: @@ -793,12 +803,12 @@ paths: parameters: - in: query name: limit - description: "" + description: '' schema: type: integer - in: query name: offset - description: "" + description: '' schema: type: integer - in: query @@ -819,7 +829,8 @@ paths: default: created_at - in: query name: order - description: 'Which order should the sort be: `asc` (ascending) or `desc` (descending)' + description: >- + Which order should the sort be: `asc` (ascending) or `desc` (descending) schema: type: string enum: @@ -829,7 +840,7 @@ paths: requestBody: content: {} responses: - "200": + '200': content: application/json: schema: @@ -845,14 +856,14 @@ paths: parameters: - in: path name: user_id - description: "" + description: '' schema: type: string format: uuid required: true post: summary: Create doc of the user - description: "" + description: '' operationId: CreateUserDoc tags: [] parameters: [] @@ -862,7 +873,7 @@ paths: schema: $ref: '#/components/schemas/CreateDoc' responses: - "201": + '201': content: application/json: schema: @@ -873,26 +884,26 @@ paths: parameters: - in: path name: user_id - description: "" + description: '' schema: type: string format: uuid required: true - in: path name: doc_id - description: "" + description: '' schema: type: string format: uuid required: true delete: summary: Delete doc by id - description: "" + description: '' operationId: DeleteUserDoc tags: [] parameters: [] responses: - "202": + '202': content: application/json: schema: @@ -903,26 +914,26 @@ paths: parameters: - in: path name: agent_id - description: "" + description: '' schema: type: string format: uuid required: true - in: path name: doc_id - description: "" + description: '' schema: type: string format: uuid required: true delete: summary: Delete doc by id - description: "" + description: '' operationId: DeleteAgentDoc tags: [] parameters: [] responses: - "202": + '202': content: application/json: schema: @@ -932,12 +943,12 @@ paths: /agents/{agent_id}/memories/{memory_id}: delete: summary: Delete memory of the agent by id - description: "" + description: '' operationId: DeleteAgentMemory tags: [] parameters: [] responses: - "202": + '202': content: application/json: schema: @@ -947,14 +958,14 @@ paths: parameters: - in: path name: agent_id - description: "" + description: '' schema: type: string format: uuid required: true - in: path name: memory_id - description: "" + description: '' schema: type: string format: uuid @@ -968,18 +979,18 @@ paths: parameters: - in: query name: limit - description: "" + description: '' schema: type: integer - in: query name: offset - description: "" + description: '' schema: type: integer requestBody: content: {} responses: - "200": + '200': content: application/json: schema: @@ -995,14 +1006,14 @@ paths: parameters: - in: path name: agent_id - description: "" + description: '' schema: type: string format: uuid required: true post: summary: Create tool for the agent - description: "" + description: '' operationId: CreateAgentTool tags: [] parameters: [] @@ -1012,7 +1023,7 @@ paths: schema: $ref: '#/components/schemas/CreateToolRequest' responses: - "201": + '201': content: application/json: schema: @@ -1023,26 +1034,26 @@ paths: parameters: - in: path name: agent_id - description: "" + description: '' schema: type: string format: uuid required: true - in: path name: tool_id - description: "" + description: '' schema: type: string format: uuid required: true delete: summary: Delete tool by id - description: "" + description: '' operationId: DeleteAgentTool tags: [] parameters: [] responses: - "202": + '202': content: application/json: schema: @@ -1051,7 +1062,7 @@ paths: - api-key: [] put: summary: Update agent tool definition - description: "" + description: '' operationId: UpdateAgentTool tags: [] parameters: [] @@ -1061,7 +1072,7 @@ paths: schema: $ref: '#/components/schemas/UpdateToolRequest' responses: - "200": + '200': content: application/json: schema: @@ -1070,7 +1081,7 @@ paths: - api-key: [] patch: summary: Patch Agent tool parameters (merge instead of replace) - description: "" + description: '' operationId: PatchAgentTool tags: [] parameters: [] @@ -1080,8 +1091,8 @@ paths: schema: $ref: '#/components/schemas/PatchToolRequest' responses: - "200": - description: "" + '200': + description: '' headers: {} content: application/json: @@ -1092,12 +1103,12 @@ paths: /jobs/{job_id}: get: summary: Get status of the job - description: "" + description: '' operationId: GetJobStatus tags: [] parameters: [] responses: - "200": + '200': content: application/json: schema: @@ -1107,7 +1118,7 @@ paths: parameters: - in: path name: job_id - description: "" + description: '' schema: type: string format: uuid @@ -1140,7 +1151,7 @@ components: metadata: type: object properties: {} - description: Optional metadata + description: (Optional) metadata required: - id Agent: @@ -1153,7 +1164,7 @@ components: about: type: string description: About the agent - default: "" + default: '' instructions: type: array items: @@ -1197,10 +1208,12 @@ components: properties: description: type: string - description: A description of what the function does, used by the model to choose when and how to call the function. + description: >- + A description of what the function does, used by the model to choose when and how to call the function. name: type: string - description: The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. + description: >- + The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. parameters: $ref: '#/components/schemas/FunctionParameters' description: Parameters accepeted by this function @@ -1215,7 +1228,8 @@ components: enum: - function - webhook - description: Whether this tool is a `function` or a `webhook` (Only `function` tool supported right now) + description: >- + Whether this tool is a `function` or a `webhook` (Only `function` tool supported right now) function: oneOf: - $ref: '#/components/schemas/FunctionDef' @@ -1249,7 +1263,8 @@ components: description: A specific situation that sets the background for this session summary: type: string - description: (null at the beginning) - generated automatically after every interaction + description: >- + (null at the beginning) - generated automatically after every interaction created_at: type: string format: date-time @@ -1262,6 +1277,10 @@ components: type: object properties: {} description: Optional metadata + render_templates: + type: boolean + description: Render system and assistant message content as jinja templates + default: false required: - id - user_id @@ -1307,6 +1326,10 @@ components: type: object properties: {} description: Optional metadata + render_templates: + type: boolean + description: Render system and assistant message content as jinja templates + default: false required: - agent_id description: A valid request payload for creating a session @@ -1320,7 +1343,7 @@ components: about: type: string description: About the agent - default: "" + default: '' instructions: type: array items: @@ -1331,7 +1354,8 @@ components: type: array items: $ref: '#/components/schemas/CreateToolRequest' - description: A list of tools the model may call. Currently, only `function`s are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. + description: >- + A list of tools the model may call. Currently, only `function`s are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. default_settings: $ref: '#/components/schemas/AgentDefaultSettings' description: Default model settings to start every session with @@ -1455,6 +1479,7 @@ components: - assistant - system - function_call + - function description: ChatML role (system|assistant|user|function_call) content: type: string @@ -1491,7 +1516,7 @@ components: content: type: string description: ChatML content - default: "" + default: '' name: type: string description: ChatML name @@ -1514,7 +1539,8 @@ components: tools: type: array nullable: true - description: (Advanced) List of tools that are provided in addition to agent's default set of tools. Functions of same name in agent set are overriden + description: >- + (Advanced) List of tools that are provided in addition to agent's default set of tools. Functions of same name in agent set are overriden items: $ref: '#/components/schemas/Tool' tool_choice: @@ -1522,12 +1548,14 @@ components: oneOf: - $ref: '#/components/schemas/ToolChoiceOption' - $ref: '#/components/schemas/NamedToolChoice' - description: Can be one of existing tools given to the agent earlier or the ones included in the request + description: >- + Can be one of existing tools given to the agent earlier or the ones included in the request required: - messages NamedToolChoice: type: object - description: Specifies a tool the model should use. Use to force the model to call a specific function. + description: >- + Specifies a tool the model should use. Use to force the model to call a specific function. properties: type: type: string @@ -1546,17 +1574,23 @@ components: - type - function ToolChoiceOption: - description: | + description: > Controls which (if any) function is called by the model. + `none` means the model will not call a function and instead generates a message. + `auto` means the model can pick between generating a message or calling a function. + Specifying a particular function via `{"type: "function", "function": {"name": "my_function"}}` forces the model to call that function. + `none` is the default when no functions are present. `auto` is the default if functions are present. + oneOf: - type: string - description: | + description: > `none` means the model will not call a function and instead generates a message. `auto` means the model can pick between generating a message or calling a function. + enum: - none - auto @@ -1564,8 +1598,9 @@ components: type: string FunctionCallOption: type: object - description: | + description: > Specifying a particular function via `{"name": "my_function"}` forces the model to call that function. + properties: name: type: string @@ -1591,7 +1626,8 @@ components: - total_tokens ChatResponse: type: object - description: Represents a chat completion response returned by model, based on the provided input. + description: >- + Represents a chat completion response returned by model, based on the provided input. properties: id: type: string @@ -1599,7 +1635,8 @@ components: format: uuid finish_reason: type: string - description: The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, `content_filter` if content was omitted due to a flag from our content filters, `tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function. + description: >- + The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, `content_filter` if content was omitted due to a flag from our content filters, `tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function. enum: - stop - length @@ -1690,30 +1727,35 @@ components: minimum: -1 maximum: 1 nullable: true - description: (OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. + description: >- + (OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. length_penalty: type: number default: 1 minimum: 0 maximum: 2 nullable: true - description: '(Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize number of tokens generated. ' + description: "(Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize number of tokens generated. " logit_bias: type: object default: null nullable: true additionalProperties: type: integer - description: | + description: > Modify the likelihood of specified tokens appearing in the completion. + Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token. + properties: {} max_tokens: - description: | + description: > The maximum number of tokens to generate in the chat completion. + The total length of input tokens and generated tokens is limited by the model's context length. + type: integer nullable: true default: 200 @@ -1725,22 +1767,27 @@ components: minimum: -1 maximum: 1 nullable: true - description: (OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. + description: >- + (OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. repetition_penalty: type: number default: 1 minimum: 0 maximum: 2 nullable: true - description: (Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. + description: >- + (Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. response_format: type: object - description: | + description: > An object specifying the format that the model must output. + Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is valid JSON. + **Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if `finish_reason="length"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length. + properties: type: type: string @@ -1764,10 +1811,13 @@ components: minimum: -1 maximum: 9999 nullable: true - description: | + description: > This feature is in Beta. + If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result. + Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend. + stop: description: | Up to 4 sequences where the API will stop generating further tokens. @@ -1781,8 +1831,9 @@ components: items: type: string stream: - description: | + description: > If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions). + type: boolean nullable: true default: false @@ -1793,7 +1844,8 @@ components: default: 0.75 example: 0.75 nullable: true - description: What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. + description: >- + What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. top_p: type: number minimum: 0 @@ -1801,7 +1853,8 @@ components: default: 1 example: 1 nullable: true - description: Defaults to 1 An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both. + description: >- + Defaults to 1 An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both. exclusiveMinimum: true min_p: type: number @@ -1814,7 +1867,8 @@ components: default: 0.01 preset: type: string - description: Generation preset name (problem_solving|conversational|fun|prose|creative|business|deterministic|code|multilingual) + description: >- + Generation preset name (problem_solving|conversational|fun|prose|creative|business|deterministic|code|multilingual) enum: - problem_solving - conversational @@ -1834,28 +1888,31 @@ components: minimum: -2 maximum: 2 nullable: true - description: (OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. + description: >- + (OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. length_penalty: type: number default: 1 minimum: 0 maximum: 2 nullable: true - description: '(Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize number of tokens generated. ' + description: "(Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize number of tokens generated. " presence_penalty: type: number default: 0 minimum: -1 maximum: 1 nullable: true - description: (OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. + description: >- + (OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. repetition_penalty: type: number default: 1 minimum: 0 maximum: 2 nullable: true - description: (Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. + description: >- + (Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. temperature: type: number minimum: 0 @@ -1863,7 +1920,8 @@ components: default: 0.75 example: 0.75 nullable: true - description: What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. + description: >- + What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. top_p: type: number minimum: 0 @@ -1871,7 +1929,8 @@ components: default: 1 example: 1 nullable: true - description: Defaults to 1 An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both. + description: >- + Defaults to 1 An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both. min_p: type: number description: Minimum probability compared to leading token to be considered @@ -1883,7 +1942,8 @@ components: default: 0.01 preset: type: string - description: 'Generation preset name (one of: problem_solving, conversational, fun, prose, creative, business, deterministic, code, multilingual)' + description: >- + Generation preset name (one of: problem_solving, conversational, fun, prose, creative, business, deterministic, code, multilingual) enum: - problem_solving - conversational @@ -1964,7 +2024,8 @@ components: enum: - function - webhook - description: Whether this tool is a `function` or a `webhook` (Only `function` tool supported right now) + description: >- + Whether this tool is a `function` or a `webhook` (Only `function` tool supported right now) function: oneOf: - $ref: '#/components/schemas/FunctionDef' @@ -2071,7 +2132,8 @@ components: maximum: 100 state: type: string - description: 'Current state (one of: pending, in_progress, retrying, succeeded, aborted, failed)' + description: >- + Current state (one of: pending, in_progress, retrying, succeeded, aborted, failed) enum: - pending - in_progress @@ -2152,10 +2214,12 @@ components: properties: description: type: string - description: A description of what the function does, used by the model to choose when and how to call the function. + description: >- + A description of what the function does, used by the model to choose when and how to call the function. name: type: string - description: The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. + description: >- + The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. parameters: $ref: '#/components/schemas/FunctionParameters' description: Parameters accepeted by this function @@ -2170,56 +2234,56 @@ components: session_id: in: path required: false - description: "" + description: '' schema: type: string format: uuid user_id: in: path required: false - description: "" + description: '' schema: type: string format: uuid agent_id: in: path required: false - description: "" + description: '' schema: type: string format: uuid message_id: in: path required: false - description: "" + description: '' schema: type: string format: uuid doc_id: in: path required: false - description: "" + description: '' schema: type: string format: uuid memory_id: in: path required: false - description: "" + description: '' schema: type: string format: uuid tool_id: in: path required: false - description: "" + description: '' schema: type: string format: uuid job_id: in: path required: false - description: "" + description: '' schema: type: string format: uuid diff --git a/sdks/postman/collection.json b/sdks/postman/collection.json index e6faaeaee..ef26f639e 100644 --- a/sdks/postman/collection.json +++ b/sdks/postman/collection.json @@ -106,7 +106,7 @@ "body": null }, "description": "List of sessions (sorted created_at descending order) with limit+offset pagination", - "body": "{\n \"items\": [\n {\n \"id\": \"id\",\n \"user_id\": \"user_id\",\n \"agent_id\": \"agent_id\",\n \"situation\": \"situation\",\n \"summary\": \"summary\",\n \"created_at\": \"2024-01-15T09:30:00Z\",\n \"updated_at\": \"2024-01-15T09:30:00Z\"\n }\n ]\n}", + "body": "{\n \"items\": [\n {\n \"id\": \"id\",\n \"user_id\": \"user_id\",\n \"agent_id\": \"agent_id\",\n \"situation\": \"situation\",\n \"summary\": \"summary\",\n \"created_at\": \"2024-01-15T09:30:00Z\",\n \"updated_at\": \"2024-01-15T09:30:00Z\",\n \"render_templates\": true\n }\n ]\n}", "_postman_previewlanguage": "json" } ] @@ -612,7 +612,7 @@ "body": null }, "description": null, - "body": "{\n \"id\": \"id\",\n \"user_id\": \"user_id\",\n \"agent_id\": \"agent_id\",\n \"situation\": \"situation\",\n \"summary\": \"summary\",\n \"created_at\": \"2024-01-15T09:30:00Z\",\n \"updated_at\": \"2024-01-15T09:30:00Z\"\n}", + "body": "{\n \"id\": \"id\",\n \"user_id\": \"user_id\",\n \"agent_id\": \"agent_id\",\n \"situation\": \"situation\",\n \"summary\": \"summary\",\n \"created_at\": \"2024-01-15T09:30:00Z\",\n \"updated_at\": \"2024-01-15T09:30:00Z\",\n \"render_templates\": true\n}", "_postman_previewlanguage": "json" } ] diff --git a/sdks/python/julep/api/client.py b/sdks/python/julep/api/client.py index 1298f4770..4066a5b9e 100644 --- a/sdks/python/julep/api/client.py +++ b/sdks/python/julep/api/client.py @@ -145,6 +145,7 @@ def create_session( agent_id: str, situation: typing.Optional[str] = OMIT, metadata: typing.Optional[CreateSessionRequestMetadata] = OMIT, + render_templates: typing.Optional[bool] = OMIT, ) -> ResourceCreatedResponse: """ Create a session between an agent and a user @@ -157,6 +158,8 @@ def create_session( - situation: typing.Optional[str]. A specific situation that sets the background for this session - metadata: typing.Optional[CreateSessionRequestMetadata]. Optional metadata + + - render_templates: typing.Optional[bool]. Render system and assistant message content as jinja templates --- from julep.client import JulepApi @@ -174,6 +177,8 @@ def create_session( _request["situation"] = situation if metadata is not OMIT: _request["metadata"] = metadata + if render_templates is not OMIT: + _request["render_templates"] = render_templates _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "sessions"), @@ -1905,6 +1910,7 @@ async def create_session( agent_id: str, situation: typing.Optional[str] = OMIT, metadata: typing.Optional[CreateSessionRequestMetadata] = OMIT, + render_templates: typing.Optional[bool] = OMIT, ) -> ResourceCreatedResponse: """ Create a session between an agent and a user @@ -1917,6 +1923,8 @@ async def create_session( - situation: typing.Optional[str]. A specific situation that sets the background for this session - metadata: typing.Optional[CreateSessionRequestMetadata]. Optional metadata + + - render_templates: typing.Optional[bool]. Render system and assistant message content as jinja templates --- from julep.client import AsyncJulepApi @@ -1934,6 +1942,8 @@ async def create_session( _request["situation"] = situation if metadata is not OMIT: _request["metadata"] = metadata + if render_templates is not OMIT: + _request["render_templates"] = render_templates _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "sessions"), diff --git a/sdks/python/julep/api/types/chat_ml_message_role.py b/sdks/python/julep/api/types/chat_ml_message_role.py index 0303cbee1..c834310c5 100644 --- a/sdks/python/julep/api/types/chat_ml_message_role.py +++ b/sdks/python/julep/api/types/chat_ml_message_role.py @@ -15,6 +15,7 @@ class ChatMlMessageRole(str, enum.Enum): ASSISTANT = "assistant" SYSTEM = "system" FUNCTION_CALL = "function_call" + FUNCTION = "function" def visit( self, @@ -22,6 +23,7 @@ def visit( assistant: typing.Callable[[], T_Result], system: typing.Callable[[], T_Result], function_call: typing.Callable[[], T_Result], + function: typing.Callable[[], T_Result], ) -> T_Result: if self is ChatMlMessageRole.USER: return user() @@ -31,3 +33,5 @@ def visit( return system() if self is ChatMlMessageRole.FUNCTION_CALL: return function_call() + if self is ChatMlMessageRole.FUNCTION: + return function() diff --git a/sdks/python/julep/api/types/session.py b/sdks/python/julep/api/types/session.py index 9d92d1b3c..56b31b524 100644 --- a/sdks/python/julep/api/types/session.py +++ b/sdks/python/julep/api/types/session.py @@ -35,6 +35,9 @@ class Session(pydantic.BaseModel): metadata: typing.Optional[SessionMetadata] = pydantic.Field( description="Optional metadata" ) + render_templates: typing.Optional[bool] = pydantic.Field( + description="Render system and assistant message content as jinja templates" + ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = { diff --git a/sdks/python/julep/api/types/user.py b/sdks/python/julep/api/types/user.py index f775b95e5..f4db3a09f 100644 --- a/sdks/python/julep/api/types/user.py +++ b/sdks/python/julep/api/types/user.py @@ -23,7 +23,7 @@ class User(pydantic.BaseModel): ) id: str = pydantic.Field(description="User id (UUID)") metadata: typing.Optional[UserMetadata] = pydantic.Field( - description="Optional metadata" + description="(Optional) metadata" ) def json(self, **kwargs: typing.Any) -> str: diff --git a/sdks/python/julep/api/types/user_metadata.py b/sdks/python/julep/api/types/user_metadata.py index 12cdc27c6..0215af1f6 100644 --- a/sdks/python/julep/api/types/user_metadata.py +++ b/sdks/python/julep/api/types/user_metadata.py @@ -13,7 +13,7 @@ class UserMetadata(pydantic.BaseModel): """ - Optional metadata + (Optional) metadata """ def json(self, **kwargs: typing.Any) -> str: diff --git a/sdks/python/poetry.lock b/sdks/python/poetry.lock index 7dfae3f8a..ba4d4b6a4 100644 --- a/sdks/python/poetry.lock +++ b/sdks/python/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. [[package]] name = "annotated-types" @@ -204,13 +204,13 @@ files = [ [[package]] name = "beartype" -version = "0.18.2" +version = "0.18.3" description = "Unbearably fast runtime type checking in pure Python." optional = false python-versions = ">=3.8.0" files = [ - {file = "beartype-0.18.2-py3-none-any.whl", hash = "sha256:561aa7858e92289b952a6fc5faf15ea32f9519c07cdc0f4df7a01b59fc4bbeaf"}, - {file = "beartype-0.18.2.tar.gz", hash = "sha256:a6fbc0be9269889312388bfec6a9ddf41bf8fe31b68bcf9c8239db35cd38f411"}, + {file = "beartype-0.18.3-py3-none-any.whl", hash = "sha256:0131717230b04a7f1994422edaf237735febc90c0c98bd0094ce69e0a6706fff"}, + {file = "beartype-0.18.3.tar.gz", hash = "sha256:04853d78493f3c84b03956f1fa0c1e5b84c5332a760559ddc8f2cf6141ddf791"}, ] [package.extras] @@ -1618,13 +1618,13 @@ test = ["pytest", "pytest-console-scripts", "pytest-jupyter", "pytest-tornasync" [[package]] name = "openai" -version = "1.19.0" +version = "1.21.2" description = "The official Python library for the openai API" optional = false python-versions = ">=3.7.1" files = [ - {file = "openai-1.19.0-py3-none-any.whl", hash = "sha256:fef51776830930f98401fc867c24b969e3bc121f5326edbb72ed56cdfdc4ffd0"}, - {file = "openai-1.19.0.tar.gz", hash = "sha256:6a1c3538e1fa1907f19d82a0017d792d5180533ecfe1a8f22b4b5119d7a3f5a0"}, + {file = "openai-1.21.2-py3-none-any.whl", hash = "sha256:65f6bed84ecde0fc20e4f3b458000deb775531aa29154ff4d679e937d7e4370d"}, + {file = "openai-1.21.2.tar.gz", hash = "sha256:7b6e4d59f3686fcd94efdb2ee61052bf6c9dbb58052b5116fc0d75ba7adbf329"}, ] [package.dependencies] @@ -2078,13 +2078,13 @@ diagrams = ["jinja2", "railroad-diagrams"] [[package]] name = "pyright" -version = "1.1.358" +version = "1.1.359" description = "Command line wrapper for pyright" optional = false python-versions = ">=3.7" files = [ - {file = "pyright-1.1.358-py3-none-any.whl", hash = "sha256:0995b6a95eb11bd26f093cd5dee3d5e7258441b1b94d4a171b5dc5b79a1d4f4e"}, - {file = "pyright-1.1.358.tar.gz", hash = "sha256:185524a8d52f6f14bbd3b290b92ad905f25b964dddc9e7148aad760bd35c9f60"}, + {file = "pyright-1.1.359-py3-none-any.whl", hash = "sha256:5582777be7eab73512277ac7da7b41e15bc0737f488629cb9babd96e0769be61"}, + {file = "pyright-1.1.359.tar.gz", hash = "sha256:f0eab50f3dafce8a7302caeafd6a733f39901a2bf5170bb23d77fd607c8a8dbc"}, ] [package.dependencies] @@ -2241,7 +2241,6 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, - {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, diff --git a/sdks/ts/src/api/models/ChatMLMessage.ts b/sdks/ts/src/api/models/ChatMLMessage.ts index 3f9d2aff7..7be792da9 100644 --- a/sdks/ts/src/api/models/ChatMLMessage.ts +++ b/sdks/ts/src/api/models/ChatMLMessage.ts @@ -6,7 +6,7 @@ export type ChatMLMessage = { /** * ChatML role (system|assistant|user|function_call) */ - role: "user" | "assistant" | "system" | "function_call"; + role: "user" | "assistant" | "system" | "function_call" | "function"; /** * ChatML content */ diff --git a/sdks/ts/src/api/models/CreateSessionRequest.ts b/sdks/ts/src/api/models/CreateSessionRequest.ts index 45a3fa4bc..bdb4e699f 100644 --- a/sdks/ts/src/api/models/CreateSessionRequest.ts +++ b/sdks/ts/src/api/models/CreateSessionRequest.ts @@ -22,4 +22,8 @@ export type CreateSessionRequest = { * Optional metadata */ metadata?: any; + /** + * Render system and assistant message content as jinja templates + */ + render_templates?: boolean; }; diff --git a/sdks/ts/src/api/models/Session.ts b/sdks/ts/src/api/models/Session.ts index 139d412cc..b944ba81b 100644 --- a/sdks/ts/src/api/models/Session.ts +++ b/sdks/ts/src/api/models/Session.ts @@ -35,4 +35,8 @@ export type Session = { * Optional metadata */ metadata?: any; + /** + * Render system and assistant message content as jinja templates + */ + render_templates?: boolean; }; diff --git a/sdks/ts/src/api/models/User.ts b/sdks/ts/src/api/models/User.ts index 7cd9b46b9..d9e10fc4f 100644 --- a/sdks/ts/src/api/models/User.ts +++ b/sdks/ts/src/api/models/User.ts @@ -24,7 +24,7 @@ export type User = { */ id: string; /** - * Optional metadata + * (Optional) metadata */ metadata?: any; }; diff --git a/sdks/ts/src/api/schemas/$CreateSessionRequest.ts b/sdks/ts/src/api/schemas/$CreateSessionRequest.ts index 8ecf0a1db..647a066b3 100644 --- a/sdks/ts/src/api/schemas/$CreateSessionRequest.ts +++ b/sdks/ts/src/api/schemas/$CreateSessionRequest.ts @@ -24,5 +24,9 @@ export const $CreateSessionRequest = { description: `Optional metadata`, properties: {}, }, + render_templates: { + type: "boolean", + description: `Render system and assistant message content as jinja templates`, + }, }, } as const; diff --git a/sdks/ts/src/api/schemas/$Session.ts b/sdks/ts/src/api/schemas/$Session.ts index bd0920729..1fb17d4d1 100644 --- a/sdks/ts/src/api/schemas/$Session.ts +++ b/sdks/ts/src/api/schemas/$Session.ts @@ -44,5 +44,9 @@ export const $Session = { description: `Optional metadata`, properties: {}, }, + render_templates: { + type: "boolean", + description: `Render system and assistant message content as jinja templates`, + }, }, } as const; diff --git a/sdks/ts/src/api/schemas/$User.ts b/sdks/ts/src/api/schemas/$User.ts index 08a7e9e3a..e8b7d3d7b 100644 --- a/sdks/ts/src/api/schemas/$User.ts +++ b/sdks/ts/src/api/schemas/$User.ts @@ -29,7 +29,7 @@ export const $User = { format: "uuid", }, metadata: { - description: `Optional metadata`, + description: `(Optional) metadata`, properties: {}, }, },