Skip to content

Media uploader for video, images, and audio #535

@tombeckenham

Description

@tombeckenham

Problem

Some of the models return media via a stream, or provide an api to retrieve the final file. TanStack AI supports returning media either as a URL or as a base64 blob. If a URL isn't returned by the model, then it has to return a blob. This means downloading or fetching all the bytes in memory, then converting to base64. This will cause many backend environments to run out of memory.

Solution

Add a media uploader function to the constructor of video, image, audio, and speech adapters to allow the user to efficiently stream bytes from responses to a storage provider of their choice

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions