@launchdarkly/server-sdk-ai - v2.0.21
    Preparing search index...

    Interface Runner

    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.

    interface Runner {
        run(
            input: string,
            outputType?: Record<string, unknown>,
        ): Promise<RunnerResult>;
    }
    Index
    • Invoke the model with the given input string.

      Parameters

      • input: string

        The string input to the model.

      • OptionaloutputType: Record<string, unknown>

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

      Returns Promise<RunnerResult>

      Promise resolving to a RunnerResult.