T
TanStack•8mo ago
quickest-silver

How does Streaming work in TTS?

Hello, The docs says TTS supports Streaming of any primitive but I am wondering how it would be the best way to implement it. Do the loaders support streaming or do we need to use the server function directly to get the Streaming down to the client? I haven't seen many if any examples of Streaming and also if I look into the TTQ library, all I can see with Streaming is with Nextjs. It would be nice if the docs could include a minimal example of how to use Streaming with TTS
3 Replies
quickest-silver
quickest-silverOP•8mo ago
For instance if I return a ReadableStream from a Server Function I get and error with "Function is not serializable".
stormy-gold
stormy-gold•8mo ago
Jack Herrington has a good video that shows streaming with TSS - https://www.youtube.com/watch?v=iEg7MyXSrU0
Jack Herrington
YouTube
Deepseek AI with React, Tanstack Start and Ollama
Who cares about the politics or economics of Deepseek? Let's jump in and see how to use it to build a chat app today! Code: https://github.com/jherr/deepseek-start šŸ‘‰ ProNextJS Course: https://pronextjs.dev šŸ‘‰ Don't forget to subscribe to this channel for more updates: https://bit.ly/2E7drfJ šŸ‘‰ Discord server signup: https://discord.gg/ddMZFtTDa5...
quickest-silver
quickest-silverOP•8mo ago
Yep, I saw it, that's why my question regarding the loaders, he uses the chat serverFn directly within the component and I wonder if that's the way to do it or there is a better way to implement it?

Did you find this page helpful?