ValyroUI English version

AI Chat Window

Окно AI-чата. Pro · ИИ: чат и агенты › Чат

Установка

npx valyro-cli@latest login
npx valyro-cli@latest add ai-chat-window
npm install valyro-ui-pro

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

Пропсы

PropTypeDefault
messages *AIChatMessage[]Conversation turns in order; an empty list shows the empty state and suggestions.
onSend *(message: PromptSubmission) => voidCalled with the composer's text and files, or with a clicked suggestion.
loadingbooleanfalseA reply is generating: the composer shows Stop.
onStop() => voidCalled by the composer's Stop button while loading.
titleReactNodeHeader title. Defaults to labels.newChat.
modelsAIModel[]Shows a ModelSelector in the header.
modelstringControlled model; use with onModelChange.
defaultModelstringInitial model when uncontrolled.
onModelChange(id: string) => voidCalled with the new model when it changes.
onModelUpgrade(model: AIModel) => voidMakes plan-locked models in the header selector actionable (see ModelSelector onUpgrade).
onNewChat() => voidAdds a "New chat" button to the header.
headerActionsReactNodeExtra header controls, e.g. a "More" menu.
suggestionsstring[]Starter prompts shown while the conversation is empty; clicking one sends it.
emptyStateReactNodeReplaces the default empty-state greeting.
placeholderstringComposer placeholder. Defaults to labels.placeholder.
assistantNamestringName shown on assistant replies. Defaults to labels.assistant.
onRegenerate(messageId: string) => voidAdds Regenerate to the latest assistant reply.
onFeedback(messageId: string, feedback: ChatFeedback) => voidCalled when a thumbs up / down on an assistant reply is toggled; null when cleared.
localestringBCP 47 locale for timestamps, sizes and model metadata; defaults to the ThemeProvider's.
labelsPartial<AIChatWindowLabels>Every string in the window, its messages, composer and model menu.

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

  • Chat Message — Сообщения с потоковым выводом
  • Message Branches — Версии сообщения и дерево веток диалога
  • Streaming Text — Плавный вывод потока токенов
  • Markdown Preview — Отображение Markdown
  • Response Feedback — Оценка ответа и рубрика для асессоров
  • Prompt Composer — Поле промпта с вложениями
  • Inline Suggestion — Подсказка-автодополнение в поле ввода
  • Model Selector — Выбор модели ИИ
  • Model Comparison — Сравнение ответов нескольких моделей
  • Prompt Library — Библиотека промптов с переменными
  • Chain of Thought — Ход рассуждений модели
  • Tool Call — Вызов инструмента с подтверждением

Назад: Support Center · Далее: Chat Message · Весь раздел «ИИ: чат и агенты»