From 04773bb28a4559c28e9457962c3a8a5d83b03ef6 Mon Sep 17 00:00:00 2001 From: Sadrinho27 Date: Wed, 5 Nov 2025 23:07:48 +0100 Subject: [PATCH] Imroved the ChatData --- lib/4nk/models/ChatData.ts | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/lib/4nk/models/ChatData.ts b/lib/4nk/models/ChatData.ts index de54568..0bb0897 100644 --- a/lib/4nk/models/ChatData.ts +++ b/lib/4nk/models/ChatData.ts @@ -1,14 +1,23 @@ import type { RoleDefinition } from "./Roles"; +export interface ChatAttachment { + file_name: string; + ext: string; + base64: string; + type?: string; + title?: string; + category?: string; + note?: string; +} + export interface ChatData { - type: string; - content: string; - metadata: { - createdAt: string; - lastModified: string; - sender: string; - recipient: string; - }; + timestamp: number; + receiver: string; + messages: [string]; + data?: ChatAttachment[]; + role?: string; + ia?: boolean; + title?: string; } export function isChatData(data: any): data is ChatData {