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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cohere"
version = "5.12.0"
version = "5.13.0"
description = ""
readme = "README.md"
authors = []
Expand Down
4 changes: 1 addition & 3 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -2655,7 +2654,6 @@ client.v2.chat(
content="messages",
)
],
stream=False,
)

```
Expand Down Expand Up @@ -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.
Expand Down
6 changes: 4 additions & 2 deletions src/cohere/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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,
Expand Down Expand Up @@ -287,6 +287,7 @@
"AwsClient",
"BadRequestError",
"BedrockClient",
"BedrockClientV2",
"ChatCitation",
"ChatCitationGenerationEvent",
"ChatConnector",
Expand Down Expand Up @@ -460,6 +461,7 @@
"ResponseFormat",
"ResponseFormatV2",
"SagemakerClient",
"SagemakerClientV2",
"SearchQueriesGenerationStreamedChatResponse",
"SearchResultsStreamedChatResponse",
"ServiceUnavailableError",
Expand Down
2 changes: 1 addition & 1 deletion src/cohere/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 5 additions & 6 deletions src/cohere/v2/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ def chat_stream(
p=1.1,
return_prompt=True,
logprobs=True,
stream=True,
)
for chunk in response:
yield chunk
Expand Down Expand Up @@ -535,7 +534,6 @@ def chat(
content="messages",
)
],
stream=False,
)
"""
_response = self._client_wrapper.httpx_client.request(
Expand Down Expand Up @@ -570,6 +568,7 @@ def chat(
"p": p,
"return_prompt": return_prompt,
"logprobs": logprobs,
"stream": False,
},
request_options=request_options,
omit=OMIT,
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1348,6 +1346,7 @@ async def main() -> None:
"p": p,
"return_prompt": return_prompt,
"logprobs": logprobs,
"stream": True,
},
request_options=request_options,
omit=OMIT,
Expand Down Expand Up @@ -1628,7 +1627,6 @@ async def main() -> None:
content="messages",
)
],
stream=False,
)


Expand Down Expand Up @@ -1666,6 +1664,7 @@ async def main() -> None:
"p": p,
"return_prompt": return_prompt,
"logprobs": logprobs,
"stream": False,
},
request_options=request_options,
omit=OMIT,
Expand Down Expand Up @@ -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.
Expand Down