UNPKG

@genkit-ai/ai

Version:

Genkit AI framework generative AI APIs.

1 lines 2.57 kB
{"version":3,"sources":["../src/metadata.ts"],"sourcesContent":["/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Metadata keys used for UI-specific schema annotations.\n */\nexport const GENKIT_UI_METADATA = {\n /**\n * Provides data to populate both standard and customized UI widgets.\n *\n * e.g.\n *\n * {\n * [GENKIT_UI_METADATA.DATA_SOURCE]: {\n * action: '/custom/foo',\n * allowCustomValues: true\n * }\n * }\n */\n DATA_SOURCE: 'x-genkit-ui-data-source',\n\n /**\n * Provides a display name or label for the UI. By default, the Dev UI will\n * transform schema fields to \"Sentence case\". There are times where this is\n * not desirable and needs to be overwritten, such as abbreviations or\n * acronyms (e.g. \"Top P\", \"Top K\") and proper nouns (e.g. \"Google Search\n * retrieval\").\n *\n * e.g. { [GENKIT_UI_METADATA.DISPLAY_NAME]: 'Top P' }\n */\n DISPLAY_NAME: 'x-genkit-ui-display-name',\n\n /**\n * Specifies the UI component (widget) to use for a schema field. Commonly\n * used for model and middleware configuration. Useful to resolve ambiguity\n * when multiple inputs could apply, or to provide a tailored user experience\n * for complex inputs.\n *\n * e.g. { [GENKIT_UI_METADATA.WIDGET]: GENKIT_UI_WIDGETS.MODEL_LIST }\n */\n WIDGET: 'x-genkit-ui-widget',\n} as const;\n\n/**\n * Standard UI widget names used with GENKIT_UI_METADATA.WIDGET.\n */\nexport const GENKIT_UI_WIDGETS = {\n /** A widget for configuring a list of models. */\n MODEL_LIST: 'model-list-config',\n /** A widget for configuring LLM model safety settings. */\n SAFETY_SETTINGS: 'safety-settings',\n} as const;\n"],"mappings":"AAmBO,MAAM,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAahC,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWb,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUd,QAAQ;AACV;AAKO,MAAM,oBAAoB;AAAA;AAAA,EAE/B,YAAY;AAAA;AAAA,EAEZ,iBAAiB;AACnB;","names":[]}