using AIStudio.Tools.Rust;
namespace AIStudio.Tools.Services;
///
/// Checks, stores, and deletes the tokenizers the app keeps below its data directory.
///
///
/// The runtime does the work, and RustService passes the calls on. Code which decides when a
/// tokenizer has to be checked or stored takes this interface instead of the service, so tests can
/// examine these decisions without a running runtime.
///
internal interface ITokenizerStorage
{
///
/// Checks whether a file is a tokenizer the runtime can load.
///
/// The tokenizer file to check.
/// Whether the file is a usable tokenizer, and if not, why.
public Task ValidateTokenizer(string filePath);
///
/// Copies a tokenizer below the data directory, replacing what was stored for the model before.
///
/// The model the tokenizer belongs to, as TokenizerModelId builds it.
/// The tokenizer file to copy.
/// Whether storing succeeded, along with the path of the stored copy.
public Task StoreTokenizer(string modelId, string filePath);
///
/// Deletes what is stored for the model. Nothing stored counts as success.
///
/// The model the tokenizer belongs to, as TokenizerModelId builds it.
/// Whether deleting succeeded.
public Task DeleteTokenizer(string modelId);
}