
基于FastUI和Funcchain的轻量级Python聊天界面
fastui-chat是一个纯Python实现的简约聊天界面框架。该项目基于FastUI和Funcchain构建,提供轻量级的聊天UI解决方案。它支持FastAPI集成、多会话并行处理、可切换的聊天历史后端和自定义聊天处理器。fastui-chat具有Python专属、易用性高、兼容LangChain等特点,适合开发者快速构建和定制聊天应用。
A minimalistic ChatBot Interface in pure python. </br> Build on top of FastUI and Funcchain.
pip install fastui-chat
from fastui_chat import ChatUI # chatui inherits from FastAPI so you can use it as a FastAPI app app = ChatUI() # Run with: # uvicorn examples.minimal:app # for hot reloading: # uvicorn examples.minimal:app --reload # or use the built-in method if __name__ == "__main__": app.start_with_uvicorn()
You can also only use the router and extend your existing FastAPI app.
from fastapi import FastAPI from fastui_chat import create_chat_handler, create_history_factory from fastui_chat.chat import ChatAPIRouter from fastui_chat.history import InMemoryChatMessageHistory from fastui_chat.runtime import router as fastui_runtime # callable that returns a ChatMessageHistory given a session_id history_factory = create_history_factory( # swap out with any from langchain_community.chat_message_histories InMemoryChatMessageHistory, ) # a chat handler generates an AIMessage based on a given HumanMessage and ChatHistory chat_handler = create_chat_handler( llm="openai/gpt-4-turbo-preview", history_factory=history_factory, ) # setup your fastapi app app = FastAPI() # add the chatui router to your app app.include_router( ChatAPIRouter(history_factory, chat_handler), prefix="/api", ) # make sure to add the runtime router as latest since it has a catch-all route app.include_router(fastui_runtime) # start the server with `uvicorn examples.fastapi_router:app`
git clone https://github.com/shroominic/fastui-chat.git && cd fastui-chat ./dev-install.sh
If you want to contribute or see whats coming soon checkout the roadmap.todo file for open todos.


职场AI,就用扣子
AI办公助手,复杂任务高效处理。办公效率低?扣子空间AI助手支持播客生成、PPT制作、网页开发及报告写作,覆盖科研、商业、舆情等领域的专家Agent 7x24小时响应,生活工作无缝切换,提升50%效率!


多风格AI绘画神器
堆友平台由阿里巴巴设计团队创建,作为一款AI驱动的设计工具,专为设计师提供一站式增长服务。功能覆盖海量3D素材、AI绘画、实时渲染以及专业抠图,显著提升设计品质和效率。平台不仅提供工具,还是一个促进创意交流和个人发展的空间,界面友好,适合所有级别的设计师和创意工作者。


零代码AI应用开发平台
零代码AI应用开发平台,用户只需一句话简单描述需求,AI能自动生成小程序、APP或H5网页应用,无需编写代码。


免费创建高清无水印Sora视频
Vora是一个免费创建高清无水印Sora视频的AI工具


最适合小白的AI自动化工作流平台
无需编码,轻松生成可复用、可变现的AI自动化工作流

大模型驱动的Excel数据处理工具
基于大模型交互的表格处理系统,允许用户通过对话方式完成数据整理和可视化分析。系统采用机器学习算法解析用户指令,自动执行排序、公式计算和数据透视等操作,支持多种文件格式导入导出。数据处理响应速度保持在0.8秒以内,支持超过100万行数据的即时分析。


AI辅助编程,代码自动修复
Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。