|
@@ -149,6 +149,15 @@ class LLMCallbackHandler:
|
|
|
self.event_handler.pub_message_created(self.message)
|
|
|
self.event_handler.pub_message_in_progress(self.message)
|
|
|
|
|
|
+ """
|
|
|
+ if 'transcript' in chunk.choices[0].delta.audio:
|
|
|
+ print(chunk.choices[0].delta.audio['transcript'])
|
|
|
+ text_chunk = chunk.choices[0].delta.audio['transcript']
|
|
|
+ yield "text", text_chunk
|
|
|
+ if 'data' in chunk.choices[0].delta.audio:
|
|
|
+ audio_chunk = chunk.choices[0].delta.audio['data']
|
|
|
+ yield "audio", base64.b64decode(audio_chunk)
|
|
|
+ """
|
|
|
# append message content delta
|
|
|
# message.audio += delta.audio
|
|
|
self.event_handler.pub_message_delta(
|