Documentation
    Preparing search index...

    Interface LlmApi

    Injected window.napplet.llm API. Presence signals domain availability, not a configured connection or a consent grant. Each method rejects with the specification failure when the runtime answers with an error.

    interface LlmApi {
        cancel(requestId: string): Promise<boolean>;
        describe(handle: string): Promise<LlmModel>;
        generate(
            request: LlmGenerationRequest,
            options?: LlmGenerateOptions,
        ): LlmPendingGeneration;
        select(requirements?: LlmRequirements): Promise<LlmModel>;
    }
    Index

    Methods

    • Cancel an active generation owned by this endpoint; false for unknown or terminal ids.

      Parameters

      • requestId: string

      Returns Promise<boolean>

    • Revalidate a selection without generating or showing another chooser.

      Parameters

      • handle: string

      Returns Promise<LlmModel>

    • Ask the user to choose a connection that meets the requirements.

      Parameters

      Returns Promise<LlmModel>