Prompt Library
Библиотека промптов с переменными. Pro · ИИ: чат и агенты › Промпт и модели
Установка
npx valyro-cli@latest login
npx valyro-cli@latest add prompt-library
npm install valyro-ui-pro
import 'valyro-ui-pro/styles.css';
import { PromptLibrary } from 'valyro-ui-pro';
Пропсы
| Prop | Type | Default | |
|---|---|---|---|
prompts * | SavedPrompt[] | Saved prompts to browse, search and insert; {{variables}} in a template become fields to fill in. | |
categories | string[] | Category filter order. Defaults to the categories of prompts, in order of appearance. | |
favorites | string[] | Ids of starred prompts. | |
defaultFavorites | string[] | [] | Initial favorites when uncontrolled. |
onFavoritesChange | (ids: string[]) => void | Called with the new favorites when it changes. | |
selected | string | null | Id of the open prompt. | |
defaultSelected | string | null | null | Initial selected when uncontrolled. |
onSelectedChange | (id: string | null) => void | Called with the new selected when it changes. | |
onInsert * | (text: string, prompt: SavedPrompt) => void | Called with the filled-in prompt text. | |
labels | Partial<PromptLibraryLabels> | Overrides for the built-in English text; keys left out keep their defaults. |
Похожие компоненты
- Prompt Composer — Поле промпта с вложениями
- Inline Suggestion — Подсказка-автодополнение в поле ввода
- Model Selector — Выбор модели ИИ
- Model Comparison — Сравнение ответов нескольких моделей
- AI Chat Window — Окно AI-чата
- Chat Message — Сообщения с потоковым выводом
- Message Branches — Версии сообщения и дерево веток диалога
- Streaming Text — Плавный вывод потока токенов
- Markdown Preview — Отображение Markdown
- Response Feedback — Оценка ответа и рубрика для асессоров
- Chain of Thought — Ход рассуждений модели
- Tool Call — Вызов инструмента с подтверждением
Назад: Model Comparison · Далее: Chain of Thought · Весь раздел «ИИ: чат и агенты»