Runner protocol for AI model providers.

A single Runner interface covers completion, agent, and judge use cases. For structured output (e.g., judge evaluation), pass an outputType schema and access the parsed result via RunnerResult.parsed.

Hierarchy

  • Runner

Methods

Methods

  • Invoke the model with the given input string.

    Parameters

    • input: string

      The string input to the model.

    • Optional outputType: Record<string, unknown>

      Optional JSON schema for structured output. When provided, the model should return structured data accessible via RunnerResult.parsed.

      Optional

    Returns Promise<RunnerResult>

    Promise resolving to a RunnerResult.

Generated using TypeDoc