Skip to content

Commit ac22598

Browse files
chore(docs): use environment variables for authentication in code snippets
1 parent b53392a commit ac22598

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
@@ -93,14 +93,15 @@ pip install isaacus[aiohttp]
9393
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
9494

9595
```python
96+
import os
9697
import asyncio
9798
from isaacus import DefaultAioHttpClient
9899
from isaacus import AsyncIsaacus
99100

100101

101102
async def main() -> None:
102103
async with AsyncIsaacus(
103-
api_key="My API Key",
104+
api_key=os.environ.get("ISAACUS_API_KEY"), # This is the default and can be omitted
104105
http_client=DefaultAioHttpClient(),
105106
) as client:
106107
embedding_response = await client.embeddings.create(

0 commit comments

Comments
 (0)