miniature-nail-35141
07/07/2025, 4:49 AMtall-airline-16756
07/07/2025, 4:49 AMtall-airline-16756
07/07/2025, 4:49 AMllm_node
using Python, you can handle the output depending on the type of the node. Here's an example:
async for chunk in llm_node:
# If the chunk is a string
if isinstance(chunk, str):
print(chunk) # Print the text content
# If the chunk is a ChatChunk
elif isinstance(chunk, ChatChunk):
if chunk.delta and chunk.delta.content:
print(chunk.delta.content) # Print the text content
This code iterates through the chunks and prints the text content accordingly. Let me know if you need further assistance!
Sources: GitHub::livekit::agents | livekit-plugins/livekit-plugins-aws/livekit/plugi...miniature-nail-35141
07/07/2025, 4:50 AMtall-airline-16756
07/07/2025, 4:50 AMtall-airline-16756
07/07/2025, 4:50 AM