@hbbio/nanoagent
    Preparing search index...

    Interface Model

    Minimal interface a model must implement to be usable by the agent loop.

    interface Model {
        complete: <Memory extends ChatMemory>(
            input: readonly Message[],
            memory?: Memory,
            tools?: Tools<Memory>,
        ) => Promise<{ memory: Memory; messages: readonly Message[] }>;
        name?: string;
        stop: () => Promise<void>;
    }

    Implemented by

    Index

    Properties

    Properties

    complete: <Memory extends ChatMemory>(
        input: readonly Message[],
        memory?: Memory,
        tools?: Tools<Memory>,
    ) => Promise<{ memory: Memory; messages: readonly Message[] }>

    Produce the next assistant turn — including any tool calls — and return the updated transcript plus (possibly updated) memory.

    name?: string

    Human‑readable model name (e.g. "gpt‑4o-mini").

    stop: () => Promise<void>

    Abort an in‑flight streaming request.