ValyroUI English version

Model Comparison

Сравнение ответов нескольких моделей. Pro · ИИ: чат и агенты › Промпт и модели

Установка

npx valyro-cli@latest login
npx valyro-cli@latest add model-comparison
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { ModelComparison } from 'valyro-ui-pro';

Пропсы

PropTypeDefault
responses *ModelComparisonResponse[]Two to four responses to the same prompt.
promptReactNodeThe prompt, shown above the columns.
preferredstring | nullId of the response the user preferred.
defaultPreferredstring | nullnullInitial preferred when uncontrolled.
onPreferredChange(id: string | null) => voidCalled with the new preferred when it changes.
syncScrollbooleantrueScroll all columns together. Default true.
layout'auto' | 'columns' | 'tabs''auto'auto shows columns when each gets at least 220px, tabs otherwise.
maxHeightnumber | string420Height of each answer before it scrolls.
currencystring'USD'ISO 4217 code for cost.
renderCitation(index: number) => ReactNodeTurns [1] markers into nodes such as Citation chips.
localestringBCP 47 locale for numbers; defaults to the ThemeProvider's.
labelsPartial<ModelComparisonLabels>Overrides for the built-in English text; keys left out keep their defaults.

Похожие компоненты

Назад: Model Selector · Далее: Prompt Library · Весь раздел «ИИ: чат и агенты»