using LLama.Web.Common; using LLama.Web.Models; namespace LLama.Web.Services { /// /// Service for managing language Models /// public interface IModelService { /// /// Gets the model with the specified name. /// /// Name of the model. Task GetModel(string modelName); /// /// Loads a model from a ModelConfig object. /// /// The model configuration. Task LoadModel(ModelOptions modelOptions); /// /// Loads all models found in appsettings.json /// Task LoadModels(); /// /// Unloads the model with the specified name. /// /// Name of the model. Task UnloadModel(string modelName); /// /// Unloads all models. /// Task UnloadModels(); /// /// Gets a context with the specified identifier /// /// Name of the model. /// The context identifier. Task GetContext(string modelName, string contextName); /// /// Removes the context. /// /// Name of the model. /// The context identifier. Task RemoveContext(string modelName, string contextName); /// /// Creates a context. /// /// Name of the model. /// The context identifier. Task CreateContext(string modelName, string contextName); /// /// Gets the or create model and context. /// This will load a model from disk if not already loaded, and also create the context /// /// Name of the model. /// The context identifier. /// Both loaded Model and Context Task<(LLamaModel, LLamaContext)> GetOrCreateModelAndContext(string modelName, string contextName); } }