Skip to content

Commit 444e04b

Browse files
SDK regeneration (#688)
Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
1 parent 6af2c21 commit 444e04b

File tree

9 files changed

+110
-120
lines changed

9 files changed

+110
-120
lines changed

poetry.lock

Lines changed: 86 additions & 99 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "cohere"
33

44
[tool.poetry]
55
name = "cohere"
6-
version = "5.16.3"
6+
version = "5.17.0"
77
description = ""
88
readme = "README.md"
99
authors = []

src/cohere/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@
207207
TextToolContent,
208208
Thinking,
209209
ThinkingAssistantMessageResponseContentItem,
210+
ThinkingAssistantMessageV2ContentItem,
210211
ThinkingType,
211212
TokenizeResponse,
212213
Tool,
@@ -541,6 +542,7 @@
541542
"TextToolContent",
542543
"Thinking",
543544
"ThinkingAssistantMessageResponseContentItem",
545+
"ThinkingAssistantMessageV2ContentItem",
544546
"ThinkingType",
545547
"TokenizeResponse",
546548
"TooManyRequestsError",

src/cohere/core/client_wrapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ def __init__(
2222

2323
def get_headers(self) -> typing.Dict[str, str]:
2424
headers: typing.Dict[str, str] = {
25-
"User-Agent": "cohere/5.16.3",
25+
"User-Agent": "cohere/5.17.0",
2626
"X-Fern-Language": "Python",
2727
"X-Fern-SDK-Name": "cohere",
28-
"X-Fern-SDK-Version": "5.16.3",
28+
"X-Fern-SDK-Version": "5.17.0",
2929
}
3030
if self._client_name is not None:
3131
headers["X-Client-Name"] = self._client_name

src/cohere/types/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414
ThinkingAssistantMessageResponseContentItem,
1515
)
1616
from .assistant_message_v2content import AssistantMessageV2Content
17-
from .assistant_message_v2content_item import AssistantMessageV2ContentItem, TextAssistantMessageV2ContentItem
17+
from .assistant_message_v2content_item import (
18+
AssistantMessageV2ContentItem,
19+
TextAssistantMessageV2ContentItem,
20+
ThinkingAssistantMessageV2ContentItem,
21+
)
1822
from .auth_token_type import AuthTokenType
1923
from .chat_citation import ChatCitation
2024
from .chat_citation_generation_event import ChatCitationGenerationEvent
@@ -431,6 +435,7 @@
431435
"TextToolContent",
432436
"Thinking",
433437
"ThinkingAssistantMessageResponseContentItem",
438+
"ThinkingAssistantMessageV2ContentItem",
434439
"ThinkingType",
435440
"TokenizeResponse",
436441
"Tool",

src/cohere/types/assistant_message_v2content_item.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ class Config:
2323
extra = pydantic.Extra.allow
2424

2525

26+
class ThinkingAssistantMessageV2ContentItem(UncheckedBaseModel):
27+
value: typing.Optional[typing.Any] = None
28+
type: typing.Literal["thinking"] = "thinking"
29+
30+
if not IS_PYDANTIC_V2:
31+
32+
class Config:
33+
smart_union = True
34+
35+
2636
AssistantMessageV2ContentItem = typing_extensions.Annotated[
27-
TextAssistantMessageV2ContentItem, UnionMetadata(discriminant="type")
37+
typing.Union[TextAssistantMessageV2ContentItem, ThinkingAssistantMessageV2ContentItem],
38+
UnionMetadata(discriminant="type"),
2839
]

src/cohere/types/chat_content_delta_event_delta_message_content.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99

1010
class ChatContentDeltaEventDeltaMessageContent(UncheckedBaseModel):
11+
thinking: typing.Optional[str] = None
1112
text: typing.Optional[str] = None
1213

1314
if IS_PYDANTIC_V2:

src/cohere/v2/client.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@ def chat_stream(
157157
158158
**Note**: This parameter is only compatible with models [Command-r7b](https://docs.cohere.com/v2/docs/command-r7b) and newer.
159159
160-
**Note**: The same functionality can be achieved in `/v1/chat` using the `force_single_step` parameter. If `force_single_step=true`, this is equivalent to specifying `REQUIRED`. While if `force_single_step=true` and `tool_results` are passed, this is equivalent to specifying `NONE`.
161-
162160
thinking : typing.Optional[Thinking]
163161
164162
raw_prompting : typing.Optional[bool]
@@ -332,8 +330,6 @@ def chat(
332330
333331
**Note**: This parameter is only compatible with models [Command-r7b](https://docs.cohere.com/v2/docs/command-r7b) and newer.
334332
335-
**Note**: The same functionality can be achieved in `/v1/chat` using the `force_single_step` parameter. If `force_single_step=true`, this is equivalent to specifying `REQUIRED`. While if `force_single_step=true` and `tool_results` are passed, this is equivalent to specifying `NONE`.
336-
337333
thinking : typing.Optional[Thinking]
338334
339335
raw_prompting : typing.Optional[bool]
@@ -696,8 +692,6 @@ async def chat_stream(
696692
697693
**Note**: This parameter is only compatible with models [Command-r7b](https://docs.cohere.com/v2/docs/command-r7b) and newer.
698694
699-
**Note**: The same functionality can be achieved in `/v1/chat` using the `force_single_step` parameter. If `force_single_step=true`, this is equivalent to specifying `REQUIRED`. While if `force_single_step=true` and `tool_results` are passed, this is equivalent to specifying `NONE`.
700-
701695
thinking : typing.Optional[Thinking]
702696
703697
raw_prompting : typing.Optional[bool]
@@ -880,8 +874,6 @@ async def chat(
880874
881875
**Note**: This parameter is only compatible with models [Command-r7b](https://docs.cohere.com/v2/docs/command-r7b) and newer.
882876
883-
**Note**: The same functionality can be achieved in `/v1/chat` using the `force_single_step` parameter. If `force_single_step=true`, this is equivalent to specifying `REQUIRED`. While if `force_single_step=true` and `tool_results` are passed, this is equivalent to specifying `NONE`.
884-
885877
thinking : typing.Optional[Thinking]
886878
887879
raw_prompting : typing.Optional[bool]

src/cohere/v2/raw_client.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,6 @@ def chat_stream(
166166
167167
**Note**: This parameter is only compatible with models [Command-r7b](https://docs.cohere.com/v2/docs/command-r7b) and newer.
168168
169-
**Note**: The same functionality can be achieved in `/v1/chat` using the `force_single_step` parameter. If `force_single_step=true`, this is equivalent to specifying `REQUIRED`. While if `force_single_step=true` and `tool_results` are passed, this is equivalent to specifying `NONE`.
170-
171169
thinking : typing.Optional[Thinking]
172170
173171
raw_prompting : typing.Optional[bool]
@@ -506,8 +504,6 @@ def chat(
506504
507505
**Note**: This parameter is only compatible with models [Command-r7b](https://docs.cohere.com/v2/docs/command-r7b) and newer.
508506
509-
**Note**: The same functionality can be achieved in `/v1/chat` using the `force_single_step` parameter. If `force_single_step=true`, this is equivalent to specifying `REQUIRED`. While if `force_single_step=true` and `tool_results` are passed, this is equivalent to specifying `NONE`.
510-
511507
thinking : typing.Optional[Thinking]
512508
513509
raw_prompting : typing.Optional[bool]
@@ -1281,8 +1277,6 @@ async def chat_stream(
12811277
12821278
**Note**: This parameter is only compatible with models [Command-r7b](https://docs.cohere.com/v2/docs/command-r7b) and newer.
12831279
1284-
**Note**: The same functionality can be achieved in `/v1/chat` using the `force_single_step` parameter. If `force_single_step=true`, this is equivalent to specifying `REQUIRED`. While if `force_single_step=true` and `tool_results` are passed, this is equivalent to specifying `NONE`.
1285-
12861280
thinking : typing.Optional[Thinking]
12871281
12881282
raw_prompting : typing.Optional[bool]
@@ -1621,8 +1615,6 @@ async def chat(
16211615
16221616
**Note**: This parameter is only compatible with models [Command-r7b](https://docs.cohere.com/v2/docs/command-r7b) and newer.
16231617
1624-
**Note**: The same functionality can be achieved in `/v1/chat` using the `force_single_step` parameter. If `force_single_step=true`, this is equivalent to specifying `REQUIRED`. While if `force_single_step=true` and `tool_results` are passed, this is equivalent to specifying `NONE`.
1625-
16261618
thinking : typing.Optional[Thinking]
16271619
16281620
raw_prompting : typing.Optional[bool]

0 commit comments

Comments
 (0)