Member Junction
    Preparing search index...

    AIModelRunner — Lightweight AI model execution tracker for non-LLM model types.

    Creates AIPromptRun records for embedding calls (and future: image, audio, video) with full token/cost tracking. Uses the same model selection and vendor failover infrastructure as AIPromptRunner but without template rendering or validation.

    Architecture:

    • @memberjunction/ai (no MJ infra): BaseEmbeddings, ModelUsage
    • @memberjunction/ai-core-plus (this class): AIModelRunner — creates AIPromptRun records
    • @memberjunction/ai-prompts: AIPromptRunner — LLM-specific (template rendering, validation)

    Usage:

    const runner = new AIModelRunner();
    const result = await runner.RunEmbedding({
    Texts: ['Hello world', 'How are you'],
    ContextUser: currentUser,
    Description: 'Content item vectorization'
    });
    // result.PromptRunID links to the AIPromptRun record with token/cost data
    Index

    Constructors

    Accessors

    Methods

    • Awaits all in-flight prompt-run saves queued by this runner. The normal path does NOT call this — persistence is intentionally fire-and-forget. For tests / durability needs.

      Returns Promise<void>