Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b6d025b

Browse files
authoredFeb 27, 2024··
chore(client): use anyio.sleep instead of asyncio.sleep (#1198)
1 parent 3683c5e commit b6d025b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎src/openai/_resource.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
from __future__ import annotations
44

55
import time
6-
import asyncio
76
from typing import TYPE_CHECKING
87

8+
import anyio
9+
910
if TYPE_CHECKING:
1011
from ._client import OpenAI, AsyncOpenAI
1112

@@ -39,4 +40,4 @@ def __init__(self, client: AsyncOpenAI) -> None:
3940
self._get_api_list = client.get_api_list
4041

4142
async def _sleep(self, seconds: float) -> None:
42-
await asyncio.sleep(seconds)
43+
await anyio.sleep(seconds)

0 commit comments

Comments
 (0)
Please sign in to comment.