I want to send base64 to sendText with attributes,...
# ask-ai
c
I want to send base64 to sendText with attributes, but there is some limit of length about 50k, how we can increase that limit, I want to send images to livekit then use it in my ai agent
t
Thanks for reaching out, Babken. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm happy to help clarify this for you! The
sendText
method in LiveKit doesn’t have a strict limit on the length of the text you can send, as it smartly chunks and streams larger text payloads for you. That said, the
attributes
field, which is great for adding extra metadata, probably has a combined size limit of around 64 KiB for all keys and values—this is based on similar features like participant attributes and room metadata. If you’re looking to send images, a handy approach is to encode them as base64 and include them right in the text payload since the text length is essentially unlimited. Another option is to host the image elsewhere and share a reference link (like a URL) in the attributes or text payload. Please feel free to reach out if you want more details or need a hand with implementing this—I’m here to support you! Sources: livekit-rtc/livekit/rtc/_proto/data_stream_pb2.pyi | config-sample.yaml | Quotas and limits | LiveKit docs | src/room/data-stream/outgoing/OutgoingDataStreamManager.ts | Participant attributes and metadata | LiveKit docs