Skip to content

Commit

Permalink
SDK regeneration (#436)
Browse files Browse the repository at this point in the history
Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
  • Loading branch information
fern-api[bot] authored Mar 25, 2024
1 parent 84874c0 commit bc2b61f
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 72 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.1.1"
version = "5.1.2"
description = ""
readme = "README.md"
authors = []
Expand Down
44 changes: 22 additions & 22 deletions src/cohere/base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def __init__(
environment: ClientEnvironment = ClientEnvironment.PRODUCTION,
client_name: typing.Optional[str] = None,
token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = os.getenv("CO_API_KEY"),
timeout: typing.Optional[float] = 60,
timeout: typing.Optional[float] = 300,
httpx_client: typing.Optional[httpx.Client] = None,
):
if token is None:
Expand Down Expand Up @@ -398,7 +398,7 @@ def chat_stream(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
) as _response:
Expand Down Expand Up @@ -643,7 +643,7 @@ def chat(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
)
Expand Down Expand Up @@ -819,7 +819,7 @@ def generate_stream(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
) as _response:
Expand Down Expand Up @@ -990,7 +990,7 @@ def generate(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
)
Expand Down Expand Up @@ -1103,7 +1103,7 @@ def embed(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
)
Expand Down Expand Up @@ -1202,7 +1202,7 @@ def rerank(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
)
Expand Down Expand Up @@ -1328,7 +1328,7 @@ def classify(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
)
Expand Down Expand Up @@ -1427,7 +1427,7 @@ def summarize(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
)
Expand Down Expand Up @@ -1490,7 +1490,7 @@ def tokenize(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
)
Expand Down Expand Up @@ -1560,7 +1560,7 @@ def detokenize(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
)
Expand Down Expand Up @@ -1609,7 +1609,7 @@ def __init__(
environment: ClientEnvironment = ClientEnvironment.PRODUCTION,
client_name: typing.Optional[str] = None,
token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = os.getenv("CO_API_KEY"),
timeout: typing.Optional[float] = 60,
timeout: typing.Optional[float] = 300,
httpx_client: typing.Optional[httpx.AsyncClient] = None,
):
if token is None:
Expand Down Expand Up @@ -1910,7 +1910,7 @@ async def chat_stream(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
) as _response:
Expand Down Expand Up @@ -2155,7 +2155,7 @@ async def chat(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
)
Expand Down Expand Up @@ -2331,7 +2331,7 @@ async def generate_stream(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
) as _response:
Expand Down Expand Up @@ -2502,7 +2502,7 @@ async def generate(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
)
Expand Down Expand Up @@ -2615,7 +2615,7 @@ async def embed(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
)
Expand Down Expand Up @@ -2714,7 +2714,7 @@ async def rerank(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
)
Expand Down Expand Up @@ -2840,7 +2840,7 @@ async def classify(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
)
Expand Down Expand Up @@ -2939,7 +2939,7 @@ async def summarize(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
)
Expand Down Expand Up @@ -3002,7 +3002,7 @@ async def tokenize(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
)
Expand Down Expand Up @@ -3072,7 +3072,7 @@ async def detokenize(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
)
Expand Down
24 changes: 12 additions & 12 deletions src/cohere/connectors/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def list(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
)
Expand Down Expand Up @@ -186,7 +186,7 @@ def create(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
)
Expand Down Expand Up @@ -241,7 +241,7 @@ def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = Non
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
)
Expand Down Expand Up @@ -296,7 +296,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] =
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
)
Expand Down Expand Up @@ -400,7 +400,7 @@ def update(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
)
Expand Down Expand Up @@ -479,7 +479,7 @@ def o_auth_authorize(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
)
Expand Down Expand Up @@ -555,7 +555,7 @@ async def list(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
)
Expand Down Expand Up @@ -654,7 +654,7 @@ async def create(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
)
Expand Down Expand Up @@ -709,7 +709,7 @@ async def get(self, id: str, *, request_options: typing.Optional[RequestOptions]
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
)
Expand Down Expand Up @@ -766,7 +766,7 @@ async def delete(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
)
Expand Down Expand Up @@ -870,7 +870,7 @@ async def update(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
)
Expand Down Expand Up @@ -949,7 +949,7 @@ async def o_auth_authorize(
),
timeout=request_options.get("timeout_in_seconds")
if request_options is not None and request_options.get("timeout_in_seconds") is not None
else 60,
else 300,
retries=0,
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
)
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 @@ -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.1.1",
"X-Fern-SDK-Version": "5.1.2",
}
if self._client_name is not None:
headers["X-Client-Name"] = self._client_name
Expand Down
Loading

0 comments on commit bc2b61f

Please sign in to comment.