Skip to content

Commit e393e7d

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

14 files changed

+96
-56
lines changed

poetry.lock

Lines changed: 39 additions & 44 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.17.0"
6+
version = "5.17.1"
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
@@ -61,6 +61,7 @@
6161
ChatTextGenerationEvent,
6262
ChatTextResponseFormat,
6363
ChatTextResponseFormatV2,
64+
ChatThinkingContent,
6465
ChatToolCallDeltaEvent,
6566
ChatToolCallDeltaEventDelta,
6667
ChatToolCallDeltaEventDeltaMessage,
@@ -364,6 +365,7 @@
364365
"ChatTextGenerationEvent",
365366
"ChatTextResponseFormat",
366367
"ChatTextResponseFormatV2",
368+
"ChatThinkingContent",
367369
"ChatToolCallDeltaEvent",
368370
"ChatToolCallDeltaEventDelta",
369371
"ChatToolCallDeltaEventDeltaMessage",

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.17.0",
25+
"User-Agent": "cohere/5.17.1",
2626
"X-Fern-Language": "Python",
2727
"X-Fern-SDK-Name": "cohere",
28-
"X-Fern-SDK-Version": "5.17.0",
28+
"X-Fern-SDK-Version": "5.17.1",
2929
}
3030
if self._client_name is not None:
3131
headers["X-Client-Name"] = self._client_name

src/cohere/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
from .chat_text_generation_event import ChatTextGenerationEvent
7474
from .chat_text_response_format import ChatTextResponseFormat
7575
from .chat_text_response_format_v2 import ChatTextResponseFormatV2
76+
from .chat_thinking_content import ChatThinkingContent
7677
from .chat_tool_call_delta_event import ChatToolCallDeltaEvent
7778
from .chat_tool_call_delta_event_delta import ChatToolCallDeltaEventDelta
7879
from .chat_tool_call_delta_event_delta_message import ChatToolCallDeltaEventDeltaMessage
@@ -289,6 +290,7 @@
289290
"ChatTextGenerationEvent",
290291
"ChatTextResponseFormat",
291292
"ChatTextResponseFormatV2",
293+
"ChatThinkingContent",
292294
"ChatToolCallDeltaEvent",
293295
"ChatToolCallDeltaEventDelta",
294296
"ChatToolCallDeltaEventDeltaMessage",

src/cohere/types/assistant_message_response_content_item.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,16 @@ class Config:
2424

2525

2626
class ThinkingAssistantMessageResponseContentItem(UncheckedBaseModel):
27-
value: typing.Optional[typing.Any] = None
2827
type: typing.Literal["thinking"] = "thinking"
28+
thinking: str
2929

30-
if not IS_PYDANTIC_V2:
30+
if IS_PYDANTIC_V2:
31+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2
32+
else:
3133

3234
class Config:
3335
smart_union = True
36+
extra = pydantic.Extra.allow
3437

3538

3639
AssistantMessageResponseContentItem = typing_extensions.Annotated[

src/cohere/types/assistant_message_v2content_item.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,16 @@ class Config:
2424

2525

2626
class ThinkingAssistantMessageV2ContentItem(UncheckedBaseModel):
27-
value: typing.Optional[typing.Any] = None
2827
type: typing.Literal["thinking"] = "thinking"
28+
thinking: str
2929

30-
if not IS_PYDANTIC_V2:
30+
if IS_PYDANTIC_V2:
31+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2
32+
else:
3133

3234
class Config:
3335
smart_union = True
36+
extra = pydantic.Extra.allow
3437

3538

3639
AssistantMessageV2ContentItem = typing_extensions.Annotated[

src/cohere/types/chat_content_start_event_delta_message_content.py

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

1010

1111
class ChatContentStartEventDeltaMessageContent(UncheckedBaseModel):
12+
thinking: typing.Optional[str] = None
1213
text: typing.Optional[str] = None
1314
type: typing.Optional[ChatContentStartEventDeltaMessageContentType] = None
1415

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
import typing
4+
5+
import pydantic
6+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
7+
from ..core.unchecked_base_model import UncheckedBaseModel
8+
9+
10+
class ChatThinkingContent(UncheckedBaseModel):
11+
"""
12+
Thinking content of the message. This will be present when `thinking` is enabled, and will contain the models internal reasoning.
13+
"""
14+
15+
thinking: str
16+
17+
if IS_PYDANTIC_V2:
18+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2
19+
else:
20+
21+
class Config:
22+
smart_union = True
23+
extra = pydantic.Extra.allow

src/cohere/types/embed_by_type_response_embeddings.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ class EmbedByTypeResponseEmbeddings(UncheckedBaseModel):
4141
An array of packed unsigned binary embeddings. The length of each binary embedding is 1/8 the length of the float embeddings of the provided model. Each value is between 0 and 255.
4242
"""
4343

44+
base64: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
45+
"""
46+
An array of base64 embeddings. Each string is the result of appending the float embedding bytes together and base64 encoding that.
47+
"""
48+
4449
if IS_PYDANTIC_V2:
4550
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2
4651
else:

0 commit comments

Comments
 (0)