README 未给出具体安装与使用示例,需查阅官网文档;代码高亮依赖 Shiki,需确认打包体积与构建配置;库为 headless 无样式,需自行提供样式

llm-ui
richardgillMIT活跃维护面向大模型的 React 组件库,专门处理流式输出中 Markdown 渲染不完整、代码块闪烁等问题,让聊天界面边生成边稳定显示。
The React library for LLMs
面向 LLM 流式输出的 React 渲染库,边生成边显示不破版
面向大模型的 React 组件库,专门处理流式输出中 Markdown 渲染不完整、代码块闪烁等问题,让聊天界面边生成边稳定显示。
核心能力
- 自动移除流式输出中残缺的 Markdown 语法
- 支持把自定义 React 组件嵌入 LLM 输出
- 用节流平滑模型流式输出的停顿
- 按原生帧率渲染输出内容
- 基于 Shiki 高亮各语言代码块
容易踩的坑
内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README
Patch Changes
- Updated dependencies [
7f81520]:- @llm-ui/[email protected]
- Updated dependencies [
- @llm-ui/[email protected]2024-06-01 · 2024-06-01 12:13 UTC
查看更新说明
Patch Changes
- #264
7f81520Thanks @richardgill! - Performance improvements: useReact.memoto avoid recalculating blocks
- #264
- @llm-ui/[email protected]2024-06-01 · 2024-06-01 12:13 UTC
查看更新说明
Patch Changes
- Updated dependencies [
7f81520]:- @llm-ui/[email protected]
- Updated dependencies [
- @llm-ui/[email protected]2024-06-01 · 2024-06-01 09:50 UTC
查看更新说明
Patch Changes
- Updated dependencies [
9360d30]:- @llm-ui/[email protected]
- Updated dependencies [
- @llm-ui/[email protected]2024-06-01 · 2024-06-01 09:50 UTC
查看更新说明
Patch Changes
- #261
9360d30Thanks @richardgill! - Performance improvement: Only log console warnings in dev
- #261
用户点评
登录用户的真实使用记录,可按版本和硬件筛选共 0 条
还没有人点评。第一个说出真实体验的人最有价值。
llm-ui
The React library for LLMs.
Features
- Removes broken markdown syntax
- Add your own custom components to LLM output.
- Throttling smooths out pauses in the LLM’s streamed output
- Renders output at native frame rate
- Code blocks for every language with Shiki
- Headless: Bring your own styles
Sponsor
We’re proudly sponsored by Stream. If you need scalable, real-time chat, audio, video, feeds or activity streams, check out Stream.
Stream helps developers build scalable in-app Chat, Audio, Video, Feeds, and Moderation experiences powered by a global edge network and enterprise-grade infrastructure.