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

    How to reach one OpenAI-compatible server.

    interface OpenAICompatibleOptions {
        id?: string;
        baseUrl: string;
        apiKey?: string;
        headers?: Record<string, string>;
        quirks?: Partial<Quirks>;
        fetch?: (
            input: string | URL | Request,
            init?: RequestInit,
        ) => Promise<Response>;
    }
    Index
    id?: string

    Provider id. Defaults to openai-compatible.

    baseUrl: string

    Base URL, like https://api.openai.com/v1.

    apiKey?: string

    Sent as Authorization: Bearer <apiKey>. Local servers need none.

    headers?: Record<string, string>

    More headers for every request.

    quirks?: Partial<Quirks>

    Changes from DEFAULT_QUIRKS.

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

    The fetch to use. Defaults to the global one. Tests pass a fake.