@hbbio/nanoagent
    Preparing search index...

    Interface ChatModelOptions

    Options used when instantiating ChatModel.

    interface ChatModelOptions {
        adder?: (
            history: readonly Message[],
            assistant: Message,
        ) => Promise<readonly Message[]>;
        key?: string;
        name: string;
        noThinkPrompt?: string;
        removeThink?: boolean;
        stream?: boolean;
        stringifyArguments?: boolean;
        stringifyContent?: boolean;
        temperature?: number;
        url: string;
    }
    Index

    Properties

    adder?: (
        history: readonly Message[],
        assistant: Message,
    ) => Promise<readonly Message[]>

    Optional custom message‐adder used to merge assistant replies.

    Type declaration

      • (history: readonly Message[], assistant: Message): Promise<readonly Message[]>
      • Default message‑adder: simply appends the assistant message to the history.

        Parameters

        Returns Promise<readonly Message[]>

    key?: string

    Optional bearer token used for Authorization: Bearer ….

    name: string

    Model identifier passed to the provider.

    noThinkPrompt?: string

    No thinking prompt

    removeThink?: boolean

    Remove thinking

    stream?: boolean

    When true, requests a chunked streaming response.

    stringifyArguments?: boolean

    Tool arguments must be stringified (OpenAI)

    stringifyContent?: boolean

    Messages content should be stringified (ollama)

    temperature?: number

    Override temperature for all messages

    url: string

    HTTP endpoint that accepts OpenAI‑style chat‑completions JSON.