Spaces:
Running
Running
| 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>; | |
| } | |