vision-agent / lib /types.ts
MingruiZhang's picture
feat: project analysis (#27)
96ac62a unverified
raw history blame
No virus
751 Bytes
import { type Message } from 'ai';
export type ServerActionResult<Result> = Promise<
| Result
| {
error: string;
}
>;
/**
* @deprecated
*/
export type DatasetImageEntity = {
url: string;
selected?: boolean;
name: string;
};
/**
* @deprecated
*/
export type MessageWithSelectedDataset = Message & {
dataset: DatasetImageEntity[];
};
export type MessageBase = {
role: Message['role'];
content: string;
id: string;
};
export type ChatEntity = {
url: string;
id?: string; // a chat without id is not to be saved
user: string; // email
messages: MessageBase[];
updatedAt: number;
};
export interface SignedPayload {
id: string;
publicUrl: string;
signedUrl: string;
fields: Record<string, string>;
}