Skip to content

Commit 3fd3074

Browse files
Den 318 Own api-keys made-ore-clear(#57)
1 parent 4d03038 commit 3fd3074

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

dendrite_sdk/async_api/_core/dendrite_browser.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,23 +92,23 @@ def __init__(
9292
remote_config: Optional[Providers] = None,
9393
):
9494
"""
95-
Initializes the AsyncDendrite with API keys and Playwright options.
95+
Initializes AsyncDendrite with API keys and Playwright options.
9696
9797
Args:
98-
auth (Optional[Union[str, List[str]]]): The domains on which the browser should try and authenticate on.
99-
openai_api_key (Optional[str], optional): The OpenAI API key. If not provided, it's fetched from the environment variables.
100-
dendrite_api_key (Optional[str], optional): The Dendrite API key. If not provided, it's fetched from the environment variables.
101-
anthropic_api_key (Optional[str], optional): The Anthropic API key. If not provided, it's fetched from the environment variables.
102-
playwright_options (Any, optional): Options for configuring Playwright. Defaults to running in non-headless mode with stealth arguments.
98+
auth (Optional[Union[str, List[str]]]): The domains on which the browser should try and authenticate.
99+
dendrite_api_key (Optional[str]): The Dendrite API key. If not provided, it's fetched from the environment variables.
100+
openai_api_key (Optional[str]): Your own OpenAI API key, provide it, along with other custom API keys, if you wish to use Dendrite without paying for a license.
101+
anthropic_api_key (Optional[str]): The own Anthropic API key, provide it, along with other custom API keys, if you wish to use Dendrite without paying for a license.
102+
playwright_options (Any): Options for configuring Playwright. Defaults to running in non-headless mode with stealth arguments.
103103
104104
Raises:
105-
MissingApiKeyError: If any of the required API keys (Dendrite, OpenAI, Anthropic) are not provided or found in the environment variables.
105+
MissingApiKeyError: If the Dendrite API key is not provided or found in the environment variables.
106106
"""
107107

108108
api_config = APIConfig(
109109
dendrite_api_key=dendrite_api_key or os.environ.get("DENDRITE_API_KEY"),
110-
openai_api_key=openai_api_key or os.environ.get("OPENAI_API_KEY"),
111-
anthropic_api_key=anthropic_api_key or os.environ.get("ANTHROPIC_API_KEY"),
110+
openai_api_key=openai_api_key,
111+
anthropic_api_key=anthropic_api_key,
112112
)
113113

114114
self._impl = self._get_impl(remote_config)

dendrite_sdk/async_api/_ext_impl/browserbase/_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ async def create_session(self) -> str:
3434

3535
if response.status_code >= 400:
3636
raise DendriteException(f"Failed to create session: {response.text}")
37-
37+
3838
return response.json()["id"]
3939

4040
async def stop_session(self, session_id: str):

dendrite_sdk/sync_api/_core/dendrite_browser.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,22 +82,22 @@ def __init__(
8282
remote_config: Optional[Providers] = None,
8383
):
8484
"""
85-
Initializes the Dendrite with API keys and Playwright options.
85+
Initializes Dendrite with API keys and Playwright options.
8686
8787
Args:
88-
auth (Optional[Union[str, List[str]]]): The domains on which the browser should try and authenticate on.
89-
openai_api_key (Optional[str], optional): The OpenAI API key. If not provided, it's fetched from the environment variables.
90-
dendrite_api_key (Optional[str], optional): The Dendrite API key. If not provided, it's fetched from the environment variables.
91-
anthropic_api_key (Optional[str], optional): The Anthropic API key. If not provided, it's fetched from the environment variables.
92-
playwright_options (Any, optional): Options for configuring Playwright. Defaults to running in non-headless mode with stealth arguments.
88+
auth (Optional[Union[str, List[str]]]): The domains on which the browser should try and authenticate.
89+
dendrite_api_key (Optional[str]): The Dendrite API key. If not provided, it's fetched from the environment variables.
90+
openai_api_key (Optional[str]): Your own OpenAI API key, provide it, along with other custom API keys, if you wish to use Dendrite without paying for a license.
91+
anthropic_api_key (Optional[str]): The own Anthropic API key, provide it, along with other custom API keys, if you wish to use Dendrite without paying for a license.
92+
playwright_options (Any): Options for configuring Playwright. Defaults to running in non-headless mode with stealth arguments.
9393
9494
Raises:
95-
MissingApiKeyError: If any of the required API keys (Dendrite, OpenAI, Anthropic) are not provided or found in the environment variables.
95+
MissingApiKeyError: If the Dendrite API key is not provided or found in the environment variables.
9696
"""
9797
api_config = APIConfig(
9898
dendrite_api_key=dendrite_api_key or os.environ.get("DENDRITE_API_KEY"),
99-
openai_api_key=openai_api_key or os.environ.get("OPENAI_API_KEY"),
100-
anthropic_api_key=anthropic_api_key or os.environ.get("ANTHROPIC_API_KEY"),
99+
openai_api_key=openai_api_key,
100+
anthropic_api_key=anthropic_api_key,
101101
)
102102
self._impl = self._get_impl(remote_config)
103103
self.api_config = api_config

0 commit comments

Comments
 (0)