AI SDK Client-Side Function Calling
Unanswered
Blue Mockingbird posted this in #help-forum
Blue MockingbirdOP
Hello,
I'm encountering an issue where sometimes if the function call isn't at the beginning of the streamed message, it gets appended to the usual assistant message stream.
By the way, I'm handling the function call on the client-side, so the server side isn't running the function.
(
)
---
It gets streamed as so:
I'm encountering an issue where sometimes if the function call isn't at the beginning of the streamed message, it gets appended to the usual assistant message stream.
By the way, I'm handling the function call on the client-side, so the server side isn't running the function.
(
const { messages, input, handleInputChange, handleSubmit } = useChat({
experimental_onFunctionCall: functionCallHandler,
}))
---
It gets streamed as so:
I will call the function now. Give me a minute.
{"function....5 Replies
Blue MockingbirdOP
Ping
Blue MockingbirdOP
Ping
Blue MockingbirdOP
Ping
@Ray what package is `useChat`? I think its better to ask there?
Blue MockingbirdOP
it's from the vercel Ai sdk