Class ModelManager

Constructors

Properties

cacheManager: CacheManager
logger: WllamaLogger

Methods

  • Get all models in the cache

    Parameters

    • opts: { includeInvalid?: boolean } = {}

    Returns Promise<Model[]>

  • Parses a model URL and returns an array of URLs based on the following patterns:

    • If the input URL is an array, it returns the array itself.
    • If the input URL is a string in the gguf-split format, it returns an array containing the URL of each shard in ascending order.
    • Otherwise, it returns an array containing the input URL as a single element array.

    Parameters

    • modelUrl: string | string[]

      URL or list of URLs

    Returns string[]