百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
G

gen-ui-python

> 编程语言
开源

使用 LangChain、Python、AI SDK 和 Next.js 构建的生成式 UI Web 应用程序

391 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

使用 LangChain、Python、AI SDK 和 Next.js 构建的生成式 UI Web 应用程序

Generative UI with LangChain Python

Overview

This application aims to provide a template for building generative UI applications with LangChain Python. It comes pre-built with a few UI features which you can use to play about with gen ui. The UI components are built using Shadcn.

Getting Started

Installation

First, clone the repository and install dependencies:

bash
git clone https://github.com/bracesproul/gen-ui-python.git

cd gen-ui-python

Install dependencies in the frontend and backend directories:

bash
cd ./frontend

yarn install
bash
cd ../backend

poetry install

Secrets

Next, if you plan on using the existing pre-built UI components, you'll need to set a few environment variables:

Copy the .env.example file to .env inside the backend directory.

LangSmith keys are optional, but highly recommended if you plan on developing this application further.

The OPENAI_API_KEY is required. Get your OpenAI API key from the OpenAI dashboard.

Sign up/in to LangSmith and get your API key.

Create a new GitHub PAT (Personal Access Token) with the repo scope.

Create a free Geocode account.

bash
# ------------------LangSmith tracing------------------
LANGCHAIN_API_KEY=...
LANGCHAIN_CALLBACKS_BACKGROUND=true
LANGCHAIN_TRACING_V2=true
# -----------------------------------------------------

GITHUB_TOKEN=...
OPENAI_API_KEY=...
GEOCODE_API_KEY=...

Running the Application

bash
cd ./frontend

yarn dev

This will start a development server on http://localhost:3000.

Then, in a new terminal window:

bash
cd ../backend

poetry run start

Go further

If you're interested in ways to take this demo application further, I'd consider the following:

  • Generating entire React components to be rendered, instead of relying on pre-built components.
  • Using the LLM to build custom components using a UI library like Shadcn.
  • Multi-tool and component usage.
  • Update the LangGraph agent to call multiple tools, and appending multiple different UI components to the client rendered UI.
  • Generative UI outside of the chatbot window: Have the UI dynamically render in different areas on the screen. E.g a dashboard, where the components are dynamically rendered based on the LLMs output.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

TypeScript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言