vision-agent / lib /types.ts
MingruiZhang's picture
fix: remove mediaUrl and disallow extra fields (#79)
9537aed unverified
raw
history blame
798 Bytes
import { Chat, Message } from '@prisma/client';
import { type Message as MessageAI } from 'ai';
export type ChatWithMessages = Chat & { messages: Message[] };
export type MessageUserInput = Pick<Message, 'prompt' | 'mediaUrl'>;
export type MessageAssistantResponse = Partial<
Pick<Message, 'response' | 'result'>
>;
export type MessageUI = Pick<MessageAI, 'role' | 'content' | 'id'>;
export interface SignedPayload {
id: string;
publicUrl: string;
signedUrl: string;
fields: Record<string, string>;
}
export type ResultPayload = {
logs: {
stderr: string[];
stdout: string[];
};
results: Array<{
png?: string;
mp4?: string;
text: string;
is_main_result: boolean;
}>;
error: {
name: string;
value: string;
traceback_raw: string[];
};
};