Type alias GenerateOptions<T, C>

GenerateOptions<T, C>: {
    config?: C;
    groupedProperties?: T extends undefined
        ? string[]
        : (keyof T)[];
    groupedTask?: string | GroupedTask<T>;
    singlePrompt?: string | SinglePrompt;
}

Options available when defining queries using methods in the collection.generate namespace.

Type Parameters

  • T
  • C

Type declaration

  • Optional config?: C
  • Optional groupedProperties?: T extends undefined
        ? string[]
        : (keyof T)[]

    The properties to use as context to be injected into the groupedTask prompt when performing the grouped generation.

  • Optional groupedTask?: string | GroupedTask<T>

    The prompt to use when generating content relevant to objects returned by the query as a whole.

  • Optional singlePrompt?: string | SinglePrompt

    The prompt to use when generating content relevant to each object of the collection individually.