mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-12-14 15:48:15 +00:00
feat(models-types): update to use Message
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user