Skip to content

Commit 5327604

Browse files
committed
SDK regeneration
1 parent b701775 commit 5327604

File tree

15 files changed

+1501
-692
lines changed

15 files changed

+1501
-692
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- name: Set up python
1111
uses: actions/setup-python@v4
1212
with:
13-
python-version: 3.7
13+
python-version: 3.8
1414
- name: Bootstrap poetry
1515
run: |
1616
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
@@ -26,7 +26,7 @@ jobs:
2626
- name: Set up python
2727
uses: actions/setup-python@v4
2828
with:
29-
python-version: 3.7
29+
python-version: 3.8
3030
- name: Bootstrap poetry
3131
run: |
3232
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
@@ -45,7 +45,7 @@ jobs:
4545
- name: Set up python
4646
uses: actions/setup-python@v4
4747
with:
48-
python-version: 3.7
48+
python-version: 3.8
4949
- name: Bootstrap poetry
5050
run: |
5151
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1

poetry.lock

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

pyproject.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "cohere"
3-
version = "5.0.0a3"
3+
version = "5.0.0a4"
44
description = ""
55
readme = "README.md"
66
authors = []
@@ -9,9 +9,10 @@ packages = [
99
]
1010

1111
[tool.poetry.dependencies]
12-
python = "^3.7"
12+
python = "^3.8"
1313
httpx = ">=0.21.2"
14-
pydantic = ">= 1.9.2, < 2.5.0"
14+
pydantic = ">= 1.9.2"
15+
typing_extensions = ">= 4.0.0"
1516

1617
[tool.poetry.dev-dependencies]
1718
mypy = "0.971"

src/cohere/client.py

Lines changed: 554 additions & 181 deletions
Large diffs are not rendered by default.

src/cohere/core/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
from .datetime_utils import serialize_datetime
66
from .jsonable_encoder import jsonable_encoder
77
from .remove_none_from_dict import remove_none_from_dict
8+
from .request_options import RequestOptions
89

910
__all__ = [
1011
"ApiError",
1112
"AsyncClientWrapper",
1213
"BaseClientWrapper",
14+
"RequestOptions",
1315
"SyncClientWrapper",
1416
"jsonable_encoder",
1517
"remove_none_from_dict",

src/cohere/core/client_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def get_headers(self) -> typing.Dict[str, str]:
2121
headers: typing.Dict[str, str] = {
2222
"X-Fern-Language": "Python",
2323
"X-Fern-SDK-Name": "cohere",
24-
"X-Fern-SDK-Version": "5.0.0a3",
24+
"X-Fern-SDK-Version": "5.0.0a4",
2525
}
2626
if self._client_name is not None:
2727
headers["X-Client-Name"] = self._client_name

src/cohere/core/request_options.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
import typing
4+
5+
try:
6+
from typing import NotRequired # type: ignore
7+
except ImportError:
8+
from typing_extensions import NotRequired # type: ignore
9+
10+
11+
class RequestOptions(typing.TypedDict):
12+
"""
13+
Additional options for request-specific configuration when calling APIs via the SDK.
14+
This is used primarily as an optional final parameter for service functions.
15+
16+
Attributes:
17+
- timeout_in_seconds: int. The number of seconds to await an API call before timing out.
18+
19+
- additional_headers: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's header dict
20+
21+
- additional_query_parameters: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's query parameters dict
22+
23+
- additional_body_parameters: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's body parameters dict
24+
"""
25+
26+
timeout_in_seconds: NotRequired[int]
27+
additional_headers: NotRequired[typing.Dict[str, typing.Any]]
28+
additional_query_parameters: NotRequired[typing.Dict[str, typing.Any]]
29+
additional_body_parameters: NotRequired[typing.Dict[str, typing.Any]]

src/cohere/environment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55

66
class ClientEnvironment(enum.Enum):
7-
PRODUCTION = "https://api.cohere.ai"
7+
PRODUCTION = "https://api.cohere.ai/v1"

0 commit comments

Comments
 (0)