Skip to content

Commit 3bc93c0

Browse files
🌿 Fern Regeneration -- December 2, 2024 (#610)
* SDK regeneration * Fixes * lock --------- Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: Billy Trend <[email protected]>
1 parent bd906fa commit 3bc93c0

File tree

5 files changed

+12
-13
lines changed

5 files changed

+12
-13
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "cohere"
3-
version = "5.12.0"
3+
version = "5.13.0"
44
description = ""
55
readme = "README.md"
66
authors = []

reference.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2382,7 +2382,6 @@ response = client.v2.chat_stream(
23822382
p=1.1,
23832383
return_prompt=True,
23842384
logprobs=True,
2385-
stream=True,
23862385
)
23872386
for chunk in response:
23882387
yield chunk
@@ -2655,7 +2654,6 @@ client.v2.chat(
26552654
content="messages",
26562655
)
26572656
],
2658-
stream=False,
26592657
)
26602658

26612659
```
@@ -2973,7 +2971,7 @@ Available models and corresponding embedding dimensions:
29732971

29742972
**embedding_types:** `typing.Sequence[EmbeddingType]`
29752973

2976-
Specifies the types of embeddings you want to get back. Not required and default is None, which returns the Embed Floats response type. Can be one or more of the following types.
2974+
Specifies the types of embeddings you want to get back. Can be one or more of the following types.
29772975

29782976
* `"float"`: Use this when you want to get back the default float embeddings. Valid for all models.
29792977
* `"int8"`: Use this when you want to get back signed int8 embeddings. Valid for only v3 models.

src/cohere/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@
245245
)
246246
from . import connectors, datasets, embed_jobs, finetuning, models, v2
247247
from .aws_client import AwsClient
248-
from .bedrock_client import BedrockClient
248+
from .bedrock_client import BedrockClient, BedrockClientV2
249249
from .client import AsyncClient, Client
250250
from .client_v2 import AsyncClientV2, ClientV2
251251
from .datasets import (
@@ -257,7 +257,7 @@
257257
)
258258
from .embed_jobs import CreateEmbedJobRequestTruncate
259259
from .environment import ClientEnvironment
260-
from .sagemaker_client import SagemakerClient
260+
from .sagemaker_client import SagemakerClient, SagemakerClientV2
261261
from .v2 import (
262262
V2ChatRequestDocumentsItem,
263263
V2ChatRequestSafetyMode,
@@ -287,6 +287,7 @@
287287
"AwsClient",
288288
"BadRequestError",
289289
"BedrockClient",
290+
"BedrockClientV2",
290291
"ChatCitation",
291292
"ChatCitationGenerationEvent",
292293
"ChatConnector",
@@ -460,6 +461,7 @@
460461
"ResponseFormat",
461462
"ResponseFormatV2",
462463
"SagemakerClient",
464+
"SagemakerClientV2",
463465
"SearchQueriesGenerationStreamedChatResponse",
464466
"SearchResultsStreamedChatResponse",
465467
"ServiceUnavailableError",

src/cohere/core/client_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def get_headers(self) -> typing.Dict[str, str]:
2424
headers: typing.Dict[str, str] = {
2525
"X-Fern-Language": "Python",
2626
"X-Fern-SDK-Name": "cohere",
27-
"X-Fern-SDK-Version": "5.12.0",
27+
"X-Fern-SDK-Version": "5.13.0",
2828
}
2929
if self._client_name is not None:
3030
headers["X-Client-Name"] = self._client_name

src/cohere/v2/client.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,6 @@ def chat_stream(
222222
p=1.1,
223223
return_prompt=True,
224224
logprobs=True,
225-
stream=True,
226225
)
227226
for chunk in response:
228227
yield chunk
@@ -535,7 +534,6 @@ def chat(
535534
content="messages",
536535
)
537536
],
538-
stream=False,
539537
)
540538
"""
541539
_response = self._client_wrapper.httpx_client.request(
@@ -570,6 +568,7 @@ def chat(
570568
"p": p,
571569
"return_prompt": return_prompt,
572570
"logprobs": logprobs,
571+
"stream": False,
573572
},
574573
request_options=request_options,
575574
omit=OMIT,
@@ -737,7 +736,7 @@ def embed(
737736
input_type : EmbedInputType
738737
739738
embedding_types : typing.Sequence[EmbeddingType]
740-
Specifies the types of embeddings you want to get back. Not required and default is None, which returns the Embed Floats response type. Can be one or more of the following types.
739+
Specifies the types of embeddings you want to get back. Can be one or more of the following types.
741740
742741
* `"float"`: Use this when you want to get back the default float embeddings. Valid for all models.
743742
* `"int8"`: Use this when you want to get back signed int8 embeddings. Valid for only v3 models.
@@ -1308,7 +1307,6 @@ async def main() -> None:
13081307
p=1.1,
13091308
return_prompt=True,
13101309
logprobs=True,
1311-
stream=True,
13121310
)
13131311
async for chunk in response:
13141312
yield chunk
@@ -1348,6 +1346,7 @@ async def main() -> None:
13481346
"p": p,
13491347
"return_prompt": return_prompt,
13501348
"logprobs": logprobs,
1349+
"stream": True,
13511350
},
13521351
request_options=request_options,
13531352
omit=OMIT,
@@ -1628,7 +1627,6 @@ async def main() -> None:
16281627
content="messages",
16291628
)
16301629
],
1631-
stream=False,
16321630
)
16331631
16341632
@@ -1666,6 +1664,7 @@ async def main() -> None:
16661664
"p": p,
16671665
"return_prompt": return_prompt,
16681666
"logprobs": logprobs,
1667+
"stream": False,
16691668
},
16701669
request_options=request_options,
16711670
omit=OMIT,
@@ -1833,7 +1832,7 @@ async def embed(
18331832
input_type : EmbedInputType
18341833
18351834
embedding_types : typing.Sequence[EmbeddingType]
1836-
Specifies the types of embeddings you want to get back. Not required and default is None, which returns the Embed Floats response type. Can be one or more of the following types.
1835+
Specifies the types of embeddings you want to get back. Can be one or more of the following types.
18371836
18381837
* `"float"`: Use this when you want to get back the default float embeddings. Valid for all models.
18391838
* `"int8"`: Use this when you want to get back signed int8 embeddings. Valid for only v3 models.

0 commit comments

Comments
 (0)