namespace BotSharp.Abstraction.Files;
public interface IBotSharpFileService
{
string GetDirectory(string conversationId);
///
/// Get the files that have been uploaded in the chat.
/// If includeScreenShot is true, it will take the screenshots of non-image files, such as pdf, and return the screenshots instead of the original file.
///
///
///
///
///
///
///
///
Task> GetChatFiles(string conversationId, string source,
IEnumerable conversations, IEnumerable contentTypes,
bool includeScreenShot = false, 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);
}