diff --git a/pyproject.toml b/pyproject.toml index 9f4308e69..b884c1f54 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cohere" -version = "5.12.0" +version = "5.13.0" description = "" readme = "README.md" authors = [] diff --git a/reference.md b/reference.md index c1b7d5a60..06cf6da61 100644 --- a/reference.md +++ b/reference.md @@ -2382,7 +2382,6 @@ response = client.v2.chat_stream( p=1.1, return_prompt=True, logprobs=True, - stream=True, ) for chunk in response: yield chunk @@ -2655,7 +2654,6 @@ client.v2.chat( content="messages", ) ], - stream=False, ) ``` @@ -2973,7 +2971,7 @@ Available models and corresponding embedding dimensions: **embedding_types:** `typing.Sequence[EmbeddingType]` -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. +Specifies the types of embeddings you want to get back. Can be one or more of the following types. * `"float"`: Use this when you want to get back the default float embeddings. Valid for all models. * `"int8"`: Use this when you want to get back signed int8 embeddings. Valid for only v3 models. diff --git a/src/cohere/__init__.py b/src/cohere/__init__.py index 3a126e4f7..70321646d 100644 --- a/src/cohere/__init__.py +++ b/src/cohere/__init__.py @@ -245,7 +245,7 @@ ) from . import connectors, datasets, embed_jobs, finetuning, models, v2 from .aws_client import AwsClient -from .bedrock_client import BedrockClient +from .bedrock_client import BedrockClient, BedrockClientV2 from .client import AsyncClient, Client from .client_v2 import AsyncClientV2, ClientV2 from .datasets import ( @@ -257,7 +257,7 @@ ) from .embed_jobs import CreateEmbedJobRequestTruncate from .environment import ClientEnvironment -from .sagemaker_client import SagemakerClient +from .sagemaker_client import SagemakerClient, SagemakerClientV2 from .v2 import ( V2ChatRequestDocumentsItem, V2ChatRequestSafetyMode, @@ -287,6 +287,7 @@ "AwsClient", "BadRequestError", "BedrockClient", + "BedrockClientV2", "ChatCitation", "ChatCitationGenerationEvent", "ChatConnector", @@ -460,6 +461,7 @@ "ResponseFormat", "ResponseFormatV2", "SagemakerClient", + "SagemakerClientV2", "SearchQueriesGenerationStreamedChatResponse", "SearchResultsStreamedChatResponse", "ServiceUnavailableError", diff --git a/src/cohere/core/client_wrapper.py b/src/cohere/core/client_wrapper.py index 8213e6da3..23383e889 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.12.0", + "X-Fern-SDK-Version": "5.13.0", } if self._client_name is not None: headers["X-Client-Name"] = self._client_name diff --git a/src/cohere/v2/client.py b/src/cohere/v2/client.py index a4e465e79..05b4f4b7a 100644 --- a/src/cohere/v2/client.py +++ b/src/cohere/v2/client.py @@ -222,7 +222,6 @@ def chat_stream( p=1.1, return_prompt=True, logprobs=True, - stream=True, ) for chunk in response: yield chunk @@ -535,7 +534,6 @@ def chat( content="messages", ) ], - stream=False, ) """ _response = self._client_wrapper.httpx_client.request( @@ -570,6 +568,7 @@ def chat( "p": p, "return_prompt": return_prompt, "logprobs": logprobs, + "stream": False, }, request_options=request_options, omit=OMIT, @@ -737,7 +736,7 @@ def embed( input_type : EmbedInputType embedding_types : typing.Sequence[EmbeddingType] - 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. + Specifies the types of embeddings you want to get back. Can be one or more of the following types. * `"float"`: Use this when you want to get back the default float embeddings. Valid for all models. * `"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: p=1.1, return_prompt=True, logprobs=True, - stream=True, ) async for chunk in response: yield chunk @@ -1348,6 +1346,7 @@ async def main() -> None: "p": p, "return_prompt": return_prompt, "logprobs": logprobs, + "stream": True, }, request_options=request_options, omit=OMIT, @@ -1628,7 +1627,6 @@ async def main() -> None: content="messages", ) ], - stream=False, ) @@ -1666,6 +1664,7 @@ async def main() -> None: "p": p, "return_prompt": return_prompt, "logprobs": logprobs, + "stream": False, }, request_options=request_options, omit=OMIT, @@ -1833,7 +1832,7 @@ async def embed( input_type : EmbedInputType embedding_types : typing.Sequence[EmbeddingType] - 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. + Specifies the types of embeddings you want to get back. Can be one or more of the following types. * `"float"`: Use this when you want to get back the default float embeddings. Valid for all models. * `"int8"`: Use this when you want to get back signed int8 embeddings. Valid for only v3 models.