Skip to content

Commit

Permalink
SDK regeneration
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Mar 15, 2024
1 parent 29df075 commit 490a01b
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 43 deletions.
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.0.0a9"
version = "5.0.0a10"
description = ""
readme = "README.md"
authors = []
Expand Down
72 changes: 54 additions & 18 deletions src/cohere/base_client.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/cohere/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,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.0.0a9",
"X-Fern-SDK-Version": "5.0.0a10",
}
if self._client_name is not None:
headers["X-Client-Name"] = self._client_name
Expand Down
16 changes: 8 additions & 8 deletions src/cohere/datasets/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def list(
dataset_type: typing.Optional[str] = None,
before: typing.Optional[dt.datetime] = None,
after: typing.Optional[dt.datetime] = None,
limit: typing.Optional[str] = None,
offset: typing.Optional[str] = None,
limit: typing.Optional[float] = None,
offset: typing.Optional[float] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> DatasetsListResponse:
"""
Expand All @@ -52,9 +52,9 @@ def list(
- after: typing.Optional[dt.datetime]. optional filter after a date
- limit: typing.Optional[str]. optional limit to number of results
- limit: typing.Optional[float]. optional limit to number of results
- offset: typing.Optional[str]. optional offset to start of results
- offset: typing.Optional[float]. optional offset to start of results
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
---
Expand Down Expand Up @@ -359,8 +359,8 @@ async def list(
dataset_type: typing.Optional[str] = None,
before: typing.Optional[dt.datetime] = None,
after: typing.Optional[dt.datetime] = None,
limit: typing.Optional[str] = None,
offset: typing.Optional[str] = None,
limit: typing.Optional[float] = None,
offset: typing.Optional[float] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> DatasetsListResponse:
"""
Expand All @@ -373,9 +373,9 @@ async def list(
- after: typing.Optional[dt.datetime]. optional filter after a date
- limit: typing.Optional[str]. optional limit to number of results
- limit: typing.Optional[float]. optional limit to number of results
- offset: typing.Optional[str]. optional offset to start of results
- offset: typing.Optional[float]. optional offset to start of results
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
---
Expand Down
16 changes: 4 additions & 12 deletions src/cohere/types/chat_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,21 @@

class ChatMessage(pydantic.BaseModel):
"""
A single message in a chat history. Contains the role of the sender, the text contents of the message.
Represents a single message in the chat history, excluding the current user turn. It has two properties: `role` and `message`. The `role` identifies the sender (`CHATBOT`, `SYSTEM`, or `USER`), while the `message` contains the text content.
The chat_history parameter should not be used for `SYSTEM` messages in most cases. Instead, to add a `SYSTEM` role message at the beginning of a conversation, the `preamble` parameter should be used.
"""

role: ChatMessageRole = pydantic.Field()
"""
One of CHATBOT|USER to identify who the message is coming from.
One of `CHATBOT`, `SYSTEM`, or `USER` to identify who the message is coming from.
"""

message: str = pydantic.Field()
"""
Contents of the chat message.
"""

generation_id: typing.Optional[str] = pydantic.Field(default=None)
"""
Unique identifier for the generated reply. Useful for submitting feedback.
"""

response_id: typing.Optional[str] = pydantic.Field(default=None)
"""
Unique identifier for the response.
"""

def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
return super().json(**kwargs_with_defaults)
Expand Down
2 changes: 1 addition & 1 deletion src/cohere/types/chat_message_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

import typing

ChatMessageRole = typing.Literal["CHATBOT", "USER"]
ChatMessageRole = typing.Literal["CHATBOT", "SYSTEM", "USER"]
2 changes: 0 additions & 2 deletions src/cohere/types/tool_call.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ class ToolCall(pydantic.BaseModel):
The name and value of the parameters to use when invoking a tool.
"""

generation_id: str

def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
return super().json(**kwargs_with_defaults)
Expand Down

0 comments on commit 490a01b

Please sign in to comment.