Skip to content

Commit eaf7d15

Browse files
[fern-generated] Update SDK (#767)
Generated by Fern CLI Version: unknown Generators: - fernapi/fern-python-sdk: 5.14.4 Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
1 parent b751bc1 commit eaf7d15

10 files changed

Lines changed: 106 additions & 203 deletions

File tree

.fern/metadata.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"cliVersion": "5.37.7",
33
"generatorName": "fernapi/fern-python-sdk",
4-
"generatorVersion": "5.14.1",
4+
"generatorVersion": "5.14.4",
55
"generatorConfig": {
66
"inline_request_params": false,
77
"extras": {
@@ -94,10 +94,10 @@
9494
}
9595
]
9696
},
97-
"originGitCommit": "06c89ed3d92de0b191ec8eb5eb542753390b6c7f",
97+
"originGitCommit": "6b200e3df80ccea85f9d69dc3c5572410454d8b7",
9898
"originGitCommitIsDirty": true,
9999
"invokedBy": "ci",
100-
"requestedVersion": "7.0.0",
100+
"requestedVersion": "7.0.1",
101101
"ciProvider": "github",
102-
"sdkVersion": "7.0.0"
102+
"sdkVersion": "7.0.1"
103103
}

poetry.lock

Lines changed: 16 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ dynamic = ["version"]
44

55
[tool.poetry]
66
name = "cohere"
7-
version = "7.0.0"
7+
version = "7.0.1"
88
description = ""
99
readme = "README.md"
1010
authors = []

reference.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,11 +1538,15 @@ client.embed(
15381538

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

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

1543-
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.
1543+
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.
15441544

1545-
Images are only supported with Embed v3.0 and newer models.
1545+
Image embeddings are supported with Embed v3.0 and newer models.
1546+
1547+
For **Embed v3.x** models, the maximum number of images per call is `1`, and each image has a maximum size of `5MB`.
1548+
1549+
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`.
15461550

15471551
</dd>
15481552
</dl>
@@ -2967,11 +2971,15 @@ client.v2.embed(
29672971

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

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

2972-
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.
2976+
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.
29732977

29742978
Image embeddings are supported with Embed v3.0 and newer models.
2979+
2980+
For **Embed v3.x** models, the maximum number of images per call is `1`, and each image has a maximum size of `5MB`.
2981+
2982+
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`.
29752983

29762984
</dd>
29772985
</dl>

src/cohere/base_client.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,11 +1082,15 @@ def embed(
10821082
An array of strings for the model to embed. Maximum number of texts per call is `96`.
10831083
10841084
images : typing.Optional[typing.Sequence[str]]
1085-
An array of image data URIs for the model to embed. Maximum number of images per call is `1`.
1085+
An array of image data URIs for the model to embed.
10861086
1087-
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.
1087+
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.
10881088
1089-
Images are only supported with Embed v3.0 and newer models.
1089+
Image embeddings are supported with Embed v3.0 and newer models.
1090+
1091+
For **Embed v3.x** models, the maximum number of images per call is `1`, and each image has a maximum size of `5MB`.
1092+
1093+
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`.
10901094
10911095
model : typing.Optional[str]
10921096
ID of one of the available [Embedding models](https://docs.cohere.com/docs/cohere-embed).
@@ -2662,11 +2666,15 @@ async def embed(
26622666
An array of strings for the model to embed. Maximum number of texts per call is `96`.
26632667
26642668
images : typing.Optional[typing.Sequence[str]]
2665-
An array of image data URIs for the model to embed. Maximum number of images per call is `1`.
2669+
An array of image data URIs for the model to embed.
2670+
2671+
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.
2672+
2673+
Image embeddings are supported with Embed v3.0 and newer models.
26662674
2667-
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.
2675+
For **Embed v3.x** models, the maximum number of images per call is `1`, and each image has a maximum size of `5MB`.
26682676
2669-
Images are only supported with Embed v3.0 and newer models.
2677+
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`.
26702678
26712679
model : typing.Optional[str]
26722680
ID of one of the available [Embedding models](https://docs.cohere.com/docs/cohere-embed).

src/cohere/core/client_wrapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ def get_headers(self) -> typing.Dict[str, str]:
3131
import platform
3232

3333
headers: typing.Dict[str, str] = {
34-
"User-Agent": "cohere/7.0.0",
34+
"User-Agent": "cohere/7.0.1",
3535
"X-Fern-Language": "Python",
3636
"X-Fern-Runtime": f"python/{platform.python_version()}",
3737
"X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}",
3838
"X-Fern-SDK-Name": "cohere",
39-
"X-Fern-SDK-Version": "7.0.0",
39+
"X-Fern-SDK-Version": "7.0.1",
4040
**(self.get_custom_headers() or {}),
4141
}
4242
if self._client_name is not None:

0 commit comments

Comments
 (0)