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 Feb 16, 2024
1 parent b701775 commit 5327604
Show file tree
Hide file tree
Showing 15 changed files with 1,501 additions and 692 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8
- name: Bootstrap poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
Expand All @@ -26,7 +26,7 @@ jobs:
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8
- name: Bootstrap poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
Expand All @@ -45,7 +45,7 @@ jobs:
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8
- name: Bootstrap poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
Expand Down
363 changes: 122 additions & 241 deletions poetry.lock

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cohere"
version = "5.0.0a3"
version = "5.0.0a4"
description = ""
readme = "README.md"
authors = []
Expand All @@ -9,9 +9,10 @@ packages = [
]

[tool.poetry.dependencies]
python = "^3.7"
python = "^3.8"
httpx = ">=0.21.2"
pydantic = ">= 1.9.2, < 2.5.0"
pydantic = ">= 1.9.2"
typing_extensions = ">= 4.0.0"

[tool.poetry.dev-dependencies]
mypy = "0.971"
Expand Down
735 changes: 554 additions & 181 deletions src/cohere/client.py

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/cohere/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
from .datetime_utils import serialize_datetime
from .jsonable_encoder import jsonable_encoder
from .remove_none_from_dict import remove_none_from_dict
from .request_options import RequestOptions

__all__ = [
"ApiError",
"AsyncClientWrapper",
"BaseClientWrapper",
"RequestOptions",
"SyncClientWrapper",
"jsonable_encoder",
"remove_none_from_dict",
Expand Down
2 changes: 1 addition & 1 deletion src/cohere/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,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.0a3",
"X-Fern-SDK-Version": "5.0.0a4",
}
if self._client_name is not None:
headers["X-Client-Name"] = self._client_name
Expand Down
29 changes: 29 additions & 0 deletions src/cohere/core/request_options.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This file was auto-generated by Fern from our API Definition.

import typing

try:
from typing import NotRequired # type: ignore
except ImportError:
from typing_extensions import NotRequired # type: ignore


class RequestOptions(typing.TypedDict):
"""
Additional options for request-specific configuration when calling APIs via the SDK.
This is used primarily as an optional final parameter for service functions.
Attributes:
- timeout_in_seconds: int. The number of seconds to await an API call before timing out.
- additional_headers: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's header dict
- additional_query_parameters: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's query parameters dict
- additional_body_parameters: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's body parameters dict
"""

timeout_in_seconds: NotRequired[int]
additional_headers: NotRequired[typing.Dict[str, typing.Any]]
additional_query_parameters: NotRequired[typing.Dict[str, typing.Any]]
additional_body_parameters: NotRequired[typing.Dict[str, typing.Any]]
2 changes: 1 addition & 1 deletion src/cohere/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@


class ClientEnvironment(enum.Enum):
PRODUCTION = "https://api.cohere.ai"
PRODUCTION = "https://api.cohere.ai/v1"
Loading

0 comments on commit 5327604

Please sign in to comment.