Skip to content

Commit

Permalink
chore(client): use anyio.sleep instead of asyncio.sleep (#1198)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Feb 27, 2024
1 parent 3683c5e commit b6d025b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/openai/_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
from __future__ import annotations

import time
import asyncio
from typing import TYPE_CHECKING

import anyio

if TYPE_CHECKING:
from ._client import OpenAI, AsyncOpenAI

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

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

0 comments on commit b6d025b

Please sign in to comment.