You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to build something with the Vercel ai sdk, Nextjs and Reactjs. I am using the useCompletions function in the front-end. How ever, the onFinish callback doesn't seem to return the completion. Even if I just console log something simple, it doesn't return anything. Also if I console log the completion outside of onFinish, it doesn't log. The onResponse callback does return the response object. In the api I use the streamText function.
Am I doing something wrong?
btw: htmlContent is just the json content from the front-end converted into html.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to build something with the Vercel ai sdk, Nextjs and Reactjs. I am using the useCompletions function in the front-end. How ever, the onFinish callback doesn't seem to return the completion. Even if I just console log something simple, it doesn't return anything. Also if I console log the completion outside of onFinish, it doesn't log. The onResponse callback does return the response object. In the api I use the streamText function.
Am I doing something wrong?
btw: htmlContent is just the json content from the front-end converted into html.
Front-end:
api:
Beta Was this translation helpful? Give feedback.
All reactions