From fe4dd790bc36dd4e26a0891ceea0c6f6eaa2f887 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20BREDIN?= Date: Sat, 20 Sep 2025 21:53:59 +0200 Subject: [PATCH] fix: fix error message (TOKEN > KEY) (#7) --- src/pyannoteai/sdk/client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pyannoteai/sdk/client.py b/src/pyannoteai/sdk/client.py index 3e50876..e077058 100644 --- a/src/pyannoteai/sdk/client.py +++ b/src/pyannoteai/sdk/client.py @@ -90,7 +90,7 @@ class Client: ---------- token : str, optional pyannoteAI API key created from https://dashboard.pyannote.ai. - Defaults to using `PYANNOTEAI_API_TOKEN` environment variable. + Defaults to using `PYANNOTEAI_API_KEY` environment variable. Usage ----- @@ -123,7 +123,7 @@ def _raise_for_status(self, response: Response): raise HTTPError( """ Failed to authenticate to pyannoteAI API. Please create an API key on https://dashboard.pyannote.ai/ and -provide it either via `PYANNOTEAI_API_TOKEN` environment variable or with `token` parameter.""" +provide it either via `PYANNOTEAI_API_KEY` environment variable or with `token` parameter.""" ) # TODO: add support for other status code when @@ -207,7 +207,7 @@ def api_key(self, api_key: str) -> None: raise ValueError( """ Failed to authenticate to pyannoteAI web API. Please create an API key on https://dashboard.pyannote.ai/ and -provide it either via `PYANNOTEAI_API_TOKEN` environment variable or with `token` parameter.""" +provide it either via `PYANNOTEAI_API_KEY` environment variable or with `token` parameter.""" ) # store the API key and prepare the headers