onStart in AI sdk streamText
Unanswered
Tomistoma posted this in #help-forum
TomistomaOP
Hey guys I am trying to upgrade to the newest version of
Any ideas? Thanks!
ai/sdk but I am missing onStart when streaming. I was using onStart in the older version but I am not sure how I can execute some code after the streaming has started const result = await streamText({
model: client.chat('gpt-3.5-turbo'),
system: 'You are a helpful assistant. today is monday',
messages: context.allMessages,
onFinish: async (event) => {
// onFinish()
},
onStart: () => { -> doesn't exist
// onStart() ->
},
})Any ideas? Thanks!