Should id
be optional or omitted for the Message
type used for initialMessages
?
#2748
tylersayshi
started this conversation in
Ideas & Feedback
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Here is the type I am referring to from the ai package
ai/packages/ui-utils/src/types.ts
Line 388 in ddf0184
it seems like the
useChat
hook works without anid
on the initialMessages and this currently requires typecasting to make work in ts. I saw the type-cast in https://www.pronextjs.dev/ where they demo the hook and suggest type casting.It seems like content is the only required field for it to work at runtime fwiw
Beta Was this translation helpful? Give feedback.
All reactions