RAG
VectorSearchInput
Query input with topK slider, similarity threshold, and reranker toggle.
Preview
Installation
pnpm add nyxis-ui
Usage
import { VectorSearchInput } from 'nyxis-ui';
<VectorSearchInput
defaultValue="when does the fiscal year end?"
onSubmit={(query, { topK, threshold, reranker }) => {
runRetriever({ query, topK, threshold, reranker });
}}
/>;
Anatomy
- Search input with leading icon (spinner while
loading). top-Kslider (default range[1, 20]).- Similarity-threshold slider
0..1. - Reranker toggle.
- Submit fires
onSubmit(query, options)— Enter in the input also submits.