File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
libs/core/langchain_core/language_models Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -463,7 +463,7 @@ async def astream(
463
463
)
464
464
465
465
if self .rate_limiter :
466
- self .rate_limiter .acquire (blocking = True )
466
+ await self .rate_limiter .aacquire (blocking = True )
467
467
468
468
generation : Optional [ChatGenerationChunk ] = None
469
469
try :
@@ -905,7 +905,7 @@ async def _agenerate_with_cache(
905
905
# we usually don't want to rate limit cache lookups, but
906
906
# we do want to rate limit API requests.
907
907
if self .rate_limiter :
908
- self .rate_limiter .acquire (blocking = True )
908
+ await self .rate_limiter .aacquire (blocking = True )
909
909
910
910
# If stream is not explicitly set, check if implicitly requested by
911
911
# astream_events() or astream_log(). Bail out if _astream not implemented
You can’t perform that action at this time.
0 commit comments