UIMessage
视图消息(user 或 assistant;assistant 消息由 parts 依序组成,可直接渲染)
readonly id: string;视图内单调 id(msg-<n>;React key 可直接用)
readonly parts: readonly UIMessagePart[];readonly role: "user" | "assistant";本文是否有帮助?
感谢反馈,我们会持续改进这篇文章。
视图消息(user 或 assistant;assistant 消息由 parts 依序组成,可直接渲染)
readonly id: string;视图内单调 id(msg-<n>;React key 可直接用)
readonly parts: readonly UIMessagePart[];readonly role: "user" | "assistant";感谢反馈,我们会持续改进这篇文章。