llm-ui

richardgillMIT活跃维护

面向大模型的 React 组件库,专门处理流式输出中 Markdown 渲染不完整、代码块闪烁等问题,让聊天界面边生成边稳定显示。

The React library for LLMs

@llm-ui/[email protected]发布于 2024-06-01 12:13 UTC1,752star90fork同步于 2026-11-07 07:31 UTC

怎么上手

由 README 提炼,执行前请确认
npm install llm-ui
硬件要求按 README 说明

README 未说明

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

面向 LLM 流式输出的 React 渲染库,边生成边显示不破版

面向大模型的 React 组件库,专门处理流式输出中 Markdown 渲染不完整、代码块闪烁等问题,让聊天界面边生成边稳定显示。

核心能力

  • 自动移除流式输出中残缺的 Markdown 语法
  • 支持把自定义 React 组件嵌入 LLM 输出
  • 用节流平滑模型流式输出的停顿
  • 按原生帧率渲染输出内容
  • 基于 Shiki 高亮各语言代码块

容易踩的坑

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

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本@llm-ui/[email protected]
  1. @llm-ui/[email protected]最新正式版2024-06-01 · 2024-06-01 12:13 UTC

    Patch Changes

  2. @llm-ui/[email protected]2024-06-01 · 2024-06-01 12:13 UTC
    查看更新说明

    Patch Changes

  3. @llm-ui/[email protected]2024-06-01 · 2024-06-01 12:13 UTC
    查看更新说明

    Patch Changes

  4. @llm-ui/[email protected]2024-06-01 · 2024-06-01 09:50 UTC
    查看更新说明

    Patch Changes

  5. @llm-ui/[email protected]2024-06-01 · 2024-06-01 09:50 UTC
    查看更新说明

    Patch Changes

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    llm-ui

    The React library for LLMs.

    Documentation

    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.

    License

    MIT