fix: increase chunk_size to 8 KB for optimal latency
This commit is contained in:
parent
697cb09060
commit
f1895265e6
@ -5236,7 +5236,7 @@ async def moderations(
|
||||
async def _audio_speech_chunk_generator(
|
||||
_response: HttpxBinaryResponseContent,
|
||||
) -> AsyncGenerator[bytes, None]:
|
||||
_generator = await _response.aiter_bytes(chunk_size=4096)
|
||||
_generator = await _response.aiter_bytes(chunk_size=8192)
|
||||
async for chunk in _generator:
|
||||
yield chunk
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user