Search Results for

    Show / Hide Table of Contents

    Class ModelService

    Inheritance
    object
    CrudServiceBase<LMStudioClient>
    ModelService
    Implements
    ICrudService
    Inherited Members
    CrudServiceBase<LMStudioClient>.client
    CrudServiceBase<LMStudioClient>.ApiKey
    CrudServiceBase<LMStudioClient>.GetUrl(params string[])
    CrudServiceBase<LMStudioClient>.GetChildUrl(string, params string[])
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Glitch9.AIDevKit.LMStudio.Services
    Assembly: Glitch9.AIDevKit.Provider.LMStudio.dll
    Syntax
    public class ModelService : CrudServiceBase<LMStudioClient>, ICrudService

    Constructors

    | Edit this page View Source

    ModelService(LMStudioClient)

    Declaration
    public ModelService(LMStudioClient client)
    Parameters
    Type Name Description
    LMStudioClient client

    Methods

    | Edit this page View Source

    GetModelStatusAsync(string, RequestOptions)

    Polls model load/unload status via native GET /api/v1/models/{identifier}/status.

    Declaration
    public UniTask<ModelStatusResponse> GetModelStatusAsync(string identifier, RequestOptions options = null)
    Parameters
    Type Name Description
    string identifier
    RequestOptions options
    Returns
    Type Description
    UniTask<ModelStatusResponse>
    | Edit this page View Source

    ListModelsAsync(RequestOptions)

    Lists locally available models via OpenAI-compatible GET /v1/models.

    Declaration
    public UniTask<LMStudioModelListResponse> ListModelsAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options
    Returns
    Type Description
    UniTask<LMStudioModelListResponse>
    | Edit this page View Source

    LoadModelAsync(ModelLoadRequest, RequestOptions)

    Loads a model into VRAM via native POST /api/v1/models/load. Must complete before the model can be used for chat.

    Declaration
    public UniTask<ModelLoadResponse> LoadModelAsync(ModelLoadRequest request, RequestOptions options = null)
    Parameters
    Type Name Description
    ModelLoadRequest request
    RequestOptions options
    Returns
    Type Description
    UniTask<ModelLoadResponse>
    | Edit this page View Source

    UnloadModelAsync(ModelUnloadRequest, RequestOptions)

    Unloads a model from VRAM via native POST /api/v1/models/unload.

    Declaration
    public UniTask<ModelLoadResponse> UnloadModelAsync(ModelUnloadRequest request, RequestOptions options = null)
    Parameters
    Type Name Description
    ModelUnloadRequest request
    RequestOptions options
    Returns
    Type Description
    UniTask<ModelLoadResponse>

    Implements

    ICrudService

    Extension Methods

    ArrayExtensions.ToArrayOrEmpty<T>(T)
    ArrayExtensions.ToArrayOrNull<T>(T)
    EventExtensions.ToDelta<T>(T, string, int, string, bool)
    EventExtensions.ToDone<T>(T, string, int, string)
    EventExtensions.ToEvent<T>(T)
    EventExtensions.UpcastDelta<T1, T2>(T1, string, int, string, bool)
    FallbackExtensions.IsOr<TParent, TChild>(TParent, TChild)
    ResponseCastingExtensions.GetResult<T>(T)
    SystemExtensions.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation