Skip to content

Commit 92f7455

Browse files
chore(docs): use environment variables for authentication in code snippets
1 parent 9dd374a commit 92f7455

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,15 @@ pip install contextual-client[aiohttp]
8181
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
8282

8383
```python
84+
import os
8485
import asyncio
8586
from contextual import DefaultAioHttpClient
8687
from contextual import AsyncContextualAI
8788

8889

8990
async def main() -> None:
9091
async with AsyncContextualAI(
91-
api_key="My API Key",
92+
api_key=os.environ.get("CONTEXTUAL_API_KEY"), # This is the default and can be omitted
9293
http_client=DefaultAioHttpClient(),
9394
) as client:
9495
create_agent_output = await client.agents.create(

0 commit comments

Comments
 (0)