Hierarchy (view full)

Constructors

Accessors

  • get model(): string
  • Get the model name/identifier for this LLM instance.

    Returns string

    The model name if available, "unknown" otherwise.

    Remarks

    Plugins should override this property to provide their model information.

  • get provider(): string
  • Get the provider name for this LLM instance.

    Returns string

    The provider name if available, "unknown" otherwise.

    Remarks

    Plugins should override this property to provide their provider information.

Methods

  • Returns Promise<void>

  • Pre-warm connection to the LLM service.

    Establishes DNS resolution and the TLS connection to the provider before the first inference request, reducing time-to-first-token on the initial reply. Non-blocking (fire-and-forget) and idempotent; calls made after aclose are ignored. Providers enable it by overriding _prewarmImpl.

    Returns void

  • Parameters

    • opts: {
          frequencyPenalty?: number;
          maxCompletionTokens?: number;
          model?: string;
          presencePenalty?: number;
          randomSeed?: number;
          temperature?: number;
          toolChoice?: llm.ToolChoice;
          topP?: number;
      }
      • Optional frequencyPenalty?: number
      • Optional maxCompletionTokens?: number
      • Optional model?: string
      • Optional presencePenalty?: number
      • Optional randomSeed?: number
      • Optional temperature?: number
      • Optional toolChoice?: llm.ToolChoice
      • Optional topP?: number

    Returns void