Skip to content

Commit 87c2e97

Browse files
feat: clean up environment call outs
1 parent 1c0b464 commit 87c2e97

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,14 @@ pip install openai[aiohttp]
160160
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
161161

162162
```python
163-
import os
164163
import asyncio
165164
from openai import DefaultAioHttpClient
166165
from openai import AsyncOpenAI
167166

168167

169168
async def main() -> None:
170169
async with AsyncOpenAI(
171-
api_key=os.environ.get("OPENAI_API_KEY"), # This is the default and can be omitted
170+
api_key="My API Key",
172171
http_client=DefaultAioHttpClient(),
173172
) as client:
174173
chat_completion = await client.chat.completions.create(

0 commit comments

Comments
 (0)