Skip to content

Commit

Permalink
Update client.py (#449)
Browse files Browse the repository at this point in the history
  • Loading branch information
billytrend-cohere committed Apr 3, 2024
1 parent 0f7e675 commit 44524b2
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/cohere/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ def fn(*args, **kwargs):

class Client(BaseCohere):
def __init__(
self,
api_key: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None,
*,
base_url: typing.Optional[str] = os.getenv("CO_API_URL"),
environment: ClientEnvironment = ClientEnvironment.PRODUCTION,
client_name: typing.Optional[str] = None,
timeout: typing.Optional[float] = 60,
httpx_client: typing.Optional[httpx.Client] = None,
self,
api_key: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None,
*,
base_url: typing.Optional[str] = os.getenv("CO_API_URL"),
environment: ClientEnvironment = ClientEnvironment.PRODUCTION,
client_name: typing.Optional[str] = None,
timeout: typing.Optional[float] = None,
httpx_client: typing.Optional[httpx.Client] = None,
):
if api_key is None:
api_key = os.getenv("CO_API_KEY")
Expand Down Expand Up @@ -188,14 +188,14 @@ def embed(

class AsyncClient(AsyncBaseCohere):
def __init__(
self,
api_key: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None,
*,
base_url: typing.Optional[str] = os.getenv("CO_API_URL"),
environment: ClientEnvironment = ClientEnvironment.PRODUCTION,
client_name: typing.Optional[str] = None,
timeout: typing.Optional[float] = 60,
httpx_client: typing.Optional[httpx.AsyncClient] = None,
self,
api_key: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None,
*,
base_url: typing.Optional[str] = os.getenv("CO_API_URL"),
environment: ClientEnvironment = ClientEnvironment.PRODUCTION,
client_name: typing.Optional[str] = None,
timeout: typing.Optional[float] = None,
httpx_client: typing.Optional[httpx.AsyncClient] = None,
):
if api_key is None:
api_key = os.getenv("CO_API_KEY")
Expand Down

0 comments on commit 44524b2

Please sign in to comment.