#Issue: @convex-dev/agent, broken package or not updated docs?

2 messages · Page 1 of 1 (latest)

onyx walrus
#

So i currently working at AI SaaS customer support... there is an error

{toUIMessages(messages.results ?? [])?.map((message) => {
                        return (
                            <AIMessage
                                from={message.role === "user" ? "user" : "assistant"}
                                key={message.id}
                            >
                                <AIMessageContent>
                                    <AIResponse>{message.content}</AIResponse>
                                </AIMessageContent>
                                {message.role === "assistant" && (
                                    <DicebearAvatar
                                        imageUrl="/logo.svg"
                                        seed="assistant"
                                        size={32}
                                    />
                                )}
                            </AIMessage>
                        )
                    })}

The error is: Property 'content' does not exist on type 'UIMessage'

For package.json i use this version:

"@convex-dev/agent": "^0.1.17",

Note: im using turbo repo in this case

hollow mauve
#

The UIMessage from the latest AI SDK doesn't have .content anymore - they deprecated it. If you update to the latest Agent version (and AI SDK) I did add a .text for convenience - hope that helps. npm i @convex-dev/agent@latest