Genkit JS API reference
    Preparing search index...

    Variable GENKIT_UI_METADATAConst

    GENKIT_UI_METADATA: {
        DATA_SOURCE: "x-genkit-ui-data-source";
        DISPLAY_NAME: "x-genkit-ui-display-name";
        WIDGET: "x-genkit-ui-widget";
    }

    Metadata keys used for UI-specific schema annotations.

    Type Declaration

    • ReadonlyDATA_SOURCE: "x-genkit-ui-data-source"

      Provides data to populate both standard and customized UI widgets.

      e.g.

      { [GENKIT_UI_METADATA.DATA_SOURCE]: { action: '/custom/foo', allowCustomValues: true } }

    • ReadonlyDISPLAY_NAME: "x-genkit-ui-display-name"

      Provides a display name or label for the UI. By default, the Dev UI will transform schema fields to "Sentence case". There are times where this is not desirable and needs to be overwritten, such as abbreviations or acronyms (e.g. "Top P", "Top K") and proper nouns (e.g. "Google Search retrieval").

      e.g. { [GENKIT_UI_METADATA.DISPLAY_NAME]: 'Top P' }

    • ReadonlyWIDGET: "x-genkit-ui-widget"

      Specifies the UI component (widget) to use for a schema field. Commonly used for model and middleware configuration. Useful to resolve ambiguity when multiple inputs could apply, or to provide a tailored user experience for complex inputs.

      e.g. { [GENKIT_UI_METADATA.WIDGET]: GENKIT_UI_WIDGETS.MODEL_LIST }