Streaming Chat
ProInstallation
ProStreaming Chat is a Pro component
Sign in to see the source, or install it with a license key. The live preview and props above are free to explore.
Install with a key
- Add the Pro registry to
components.json:components.json { "registries": { "@uibrik-pro": { "url": "https://uibrik.com/r/pro/{name}.json", "headers": { "Authorization": "Bearer ${UIBRIK_LICENSE}" } } } } - Put your key in
.env.localand add that file to.gitignore:.env.local UIBRIK_LICENSE=your-license-key - Install it:
Terminal npx shadcn@latest add @uibrik-pro/streaming-chat
Loading your installation…
Props
StreamingChat- voice
- Type boolean
- true
- Dictation button. It only shows in browsers that support speech recognition.
- attach
- Type boolean
- true
- File button, drag and drop, and paste.
- speed
- Type number
- 22
- Words per second for the built-in demo model.
- blur
- Type number
- 4
- Blur a new word starts with. 0 turns the blur off.
- placeholder
- Type string
- "Ask anything"
- Hint shown in the empty input.
- respond
- Type (prompt: string, signal: AbortSignal, files: File[]) => AsyncIterable<string>
- –
- Where replies come from. Yield text pieces as they arrive. Leave out to use the built-in demo model.
- accept
- Type string
- ""
- Which files to take, as an <input accept> string such as "image/*,.pdf". Empty takes any.
- maxFiles
- Type number
- 6
- Most files one message can carry.
- maxFileSizeMb
- Type number
- 10
- Largest single file, in MB.
- suggestions
- Type string[]
- 3 prompts
- Prompts offered before the first message. Pass [] to hide them.
- thinkingLabels
- Type string[]
- 4 labels
- Shown in turn, a few seconds apart, while waiting for the first word. The last one holds.
- className
- Type string
- –
- Size the chat by giving it a height, e.g. h-[640px] max-w-2xl.