Class LLMVisionProvider

Vision provider that delegates to a cloud LLM via generateText().

Satisfies the narrow IVisionProvider contract used by the MultimodalIndexer, allowing any vision-capable LLM to serve as the image description backend.

Example

const provider = new LLMVisionProvider({ provider: 'openai' });
const indexer = new MultimodalIndexer({
embeddingManager,
vectorStore,
visionProvider: provider,
});

Implements

Constructors

Methods

Constructors

Methods

  • Generate a text description of the provided image using a cloud vision LLM.

    The image is sent as a base64 data URL in a multimodal message to the configured provider. The LLM's response is returned as-is.

    Parameters

    • image: string

      Image as a URL string (https://...) or base64 data URL (data:image/png;base64,...).

    Returns Promise<string>

    Detailed text description of the image content.

    Throws

    If the LLM call fails.

    Throws

    If the LLM returns an empty response.

    Example

    const description = await provider.describeImage(
    'data:image/png;base64,iVBORw0KGgoAAAA...'
    );
    console.log(description);
    // "A golden retriever playing fetch on a sandy beach..."