We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18c7c0f commit cedc48dCopy full SHA for cedc48d
README.md
@@ -116,14 +116,15 @@ pip install perplexityai[aiohttp]
116
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
117
118
```python
119
+import os
120
import asyncio
121
from perplexity import DefaultAioHttpClient
122
from perplexity import AsyncPerplexity
123
124
125
async def main() -> None:
126
async with AsyncPerplexity(
- api_key="My API Key",
127
+ api_key=os.environ.get("PERPLEXITY_API_KEY"), # This is the default and can be omitted
128
http_client=DefaultAioHttpClient(),
129
) as client:
130
stream_chunk = await client.chat.completions.create(
0 commit comments