Skip to content

Assistant Hook: Add client side function handling and other events #868

Closed
@johannbuscail

Description

@johannbuscail

Feature Description

Add events on the useAssistant hook, just like the useChat hook.

https://sdk.vercel.ai/docs/api-reference/use-chat
onResponse
onError
onFinish

But most importantly, making the assistant hook actually useful is the onFunctionCall event.
This is a MAJOR and really really important event as it allows the assistant to interact with the client side.

https://sdk.vercel.ai/docs/guides/providers/openai-functions#handling-function-calls-on-the-client

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions