diff --git a/poetry.lock b/poetry.lock index 98c1ebc43..1ca38b7ac 100644 --- a/poetry.lock +++ b/poetry.lock @@ -89,17 +89,17 @@ files = [ [[package]] name = "boto3" -version = "1.35.43" +version = "1.35.49" description = "The AWS SDK for Python" optional = true python-versions = ">=3.8" files = [ - {file = "boto3-1.35.43-py3-none-any.whl", hash = "sha256:e6a50a0599f75b21de0de1a551a0564793d25b304fa623e4052e527b268de734"}, - {file = "boto3-1.35.43.tar.gz", hash = "sha256:0197f460632804577aa78b2f6daf7b823bffa9d4d67a5cebb179efff0fe9631b"}, + {file = "boto3-1.35.49-py3-none-any.whl", hash = "sha256:b660c649a27a6b47a34f6f858f5bd7c3b0a798a16dec8dda7cbebeee80fd1f60"}, + {file = "boto3-1.35.49.tar.gz", hash = "sha256:ddecb27f5699ca9f97711c52b6c0652c2e63bf6c2bfbc13b819b4f523b4d30ff"}, ] [package.dependencies] -botocore = ">=1.35.43,<1.36.0" +botocore = ">=1.35.49,<1.36.0" jmespath = ">=0.7.1,<2.0.0" s3transfer = ">=0.10.0,<0.11.0" @@ -108,13 +108,13 @@ crt = ["botocore[crt] (>=1.21.0,<2.0a0)"] [[package]] name = "botocore" -version = "1.35.43" +version = "1.35.49" description = "Low-level, data-driven core of boto 3." optional = true python-versions = ">=3.8" files = [ - {file = "botocore-1.35.43-py3-none-any.whl", hash = "sha256:7cfdee9117617da97daaf259dd8484bcdc259c59eb7d1ce7db9ecf8506b7d36c"}, - {file = "botocore-1.35.43.tar.gz", hash = "sha256:04539b85ade060601a3023cacb538fc17aad8c059a5a2e18fe4bc5d0d91fbd72"}, + {file = "botocore-1.35.49-py3-none-any.whl", hash = "sha256:aed4d3643afd702920792b68fbe712a8c3847993820d1048cd238a6469354da1"}, + {file = "botocore-1.35.49.tar.gz", hash = "sha256:07d0c1325fdbfa49a4a054413dbdeab0a6030449b2aa66099241af2dac48afd8"}, ] [package.dependencies] @@ -450,13 +450,13 @@ tests = ["pytest", "pytest-cov", "pytest-xdist"] [[package]] name = "databricks-sdk" -version = "0.35.0" +version = "0.36.0" description = "Databricks SDK for Python (Beta)" optional = true python-versions = ">=3.7" files = [ - {file = "databricks_sdk-0.35.0-py3-none-any.whl", hash = "sha256:00cce49014dfa1d5912cb18e376d28b2de8829a8f645d87d4040bae048630578"}, - {file = "databricks_sdk-0.35.0.tar.gz", hash = "sha256:9446409fd321b43ac586653120b16734d13a97674fee9f89b6562f24d32d48e0"}, + {file = "databricks_sdk-0.36.0-py3-none-any.whl", hash = "sha256:e6105a2752c7980de35f7c7e3c4d63389c0763c9ef7bf7e2813e464acef907e9"}, + {file = "databricks_sdk-0.36.0.tar.gz", hash = "sha256:d8c46348cbd3e0b56991a6b7a59d7a6e0437947f6387bef832e6fe092e2dd427"}, ] [package.dependencies] @@ -694,13 +694,13 @@ woff = ["brotli (>=1.0.1)", "brotlicffi (>=0.8.0)", "zopfli (>=0.1.4)"] [[package]] name = "fsspec" -version = "2024.9.0" +version = "2024.10.0" description = "File-system specification" optional = false python-versions = ">=3.8" files = [ - {file = "fsspec-2024.9.0-py3-none-any.whl", hash = "sha256:a0947d552d8a6efa72cc2c730b12c41d043509156966cca4fb157b0f2a0c574b"}, - {file = "fsspec-2024.9.0.tar.gz", hash = "sha256:4b0afb90c2f21832df142f292649035d80b421f60a9e1c027802e5a0da2b04e8"}, + {file = "fsspec-2024.10.0-py3-none-any.whl", hash = "sha256:03b9a6785766a4de40368b88906366755e2819e758b83705c88cd7cb5fe81871"}, + {file = "fsspec-2024.10.0.tar.gz", hash = "sha256:eda2d8a4116d4f2429db8550f2457da57279247dd930bb12f821b58391359493"}, ] [package.extras] @@ -803,22 +803,23 @@ six = "*" [[package]] name = "graphene" -version = "3.4" +version = "3.4.1" description = "GraphQL Framework for Python" optional = true python-versions = "*" files = [ - {file = "graphene-3.4-py2.py3-none-any.whl", hash = "sha256:28bf359b802cdb808130a5521135d4c88a262564598cfdc91628d2c172b99dce"}, - {file = "graphene-3.4.tar.gz", hash = "sha256:65e5ec84c5b7fb4fc41518acfbafb62ebb393d3982fbba00cd5393e431a80b97"}, + {file = "graphene-3.4.1-py2.py3-none-any.whl", hash = "sha256:ca98f853201293871cdc7f55faf2523a9bc077181fe0f4947db5a243e5c67083"}, + {file = "graphene-3.4.1.tar.gz", hash = "sha256:828a8d7b1bce450566a72cc8733716c20f3acfc659960de73dd38f46dc302040"}, ] [package.dependencies] graphql-core = ">=3.1,<3.3" graphql-relay = ">=3.1,<3.3" +python-dateutil = ">=2.7.0,<3" typing-extensions = ">=4.7.1,<5" [package.extras] -dev = ["coveralls (>=3.3,<5)", "pytest (>=8,<9)", "pytest-asyncio (>=0.16,<2)", "pytest-benchmark (>=4,<5)", "pytest-cov (>=5,<6)", "pytest-mock (>=3,<4)", "ruff (==0.5.0)"] +dev = ["coveralls (>=3.3,<5)", "mypy (>=1.10,<2)", "pytest (>=8,<9)", "pytest-asyncio (>=0.16,<2)", "pytest-benchmark (>=4,<5)", "pytest-cov (>=5,<6)", "pytest-mock (>=3,<4)", "ruff (==0.5.0)", "types-python-dateutil (>=2.8.1,<3)"] test = ["coveralls (>=3.3,<5)", "pytest (>=8,<9)", "pytest-asyncio (>=0.16,<2)", "pytest-benchmark (>=4,<5)", "pytest-cov (>=5,<6)", "pytest-mock (>=3,<4)"] [[package]] @@ -1026,13 +1027,13 @@ files = [ [[package]] name = "huggingface-hub" -version = "0.26.0" +version = "0.26.1" description = "Client library to download and publish models, datasets and other repos on the huggingface.co hub" optional = false python-versions = ">=3.8.0" files = [ - {file = "huggingface_hub-0.26.0-py3-none-any.whl", hash = "sha256:e43b8f36042b2103b48dea822535e08f5f089c4aa7013a067fca7b4ebf7f85a3"}, - {file = "huggingface_hub-0.26.0.tar.gz", hash = "sha256:524fe9281b015b76aa73ff1a83bf1cbe8cab851c9ac5ae5fcd2a25d5173ce629"}, + {file = "huggingface_hub-0.26.1-py3-none-any.whl", hash = "sha256:5927a8fc64ae68859cd954b7cc29d1c8390a5e15caba6d3d349c973be8fdacf3"}, + {file = "huggingface_hub-0.26.1.tar.gz", hash = "sha256:414c0d9b769eecc86c70f9d939d0f48bb28e8461dd1130021542eff0212db890"}, ] [package.dependencies] @@ -1337,13 +1338,13 @@ files = [ [[package]] name = "mako" -version = "1.3.5" +version = "1.3.6" description = "A super-fast templating language that borrows the best ideas from the existing templating languages." optional = true python-versions = ">=3.8" files = [ - {file = "Mako-1.3.5-py3-none-any.whl", hash = "sha256:260f1dbc3a519453a9c856dedfe4beb4e50bd5a26d96386cb6c80856556bb91a"}, - {file = "Mako-1.3.5.tar.gz", hash = "sha256:48dbc20568c1d276a2698b36d968fa76161bf127194907ea6fc594fa81f943bc"}, + {file = "Mako-1.3.6-py3-none-any.whl", hash = "sha256:a91198468092a2f1a0de86ca92690fb0cfc43ca90ee17e15d93662b4c04b241a"}, + {file = "mako-1.3.6.tar.gz", hash = "sha256:9ec3a1583713479fae654f83ed9fa8c9a4c16b7bb0daba0e6bbebff50c0d983d"}, ] [package.dependencies] @@ -1546,13 +1547,13 @@ files = [ [[package]] name = "mlflow" -version = "2.17.0" +version = "2.17.1" description = "MLflow is an open source platform for the complete machine learning lifecycle" optional = true python-versions = ">=3.8" files = [ - {file = "mlflow-2.17.0-py3-none-any.whl", hash = "sha256:64fbc0dfcb7322ed4cbccadc2f533bdd2944001b983ea8c10db45c7c59b46b7c"}, - {file = "mlflow-2.17.0.tar.gz", hash = "sha256:5bb2089b833da48e4a92a9b4cb1cb5fa509a571eb3c603be39f5238b4721e076"}, + {file = "mlflow-2.17.1-py3-none-any.whl", hash = "sha256:e614d0732cf95712891bfdfd92461dcf6a85d9e1899591be8399eb107eec6919"}, + {file = "mlflow-2.17.1.tar.gz", hash = "sha256:04cbec7fe79a4509d8c073ef64302b24e73cb447f5a14ad51d915bfbaa05c73b"}, ] [package.dependencies] @@ -1567,7 +1568,7 @@ Jinja2 = [ ] markdown = ">=3.3,<4" matplotlib = "<4" -mlflow-skinny = "2.17.0" +mlflow-skinny = "2.17.1" numpy = "<3" pandas = "<3" pyarrow = ">=4.0.0,<18" @@ -1590,13 +1591,13 @@ xethub = ["mlflow-xethub"] [[package]] name = "mlflow-skinny" -version = "2.17.0" +version = "2.17.1" description = "MLflow is an open source platform for the complete machine learning lifecycle" optional = true python-versions = ">=3.8" files = [ - {file = "mlflow_skinny-2.17.0-py3-none-any.whl", hash = "sha256:9eff7160f7459e09c01cc5bc2a68fdba7b64adbce069ef6d1013569830569048"}, - {file = "mlflow_skinny-2.17.0.tar.gz", hash = "sha256:bbb770368e68ffe783a76fa38854618c1411b44bda21eb8b770ca4cc28801299"}, + {file = "mlflow_skinny-2.17.1-py3-none-any.whl", hash = "sha256:656b7ccf37e7a5a00124487ad9ff1be781a041b6830ac7ae08cd594fd40b7f69"}, + {file = "mlflow_skinny-2.17.1.tar.gz", hash = "sha256:75500acab95c81aac469ed12da4a102e229b8e16757b61393080a44d45018020"}, ] [package.dependencies] @@ -2553,13 +2554,13 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] [[package]] name = "rich" -version = "13.9.2" +version = "13.9.3" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" optional = true python-versions = ">=3.8.0" files = [ - {file = "rich-13.9.2-py3-none-any.whl", hash = "sha256:8c82a3d3f8dcfe9e734771313e606b39d8247bb6b826e196f4914b333b743cf1"}, - {file = "rich-13.9.2.tar.gz", hash = "sha256:51a2c62057461aaf7152b4d611168f93a9fc73068f8ded2790f29fe2b5366d0c"}, + {file = "rich-13.9.3-py3-none-any.whl", hash = "sha256:9836f5096eb2172c9e77df411c1b009bace4193d6a481d534fea75ebba758283"}, + {file = "rich-13.9.3.tar.gz", hash = "sha256:bc1e01b899537598cf02579d2b9f4a415104d3fc439313a7a2c165d76557a08e"}, ] [package.dependencies] @@ -3229,13 +3230,13 @@ files = [ [[package]] name = "tqdm" -version = "4.66.5" +version = "4.66.6" description = "Fast, Extensible Progress Meter" optional = false python-versions = ">=3.7" files = [ - {file = "tqdm-4.66.5-py3-none-any.whl", hash = "sha256:90279a3770753eafc9194a0364852159802111925aa30eb3f9d85b0e805ac7cd"}, - {file = "tqdm-4.66.5.tar.gz", hash = "sha256:e1020aef2e5096702d8a025ac7d16b1577279c9d63f8375b63083e9a5f0fcbad"}, + {file = "tqdm-4.66.6-py3-none-any.whl", hash = "sha256:223e8b5359c2efc4b30555531f09e9f2f3589bcd7fdd389271191031b49b7a63"}, + {file = "tqdm-4.66.6.tar.gz", hash = "sha256:4bdd694238bef1485ce839d67967ab50af8f9272aab687c0d7702a01da0be090"}, ] [package.dependencies] @@ -3369,13 +3370,13 @@ testing = ["coverage (>=5.0)", "pytest", "pytest-cov"] [[package]] name = "werkzeug" -version = "3.0.4" +version = "3.0.6" description = "The comprehensive WSGI web application library." optional = true python-versions = ">=3.8" files = [ - {file = "werkzeug-3.0.4-py3-none-any.whl", hash = "sha256:02c9eb92b7d6c06f31a782811505d2157837cea66aaede3e217c7c27c039476c"}, - {file = "werkzeug-3.0.4.tar.gz", hash = "sha256:34f2371506b250df4d4f84bfe7b0921e4762525762bbd936614909fe25cd7306"}, + {file = "werkzeug-3.0.6-py3-none-any.whl", hash = "sha256:1bc0c2310d2fbb07b1dd1105eba2f7af72f322e1e455f2f93c993bee8c8a5f17"}, + {file = "werkzeug-3.0.6.tar.gz", hash = "sha256:a8dd59d4de28ca70471a34cba79bed5f7ef2e036a76b3ab0835474246eb41f8d"}, ] [package.dependencies] diff --git a/pyproject.toml b/pyproject.toml index e130132bc..15da59a41 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cohere" -version = "5.11.1" +version = "5.11.2" description = "" readme = "README.md" authors = [] diff --git a/reference.md b/reference.md index 7d0740d7f..f1b6b9cb2 100644 --- a/reference.md +++ b/reference.md @@ -236,7 +236,7 @@ Compatible Deployments: **connectors:** `typing.Optional[typing.Sequence[ChatConnector]]` -Accepts `{"id": "web-search"}`, and/or the `"id"` for a custom [connector](https://docs.cohere.com/docs/connectors), if you've [created](https://docs.cohere.com/docs/creating-and-deploying-a-connector) one. +Accepts `{"id": "web-search"}`, and/or the `"id"` for a custom [connector](https://docs.cohere.com/docs/connectors), if you've [created](https://docs.cohere.com/v1/docs/creating-and-deploying-a-connector) one. When specified, the model's reply will be enriched with information found by querying each of the connectors (RAG). @@ -721,7 +721,7 @@ Compatible Deployments: **connectors:** `typing.Optional[typing.Sequence[ChatConnector]]` -Accepts `{"id": "web-search"}`, and/or the `"id"` for a custom [connector](https://docs.cohere.com/docs/connectors), if you've [created](https://docs.cohere.com/docs/creating-and-deploying-a-connector) one. +Accepts `{"id": "web-search"}`, and/or the `"id"` for a custom [connector](https://docs.cohere.com/docs/connectors), if you've [created](https://docs.cohere.com/v1/docs/creating-and-deploying-a-connector) one. When specified, the model's reply will be enriched with information found by querying each of the connectors (RAG). @@ -1584,9 +1584,9 @@ If `ALL` is selected, the token likelihoods will be provided both for the prompt
-This endpoint returns text embeddings. An embedding is a list of floating point numbers that captures semantic information about the text that it represents. +This endpoint returns text and image embeddings. An embedding is a list of floating point numbers that captures semantic information about the content that it represents. -Embeddings can be used to create text classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page. +Embeddings can be used to create classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page. If you want to learn more how to use the embedding model, have a look at the [Semantic Search Guide](/docs/semantic-search).
@@ -4015,7 +4015,7 @@ client.connectors.list()
-Creates a new connector. The connector is tested during registration and will cancel registration when the test is unsuccessful. See ['Creating and Deploying a Connector'](https://docs.cohere.com/docs/creating-and-deploying-a-connector) for more information. +Creates a new connector. The connector is tested during registration and will cancel registration when the test is unsuccessful. See ['Creating and Deploying a Connector'](https://docs.cohere.com/v1/docs/creating-and-deploying-a-connector) for more information.
diff --git a/src/cohere/__init__.py b/src/cohere/__init__.py index f5cc2e61a..bbccc3a17 100644 --- a/src/cohere/__init__.py +++ b/src/cohere/__init__.py @@ -138,6 +138,7 @@ Generation, GetConnectorResponse, GetModelResponse, + Image, JsonObjectResponseFormat, JsonObjectResponseFormatV2, JsonResponseFormat, @@ -421,6 +422,7 @@ "Generation", "GetConnectorResponse", "GetModelResponse", + "Image", "InternalServerError", "JsonObjectResponseFormat", "JsonObjectResponseFormatV2", diff --git a/src/cohere/base_client.py b/src/cohere/base_client.py index 24039b71c..f23a777a4 100644 --- a/src/cohere/base_client.py +++ b/src/cohere/base_client.py @@ -250,7 +250,7 @@ def chat_stream( connectors : typing.Optional[typing.Sequence[ChatConnector]] - Accepts `{"id": "web-search"}`, and/or the `"id"` for a custom [connector](https://docs.cohere.com/docs/connectors), if you've [created](https://docs.cohere.com/docs/creating-and-deploying-a-connector) one. + Accepts `{"id": "web-search"}`, and/or the `"id"` for a custom [connector](https://docs.cohere.com/docs/connectors), if you've [created](https://docs.cohere.com/v1/docs/creating-and-deploying-a-connector) one. When specified, the model's reply will be enriched with information found by querying each of the connectors (RAG). @@ -801,7 +801,7 @@ def chat( connectors : typing.Optional[typing.Sequence[ChatConnector]] - Accepts `{"id": "web-search"}`, and/or the `"id"` for a custom [connector](https://docs.cohere.com/docs/connectors), if you've [created](https://docs.cohere.com/docs/creating-and-deploying-a-connector) one. + Accepts `{"id": "web-search"}`, and/or the `"id"` for a custom [connector](https://docs.cohere.com/docs/connectors), if you've [created](https://docs.cohere.com/v1/docs/creating-and-deploying-a-connector) one. When specified, the model's reply will be enriched with information found by querying each of the connectors (RAG). @@ -1777,9 +1777,9 @@ def embed( request_options: typing.Optional[RequestOptions] = None, ) -> EmbedResponse: """ - This endpoint returns text embeddings. An embedding is a list of floating point numbers that captures semantic information about the text that it represents. + This endpoint returns text and image embeddings. An embedding is a list of floating point numbers that captures semantic information about the content that it represents. - Embeddings can be used to create text classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page. + Embeddings can be used to create classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page. If you want to learn more how to use the embedding model, have a look at the [Semantic Search Guide](/docs/semantic-search). @@ -3245,7 +3245,7 @@ async def chat_stream( connectors : typing.Optional[typing.Sequence[ChatConnector]] - Accepts `{"id": "web-search"}`, and/or the `"id"` for a custom [connector](https://docs.cohere.com/docs/connectors), if you've [created](https://docs.cohere.com/docs/creating-and-deploying-a-connector) one. + Accepts `{"id": "web-search"}`, and/or the `"id"` for a custom [connector](https://docs.cohere.com/docs/connectors), if you've [created](https://docs.cohere.com/v1/docs/creating-and-deploying-a-connector) one. When specified, the model's reply will be enriched with information found by querying each of the connectors (RAG). @@ -3804,7 +3804,7 @@ async def chat( connectors : typing.Optional[typing.Sequence[ChatConnector]] - Accepts `{"id": "web-search"}`, and/or the `"id"` for a custom [connector](https://docs.cohere.com/docs/connectors), if you've [created](https://docs.cohere.com/docs/creating-and-deploying-a-connector) one. + Accepts `{"id": "web-search"}`, and/or the `"id"` for a custom [connector](https://docs.cohere.com/docs/connectors), if you've [created](https://docs.cohere.com/v1/docs/creating-and-deploying-a-connector) one. When specified, the model's reply will be enriched with information found by querying each of the connectors (RAG). @@ -4804,9 +4804,9 @@ async def embed( request_options: typing.Optional[RequestOptions] = None, ) -> EmbedResponse: """ - This endpoint returns text embeddings. An embedding is a list of floating point numbers that captures semantic information about the text that it represents. + This endpoint returns text and image embeddings. An embedding is a list of floating point numbers that captures semantic information about the content that it represents. - Embeddings can be used to create text classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page. + Embeddings can be used to create classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page. If you want to learn more how to use the embedding model, have a look at the [Semantic Search Guide](/docs/semantic-search). diff --git a/src/cohere/connectors/client.py b/src/cohere/connectors/client.py index 0b29de18e..f829aefb5 100644 --- a/src/cohere/connectors/client.py +++ b/src/cohere/connectors/client.py @@ -225,7 +225,7 @@ def create( request_options: typing.Optional[RequestOptions] = None, ) -> CreateConnectorResponse: """ - Creates a new connector. The connector is tested during registration and will cancel registration when the test is unsuccessful. See ['Creating and Deploying a Connector'](https://docs.cohere.com/docs/creating-and-deploying-a-connector) for more information. + Creates a new connector. The connector is tested during registration and will cancel registration when the test is unsuccessful. See ['Creating and Deploying a Connector'](https://docs.cohere.com/v1/docs/creating-and-deploying-a-connector) for more information. Parameters ---------- @@ -1303,7 +1303,7 @@ async def create( request_options: typing.Optional[RequestOptions] = None, ) -> CreateConnectorResponse: """ - Creates a new connector. The connector is tested during registration and will cancel registration when the test is unsuccessful. See ['Creating and Deploying a Connector'](https://docs.cohere.com/docs/creating-and-deploying-a-connector) for more information. + Creates a new connector. The connector is tested during registration and will cancel registration when the test is unsuccessful. See ['Creating and Deploying a Connector'](https://docs.cohere.com/v1/docs/creating-and-deploying-a-connector) for more information. Parameters ---------- diff --git a/src/cohere/core/client_wrapper.py b/src/cohere/core/client_wrapper.py index 91fb65307..06b6665a7 100644 --- a/src/cohere/core/client_wrapper.py +++ b/src/cohere/core/client_wrapper.py @@ -24,7 +24,7 @@ def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { "X-Fern-Language": "Python", "X-Fern-SDK-Name": "cohere", - "X-Fern-SDK-Version": "5.11.1", + "X-Fern-SDK-Version": "5.11.2", } if self._client_name is not None: headers["X-Client-Name"] = self._client_name diff --git a/src/cohere/datasets/types/datasets_create_response.py b/src/cohere/datasets/types/datasets_create_response.py index 4e8bb19e0..fe51c3f37 100644 --- a/src/cohere/datasets/types/datasets_create_response.py +++ b/src/cohere/datasets/types/datasets_create_response.py @@ -13,10 +13,9 @@ class DatasetsCreateResponse(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/datasets/types/datasets_create_response_dataset_parts_item.py b/src/cohere/datasets/types/datasets_create_response_dataset_parts_item.py index 4204e9c01..77a9bcded 100644 --- a/src/cohere/datasets/types/datasets_create_response_dataset_parts_item.py +++ b/src/cohere/datasets/types/datasets_create_response_dataset_parts_item.py @@ -28,10 +28,9 @@ class DatasetsCreateResponseDatasetPartsItem(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/datasets/types/datasets_get_response.py b/src/cohere/datasets/types/datasets_get_response.py index 9f621dea3..7fea0eeb2 100644 --- a/src/cohere/datasets/types/datasets_get_response.py +++ b/src/cohere/datasets/types/datasets_get_response.py @@ -11,10 +11,9 @@ class DatasetsGetResponse(UncheckedBaseModel): dataset: Dataset if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/datasets/types/datasets_get_usage_response.py b/src/cohere/datasets/types/datasets_get_usage_response.py index 9c0e1e161..424764d84 100644 --- a/src/cohere/datasets/types/datasets_get_usage_response.py +++ b/src/cohere/datasets/types/datasets_get_usage_response.py @@ -13,10 +13,9 @@ class DatasetsGetUsageResponse(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/datasets/types/datasets_list_response.py b/src/cohere/datasets/types/datasets_list_response.py index 506223056..81424846d 100644 --- a/src/cohere/datasets/types/datasets_list_response.py +++ b/src/cohere/datasets/types/datasets_list_response.py @@ -11,10 +11,9 @@ class DatasetsListResponse(UncheckedBaseModel): datasets: typing.Optional[typing.List[Dataset]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/finetuning/finetuning/types/base_model.py b/src/cohere/finetuning/finetuning/types/base_model.py index fc993edb6..44ad982b4 100644 --- a/src/cohere/finetuning/finetuning/types/base_model.py +++ b/src/cohere/finetuning/finetuning/types/base_model.py @@ -34,10 +34,9 @@ class BaseModel(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/finetuning/finetuning/types/create_finetuned_model_response.py b/src/cohere/finetuning/finetuning/types/create_finetuned_model_response.py index 7dd49fa29..7408c72a3 100644 --- a/src/cohere/finetuning/finetuning/types/create_finetuned_model_response.py +++ b/src/cohere/finetuning/finetuning/types/create_finetuned_model_response.py @@ -18,10 +18,9 @@ class CreateFinetunedModelResponse(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/finetuning/finetuning/types/event.py b/src/cohere/finetuning/finetuning/types/event.py index f7f1f93b0..9aacd0d68 100644 --- a/src/cohere/finetuning/finetuning/types/event.py +++ b/src/cohere/finetuning/finetuning/types/event.py @@ -29,10 +29,9 @@ class Event(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/finetuning/finetuning/types/finetuned_model.py b/src/cohere/finetuning/finetuning/types/finetuned_model.py index d554af2d2..861c2c2fd 100644 --- a/src/cohere/finetuning/finetuning/types/finetuned_model.py +++ b/src/cohere/finetuning/finetuning/types/finetuned_model.py @@ -65,10 +65,9 @@ class FinetunedModel(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/finetuning/finetuning/types/get_finetuned_model_response.py b/src/cohere/finetuning/finetuning/types/get_finetuned_model_response.py index 1b06b0ed4..a91428728 100644 --- a/src/cohere/finetuning/finetuning/types/get_finetuned_model_response.py +++ b/src/cohere/finetuning/finetuning/types/get_finetuned_model_response.py @@ -18,10 +18,9 @@ class GetFinetunedModelResponse(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/finetuning/finetuning/types/hyperparameters.py b/src/cohere/finetuning/finetuning/types/hyperparameters.py index 2185f4c20..316fdc65c 100644 --- a/src/cohere/finetuning/finetuning/types/hyperparameters.py +++ b/src/cohere/finetuning/finetuning/types/hyperparameters.py @@ -57,10 +57,9 @@ class Hyperparameters(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/finetuning/finetuning/types/list_events_response.py b/src/cohere/finetuning/finetuning/types/list_events_response.py index 9439c2efe..522747ca2 100644 --- a/src/cohere/finetuning/finetuning/types/list_events_response.py +++ b/src/cohere/finetuning/finetuning/types/list_events_response.py @@ -29,10 +29,9 @@ class ListEventsResponse(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/finetuning/finetuning/types/list_finetuned_models_response.py b/src/cohere/finetuning/finetuning/types/list_finetuned_models_response.py index 36353317e..b79eec1cd 100644 --- a/src/cohere/finetuning/finetuning/types/list_finetuned_models_response.py +++ b/src/cohere/finetuning/finetuning/types/list_finetuned_models_response.py @@ -29,10 +29,9 @@ class ListFinetunedModelsResponse(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/finetuning/finetuning/types/list_training_step_metrics_response.py b/src/cohere/finetuning/finetuning/types/list_training_step_metrics_response.py index cc465ab02..9cec7460a 100644 --- a/src/cohere/finetuning/finetuning/types/list_training_step_metrics_response.py +++ b/src/cohere/finetuning/finetuning/types/list_training_step_metrics_response.py @@ -24,10 +24,9 @@ class ListTrainingStepMetricsResponse(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/finetuning/finetuning/types/settings.py b/src/cohere/finetuning/finetuning/types/settings.py index 9f1238bdb..f0a40e3d5 100644 --- a/src/cohere/finetuning/finetuning/types/settings.py +++ b/src/cohere/finetuning/finetuning/types/settings.py @@ -40,10 +40,9 @@ class Settings(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/finetuning/finetuning/types/training_step_metrics.py b/src/cohere/finetuning/finetuning/types/training_step_metrics.py index 18d323501..742f17c24 100644 --- a/src/cohere/finetuning/finetuning/types/training_step_metrics.py +++ b/src/cohere/finetuning/finetuning/types/training_step_metrics.py @@ -28,10 +28,9 @@ class TrainingStepMetrics(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/finetuning/finetuning/types/update_finetuned_model_response.py b/src/cohere/finetuning/finetuning/types/update_finetuned_model_response.py index 4bf0c4894..fd203d6b2 100644 --- a/src/cohere/finetuning/finetuning/types/update_finetuned_model_response.py +++ b/src/cohere/finetuning/finetuning/types/update_finetuned_model_response.py @@ -18,10 +18,9 @@ class UpdateFinetunedModelResponse(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/finetuning/finetuning/types/wandb_config.py b/src/cohere/finetuning/finetuning/types/wandb_config.py index 8c77de27b..3a299ae90 100644 --- a/src/cohere/finetuning/finetuning/types/wandb_config.py +++ b/src/cohere/finetuning/finetuning/types/wandb_config.py @@ -27,10 +27,9 @@ class WandbConfig(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/__init__.py b/src/cohere/types/__init__.py index 4f000ecf9..feccf79b6 100644 --- a/src/cohere/types/__init__.py +++ b/src/cohere/types/__init__.py @@ -141,6 +141,7 @@ from .generation import Generation from .get_connector_response import GetConnectorResponse from .get_model_response import GetModelResponse +from .image import Image from .json_response_format import JsonResponseFormat from .json_response_format_v2 import JsonResponseFormatV2 from .label_metric import LabelMetric @@ -357,6 +358,7 @@ "Generation", "GetConnectorResponse", "GetModelResponse", + "Image", "JsonObjectResponseFormat", "JsonObjectResponseFormatV2", "JsonResponseFormat", diff --git a/src/cohere/types/api_meta.py b/src/cohere/types/api_meta.py index 3aee6abb4..469f6c7a1 100644 --- a/src/cohere/types/api_meta.py +++ b/src/cohere/types/api_meta.py @@ -16,10 +16,9 @@ class ApiMeta(UncheckedBaseModel): warnings: typing.Optional[typing.List[str]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/api_meta_api_version.py b/src/cohere/types/api_meta_api_version.py index 1035b81cb..03436dfd7 100644 --- a/src/cohere/types/api_meta_api_version.py +++ b/src/cohere/types/api_meta_api_version.py @@ -12,10 +12,9 @@ class ApiMetaApiVersion(UncheckedBaseModel): is_experimental: typing.Optional[bool] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/api_meta_billed_units.py b/src/cohere/types/api_meta_billed_units.py index c4c934d35..3a592cbce 100644 --- a/src/cohere/types/api_meta_billed_units.py +++ b/src/cohere/types/api_meta_billed_units.py @@ -7,6 +7,11 @@ class ApiMetaBilledUnits(UncheckedBaseModel): + images: typing.Optional[float] = pydantic.Field(default=None) + """ + The number of billed images. + """ + input_tokens: typing.Optional[float] = pydantic.Field(default=None) """ The number of billed input tokens. @@ -28,10 +33,9 @@ class ApiMetaBilledUnits(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/api_meta_tokens.py b/src/cohere/types/api_meta_tokens.py index c71a8f9be..3b86de213 100644 --- a/src/cohere/types/api_meta_tokens.py +++ b/src/cohere/types/api_meta_tokens.py @@ -18,10 +18,9 @@ class ApiMetaTokens(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/assistant_message.py b/src/cohere/types/assistant_message.py index c870095f3..78e60717b 100644 --- a/src/cohere/types/assistant_message.py +++ b/src/cohere/types/assistant_message.py @@ -24,10 +24,9 @@ class AssistantMessage(UncheckedBaseModel): citations: typing.Optional[typing.List[Citation]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/assistant_message_content_item.py b/src/cohere/types/assistant_message_content_item.py index eeb64cf4a..81c8e5440 100644 --- a/src/cohere/types/assistant_message_content_item.py +++ b/src/cohere/types/assistant_message_content_item.py @@ -14,11 +14,10 @@ class TextAssistantMessageContentItem(UncheckedBaseModel): text: str if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/assistant_message_response.py b/src/cohere/types/assistant_message_response.py index dace43c2e..e7adc8d78 100644 --- a/src/cohere/types/assistant_message_response.py +++ b/src/cohere/types/assistant_message_response.py @@ -25,10 +25,9 @@ class AssistantMessageResponse(UncheckedBaseModel): citations: typing.Optional[typing.List[Citation]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/assistant_message_response_content_item.py b/src/cohere/types/assistant_message_response_content_item.py index 6b5686530..65d347b8a 100644 --- a/src/cohere/types/assistant_message_response_content_item.py +++ b/src/cohere/types/assistant_message_response_content_item.py @@ -14,11 +14,10 @@ class TextAssistantMessageResponseContentItem(UncheckedBaseModel): text: str if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_citation.py b/src/cohere/types/chat_citation.py index 07f82a05d..63db3f699 100644 --- a/src/cohere/types/chat_citation.py +++ b/src/cohere/types/chat_citation.py @@ -32,10 +32,9 @@ class ChatCitation(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_citation_generation_event.py b/src/cohere/types/chat_citation_generation_event.py index 36cd620bc..fc0785f94 100644 --- a/src/cohere/types/chat_citation_generation_event.py +++ b/src/cohere/types/chat_citation_generation_event.py @@ -14,10 +14,9 @@ class ChatCitationGenerationEvent(ChatStreamEvent): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_connector.py b/src/cohere/types/chat_connector.py index 65e574740..db58db63f 100644 --- a/src/cohere/types/chat_connector.py +++ b/src/cohere/types/chat_connector.py @@ -36,10 +36,9 @@ class ChatConnector(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_content_delta_event.py b/src/cohere/types/chat_content_delta_event.py index 95cea88ed..6954ebea9 100644 --- a/src/cohere/types/chat_content_delta_event.py +++ b/src/cohere/types/chat_content_delta_event.py @@ -16,10 +16,9 @@ class ChatContentDeltaEvent(ChatStreamEventType): delta: typing.Optional[ChatContentDeltaEventDelta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_content_delta_event_delta.py b/src/cohere/types/chat_content_delta_event_delta.py index b2245aeaf..7eb6e1e68 100644 --- a/src/cohere/types/chat_content_delta_event_delta.py +++ b/src/cohere/types/chat_content_delta_event_delta.py @@ -11,10 +11,9 @@ class ChatContentDeltaEventDelta(UncheckedBaseModel): message: typing.Optional[ChatContentDeltaEventDeltaMessage] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_content_delta_event_delta_message.py b/src/cohere/types/chat_content_delta_event_delta_message.py index 107837e57..83dbdd368 100644 --- a/src/cohere/types/chat_content_delta_event_delta_message.py +++ b/src/cohere/types/chat_content_delta_event_delta_message.py @@ -11,10 +11,9 @@ class ChatContentDeltaEventDeltaMessage(UncheckedBaseModel): content: typing.Optional[ChatContentDeltaEventDeltaMessageContent] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_content_delta_event_delta_message_content.py b/src/cohere/types/chat_content_delta_event_delta_message_content.py index 78470d40e..e33bfaa1d 100644 --- a/src/cohere/types/chat_content_delta_event_delta_message_content.py +++ b/src/cohere/types/chat_content_delta_event_delta_message_content.py @@ -10,10 +10,9 @@ class ChatContentDeltaEventDeltaMessageContent(UncheckedBaseModel): text: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_content_end_event.py b/src/cohere/types/chat_content_end_event.py index 9c7833b58..4376d4fda 100644 --- a/src/cohere/types/chat_content_end_event.py +++ b/src/cohere/types/chat_content_end_event.py @@ -14,10 +14,9 @@ class ChatContentEndEvent(ChatStreamEventType): index: typing.Optional[int] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_content_start_event.py b/src/cohere/types/chat_content_start_event.py index 3140073f9..d0130d13b 100644 --- a/src/cohere/types/chat_content_start_event.py +++ b/src/cohere/types/chat_content_start_event.py @@ -16,10 +16,9 @@ class ChatContentStartEvent(ChatStreamEventType): delta: typing.Optional[ChatContentStartEventDelta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_content_start_event_delta.py b/src/cohere/types/chat_content_start_event_delta.py index fd0172193..4cf4369b7 100644 --- a/src/cohere/types/chat_content_start_event_delta.py +++ b/src/cohere/types/chat_content_start_event_delta.py @@ -11,10 +11,9 @@ class ChatContentStartEventDelta(UncheckedBaseModel): message: typing.Optional[ChatContentStartEventDeltaMessage] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_content_start_event_delta_message.py b/src/cohere/types/chat_content_start_event_delta_message.py index 8b7e0d6b5..87f1a4786 100644 --- a/src/cohere/types/chat_content_start_event_delta_message.py +++ b/src/cohere/types/chat_content_start_event_delta_message.py @@ -11,10 +11,9 @@ class ChatContentStartEventDeltaMessage(UncheckedBaseModel): content: typing.Optional[ChatContentStartEventDeltaMessageContent] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_content_start_event_delta_message_content.py b/src/cohere/types/chat_content_start_event_delta_message_content.py index 945e549cf..d75af379c 100644 --- a/src/cohere/types/chat_content_start_event_delta_message_content.py +++ b/src/cohere/types/chat_content_start_event_delta_message_content.py @@ -11,10 +11,9 @@ class ChatContentStartEventDeltaMessageContent(UncheckedBaseModel): type: typing.Optional[typing.Literal["text"]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_data_metrics.py b/src/cohere/types/chat_data_metrics.py index fba215409..7dc5785aa 100644 --- a/src/cohere/types/chat_data_metrics.py +++ b/src/cohere/types/chat_data_metrics.py @@ -23,10 +23,9 @@ class ChatDataMetrics(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_message.py b/src/cohere/types/chat_message.py index 7a24cd541..483387027 100644 --- a/src/cohere/types/chat_message.py +++ b/src/cohere/types/chat_message.py @@ -22,10 +22,9 @@ class ChatMessage(UncheckedBaseModel): tool_calls: typing.Optional[typing.List[ToolCall]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_message_end_event.py b/src/cohere/types/chat_message_end_event.py index 3f518a77c..c5cf4e33d 100644 --- a/src/cohere/types/chat_message_end_event.py +++ b/src/cohere/types/chat_message_end_event.py @@ -16,10 +16,9 @@ class ChatMessageEndEvent(ChatStreamEventType): delta: typing.Optional[ChatMessageEndEventDelta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_message_end_event_delta.py b/src/cohere/types/chat_message_end_event_delta.py index 2b5808254..c325785f4 100644 --- a/src/cohere/types/chat_message_end_event_delta.py +++ b/src/cohere/types/chat_message_end_event_delta.py @@ -13,10 +13,9 @@ class ChatMessageEndEventDelta(UncheckedBaseModel): usage: typing.Optional[Usage] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_message_start_event.py b/src/cohere/types/chat_message_start_event.py index c345d1bcd..a6886d565 100644 --- a/src/cohere/types/chat_message_start_event.py +++ b/src/cohere/types/chat_message_start_event.py @@ -20,10 +20,9 @@ class ChatMessageStartEvent(ChatStreamEventType): delta: typing.Optional[ChatMessageStartEventDelta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_message_start_event_delta.py b/src/cohere/types/chat_message_start_event_delta.py index e8a98939d..55af9d948 100644 --- a/src/cohere/types/chat_message_start_event_delta.py +++ b/src/cohere/types/chat_message_start_event_delta.py @@ -11,10 +11,9 @@ class ChatMessageStartEventDelta(UncheckedBaseModel): message: typing.Optional[ChatMessageStartEventDeltaMessage] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_message_start_event_delta_message.py b/src/cohere/types/chat_message_start_event_delta_message.py index b384fd59d..bd36fef29 100644 --- a/src/cohere/types/chat_message_start_event_delta_message.py +++ b/src/cohere/types/chat_message_start_event_delta_message.py @@ -13,10 +13,9 @@ class ChatMessageStartEventDeltaMessage(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_message_v2.py b/src/cohere/types/chat_message_v2.py index c1fa529c4..95a0f1777 100644 --- a/src/cohere/types/chat_message_v2.py +++ b/src/cohere/types/chat_message_v2.py @@ -24,11 +24,10 @@ class UserChatMessageV2(UncheckedBaseModel): content: UserMessageContent if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -45,11 +44,10 @@ class AssistantChatMessageV2(UncheckedBaseModel): citations: typing.Optional[typing.List[Citation]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -63,11 +61,10 @@ class SystemChatMessageV2(UncheckedBaseModel): content: SystemMessageContent if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -82,11 +79,10 @@ class ToolChatMessageV2(UncheckedBaseModel): content: ToolMessageV2Content if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_request_connectors_search_options.py b/src/cohere/types/chat_request_connectors_search_options.py index 2b86c7d29..e22dd7a30 100644 --- a/src/cohere/types/chat_request_connectors_search_options.py +++ b/src/cohere/types/chat_request_connectors_search_options.py @@ -22,10 +22,9 @@ class ChatRequestConnectorsSearchOptions(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_response.py b/src/cohere/types/chat_response.py index 738f56540..ca40f48a4 100644 --- a/src/cohere/types/chat_response.py +++ b/src/cohere/types/chat_response.py @@ -25,10 +25,9 @@ class ChatResponse(UncheckedBaseModel): usage: typing.Optional[Usage] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_search_queries_generation_event.py b/src/cohere/types/chat_search_queries_generation_event.py index eb0d6237d..d34d95151 100644 --- a/src/cohere/types/chat_search_queries_generation_event.py +++ b/src/cohere/types/chat_search_queries_generation_event.py @@ -14,10 +14,9 @@ class ChatSearchQueriesGenerationEvent(ChatStreamEvent): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_search_query.py b/src/cohere/types/chat_search_query.py index f0695a93f..d2318d9a9 100644 --- a/src/cohere/types/chat_search_query.py +++ b/src/cohere/types/chat_search_query.py @@ -22,10 +22,9 @@ class ChatSearchQuery(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_search_result.py b/src/cohere/types/chat_search_result.py index 14ab32f58..4cd9f307d 100644 --- a/src/cohere/types/chat_search_result.py +++ b/src/cohere/types/chat_search_result.py @@ -31,10 +31,9 @@ class ChatSearchResult(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_search_result_connector.py b/src/cohere/types/chat_search_result_connector.py index 22cab6a56..28f9fb534 100644 --- a/src/cohere/types/chat_search_result_connector.py +++ b/src/cohere/types/chat_search_result_connector.py @@ -17,10 +17,9 @@ class ChatSearchResultConnector(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_search_results_event.py b/src/cohere/types/chat_search_results_event.py index 85948ba85..364554505 100644 --- a/src/cohere/types/chat_search_results_event.py +++ b/src/cohere/types/chat_search_results_event.py @@ -20,10 +20,9 @@ class ChatSearchResultsEvent(ChatStreamEvent): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_stream_end_event.py b/src/cohere/types/chat_stream_end_event.py index d42e34550..582a09304 100644 --- a/src/cohere/types/chat_stream_end_event.py +++ b/src/cohere/types/chat_stream_end_event.py @@ -24,10 +24,9 @@ class ChatStreamEndEvent(ChatStreamEvent): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_stream_event.py b/src/cohere/types/chat_stream_event.py index 5c21ba71f..36fbab6c5 100644 --- a/src/cohere/types/chat_stream_event.py +++ b/src/cohere/types/chat_stream_event.py @@ -8,10 +8,9 @@ class ChatStreamEvent(UncheckedBaseModel): if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_stream_event_type.py b/src/cohere/types/chat_stream_event_type.py index 70d25a015..bfa4c228f 100644 --- a/src/cohere/types/chat_stream_event_type.py +++ b/src/cohere/types/chat_stream_event_type.py @@ -12,10 +12,9 @@ class ChatStreamEventType(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_stream_request_connectors_search_options.py b/src/cohere/types/chat_stream_request_connectors_search_options.py index 49ea7624f..ad7d8e3ce 100644 --- a/src/cohere/types/chat_stream_request_connectors_search_options.py +++ b/src/cohere/types/chat_stream_request_connectors_search_options.py @@ -22,10 +22,9 @@ class ChatStreamRequestConnectorsSearchOptions(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_stream_start_event.py b/src/cohere/types/chat_stream_start_event.py index e255ad1f0..dc6dafcd4 100644 --- a/src/cohere/types/chat_stream_start_event.py +++ b/src/cohere/types/chat_stream_start_event.py @@ -13,10 +13,9 @@ class ChatStreamStartEvent(ChatStreamEvent): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_text_generation_event.py b/src/cohere/types/chat_text_generation_event.py index c7c6ae88f..40c57b362 100644 --- a/src/cohere/types/chat_text_generation_event.py +++ b/src/cohere/types/chat_text_generation_event.py @@ -13,10 +13,9 @@ class ChatTextGenerationEvent(ChatStreamEvent): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_tool_call_delta_event.py b/src/cohere/types/chat_tool_call_delta_event.py index a287d9312..f4fbdc6b0 100644 --- a/src/cohere/types/chat_tool_call_delta_event.py +++ b/src/cohere/types/chat_tool_call_delta_event.py @@ -16,10 +16,9 @@ class ChatToolCallDeltaEvent(ChatStreamEventType): delta: typing.Optional[ChatToolCallDeltaEventDelta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_tool_call_delta_event_delta.py b/src/cohere/types/chat_tool_call_delta_event_delta.py index 815773dbb..b89f45c03 100644 --- a/src/cohere/types/chat_tool_call_delta_event_delta.py +++ b/src/cohere/types/chat_tool_call_delta_event_delta.py @@ -11,10 +11,9 @@ class ChatToolCallDeltaEventDelta(UncheckedBaseModel): tool_call: typing.Optional[ChatToolCallDeltaEventDeltaToolCall] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_tool_call_delta_event_delta_tool_call.py b/src/cohere/types/chat_tool_call_delta_event_delta_tool_call.py index 2d0f8f877..707b84376 100644 --- a/src/cohere/types/chat_tool_call_delta_event_delta_tool_call.py +++ b/src/cohere/types/chat_tool_call_delta_event_delta_tool_call.py @@ -11,10 +11,9 @@ class ChatToolCallDeltaEventDeltaToolCall(UncheckedBaseModel): function: typing.Optional[ChatToolCallDeltaEventDeltaToolCallFunction] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_tool_call_delta_event_delta_tool_call_function.py b/src/cohere/types/chat_tool_call_delta_event_delta_tool_call_function.py index 27dd7d575..8cfa9a362 100644 --- a/src/cohere/types/chat_tool_call_delta_event_delta_tool_call_function.py +++ b/src/cohere/types/chat_tool_call_delta_event_delta_tool_call_function.py @@ -10,10 +10,9 @@ class ChatToolCallDeltaEventDeltaToolCallFunction(UncheckedBaseModel): arguments: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_tool_call_end_event.py b/src/cohere/types/chat_tool_call_end_event.py index 788ef04f7..8dd292c39 100644 --- a/src/cohere/types/chat_tool_call_end_event.py +++ b/src/cohere/types/chat_tool_call_end_event.py @@ -14,10 +14,9 @@ class ChatToolCallEndEvent(ChatStreamEventType): index: typing.Optional[int] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_tool_call_start_event.py b/src/cohere/types/chat_tool_call_start_event.py index 2ad477ef7..2a0d1fab3 100644 --- a/src/cohere/types/chat_tool_call_start_event.py +++ b/src/cohere/types/chat_tool_call_start_event.py @@ -16,10 +16,9 @@ class ChatToolCallStartEvent(ChatStreamEventType): delta: typing.Optional[ChatToolCallStartEventDelta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_tool_call_start_event_delta.py b/src/cohere/types/chat_tool_call_start_event_delta.py index 101cba4ad..be690316a 100644 --- a/src/cohere/types/chat_tool_call_start_event_delta.py +++ b/src/cohere/types/chat_tool_call_start_event_delta.py @@ -11,10 +11,9 @@ class ChatToolCallStartEventDelta(UncheckedBaseModel): tool_call: typing.Optional[ChatToolCallStartEventDeltaToolCall] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_tool_call_start_event_delta_tool_call.py b/src/cohere/types/chat_tool_call_start_event_delta_tool_call.py index e8724bc3c..9910cd8c8 100644 --- a/src/cohere/types/chat_tool_call_start_event_delta_tool_call.py +++ b/src/cohere/types/chat_tool_call_start_event_delta_tool_call.py @@ -13,10 +13,9 @@ class ChatToolCallStartEventDeltaToolCall(UncheckedBaseModel): function: typing.Optional[ChatToolCallStartEventDeltaToolCallFunction] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_tool_call_start_event_delta_tool_call_function.py b/src/cohere/types/chat_tool_call_start_event_delta_tool_call_function.py index f7dcfcc8b..471ffe472 100644 --- a/src/cohere/types/chat_tool_call_start_event_delta_tool_call_function.py +++ b/src/cohere/types/chat_tool_call_start_event_delta_tool_call_function.py @@ -11,10 +11,9 @@ class ChatToolCallStartEventDeltaToolCallFunction(UncheckedBaseModel): arguments: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_tool_calls_chunk_event.py b/src/cohere/types/chat_tool_calls_chunk_event.py index dd7f9cfa8..f56584a76 100644 --- a/src/cohere/types/chat_tool_calls_chunk_event.py +++ b/src/cohere/types/chat_tool_calls_chunk_event.py @@ -12,10 +12,9 @@ class ChatToolCallsChunkEvent(ChatStreamEvent): text: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_tool_calls_generation_event.py b/src/cohere/types/chat_tool_calls_generation_event.py index f13810618..5c4c0e005 100644 --- a/src/cohere/types/chat_tool_calls_generation_event.py +++ b/src/cohere/types/chat_tool_calls_generation_event.py @@ -16,10 +16,9 @@ class ChatToolCallsGenerationEvent(ChatStreamEvent): tool_calls: typing.List[ToolCall] if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_tool_plan_delta_event.py b/src/cohere/types/chat_tool_plan_delta_event.py index f2286a99c..d657cf86c 100644 --- a/src/cohere/types/chat_tool_plan_delta_event.py +++ b/src/cohere/types/chat_tool_plan_delta_event.py @@ -15,10 +15,9 @@ class ChatToolPlanDeltaEvent(ChatStreamEventType): delta: typing.Optional[ChatToolPlanDeltaEventDelta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/chat_tool_plan_delta_event_delta.py b/src/cohere/types/chat_tool_plan_delta_event_delta.py index 6dacb1dce..5a1b9277c 100644 --- a/src/cohere/types/chat_tool_plan_delta_event_delta.py +++ b/src/cohere/types/chat_tool_plan_delta_event_delta.py @@ -10,10 +10,9 @@ class ChatToolPlanDeltaEventDelta(UncheckedBaseModel): tool_plan: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/check_api_key_response.py b/src/cohere/types/check_api_key_response.py index f838acff5..dae567694 100644 --- a/src/cohere/types/check_api_key_response.py +++ b/src/cohere/types/check_api_key_response.py @@ -12,10 +12,9 @@ class CheckApiKeyResponse(UncheckedBaseModel): owner_id: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/citation.py b/src/cohere/types/citation.py index adacdb1e7..6b935c35e 100644 --- a/src/cohere/types/citation.py +++ b/src/cohere/types/citation.py @@ -30,10 +30,9 @@ class Citation(UncheckedBaseModel): sources: typing.Optional[typing.List[Source]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/citation_end_event.py b/src/cohere/types/citation_end_event.py index b0a3853ce..55ce022b7 100644 --- a/src/cohere/types/citation_end_event.py +++ b/src/cohere/types/citation_end_event.py @@ -14,10 +14,9 @@ class CitationEndEvent(ChatStreamEventType): index: typing.Optional[int] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/citation_options.py b/src/cohere/types/citation_options.py index d03992be8..74cc3413a 100644 --- a/src/cohere/types/citation_options.py +++ b/src/cohere/types/citation_options.py @@ -19,10 +19,9 @@ class CitationOptions(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/citation_start_event.py b/src/cohere/types/citation_start_event.py index 355281d9a..5518f761f 100644 --- a/src/cohere/types/citation_start_event.py +++ b/src/cohere/types/citation_start_event.py @@ -16,10 +16,9 @@ class CitationStartEvent(ChatStreamEventType): delta: typing.Optional[CitationStartEventDelta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/citation_start_event_delta.py b/src/cohere/types/citation_start_event_delta.py index f114b5159..6961fecef 100644 --- a/src/cohere/types/citation_start_event_delta.py +++ b/src/cohere/types/citation_start_event_delta.py @@ -11,10 +11,9 @@ class CitationStartEventDelta(UncheckedBaseModel): message: typing.Optional[CitationStartEventDeltaMessage] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/citation_start_event_delta_message.py b/src/cohere/types/citation_start_event_delta_message.py index cfddfdda1..8c3d7dac5 100644 --- a/src/cohere/types/citation_start_event_delta_message.py +++ b/src/cohere/types/citation_start_event_delta_message.py @@ -11,10 +11,9 @@ class CitationStartEventDeltaMessage(UncheckedBaseModel): citations: typing.Optional[Citation] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/classify_data_metrics.py b/src/cohere/types/classify_data_metrics.py index 7f045655e..447f2b40f 100644 --- a/src/cohere/types/classify_data_metrics.py +++ b/src/cohere/types/classify_data_metrics.py @@ -11,10 +11,9 @@ class ClassifyDataMetrics(UncheckedBaseModel): label_metrics: typing.Optional[typing.List[LabelMetric]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/classify_example.py b/src/cohere/types/classify_example.py index 3132af4b5..cbe48206b 100644 --- a/src/cohere/types/classify_example.py +++ b/src/cohere/types/classify_example.py @@ -11,10 +11,9 @@ class ClassifyExample(UncheckedBaseModel): label: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/classify_response.py b/src/cohere/types/classify_response.py index 1d2460d29..a73d71c7d 100644 --- a/src/cohere/types/classify_response.py +++ b/src/cohere/types/classify_response.py @@ -14,10 +14,9 @@ class ClassifyResponse(UncheckedBaseModel): meta: typing.Optional[ApiMeta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/classify_response_classifications_item.py b/src/cohere/types/classify_response_classifications_item.py index 95d226684..55c01f06d 100644 --- a/src/cohere/types/classify_response_classifications_item.py +++ b/src/cohere/types/classify_response_classifications_item.py @@ -48,10 +48,9 @@ class ClassifyResponseClassificationsItem(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/classify_response_classifications_item_labels_value.py b/src/cohere/types/classify_response_classifications_item_labels_value.py index f88f8e19c..cf23ba24a 100644 --- a/src/cohere/types/classify_response_classifications_item_labels_value.py +++ b/src/cohere/types/classify_response_classifications_item_labels_value.py @@ -10,10 +10,9 @@ class ClassifyResponseClassificationsItemLabelsValue(UncheckedBaseModel): confidence: typing.Optional[float] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/client_closed_request_error_body.py b/src/cohere/types/client_closed_request_error_body.py index ad4bd2c0e..d8a8bbf2e 100644 --- a/src/cohere/types/client_closed_request_error_body.py +++ b/src/cohere/types/client_closed_request_error_body.py @@ -10,10 +10,9 @@ class ClientClosedRequestErrorBody(UncheckedBaseModel): data: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/connector.py b/src/cohere/types/connector.py index 77ae89c80..21ec8b938 100644 --- a/src/cohere/types/connector.py +++ b/src/cohere/types/connector.py @@ -83,10 +83,9 @@ class Connector(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/connector_o_auth.py b/src/cohere/types/connector_o_auth.py index bbb090875..c47b9de66 100644 --- a/src/cohere/types/connector_o_auth.py +++ b/src/cohere/types/connector_o_auth.py @@ -33,10 +33,9 @@ class ConnectorOAuth(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/content.py b/src/cohere/types/content.py index 3b2ded0f4..c01563e47 100644 --- a/src/cohere/types/content.py +++ b/src/cohere/types/content.py @@ -18,11 +18,10 @@ class TextContent(UncheckedBaseModel): text: str if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/create_connector_o_auth.py b/src/cohere/types/create_connector_o_auth.py index 6ff0e7b35..2066befcb 100644 --- a/src/cohere/types/create_connector_o_auth.py +++ b/src/cohere/types/create_connector_o_auth.py @@ -33,10 +33,9 @@ class CreateConnectorOAuth(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/create_connector_response.py b/src/cohere/types/create_connector_response.py index b26aed526..537b411e8 100644 --- a/src/cohere/types/create_connector_response.py +++ b/src/cohere/types/create_connector_response.py @@ -11,10 +11,9 @@ class CreateConnectorResponse(UncheckedBaseModel): connector: Connector if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/create_connector_service_auth.py b/src/cohere/types/create_connector_service_auth.py index faf087541..391b7145b 100644 --- a/src/cohere/types/create_connector_service_auth.py +++ b/src/cohere/types/create_connector_service_auth.py @@ -15,10 +15,9 @@ class CreateConnectorServiceAuth(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/create_embed_job_response.py b/src/cohere/types/create_embed_job_response.py index 135c64646..62f0031ba 100644 --- a/src/cohere/types/create_embed_job_response.py +++ b/src/cohere/types/create_embed_job_response.py @@ -16,10 +16,9 @@ class CreateEmbedJobResponse(UncheckedBaseModel): meta: typing.Optional[ApiMeta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/dataset.py b/src/cohere/types/dataset.py index c297f2955..4b5003a26 100644 --- a/src/cohere/types/dataset.py +++ b/src/cohere/types/dataset.py @@ -60,10 +60,9 @@ class Dataset(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/dataset_part.py b/src/cohere/types/dataset_part.py index 9f6a62fb8..742ca0a6c 100644 --- a/src/cohere/types/dataset_part.py +++ b/src/cohere/types/dataset_part.py @@ -48,10 +48,9 @@ class DatasetPart(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/detokenize_response.py b/src/cohere/types/detokenize_response.py index b72b2dc8d..027057511 100644 --- a/src/cohere/types/detokenize_response.py +++ b/src/cohere/types/detokenize_response.py @@ -16,10 +16,9 @@ class DetokenizeResponse(UncheckedBaseModel): meta: typing.Optional[ApiMeta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/document.py b/src/cohere/types/document.py index d9e46eaa7..a18e03569 100644 --- a/src/cohere/types/document.py +++ b/src/cohere/types/document.py @@ -24,10 +24,9 @@ class Document(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/document_content.py b/src/cohere/types/document_content.py index a3194d504..503786a5e 100644 --- a/src/cohere/types/document_content.py +++ b/src/cohere/types/document_content.py @@ -15,10 +15,9 @@ class DocumentContent(UncheckedBaseModel): document: Document if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/document_source.py b/src/cohere/types/document_source.py index 2402ba055..211f38e09 100644 --- a/src/cohere/types/document_source.py +++ b/src/cohere/types/document_source.py @@ -19,10 +19,9 @@ class DocumentSource(UncheckedBaseModel): document: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/embed_by_type_response.py b/src/cohere/types/embed_by_type_response.py index 04dac46c0..3dc07ae9a 100644 --- a/src/cohere/types/embed_by_type_response.py +++ b/src/cohere/types/embed_by_type_response.py @@ -4,6 +4,7 @@ from .embed_by_type_response_embeddings import EmbedByTypeResponseEmbeddings import pydantic import typing +from .image import Image from .api_meta import ApiMeta from ..core.pydantic_utilities import IS_PYDANTIC_V2 @@ -20,13 +21,17 @@ class EmbedByTypeResponse(UncheckedBaseModel): The text entries for which embeddings were returned. """ + images: typing.Optional[typing.List[Image]] = pydantic.Field(default=None) + """ + The image entries for which embeddings were returned. + """ + meta: typing.Optional[ApiMeta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/embed_by_type_response_embeddings.py b/src/cohere/types/embed_by_type_response_embeddings.py index 039c38cb1..0246ee067 100644 --- a/src/cohere/types/embed_by_type_response_embeddings.py +++ b/src/cohere/types/embed_by_type_response_embeddings.py @@ -41,10 +41,9 @@ class EmbedByTypeResponseEmbeddings(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/embed_floats_response.py b/src/cohere/types/embed_floats_response.py index d462891c8..bc40fbe1d 100644 --- a/src/cohere/types/embed_floats_response.py +++ b/src/cohere/types/embed_floats_response.py @@ -3,6 +3,7 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing import pydantic +from .image import Image from .api_meta import ApiMeta from ..core.pydantic_utilities import IS_PYDANTIC_V2 @@ -19,13 +20,17 @@ class EmbedFloatsResponse(UncheckedBaseModel): The text entries for which embeddings were returned. """ + images: typing.Optional[typing.List[Image]] = pydantic.Field(default=None) + """ + The image entries for which embeddings were returned. + """ + meta: typing.Optional[ApiMeta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/embed_job.py b/src/cohere/types/embed_job.py index f1eea4c3d..d74bb3ed8 100644 --- a/src/cohere/types/embed_job.py +++ b/src/cohere/types/embed_job.py @@ -54,10 +54,9 @@ class EmbedJob(UncheckedBaseModel): meta: typing.Optional[ApiMeta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/embed_response.py b/src/cohere/types/embed_response.py index d6e142daf..00906af9b 100644 --- a/src/cohere/types/embed_response.py +++ b/src/cohere/types/embed_response.py @@ -3,6 +3,7 @@ from __future__ import annotations from ..core.unchecked_base_model import UncheckedBaseModel import typing +from .image import Image from .api_meta import ApiMeta from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic @@ -16,14 +17,14 @@ class EmbeddingsFloatsEmbedResponse(UncheckedBaseModel): id: str embeddings: typing.List[typing.List[float]] texts: typing.List[str] + images: typing.Optional[typing.List[Image]] = None meta: typing.Optional[ApiMeta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -33,14 +34,14 @@ class EmbeddingsByTypeEmbedResponse(UncheckedBaseModel): id: str embeddings: EmbedByTypeResponseEmbeddings texts: typing.List[str] + images: typing.Optional[typing.List[Image]] = None meta: typing.Optional[ApiMeta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/finetune_dataset_metrics.py b/src/cohere/types/finetune_dataset_metrics.py index 7617091f6..c05f76114 100644 --- a/src/cohere/types/finetune_dataset_metrics.py +++ b/src/cohere/types/finetune_dataset_metrics.py @@ -38,10 +38,9 @@ class FinetuneDatasetMetrics(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/gateway_timeout_error_body.py b/src/cohere/types/gateway_timeout_error_body.py index 03c315fd9..bd5abd678 100644 --- a/src/cohere/types/gateway_timeout_error_body.py +++ b/src/cohere/types/gateway_timeout_error_body.py @@ -10,10 +10,9 @@ class GatewayTimeoutErrorBody(UncheckedBaseModel): data: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/generate_stream_end.py b/src/cohere/types/generate_stream_end.py index de4d7b082..ee02abea3 100644 --- a/src/cohere/types/generate_stream_end.py +++ b/src/cohere/types/generate_stream_end.py @@ -14,10 +14,9 @@ class GenerateStreamEnd(GenerateStreamEvent): response: GenerateStreamEndResponse if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/generate_stream_end_response.py b/src/cohere/types/generate_stream_end_response.py index ac4998548..1808c6878 100644 --- a/src/cohere/types/generate_stream_end_response.py +++ b/src/cohere/types/generate_stream_end_response.py @@ -13,10 +13,9 @@ class GenerateStreamEndResponse(UncheckedBaseModel): generations: typing.Optional[typing.List[SingleGenerationInStream]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/generate_stream_error.py b/src/cohere/types/generate_stream_error.py index 53d4b6320..43ead19c9 100644 --- a/src/cohere/types/generate_stream_error.py +++ b/src/cohere/types/generate_stream_error.py @@ -21,10 +21,9 @@ class GenerateStreamError(GenerateStreamEvent): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/generate_stream_event.py b/src/cohere/types/generate_stream_event.py index 978131b12..77cce9015 100644 --- a/src/cohere/types/generate_stream_event.py +++ b/src/cohere/types/generate_stream_event.py @@ -8,10 +8,9 @@ class GenerateStreamEvent(UncheckedBaseModel): if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/generate_stream_text.py b/src/cohere/types/generate_stream_text.py index a8a959e51..a7fe215c2 100644 --- a/src/cohere/types/generate_stream_text.py +++ b/src/cohere/types/generate_stream_text.py @@ -20,10 +20,9 @@ class GenerateStreamText(GenerateStreamEvent): is_finished: bool if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/generate_streamed_response.py b/src/cohere/types/generate_streamed_response.py index a7694cbbe..d387a772a 100644 --- a/src/cohere/types/generate_streamed_response.py +++ b/src/cohere/types/generate_streamed_response.py @@ -22,11 +22,10 @@ class TextGenerationGenerateStreamedResponse(UncheckedBaseModel): is_finished: bool if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -42,11 +41,10 @@ class StreamEndGenerateStreamedResponse(UncheckedBaseModel): response: GenerateStreamEndResponse if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -63,11 +61,10 @@ class StreamErrorGenerateStreamedResponse(UncheckedBaseModel): err: str if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/generation.py b/src/cohere/types/generation.py index abf5bdb0f..429e00ba1 100644 --- a/src/cohere/types/generation.py +++ b/src/cohere/types/generation.py @@ -23,10 +23,9 @@ class Generation(UncheckedBaseModel): meta: typing.Optional[ApiMeta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/get_connector_response.py b/src/cohere/types/get_connector_response.py index 66c3b3a1e..efe07a44b 100644 --- a/src/cohere/types/get_connector_response.py +++ b/src/cohere/types/get_connector_response.py @@ -11,10 +11,9 @@ class GetConnectorResponse(UncheckedBaseModel): connector: Connector if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/get_model_response.py b/src/cohere/types/get_model_response.py index d73bd6c24..ef0eb331f 100644 --- a/src/cohere/types/get_model_response.py +++ b/src/cohere/types/get_model_response.py @@ -43,10 +43,9 @@ class GetModelResponse(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/image.py b/src/cohere/types/image.py new file mode 100644 index 000000000..058f8676a --- /dev/null +++ b/src/cohere/types/image.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.unchecked_base_model import UncheckedBaseModel +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + + +class Image(UncheckedBaseModel): + width: int = pydantic.Field() + """ + Width of the image in pixels + """ + + height: int = pydantic.Field() + """ + Height of the image in pixels + """ + + format: str = pydantic.Field() + """ + Format of the image + """ + + bit_depth: int = pydantic.Field() + """ + Bit depth of the image + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 + else: + + class Config: + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/cohere/types/json_response_format.py b/src/cohere/types/json_response_format.py index f6a2005fd..325a118b2 100644 --- a/src/cohere/types/json_response_format.py +++ b/src/cohere/types/json_response_format.py @@ -31,10 +31,9 @@ class JsonResponseFormat(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/json_response_format_v2.py b/src/cohere/types/json_response_format_v2.py index c12c4b0eb..c728cb3d8 100644 --- a/src/cohere/types/json_response_format_v2.py +++ b/src/cohere/types/json_response_format_v2.py @@ -27,10 +27,9 @@ class JsonResponseFormatV2(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/label_metric.py b/src/cohere/types/label_metric.py index bbc303f1e..a3c0c28b1 100644 --- a/src/cohere/types/label_metric.py +++ b/src/cohere/types/label_metric.py @@ -23,10 +23,9 @@ class LabelMetric(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/list_connectors_response.py b/src/cohere/types/list_connectors_response.py index 4fc64ff9b..5a8f144ee 100644 --- a/src/cohere/types/list_connectors_response.py +++ b/src/cohere/types/list_connectors_response.py @@ -15,10 +15,9 @@ class ListConnectorsResponse(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/list_embed_job_response.py b/src/cohere/types/list_embed_job_response.py index e2c1523f5..ef2625f7c 100644 --- a/src/cohere/types/list_embed_job_response.py +++ b/src/cohere/types/list_embed_job_response.py @@ -11,10 +11,9 @@ class ListEmbedJobResponse(UncheckedBaseModel): embed_jobs: typing.Optional[typing.List[EmbedJob]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/list_models_response.py b/src/cohere/types/list_models_response.py index 4a046fc84..2b787bf74 100644 --- a/src/cohere/types/list_models_response.py +++ b/src/cohere/types/list_models_response.py @@ -15,10 +15,9 @@ class ListModelsResponse(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/message.py b/src/cohere/types/message.py index cdb690afb..770e32e1e 100644 --- a/src/cohere/types/message.py +++ b/src/cohere/types/message.py @@ -17,11 +17,10 @@ class ChatbotMessage(UncheckedBaseModel): tool_calls: typing.Optional[typing.List[ToolCall]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -32,11 +31,10 @@ class SystemMessage(UncheckedBaseModel): tool_calls: typing.Optional[typing.List[ToolCall]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -47,11 +45,10 @@ class UserMessage(UncheckedBaseModel): tool_calls: typing.Optional[typing.List[ToolCall]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -61,11 +58,10 @@ class ToolMessage(UncheckedBaseModel): tool_results: typing.Optional[typing.List[ToolResult]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/metrics.py b/src/cohere/types/metrics.py index f4a177c63..3c54392d5 100644 --- a/src/cohere/types/metrics.py +++ b/src/cohere/types/metrics.py @@ -13,10 +13,9 @@ class Metrics(UncheckedBaseModel): embed_data: typing.Optional[MetricsEmbedData] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/metrics_embed_data.py b/src/cohere/types/metrics_embed_data.py index f7a8d5033..72ff014d1 100644 --- a/src/cohere/types/metrics_embed_data.py +++ b/src/cohere/types/metrics_embed_data.py @@ -14,10 +14,9 @@ class MetricsEmbedData(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/metrics_embed_data_fields_item.py b/src/cohere/types/metrics_embed_data_fields_item.py index 42f8f8eee..c1b3d5aef 100644 --- a/src/cohere/types/metrics_embed_data_fields_item.py +++ b/src/cohere/types/metrics_embed_data_fields_item.py @@ -18,10 +18,9 @@ class MetricsEmbedDataFieldsItem(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/non_streamed_chat_response.py b/src/cohere/types/non_streamed_chat_response.py index 55c275271..b311ca425 100644 --- a/src/cohere/types/non_streamed_chat_response.py +++ b/src/cohere/types/non_streamed_chat_response.py @@ -25,6 +25,11 @@ class NonStreamedChatResponse(UncheckedBaseModel): Unique identifier for the generated reply. Useful for submitting feedback. """ + response_id: typing.Optional[str] = pydantic.Field(default=None) + """ + Unique identifier for the response. + """ + citations: typing.Optional[typing.List[ChatCitation]] = pydantic.Field(default=None) """ Inline citations for the generated reply. @@ -65,10 +70,9 @@ class NonStreamedChatResponse(UncheckedBaseModel): meta: typing.Optional[ApiMeta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/not_implemented_error_body.py b/src/cohere/types/not_implemented_error_body.py index 657825c31..d0855d3d8 100644 --- a/src/cohere/types/not_implemented_error_body.py +++ b/src/cohere/types/not_implemented_error_body.py @@ -10,10 +10,9 @@ class NotImplementedErrorBody(UncheckedBaseModel): data: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/o_auth_authorize_response.py b/src/cohere/types/o_auth_authorize_response.py index fd9a84eb4..fb6baf135 100644 --- a/src/cohere/types/o_auth_authorize_response.py +++ b/src/cohere/types/o_auth_authorize_response.py @@ -13,10 +13,9 @@ class OAuthAuthorizeResponse(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/parse_info.py b/src/cohere/types/parse_info.py index 6f93159b8..c557f8b30 100644 --- a/src/cohere/types/parse_info.py +++ b/src/cohere/types/parse_info.py @@ -11,10 +11,9 @@ class ParseInfo(UncheckedBaseModel): delimiter: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/rerank_response.py b/src/cohere/types/rerank_response.py index d83a6995e..132e95b2a 100644 --- a/src/cohere/types/rerank_response.py +++ b/src/cohere/types/rerank_response.py @@ -18,10 +18,9 @@ class RerankResponse(UncheckedBaseModel): meta: typing.Optional[ApiMeta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/rerank_response_results_item.py b/src/cohere/types/rerank_response_results_item.py index 052c53494..787e98065 100644 --- a/src/cohere/types/rerank_response_results_item.py +++ b/src/cohere/types/rerank_response_results_item.py @@ -24,10 +24,9 @@ class RerankResponseResultsItem(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/rerank_response_results_item_document.py b/src/cohere/types/rerank_response_results_item_document.py index 5fa05e4b5..7c8772ca4 100644 --- a/src/cohere/types/rerank_response_results_item_document.py +++ b/src/cohere/types/rerank_response_results_item_document.py @@ -17,10 +17,9 @@ class RerankResponseResultsItemDocument(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/reranker_data_metrics.py b/src/cohere/types/reranker_data_metrics.py index bb14b4fe3..abf9a1a8d 100644 --- a/src/cohere/types/reranker_data_metrics.py +++ b/src/cohere/types/reranker_data_metrics.py @@ -38,10 +38,9 @@ class RerankerDataMetrics(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/response_format.py b/src/cohere/types/response_format.py index dae43927f..3ba954c27 100644 --- a/src/cohere/types/response_format.py +++ b/src/cohere/types/response_format.py @@ -25,11 +25,10 @@ class TextResponseFormat(UncheckedBaseModel): type: typing.Literal["text"] = "text" if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -52,11 +51,10 @@ class JsonObjectResponseFormat(UncheckedBaseModel): ] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/response_format_v2.py b/src/cohere/types/response_format_v2.py index b1f7f4cbc..934294546 100644 --- a/src/cohere/types/response_format_v2.py +++ b/src/cohere/types/response_format_v2.py @@ -27,11 +27,10 @@ class TextResponseFormatV2(UncheckedBaseModel): type: typing.Literal["text"] = "text" if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -55,11 +54,10 @@ class JsonObjectResponseFormatV2(UncheckedBaseModel): json_schema: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/single_generation.py b/src/cohere/types/single_generation.py index ec79c7c9c..2a53f1a5d 100644 --- a/src/cohere/types/single_generation.py +++ b/src/cohere/types/single_generation.py @@ -22,10 +22,9 @@ class SingleGeneration(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/single_generation_in_stream.py b/src/cohere/types/single_generation_in_stream.py index 67a873661..7dd33d4d4 100644 --- a/src/cohere/types/single_generation_in_stream.py +++ b/src/cohere/types/single_generation_in_stream.py @@ -22,10 +22,9 @@ class SingleGenerationInStream(UncheckedBaseModel): finish_reason: FinishReason if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/single_generation_token_likelihoods_item.py b/src/cohere/types/single_generation_token_likelihoods_item.py index e5e1ab039..4cd2b22d0 100644 --- a/src/cohere/types/single_generation_token_likelihoods_item.py +++ b/src/cohere/types/single_generation_token_likelihoods_item.py @@ -11,10 +11,9 @@ class SingleGenerationTokenLikelihoodsItem(UncheckedBaseModel): likelihood: float if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/source.py b/src/cohere/types/source.py index 0087cf628..9159c9852 100644 --- a/src/cohere/types/source.py +++ b/src/cohere/types/source.py @@ -19,11 +19,10 @@ class ToolSource(UncheckedBaseModel): tool_output: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -38,11 +37,10 @@ class DocumentSource(UncheckedBaseModel): document: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/streamed_chat_response.py b/src/cohere/types/streamed_chat_response.py index 2f2a6c526..f197f1c53 100644 --- a/src/cohere/types/streamed_chat_response.py +++ b/src/cohere/types/streamed_chat_response.py @@ -26,11 +26,10 @@ class StreamStartStreamedChatResponse(UncheckedBaseModel): generation_id: str if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -44,11 +43,10 @@ class SearchQueriesGenerationStreamedChatResponse(UncheckedBaseModel): search_queries: typing.List[ChatSearchQuery] if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -63,11 +61,10 @@ class SearchResultsStreamedChatResponse(UncheckedBaseModel): documents: typing.Optional[typing.List[ChatDocument]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -81,11 +78,10 @@ class TextGenerationStreamedChatResponse(UncheckedBaseModel): text: str if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -99,11 +95,10 @@ class CitationGenerationStreamedChatResponse(UncheckedBaseModel): citations: typing.List[ChatCitation] if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -118,11 +113,10 @@ class ToolCallsGenerationStreamedChatResponse(UncheckedBaseModel): tool_calls: typing.List[ToolCall] if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -137,11 +131,10 @@ class StreamEndStreamedChatResponse(UncheckedBaseModel): response: NonStreamedChatResponse if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -156,11 +149,10 @@ class ToolCallsChunkStreamedChatResponse(UncheckedBaseModel): text: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/streamed_chat_response_v2.py b/src/cohere/types/streamed_chat_response_v2.py index 50282f760..cb224b8c1 100644 --- a/src/cohere/types/streamed_chat_response_v2.py +++ b/src/cohere/types/streamed_chat_response_v2.py @@ -27,11 +27,10 @@ class MessageStartStreamedChatResponseV2(UncheckedBaseModel): delta: typing.Optional[ChatMessageStartEventDelta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -46,11 +45,10 @@ class ContentStartStreamedChatResponseV2(UncheckedBaseModel): delta: typing.Optional[ChatContentStartEventDelta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -65,11 +63,10 @@ class ContentDeltaStreamedChatResponseV2(UncheckedBaseModel): delta: typing.Optional[ChatContentDeltaEventDelta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -83,11 +80,10 @@ class ContentEndStreamedChatResponseV2(UncheckedBaseModel): index: typing.Optional[int] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -101,11 +97,10 @@ class ToolPlanDeltaStreamedChatResponseV2(UncheckedBaseModel): delta: typing.Optional[ChatToolPlanDeltaEventDelta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -120,11 +115,10 @@ class ToolCallStartStreamedChatResponseV2(UncheckedBaseModel): delta: typing.Optional[ChatToolCallStartEventDelta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -139,11 +133,10 @@ class ToolCallDeltaStreamedChatResponseV2(UncheckedBaseModel): delta: typing.Optional[ChatToolCallDeltaEventDelta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -157,11 +150,10 @@ class ToolCallEndStreamedChatResponseV2(UncheckedBaseModel): index: typing.Optional[int] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -176,11 +168,10 @@ class CitationStartStreamedChatResponseV2(UncheckedBaseModel): delta: typing.Optional[CitationStartEventDelta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -194,11 +185,10 @@ class CitationEndStreamedChatResponseV2(UncheckedBaseModel): index: typing.Optional[int] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -213,11 +203,10 @@ class MessageEndStreamedChatResponseV2(UncheckedBaseModel): delta: typing.Optional[ChatMessageEndEventDelta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/summarize_response.py b/src/cohere/types/summarize_response.py index 187a3565e..cc892eb8b 100644 --- a/src/cohere/types/summarize_response.py +++ b/src/cohere/types/summarize_response.py @@ -21,10 +21,9 @@ class SummarizeResponse(UncheckedBaseModel): meta: typing.Optional[ApiMeta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/system_message.py b/src/cohere/types/system_message.py index cdc8460a2..1cbd33462 100644 --- a/src/cohere/types/system_message.py +++ b/src/cohere/types/system_message.py @@ -15,10 +15,9 @@ class SystemMessage(UncheckedBaseModel): content: SystemMessageContent if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/system_message_content_item.py b/src/cohere/types/system_message_content_item.py index 6865810cd..60acf29d0 100644 --- a/src/cohere/types/system_message_content_item.py +++ b/src/cohere/types/system_message_content_item.py @@ -14,11 +14,10 @@ class TextSystemMessageContentItem(UncheckedBaseModel): text: str if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/text_content.py b/src/cohere/types/text_content.py index 338597155..16f68f06c 100644 --- a/src/cohere/types/text_content.py +++ b/src/cohere/types/text_content.py @@ -14,10 +14,9 @@ class TextContent(UncheckedBaseModel): text: str if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/text_response_format.py b/src/cohere/types/text_response_format.py index a7bad64f0..494eba519 100644 --- a/src/cohere/types/text_response_format.py +++ b/src/cohere/types/text_response_format.py @@ -8,10 +8,9 @@ class TextResponseFormat(UncheckedBaseModel): if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/text_response_format_v2.py b/src/cohere/types/text_response_format_v2.py index 2dc6310cb..9b531e396 100644 --- a/src/cohere/types/text_response_format_v2.py +++ b/src/cohere/types/text_response_format_v2.py @@ -8,10 +8,9 @@ class TextResponseFormatV2(UncheckedBaseModel): if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/tokenize_response.py b/src/cohere/types/tokenize_response.py index e3f2dd985..ba8dc0f96 100644 --- a/src/cohere/types/tokenize_response.py +++ b/src/cohere/types/tokenize_response.py @@ -17,10 +17,9 @@ class TokenizeResponse(UncheckedBaseModel): meta: typing.Optional[ApiMeta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/too_many_requests_error_body.py b/src/cohere/types/too_many_requests_error_body.py index 91fdb17ad..ade0cfc86 100644 --- a/src/cohere/types/too_many_requests_error_body.py +++ b/src/cohere/types/too_many_requests_error_body.py @@ -10,10 +10,9 @@ class TooManyRequestsErrorBody(UncheckedBaseModel): data: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/tool.py b/src/cohere/types/tool.py index 2d6bc4859..44354755b 100644 --- a/src/cohere/types/tool.py +++ b/src/cohere/types/tool.py @@ -36,10 +36,9 @@ class Tool(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/tool_call.py b/src/cohere/types/tool_call.py index ac747f004..421b3e414 100644 --- a/src/cohere/types/tool_call.py +++ b/src/cohere/types/tool_call.py @@ -22,10 +22,9 @@ class ToolCall(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/tool_call_delta.py b/src/cohere/types/tool_call_delta.py index 40403e68c..3aabecbbd 100644 --- a/src/cohere/types/tool_call_delta.py +++ b/src/cohere/types/tool_call_delta.py @@ -32,10 +32,9 @@ class ToolCallDelta(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/tool_call_v2.py b/src/cohere/types/tool_call_v2.py index 1cd714033..53a0540b2 100644 --- a/src/cohere/types/tool_call_v2.py +++ b/src/cohere/types/tool_call_v2.py @@ -17,10 +17,9 @@ class ToolCallV2(UncheckedBaseModel): function: typing.Optional[ToolCallV2Function] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/tool_call_v2function.py b/src/cohere/types/tool_call_v2function.py index 6e27943c9..4341b8cde 100644 --- a/src/cohere/types/tool_call_v2function.py +++ b/src/cohere/types/tool_call_v2function.py @@ -11,10 +11,9 @@ class ToolCallV2Function(UncheckedBaseModel): arguments: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/tool_content.py b/src/cohere/types/tool_content.py index 8a599572d..f354de8a0 100644 --- a/src/cohere/types/tool_content.py +++ b/src/cohere/types/tool_content.py @@ -19,11 +19,10 @@ class TextToolContent(UncheckedBaseModel): text: str if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow @@ -37,11 +36,10 @@ class DocumentToolContent(UncheckedBaseModel): document: Document if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/tool_message.py b/src/cohere/types/tool_message.py index 623cbdea9..e40a05174 100644 --- a/src/cohere/types/tool_message.py +++ b/src/cohere/types/tool_message.py @@ -15,10 +15,9 @@ class ToolMessage(UncheckedBaseModel): tool_results: typing.Optional[typing.List[ToolResult]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/tool_message_v2.py b/src/cohere/types/tool_message_v2.py index fb69c6b40..f5d57c397 100644 --- a/src/cohere/types/tool_message_v2.py +++ b/src/cohere/types/tool_message_v2.py @@ -23,10 +23,9 @@ class ToolMessageV2(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/tool_parameter_definitions_value.py b/src/cohere/types/tool_parameter_definitions_value.py index 806875f1e..d6382f327 100644 --- a/src/cohere/types/tool_parameter_definitions_value.py +++ b/src/cohere/types/tool_parameter_definitions_value.py @@ -23,10 +23,9 @@ class ToolParameterDefinitionsValue(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/tool_result.py b/src/cohere/types/tool_result.py index b98403171..9ea17dae1 100644 --- a/src/cohere/types/tool_result.py +++ b/src/cohere/types/tool_result.py @@ -12,10 +12,9 @@ class ToolResult(UncheckedBaseModel): outputs: typing.List[typing.Dict[str, typing.Optional[typing.Any]]] if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/tool_source.py b/src/cohere/types/tool_source.py index 1ece16490..6b64edf99 100644 --- a/src/cohere/types/tool_source.py +++ b/src/cohere/types/tool_source.py @@ -15,10 +15,9 @@ class ToolSource(UncheckedBaseModel): tool_output: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/tool_v2.py b/src/cohere/types/tool_v2.py index c5ce92300..f1815f8ef 100644 --- a/src/cohere/types/tool_v2.py +++ b/src/cohere/types/tool_v2.py @@ -15,10 +15,9 @@ class ToolV2(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/tool_v2function.py b/src/cohere/types/tool_v2function.py index a55d1e1bd..1b865f64b 100644 --- a/src/cohere/types/tool_v2function.py +++ b/src/cohere/types/tool_v2function.py @@ -27,10 +27,9 @@ class ToolV2Function(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/unprocessable_entity_error_body.py b/src/cohere/types/unprocessable_entity_error_body.py index 7dbea4a02..697759a3c 100644 --- a/src/cohere/types/unprocessable_entity_error_body.py +++ b/src/cohere/types/unprocessable_entity_error_body.py @@ -10,10 +10,9 @@ class UnprocessableEntityErrorBody(UncheckedBaseModel): data: typing.Optional[str] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/update_connector_response.py b/src/cohere/types/update_connector_response.py index ac296dc65..4aaa4c238 100644 --- a/src/cohere/types/update_connector_response.py +++ b/src/cohere/types/update_connector_response.py @@ -11,10 +11,9 @@ class UpdateConnectorResponse(UncheckedBaseModel): connector: Connector if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/usage.py b/src/cohere/types/usage.py index 3e7cdf51e..3241d73a0 100644 --- a/src/cohere/types/usage.py +++ b/src/cohere/types/usage.py @@ -13,10 +13,9 @@ class Usage(UncheckedBaseModel): tokens: typing.Optional[UsageTokens] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/usage_billed_units.py b/src/cohere/types/usage_billed_units.py index bfb82fd95..d8973b84e 100644 --- a/src/cohere/types/usage_billed_units.py +++ b/src/cohere/types/usage_billed_units.py @@ -28,10 +28,9 @@ class UsageBilledUnits(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/usage_tokens.py b/src/cohere/types/usage_tokens.py index c9b83d4ba..2e44c9782 100644 --- a/src/cohere/types/usage_tokens.py +++ b/src/cohere/types/usage_tokens.py @@ -18,10 +18,9 @@ class UsageTokens(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/types/user_message.py b/src/cohere/types/user_message.py index 25339d292..69fce5795 100644 --- a/src/cohere/types/user_message.py +++ b/src/cohere/types/user_message.py @@ -19,10 +19,9 @@ class UserMessage(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/v2/types/v2rerank_response.py b/src/cohere/v2/types/v2rerank_response.py index 54583df46..51cf8f2a7 100644 --- a/src/cohere/v2/types/v2rerank_response.py +++ b/src/cohere/v2/types/v2rerank_response.py @@ -18,10 +18,9 @@ class V2RerankResponse(UncheckedBaseModel): meta: typing.Optional[ApiMeta] = None if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/v2/types/v2rerank_response_results_item.py b/src/cohere/v2/types/v2rerank_response_results_item.py index 4a09afd99..adb0b3ceb 100644 --- a/src/cohere/v2/types/v2rerank_response_results_item.py +++ b/src/cohere/v2/types/v2rerank_response_results_item.py @@ -24,10 +24,9 @@ class V2RerankResponseResultsItem(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow diff --git a/src/cohere/v2/types/v2rerank_response_results_item_document.py b/src/cohere/v2/types/v2rerank_response_results_item_document.py index e526cc60f..e139e593b 100644 --- a/src/cohere/v2/types/v2rerank_response_results_item_document.py +++ b/src/cohere/v2/types/v2rerank_response_results_item_document.py @@ -17,10 +17,9 @@ class V2RerankResponseResultsItemDocument(UncheckedBaseModel): """ if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 else: class Config: - frozen = True smart_union = True extra = pydantic.Extra.allow