diff --git a/src/lib/models/types.ts b/src/lib/models/types.ts index 54c3e1e..8abefd7 100644 --- a/src/lib/models/types.ts +++ b/src/lib/models/types.ts @@ -1,5 +1,5 @@ import z from 'zod'; -import { ChatTurnMessage } from '../types'; +import { Message } from '../types'; type Model = { name: string; @@ -44,13 +44,13 @@ type Tool = { }; type ToolCall = { - id?: string; + id: string; name: string; arguments: Record; }; type GenerateTextInput = { - messages: ChatTurnMessage[]; + messages: Message[]; tools?: Tool[]; options?: GenerateOptions; }; @@ -63,14 +63,14 @@ type GenerateTextOutput = { type StreamTextOutput = { contentChunk: string; - toolCallChunk: Partial[]; + toolCallChunk: ToolCall[]; additionalInfo?: Record; done?: boolean; }; type GenerateObjectInput = { schema: z.ZodTypeAny; - messages: ChatTurnMessage[]; + messages: Message[]; options?: GenerateOptions; };