From e66db36f2c5036158c3945a3ec703a6bafdf7431 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Thu, 11 Sep 2025 18:35:04 +0000 Subject: [PATCH] SDK regeneration --- poetry.lock | 6 +++--- pyproject.toml | 2 +- src/cohere/core/client_wrapper.py | 4 ++-- src/cohere/finetuning/client.py | 12 ++++++------ src/cohere/v2/client.py | 32 ------------------------------- src/cohere/v2/raw_client.py | 32 ------------------------------- 6 files changed, 12 insertions(+), 76 deletions(-) diff --git a/poetry.lock b/poetry.lock index 3c68dc09e..26e37aa66 100644 --- a/poetry.lock +++ b/poetry.lock @@ -222,13 +222,13 @@ files = [ [[package]] name = "fsspec" -version = "2025.7.0" +version = "2025.9.0" description = "File-system specification" optional = false python-versions = ">=3.9" files = [ - {file = "fsspec-2025.7.0-py3-none-any.whl", hash = "sha256:8b012e39f63c7d5f10474de957f3ab793b47b45ae7d39f2fb735f8bbe25c0e21"}, - {file = "fsspec-2025.7.0.tar.gz", hash = "sha256:786120687ffa54b8283d942929540d8bc5ccfa820deb555a2b5d0ed2b737bf58"}, + {file = "fsspec-2025.9.0-py3-none-any.whl", hash = "sha256:530dc2a2af60a414a832059574df4a6e10cce927f6f4a78209390fe38955cfb7"}, + {file = "fsspec-2025.9.0.tar.gz", hash = "sha256:19fd429483d25d28b65ec68f9f4adc16c17ea2c7c7bf54ec61360d478fb19c19"}, ] [package.extras] diff --git a/pyproject.toml b/pyproject.toml index c3e6fa0a8..22360b416 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "cohere" [tool.poetry] name = "cohere" -version = "5.17.1" +version = "6.0.0" description = "" readme = "README.md" authors = [] diff --git a/src/cohere/core/client_wrapper.py b/src/cohere/core/client_wrapper.py index 46eee2950..a3faddf16 100644 --- a/src/cohere/core/client_wrapper.py +++ b/src/cohere/core/client_wrapper.py @@ -22,10 +22,10 @@ def __init__( def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "cohere/5.17.1", + "User-Agent": "cohere/6.0.0", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "cohere", - "X-Fern-SDK-Version": "5.17.1", + "X-Fern-SDK-Version": "6.0.0", } if self._client_name is not None: headers["X-Client-Name"] = self._client_name diff --git a/src/cohere/finetuning/client.py b/src/cohere/finetuning/client.py index 66e68345a..aa4a8d066 100644 --- a/src/cohere/finetuning/client.py +++ b/src/cohere/finetuning/client.py @@ -115,12 +115,12 @@ def create_finetuned_model( ) client.finetuning.create_finetuned_model( request=FinetunedModel( - name="api-test", + name="name", settings=Settings( base_model=BaseModel( - base_type="BASE_TYPE_CHAT", + base_type="BASE_TYPE_UNSPECIFIED", ), - dataset_id="my-dataset-id", + dataset_id="dataset_id", ), ), ) @@ -478,12 +478,12 @@ async def create_finetuned_model( async def main() -> None: await client.finetuning.create_finetuned_model( request=FinetunedModel( - name="api-test", + name="name", settings=Settings( base_model=BaseModel( - base_type="BASE_TYPE_CHAT", + base_type="BASE_TYPE_UNSPECIFIED", ), - dataset_id="my-dataset-id", + dataset_id="dataset_id", ), ), ) diff --git a/src/cohere/v2/client.py b/src/cohere/v2/client.py index 0c9a1325c..a19d78e27 100644 --- a/src/cohere/v2/client.py +++ b/src/cohere/v2/client.py @@ -66,7 +66,6 @@ def chat_stream( logprobs: typing.Optional[bool] = OMIT, tool_choice: typing.Optional[V2ChatStreamRequestToolChoice] = OMIT, thinking: typing.Optional[Thinking] = OMIT, - raw_prompting: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[V2ChatStreamResponse]: """ @@ -159,12 +158,6 @@ def chat_stream( thinking : typing.Optional[Thinking] - 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 - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -212,7 +205,6 @@ def chat_stream( logprobs=logprobs, tool_choice=tool_choice, thinking=thinking, - raw_prompting=raw_prompting, request_options=request_options, ) as r: yield from r.data @@ -239,7 +231,6 @@ def chat( logprobs: typing.Optional[bool] = OMIT, tool_choice: typing.Optional[V2ChatRequestToolChoice] = OMIT, thinking: typing.Optional[Thinking] = OMIT, - raw_prompting: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> V2ChatResponse: """ @@ -332,12 +323,6 @@ def chat( thinking : typing.Optional[Thinking] - 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 - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -383,7 +368,6 @@ def chat( logprobs=logprobs, tool_choice=tool_choice, thinking=thinking, - raw_prompting=raw_prompting, request_options=request_options, ) return _response.data @@ -602,7 +586,6 @@ async def chat_stream( logprobs: typing.Optional[bool] = OMIT, tool_choice: typing.Optional[V2ChatStreamRequestToolChoice] = OMIT, thinking: typing.Optional[Thinking] = OMIT, - raw_prompting: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[V2ChatStreamResponse]: """ @@ -695,12 +678,6 @@ async def chat_stream( thinking : typing.Optional[Thinking] - 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 - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -756,7 +733,6 @@ async def main() -> None: logprobs=logprobs, tool_choice=tool_choice, thinking=thinking, - raw_prompting=raw_prompting, request_options=request_options, ) as r: async for _chunk in r.data: @@ -784,7 +760,6 @@ async def chat( logprobs: typing.Optional[bool] = OMIT, tool_choice: typing.Optional[V2ChatRequestToolChoice] = OMIT, thinking: typing.Optional[Thinking] = OMIT, - raw_prompting: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> V2ChatResponse: """ @@ -877,12 +852,6 @@ async def chat( thinking : typing.Optional[Thinking] - 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 - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -936,7 +905,6 @@ async def main() -> None: logprobs=logprobs, tool_choice=tool_choice, thinking=thinking, - raw_prompting=raw_prompting, request_options=request_options, ) return _response.data diff --git a/src/cohere/v2/raw_client.py b/src/cohere/v2/raw_client.py index 43ac34e23..630d5d3d9 100644 --- a/src/cohere/v2/raw_client.py +++ b/src/cohere/v2/raw_client.py @@ -75,7 +75,6 @@ def chat_stream( logprobs: typing.Optional[bool] = OMIT, tool_choice: typing.Optional[V2ChatStreamRequestToolChoice] = OMIT, thinking: typing.Optional[Thinking] = OMIT, - raw_prompting: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[HttpResponse[typing.Iterator[V2ChatStreamResponse]]]: """ @@ -168,12 +167,6 @@ def chat_stream( thinking : typing.Optional[Thinking] - 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 - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -217,7 +210,6 @@ def chat_stream( "thinking": convert_and_respect_annotation_metadata( object_=thinking, annotation=Thinking, direction="write" ), - "raw_prompting": raw_prompting, "stream": True, }, headers={ @@ -413,7 +405,6 @@ def chat( logprobs: typing.Optional[bool] = OMIT, tool_choice: typing.Optional[V2ChatRequestToolChoice] = OMIT, thinking: typing.Optional[Thinking] = OMIT, - raw_prompting: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[V2ChatResponse]: """ @@ -506,12 +497,6 @@ def chat( thinking : typing.Optional[Thinking] - 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 - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -555,7 +540,6 @@ def chat( "thinking": convert_and_respect_annotation_metadata( object_=thinking, annotation=Thinking, direction="write" ), - "raw_prompting": raw_prompting, "stream": False, }, headers={ @@ -1187,7 +1171,6 @@ async def chat_stream( logprobs: typing.Optional[bool] = OMIT, tool_choice: typing.Optional[V2ChatStreamRequestToolChoice] = OMIT, thinking: typing.Optional[Thinking] = OMIT, - raw_prompting: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[V2ChatStreamResponse]]]: """ @@ -1280,12 +1263,6 @@ async def chat_stream( thinking : typing.Optional[Thinking] - 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 - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1329,7 +1306,6 @@ async def chat_stream( "thinking": convert_and_respect_annotation_metadata( object_=thinking, annotation=Thinking, direction="write" ), - "raw_prompting": raw_prompting, "stream": True, }, headers={ @@ -1525,7 +1501,6 @@ async def chat( logprobs: typing.Optional[bool] = OMIT, tool_choice: typing.Optional[V2ChatRequestToolChoice] = OMIT, thinking: typing.Optional[Thinking] = OMIT, - raw_prompting: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[V2ChatResponse]: """ @@ -1618,12 +1593,6 @@ async def chat( thinking : typing.Optional[Thinking] - 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 - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1667,7 +1636,6 @@ async def chat( "thinking": convert_and_respect_annotation_metadata( object_=thinking, annotation=Thinking, direction="write" ), - "raw_prompting": raw_prompting, "stream": False, }, headers={