Patch Changes
-
#226
d879e6d
Thanks @zrosenbauer! - feat: add Vercel UI SDK integration package for converting theOperationContext
to a list of messages that can be used with the Vercel AI SDKAdded
convertToUIMessages
function to the@voltagent/vercel-ui
package that converts theOperationContext
to a list of messages that can be used with the Vercel AI SDK.import { convertToUIMessages } from "@voltagent/vercel-ui"; import { Agent } from "@voltagent/core"; const uiMessages = convertToUIMessages(context); // Semi-realistic example new Agent({ hooks: { onEnd: async ({ agent, output, error, conversationId, context }) => { const uiMessages = convertToUIMessages(context); await chatStore.save({ conversationId, messages: uiMessages, }); }, }, });