Polyman Documentation - v3.1.0
    Preparing search index...

    Interface ModelCatalogOptions

    Where the catalog keeps its files and how it fetches. Tests pass fakes.

    interface ModelCatalogOptions {
        dir?: string;
        home?: string;
        fetch?: (
            input: string | URL | Request,
            init?: RequestInit,
        ) => Promise<Response>;
        now?: () => number;
        ttlMs?: number;
        timeoutMs?: number;
    }
    Index
    dir?: string

    Folder of the cache files. Defaults to <home>/.polyman/agent/models.

    home?: string

    Home folder. Defaults to HOME, then USERPROFILE, then the OS one.

    fetch?: (input: string | URL | Request, init?: RequestInit) => Promise<Response>

    The fetch to use. Defaults to the global one.

    now?: () => number

    The clock, in ms. Defaults to Date.now.

    ttlMs?: number

    How long a cached list is fresh. Defaults to CATALOG_TTL_MS.

    timeoutMs?: number

    Time limit of the live fetch. Defaults to CATALOG_TIMEOUT_MS.