@yamlresume/ai
    Preparing search index...

    Interface GenerateWithValidationOptions

    Options for generating content with an LLM and validating the result.

    interface GenerateWithValidationOptions {
        maxRetries?: number;
        maxTokens?: number;
        model: LanguageModelV1;
        onChunk?: (chunk: string) => void;
        prompt: string;
        system: string;
        task: string;
        temperature?: number;
    }

    Hierarchy (View Summary)

    Index
    maxRetries?: number

    Maximum number of retries when the generated output fails validation.

    2
    
    maxTokens?: number

    Maximum number of tokens to generate.

    16384
    
    model: LanguageModelV1

    The Vercel AI SDK language model to use.

    onChunk?: (chunk: string) => void

    Optional callback invoked with each text chunk streamed from the model. When provided, the LLM response is streamed instead of returned all at once.

    Type Declaration

      • (chunk: string): void
      • Parameters

        • chunk: string

          The incremental text chunk from the model.

        Returns void

    prompt: string

    The user prompt for the LLM.

    system: string

    The system prompt for the LLM.

    task: string

    Human-readable description of the task, used in the final error message.

    Example: "generate a valid resume" or "translate a valid resume".

    temperature?: number

    Sampling temperature. Lower values produce more deterministic output.

    Some models (kimi-k2.6 with my test) only accept a temperature of 1.0.

    1