Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"cliVersion": "5.37.7",
"generatorName": "fernapi/fern-python-sdk",
"generatorVersion": "5.14.1",
"generatorVersion": "5.14.4",
"generatorConfig": {
"inline_request_params": false,
"extras": {
Expand Down Expand Up @@ -94,10 +94,10 @@
}
]
},
"originGitCommit": "06c89ed3d92de0b191ec8eb5eb542753390b6c7f",
"originGitCommit": "6b200e3df80ccea85f9d69dc3c5572410454d8b7",
"originGitCommitIsDirty": true,
"invokedBy": "ci",
"requestedVersion": "7.0.0",
"requestedVersion": "7.0.1",
"ciProvider": "github",
"sdkVersion": "7.0.0"
"sdkVersion": "7.0.1"
}
31 changes: 16 additions & 15 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dynamic = ["version"]

[tool.poetry]
name = "cohere"
version = "7.0.0"
version = "7.0.1"
description = ""
readme = "README.md"
authors = []
Expand Down
18 changes: 13 additions & 5 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1538,11 +1538,15 @@ client.embed(

**images:** `typing.Optional[typing.List[str]]`

An array of image data URIs for the model to embed. Maximum number of images per call is `1`.
An array of image data URIs for the model to embed.

The image must be a valid [data URI](https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data). The image must be in either `image/jpeg`, `image/png`, `image/webp`, or `image/gif` format and has a maximum size of 5MB.
The image must be a valid [data URI](https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data). The image must be in either `image/jpeg`, `image/png`, `image/webp`, or `image/gif` format.

Images are only supported with Embed v3.0 and newer models.
Image embeddings are supported with Embed v3.0 and newer models.

For **Embed v3.x** models, the maximum number of images per call is `1`, and each image has a maximum size of `5MB`.

For **Embed v4.0 and newer** models, there is no limit on the number of images per call. The combined size of all images in the request must be at most `20MB`.

</dd>
</dl>
Expand Down Expand Up @@ -2967,11 +2971,15 @@ client.v2.embed(

**images:** `typing.Optional[typing.List[str]]`

An array of image data URIs for the model to embed. Maximum number of images per call is `1`.
An array of image data URIs for the model to embed.

The image must be a valid [data URI](https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data). The image must be in either `image/jpeg`, `image/png`, `image/webp`, or `image/gif` format and has a maximum size of 5MB.
The image must be a valid [data URI](https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data). The image must be in either `image/jpeg`, `image/png`, `image/webp`, or `image/gif` format.

Image embeddings are supported with Embed v3.0 and newer models.

For **Embed v3.x** models, the maximum number of images per call is `1`, and each image has a maximum size of `5MB`.

For **Embed v4.0 and newer** models, there is no limit on the number of images per call. The combined size of all images in the request must be at most `20MB`.

</dd>
</dl>
Expand Down
20 changes: 14 additions & 6 deletions src/cohere/base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1082,11 +1082,15 @@ def embed(
An array of strings for the model to embed. Maximum number of texts per call is `96`.

images : typing.Optional[typing.Sequence[str]]
An array of image data URIs for the model to embed. Maximum number of images per call is `1`.
An array of image data URIs for the model to embed.

The image must be a valid [data URI](https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data). The image must be in either `image/jpeg`, `image/png`, `image/webp`, or `image/gif` format and has a maximum size of 5MB.
The image must be a valid [data URI](https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data). The image must be in either `image/jpeg`, `image/png`, `image/webp`, or `image/gif` format.

Images are only supported with Embed v3.0 and newer models.
Image embeddings are supported with Embed v3.0 and newer models.

For **Embed v3.x** models, the maximum number of images per call is `1`, and each image has a maximum size of `5MB`.

For **Embed v4.0 and newer** models, there is no limit on the number of images per call. The combined size of all images in the request must be at most `20MB`.

model : typing.Optional[str]
ID of one of the available [Embedding models](https://docs.cohere.com/docs/cohere-embed).
Expand Down Expand Up @@ -2662,11 +2666,15 @@ async def embed(
An array of strings for the model to embed. Maximum number of texts per call is `96`.

images : typing.Optional[typing.Sequence[str]]
An array of image data URIs for the model to embed. Maximum number of images per call is `1`.
An array of image data URIs for the model to embed.

The image must be a valid [data URI](https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data). The image must be in either `image/jpeg`, `image/png`, `image/webp`, or `image/gif` format.

Image embeddings are supported with Embed v3.0 and newer models.

The image must be a valid [data URI](https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data). The image must be in either `image/jpeg`, `image/png`, `image/webp`, or `image/gif` format and has a maximum size of 5MB.
For **Embed v3.x** models, the maximum number of images per call is `1`, and each image has a maximum size of `5MB`.

Images are only supported with Embed v3.0 and newer models.
For **Embed v4.0 and newer** models, there is no limit on the number of images per call. The combined size of all images in the request must be at most `20MB`.

model : typing.Optional[str]
ID of one of the available [Embedding models](https://docs.cohere.com/docs/cohere-embed).
Expand Down
4 changes: 2 additions & 2 deletions src/cohere/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ def get_headers(self) -> typing.Dict[str, str]:
import platform

headers: typing.Dict[str, str] = {
"User-Agent": "cohere/7.0.0",
"User-Agent": "cohere/7.0.1",
"X-Fern-Language": "Python",
"X-Fern-Runtime": f"python/{platform.python_version()}",
"X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}",
"X-Fern-SDK-Name": "cohere",
"X-Fern-SDK-Version": "7.0.0",
"X-Fern-SDK-Version": "7.0.1",
**(self.get_custom_headers() or {}),
}
if self._client_name is not None:
Expand Down
Loading
Loading