Skip to content
Closed
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
24 changes: 12 additions & 12 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 @@ -3,7 +3,7 @@ name = "cohere"

[tool.poetry]
name = "cohere"
version = "5.16.2"
version = "5.16.3"
description = ""
readme = "README.md"
authors = []
Expand Down
2 changes: 0 additions & 2 deletions src/cohere/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@
NonStreamedChatResponse,
OAuthAuthorizeResponse,
ParseInfo,
ReasoningEffort,
RerankDocument,
RerankRequestDocumentsItem,
RerankResponse,
Expand Down Expand Up @@ -496,7 +495,6 @@
"NotImplementedError",
"OAuthAuthorizeResponse",
"ParseInfo",
"ReasoningEffort",
"RerankDocument",
"RerankRequestDocumentsItem",
"RerankResponse",
Expand Down
32 changes: 0 additions & 32 deletions src/cohere/base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ def chat_stream(
*,
message: str,
accepts: typing.Optional[typing.Literal["text/event-stream"]] = None,
raw_prompting: typing.Optional[bool] = OMIT,
model: typing.Optional[str] = OMIT,
preamble: typing.Optional[str] = OMIT,
chat_history: typing.Optional[typing.Sequence[Message]] = OMIT,
Expand Down Expand Up @@ -187,12 +186,6 @@ def chat_stream(
accepts : typing.Optional[typing.Literal["text/event-stream"]]
Pass text/event-stream to receive the streamed response as server-sent events. The default is `\n` delimited events.

raw_prompting : typing.Optional[bool]
When enabled, the user's prompt will be sent to the model without
any pre-processing.

Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments

model : typing.Optional[str]
The name of a compatible [Cohere model](https://docs.cohere.com/docs/models) or the ID of a [fine-tuned](https://docs.cohere.com/docs/chat-fine-tuning) model.

Expand Down Expand Up @@ -414,7 +407,6 @@ def chat_stream(
with self._raw_client.chat_stream(
message=message,
accepts=accepts,
raw_prompting=raw_prompting,
model=model,
preamble=preamble,
chat_history=chat_history,
Expand Down Expand Up @@ -447,7 +439,6 @@ def chat(
*,
message: str,
accepts: typing.Optional[typing.Literal["text/event-stream"]] = None,
raw_prompting: typing.Optional[bool] = OMIT,
model: typing.Optional[str] = OMIT,
preamble: typing.Optional[str] = OMIT,
chat_history: typing.Optional[typing.Sequence[Message]] = OMIT,
Expand Down Expand Up @@ -487,12 +478,6 @@ def chat(
accepts : typing.Optional[typing.Literal["text/event-stream"]]
Pass text/event-stream to receive the streamed response as server-sent events. The default is `\n` delimited events.

raw_prompting : typing.Optional[bool]
When enabled, the user's prompt will be sent to the model without
any pre-processing.

Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments

model : typing.Optional[str]
The name of a compatible [Cohere model](https://docs.cohere.com/docs/models) or the ID of a [fine-tuned](https://docs.cohere.com/docs/chat-fine-tuning) model.

Expand Down Expand Up @@ -725,7 +710,6 @@ def chat(
_response = self._raw_client.chat(
message=message,
accepts=accepts,
raw_prompting=raw_prompting,
model=model,
preamble=preamble,
chat_history=chat_history,
Expand Down Expand Up @@ -1602,7 +1586,6 @@ async def chat_stream(
*,
message: str,
accepts: typing.Optional[typing.Literal["text/event-stream"]] = None,
raw_prompting: typing.Optional[bool] = OMIT,
model: typing.Optional[str] = OMIT,
preamble: typing.Optional[str] = OMIT,
chat_history: typing.Optional[typing.Sequence[Message]] = OMIT,
Expand Down Expand Up @@ -1643,12 +1626,6 @@ async def chat_stream(
accepts : typing.Optional[typing.Literal["text/event-stream"]]
Pass text/event-stream to receive the streamed response as server-sent events. The default is `\n` delimited events.

raw_prompting : typing.Optional[bool]
When enabled, the user's prompt will be sent to the model without
any pre-processing.

Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments

model : typing.Optional[str]
The name of a compatible [Cohere model](https://docs.cohere.com/docs/models) or the ID of a [fine-tuned](https://docs.cohere.com/docs/chat-fine-tuning) model.

Expand Down Expand Up @@ -1878,7 +1855,6 @@ async def main() -> None:
async with self._raw_client.chat_stream(
message=message,
accepts=accepts,
raw_prompting=raw_prompting,
model=model,
preamble=preamble,
chat_history=chat_history,
Expand Down Expand Up @@ -1912,7 +1888,6 @@ async def chat(
*,
message: str,
accepts: typing.Optional[typing.Literal["text/event-stream"]] = None,
raw_prompting: typing.Optional[bool] = OMIT,
model: typing.Optional[str] = OMIT,
preamble: typing.Optional[str] = OMIT,
chat_history: typing.Optional[typing.Sequence[Message]] = OMIT,
Expand Down Expand Up @@ -1952,12 +1927,6 @@ async def chat(
accepts : typing.Optional[typing.Literal["text/event-stream"]]
Pass text/event-stream to receive the streamed response as server-sent events. The default is `\n` delimited events.

raw_prompting : typing.Optional[bool]
When enabled, the user's prompt will be sent to the model without
any pre-processing.

Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments

model : typing.Optional[str]
The name of a compatible [Cohere model](https://docs.cohere.com/docs/models) or the ID of a [fine-tuned](https://docs.cohere.com/docs/chat-fine-tuning) model.

Expand Down Expand Up @@ -2198,7 +2167,6 @@ async def main() -> None:
_response = await self._raw_client.chat(
message=message,
accepts=accepts,
raw_prompting=raw_prompting,
model=model,
preamble=preamble,
chat_history=chat_history,
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 @@ -22,10 +22,10 @@ def __init__(

def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
"User-Agent": "cohere/5.16.2",
"User-Agent": "cohere/5.16.3",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "cohere",
"X-Fern-SDK-Version": "5.16.2",
"X-Fern-SDK-Version": "5.16.3",
}
if self._client_name is not None:
headers["X-Client-Name"] = self._client_name
Expand Down
32 changes: 0 additions & 32 deletions src/cohere/raw_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ def chat_stream(
*,
message: str,
accepts: typing.Optional[typing.Literal["text/event-stream"]] = None,
raw_prompting: typing.Optional[bool] = OMIT,
model: typing.Optional[str] = OMIT,
preamble: typing.Optional[str] = OMIT,
chat_history: typing.Optional[typing.Sequence[Message]] = OMIT,
Expand Down Expand Up @@ -115,12 +114,6 @@ def chat_stream(
accepts : typing.Optional[typing.Literal["text/event-stream"]]
Pass text/event-stream to receive the streamed response as server-sent events. The default is `\n` delimited events.

raw_prompting : typing.Optional[bool]
When enabled, the user's prompt will be sent to the model without
any pre-processing.

Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments

model : typing.Optional[str]
The name of a compatible [Cohere model](https://docs.cohere.com/docs/models) or the ID of a [fine-tuned](https://docs.cohere.com/docs/chat-fine-tuning) model.

Expand Down Expand Up @@ -329,7 +322,6 @@ def chat_stream(
"v1/chat",
method="POST",
json={
"raw_prompting": raw_prompting,
"message": message,
"model": model,
"preamble": preamble,
Expand Down Expand Up @@ -542,7 +534,6 @@ def chat(
*,
message: str,
accepts: typing.Optional[typing.Literal["text/event-stream"]] = None,
raw_prompting: typing.Optional[bool] = OMIT,
model: typing.Optional[str] = OMIT,
preamble: typing.Optional[str] = OMIT,
chat_history: typing.Optional[typing.Sequence[Message]] = OMIT,
Expand Down Expand Up @@ -582,12 +573,6 @@ def chat(
accepts : typing.Optional[typing.Literal["text/event-stream"]]
Pass text/event-stream to receive the streamed response as server-sent events. The default is `\n` delimited events.

raw_prompting : typing.Optional[bool]
When enabled, the user's prompt will be sent to the model without
any pre-processing.

Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments

model : typing.Optional[str]
The name of a compatible [Cohere model](https://docs.cohere.com/docs/models) or the ID of a [fine-tuned](https://docs.cohere.com/docs/chat-fine-tuning) model.

Expand Down Expand Up @@ -796,7 +781,6 @@ def chat(
"v1/chat",
method="POST",
json={
"raw_prompting": raw_prompting,
"message": message,
"model": model,
"preamble": preamble,
Expand Down Expand Up @@ -2989,7 +2973,6 @@ async def chat_stream(
*,
message: str,
accepts: typing.Optional[typing.Literal["text/event-stream"]] = None,
raw_prompting: typing.Optional[bool] = OMIT,
model: typing.Optional[str] = OMIT,
preamble: typing.Optional[str] = OMIT,
chat_history: typing.Optional[typing.Sequence[Message]] = OMIT,
Expand Down Expand Up @@ -3030,12 +3013,6 @@ async def chat_stream(
accepts : typing.Optional[typing.Literal["text/event-stream"]]
Pass text/event-stream to receive the streamed response as server-sent events. The default is `\n` delimited events.

raw_prompting : typing.Optional[bool]
When enabled, the user's prompt will be sent to the model without
any pre-processing.

Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments

model : typing.Optional[str]
The name of a compatible [Cohere model](https://docs.cohere.com/docs/models) or the ID of a [fine-tuned](https://docs.cohere.com/docs/chat-fine-tuning) model.

Expand Down Expand Up @@ -3244,7 +3221,6 @@ async def chat_stream(
"v1/chat",
method="POST",
json={
"raw_prompting": raw_prompting,
"message": message,
"model": model,
"preamble": preamble,
Expand Down Expand Up @@ -3457,7 +3433,6 @@ async def chat(
*,
message: str,
accepts: typing.Optional[typing.Literal["text/event-stream"]] = None,
raw_prompting: typing.Optional[bool] = OMIT,
model: typing.Optional[str] = OMIT,
preamble: typing.Optional[str] = OMIT,
chat_history: typing.Optional[typing.Sequence[Message]] = OMIT,
Expand Down Expand Up @@ -3497,12 +3472,6 @@ async def chat(
accepts : typing.Optional[typing.Literal["text/event-stream"]]
Pass text/event-stream to receive the streamed response as server-sent events. The default is `\n` delimited events.

raw_prompting : typing.Optional[bool]
When enabled, the user's prompt will be sent to the model without
any pre-processing.

Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments

model : typing.Optional[str]
The name of a compatible [Cohere model](https://docs.cohere.com/docs/models) or the ID of a [fine-tuned](https://docs.cohere.com/docs/chat-fine-tuning) model.

Expand Down Expand Up @@ -3711,7 +3680,6 @@ async def chat(
"v1/chat",
method="POST",
json={
"raw_prompting": raw_prompting,
"message": message,
"model": model,
"preamble": preamble,
Expand Down
2 changes: 0 additions & 2 deletions src/cohere/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@
from .non_streamed_chat_response import NonStreamedChatResponse
from .o_auth_authorize_response import OAuthAuthorizeResponse
from .parse_info import ParseInfo
from .reasoning_effort import ReasoningEffort
from .rerank_document import RerankDocument
from .rerank_request_documents_item import RerankRequestDocumentsItem
from .rerank_response import RerankResponse
Expand Down Expand Up @@ -390,7 +389,6 @@
"NonStreamedChatResponse",
"OAuthAuthorizeResponse",
"ParseInfo",
"ReasoningEffort",
"RerankDocument",
"RerankRequestDocumentsItem",
"RerankResponse",
Expand Down
5 changes: 0 additions & 5 deletions src/cohere/types/chat_message_end_event_delta.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
from .chat_finish_reason import ChatFinishReason
from .usage import Usage


class ChatMessageEndEventDelta(UncheckedBaseModel):
Expand All @@ -15,9 +13,6 @@ class ChatMessageEndEventDelta(UncheckedBaseModel):
An error message if an error occurred during the generation.
"""

finish_reason: typing.Optional[ChatFinishReason] = None
usage: typing.Optional[Usage] = None

if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2
else:
Expand Down
5 changes: 0 additions & 5 deletions src/cohere/types/reasoning_effort.py

This file was deleted.

Loading
Loading