feat(models-types): update to use Message

This commit is contained in:
ItzCrazyKns
2025-12-06 15:25:15 +05:30
parent 574b3d55e2
commit e99c8bdd50

View File

@@ -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<string, any>;
};
type GenerateTextInput = {
messages: ChatTurnMessage[];
messages: Message[];
tools?: Tool[];
options?: GenerateOptions;
};
@@ -63,14 +63,14 @@ type GenerateTextOutput = {
type StreamTextOutput = {
contentChunk: string;
toolCallChunk: Partial<ToolCall>[];
toolCallChunk: ToolCall[];
additionalInfo?: Record<string, any>;
done?: boolean;
};
type GenerateObjectInput = {
schema: z.ZodTypeAny;
messages: ChatTurnMessage[];
messages: Message[];
options?: GenerateOptions;
};