Skip to content

AIDK API Reference / aidk-ai-sdk / fromAiSdkInputMessages

Function: fromAiSdkInputMessages() ​

ts
function fromAiSdkInputMessages(messages: ModelMessage[]): Message[];

Defined in: packages/adapters/ai-sdk/src/adapter.ts:1253

Convert AI SDK input messages to our Message[] format. This is the inverse of toAiSdkMessages.

Use this when receiving messages in AI SDK format and need to process them with our internal systems.

Parameters ​

ParameterType
messagesModelMessage[]

Returns ​

Message[]

Released under the MIT License.