LLMContext: fix create_audio_message

This commit is contained in:
Aleix Conchillo Flaqué
2026-01-13 13:50:09 -08:00
parent 87d0dc9e24
commit 5612bf513b
2 changed files with 2 additions and 1 deletions

1
changelog/3435.fixed.md Normal file
View File

@@ -0,0 +1 @@
- Fixed `LLMContext.create_audio_message()` by correcting an internal helper that was incorrectly declared async while being run in `asyncio.to_thread()`.

View File

@@ -206,7 +206,7 @@ class LLMContext:
"""
content = [{"type": "text", "text": text}]
async def encode_audio():
def encode_audio():
sample_rate = audio_frames[0].sample_rate
num_channels = audio_frames[0].num_channels