Next.js Discord

Discord Forum

How do I get the full streaming response rather than StreamingTextResponse?

Unanswered
Sphynx posted this in #help-forum
Open in Discord
SphynxOP
I am integrating vercel ai and see the example return a StreamingTextResponse to the the client.

But how can I get the full model that OpenAI returns and pass that through to the client?

public struct ChatStream {
    public let id: String
    public let object: String
    public let created: Date
    public let model: String
    public let choices: [ChatStream.Choice]
}


There direct response looks like the model above.

0 Replies