mirror of https://github.com/microsoft/autogen.git
fix(oai): fixing a bug when not using the OpenAIWrapper by making rate limiter config optional. (#4066)
Co-authored-by: Joel Klaverkamp <joel.klaverkamp@upfeat.com>
This commit is contained in:
parent
9f428880b3
commit
23c14bc937
|
@ -1069,7 +1069,7 @@ class OpenAIWrapper:
|
|||
|
||||
def _throttle_api_calls(self, idx: int) -> None:
|
||||
"""Rate limit api calls."""
|
||||
if self._rate_limiters[idx]:
|
||||
if idx < len(self._rate_limiters) and self._rate_limiters[idx]:
|
||||
limiter = self._rate_limiters[idx]
|
||||
|
||||
assert limiter is not None
|
||||
|
|
Loading…
Reference in New Issue