namespace BotSharp.Abstraction.Files; public interface IBotSharpFileService { string GetDirectory(string conversationId); Task> GetChatImages(string conversationId, string source, IEnumerable fileTypes, List conversations, int? offset = null); IEnumerable GetMessageFiles(string conversationId, IEnumerable messageIds, string source, bool imageOnly = false); string GetMessageFile(string conversationId, string messageId, string source, string index, string fileName); IEnumerable GetMessagesWithFile(string conversationId, IEnumerable messageIds); bool SaveMessageFiles(string conversationId, string messageId, string source, List files); string GetUserAvatar(); bool SaveUserAvatar(BotSharpFile file); /// /// Delete files under messages /// /// Conversation Id /// Files in these messages will be deleted /// The starting message to delete /// If not null, delete messages while input a new message; otherwise, delete messages only /// bool DeleteMessageFiles(string conversationId, IEnumerable messageIds, string targetMessageId, string? newMessageId = null); bool DeleteConversationFiles(IEnumerable conversationIds); /// /// Take screenshots of pdf pages and get response from llm /// /// /// Pdf files /// Task InstructPdf(string? provider, string? model, string? modelId, string prompt, List files); /// /// Get file bytes and content type from data, e.g., "data:image/png;base64,aaaaaaaaa" /// /// /// (string, byte[]) GetFileInfoFromData(string data); string GetFileContentType(string filePath); }