
sanic-web
一个轻量级、支持全链路且易于二次开发的大模型应用项目 支持DeepSeek/Qwen2.5等大模型 基于 Dify 、Ollama&Vllm、Sanic 和 Text2SQL 📊 等技术构建的一站式大模型应用开发项目,采用 Vue3、TypeScript 和 Vite 5 打造现代UI。它支持通过 ECharts 📈 实现基于大模型的数据图形化问答,具备处理 CSV 文件 📂 表格问答的能力。同时,能方便对接第三方开源 RAG 系统 检索系统 🌐等,以支持广泛的通用知识问答。
Stars: 189

Sanic-Web is a lightweight, end-to-end, and easily customizable large model application project built on technologies such as Dify, Ollama & Vllm, Sanic, and Text2SQL. It provides a one-stop solution for developing large model applications, supporting graphical data-driven Q&A using ECharts, handling table-based Q&A with CSV files, and integrating with third-party RAG systems for general knowledge Q&A. As a lightweight framework, Sanic-Web enables rapid iteration and extension to facilitate the quick implementation of large model projects.
README:
🌟 项目简介
一个轻量级、支持全链路且易于二次开发的大模型应用项目
已适配DeepSeek/Qwen2.5等大模型
基于 Dify 、Ollama&Vllm、Sanic 和 Text2SQL 📊 等技术构建的一站式大模型应用开发项目,采用 Vue3、TypeScript 和 Vite 5 打造现代UI。它支持通过 ECharts 📈 实现基于大模型的数据图形化问答,具备处理 CSV 文件 📂 表格问答的能力。同时,能方便对接第三方开源 RAG 系统 检索系统 🌐等,以支持广泛的通用知识问答。
作为轻量级的大模型应用开发项目,Sanic-Web 🛠️ 支持快速迭代与扩展,助力大模型项目快速落地。🚀
- 核心技术栈:Dify + Ollama + RAG + (Qwen2.5/DeepSeek) + Text2SQL
- UI 框架:Vue 3 + TypeScript + Vite 5
- 数据问答:集成 ECharts大模型实现Text2SQL轻量级的图形化数据问答展示
- 表格问答:支持 CSV格式文件的上传与基于大模型总结预处理和Text2SQL的表格数据问答
- 通用问答:支持通用数据形式问答基于对接三方RAG系统+公网检索模式
- 应用架构:作为一个轻量级全链路一站式大模型应用开发框架方便扩展落地
- 灵活部署:支持大模型应用开发各依赖组件docker-compose一键拉起快速部署零配置
在开始之前,请确保您的开发环境满足以下最低配置要求:
- 操作系统:Windows 10/11, macOs M系列, Centos/Ubuntu
- GPU: 本地使用ollama部署,推荐使用Nvidia显卡或CPU模式。或公网购买APIKEY形式
- 内存:8GB+
- Python 3.8+
- Poetry 1.8.3+
- Dify 0.7.1+
- Mysql 8.0+
- Node.js 18.12.x+
- Pnpm 9.x
- 参考Ollama部署
- 模型: Qwen2.5 7B 模型
- 模型: DeepSeek R1 7B 模型
- 阿里云公网APIKEY形式
-
安装Dify
- 官方参考文档
- 为了兼顾第一次接触大模型应用的同学,本项目提供了一键拉起Dify服务方便大家快速体验。
- Dify本机访问地址:http://localhost:18000 账号/密码: 需自己注册
# 拉起内置的dify服务 cd docker/dify/docker docker-compose up -d
-
Dify配置
- 添加Dify大模型提供商Ollama,配置Qwen2.5模型和DeepSeek R1模型
- 导入项目根目录下的docker/dify/数据问答_v1.1.1_deepseek.yml画布
- 获取画布对应的api-key先复制出来下面步骤会使用
- 导入画布后需要手动选择一下你本地配置的大模型并保存
- 具体步骤如下:
- 第一步克隆代码到本地
- 第二步参考上面大模型部署先安装Ollama部署Qwen2.5模型和DeepSeek R1模型
- 第三步Dify环境配置直接参考上面Dify环境配置 这步很重要!!!!
- 第四步启动服务具体步骤如下:
-
克隆仓库
git clone https://github.com/apconw/sanic-web.git
-
启动服务
- 修改docker-compose里的chat-service服务DIFY_开头的环境变量
- 修改DIFY_DATABASE_QA_API_KEY 获取Dify画布的api-key
# 拉起前后端服务和中间件 cd docker docker compose up -d
-
Minio配置
- 访问MinIO服务,http://localhost:19001/ 账号:admin 密码:12345678
- 创建一个bucket,名称filedata,同时配置Access Key
- 修改docker-compose里的chat-service服务的MINIO_开头的环境变量重启服务
# 重新拉起前后端服务和中间件 cd docker docker compose up -d
-
数据初始化
# 安装依赖包 pip install pymysql # Mac or Linux 用户执行 cd docker ./init.sh # Windows 用户执行 cd common python initialize_mysql.py
-
访问服务
- 第一步克隆代码到本地
- 第二步参考上面大模型部署先安装Ollama部署Qwen2.5模型和DeepSeek R1模型
- 第三步本地开发环境Dify配置,参考上面 Dify环境配置里 获取Dify画布的api-key 同时修改.env.dev文件里面的DIFY_DATABASE_QA_API_KEY
- 第四步本地开发环境Minio配置,修改env.dev文件里面的Minio相关密钥信息
- 第五步安装前后端项目依赖并启动前后端服务具体步骤如下:
-
后端依赖安装
- poetry安装 参考poetry官方文档
# 安装poetry pip install poetry # 安装依赖根目录执行 # 设置国内仓库 poetry source add --priority=primary mirrors https://pypi.tuna.tsinghua.edu.cn/simple/ poetry install --no-root
-
安装中间件
cd docker docker compose up -d mysql minio
-
Minio配置
- 访问MinIO服务,http://localhost:19001/ 账号:admin 密码:12345678
- 创建一个bucket,名称filedata,同时配置Access Key
- 修改.evn.dev里的MINIO_开头的密钥消息
-
初始化数据库
- 如果使用本地环境mysql,初始化数据时需修改源码initialize_mysql,修改数据库连接信息即可
# Mac or Linux 用户执行 cd docker ./init.sh # Windows 用户执行 cd common python initialize_mysql.py
-
前端依赖安装
- 前端是基于开源项目可参考chatgpt-vue3-light-mvp安装二开
# 安装前端依赖&启动服务 cd web #安装依赖 npm install -g pnpm pnpm i #启动服务 pnpm dev
-
启动后端服务
#启动后端服务 python serv.py
-
访问服务
- 执行构建命令:
# 构建前端镜像 make web-build # 构建后端镜像 make server-build
如果你喜欢这个项目或发现有用,可以点右上角 Star
支持一下,你的支持是我们不断改进的动力,感谢! ^_^
- 本软件基于开源技术构建,使用Dify、Ollama、Vue大模型等开源项目。技术上如有问题,可以先向对应的开源社区请求帮助。
- 开源不易,本人精力和时间有限,如需一对一技术支持,请先赞助。联系微信(备注 技术支持)
- 一对一技术支持 我将亲自远程帮您部署和启动、并讲解项目架构以及二开思路等.
- 长期技术支持方式 拉你加入群(一线算法、架构大佬群),为你提供技术指导,项目解决方案等。
技术支持方式 | 赞助(元) |
---|---|
加 QQ:343397495,微信:weber812 | 50/次 |
长期技术支持(不限次数,提供技术指导,项目解决方等) | 100 |
- 大模型应用交流群欢迎大家, 欢迎加进群讨论分享经验
- 关注下面的公众号点击·微信群菜单添加微信拉你入群
微信群 |
---|
![]() |
MIT License | Copyright © 2024-PRESENT AiAdventurer
For Tasks:
Click tags to check more tools for each tasksFor Jobs:
Alternative AI tools for sanic-web
Similar Open Source Tools

sanic-web
Sanic-Web is a lightweight, end-to-end, and easily customizable large model application project built on technologies such as Dify, Ollama & Vllm, Sanic, and Text2SQL. It provides a one-stop solution for developing large model applications, supporting graphical data-driven Q&A using ECharts, handling table-based Q&A with CSV files, and integrating with third-party RAG systems for general knowledge Q&A. As a lightweight framework, Sanic-Web enables rapid iteration and extension to facilitate the quick implementation of large model projects.

llm_note
LLM notes repository contains detailed analysis on transformer models, language model compression, inference and deployment, high-performance computing, and system optimization methods. It includes discussions on various algorithms, frameworks, and performance analysis related to large language models and high-performance computing. The repository serves as a comprehensive resource for understanding and optimizing language models and computing systems.

LabelQuick
LabelQuick_V2.0 is a fast image annotation tool designed and developed by the AI Horizon team. This version has been optimized and improved based on the previous version. It provides an intuitive interface and powerful annotation and segmentation functions to efficiently complete dataset annotation work. The tool supports video object tracking annotation, quick annotation by clicking, and various video operations. It introduces the SAM2 model for accurate and efficient object detection in video frames, reducing manual intervention and improving annotation quality. The tool is designed for Windows systems and requires a minimum of 6GB of memory.

AI-Drug-Discovery-Design
AI-Drug-Discovery-Design is a repository focused on Artificial Intelligence-assisted Drug Discovery and Design. It explores the use of AI technology to accelerate and optimize the drug development process. The advantages of AI in drug design include speeding up research cycles, improving accuracy through data-driven models, reducing costs by minimizing experimental redundancies, and enabling personalized drug design for specific patients or disease characteristics.

Daily-DeepLearning
Daily-DeepLearning is a repository that covers various computer science topics such as data structures, operating systems, computer networks, Python programming, data science packages like numpy, pandas, matplotlib, machine learning theories, deep learning theories, NLP concepts, machine learning practical applications, deep learning practical applications, and big data technologies like Hadoop and Hive. It also includes coding exercises related to '剑指offer'. The repository provides detailed explanations and examples for each topic, making it a comprehensive resource for learning and practicing different aspects of computer science and data-related fields.

MarkMap-OpenAi-ChatGpt
MarkMap-OpenAi-ChatGpt is a Vue.js-based mind map generation tool that allows users to generate mind maps by entering titles or content. The application integrates the markmap-lib and markmap-view libraries, supports visualizing mind maps, and provides functions for zooming and adapting the map to the screen. Users can also export the generated mind map in PNG, SVG, JPEG, and other formats. This project is suitable for quickly organizing ideas, study notes, project planning, etc. By simply entering content, users can get an intuitive mind map that can be continuously expanded, downloaded, and shared.

hongbomiao.com
hongbomiao.com is a personal research and development (R&D) lab that facilitates the sharing of knowledge. The repository covers a wide range of topics including web development, mobile development, desktop applications, API servers, cloud native technologies, data processing, machine learning, computer vision, embedded systems, simulation, database management, data cleaning, data orchestration, testing, ops, authentication, authorization, security, system tools, reverse engineering, Ethereum, hardware, network, guidelines, design, bots, and more. It provides detailed information on various tools, frameworks, libraries, and platforms used in these domains.

DeepBattler
DeepBattler is a tool designed for Hearthstone Battlegrounds players, providing real-time strategic advice and insights to improve gameplay experience. It integrates with the Hearthstone Deck Tracker plugin and offers voice-assisted guidance. The tool is powered by a large language model (LLM) and can match the strength of top players on EU servers. Users can set up the tool by adding dependencies, configuring the plugin path, and launching the LLM agent. DeepBattler is licensed for personal, educational, and non-commercial use, with guidelines on non-commercial distribution and acknowledgment of external contributions.

douyin-chatgpt-bot
Douyin ChatGPT Bot is an AI-driven system for automatic replies on Douyin, including comment and private message replies. It offers features such as comment filtering, customizable robot responses, and automated account management. The system aims to enhance user engagement and brand image on the Douyin platform, providing a seamless experience for managing interactions with followers and potential customers.

LotteryMaster
LotteryMaster is a tool designed to fetch lottery data, save it to Excel files, and provide analysis reports including number prediction, number recommendation, and number trends. It supports multiple platforms for access such as Web and mobile App. The tool integrates AI models like Qwen API and DeepSeek for generating analysis reports and trend analysis charts. Users can configure API parameters for controlling randomness, diversity, presence penalty, and maximum tokens. The tool also includes a frontend project based on uniapp + Vue3 + TypeScript for multi-platform applications. It provides a backend service running on Fastify with Node.js, Cheerio.js for web scraping, Pino for logging, xlsx for Excel file handling, and Jest for testing. The project is still in development and some features may not be fully implemented. The analysis reports are for reference only and do not constitute investment advice. Users are advised to use the tool responsibly and avoid addiction to gambling.

chatwiki
ChatWiki is an open-source knowledge base AI question-answering system. It is built on large language models (LLM) and retrieval-augmented generation (RAG) technologies, providing out-of-the-box data processing, model invocation capabilities, and helping enterprises quickly build their own knowledge base AI question-answering systems. It offers exclusive AI question-answering system, easy integration of models, data preprocessing, simple user interface design, and adaptability to different business scenarios.

Nano
Nano is a Transformer-based autoregressive language model for personal enjoyment, research, modification, and alchemy. It aims to implement a specific and lightweight Transformer language model based on PyTorch, without relying on Hugging Face. Nano provides pre-training and supervised fine-tuning processes for models with 56M and 168M parameters, along with LoRA plugins. It supports inference on various computing devices and explores the potential of Transformer models in various non-NLP tasks. The repository also includes instructions for experiencing inference effects, installing dependencies, downloading and preprocessing data, pre-training, supervised fine-tuning, model conversion, and various other experiments.

MoneyPrinterTurbo
MoneyPrinterTurbo is a tool that can automatically generate video content based on a provided theme or keyword. It can create video scripts, materials, subtitles, and background music, and then compile them into a high-definition short video. The tool features a web interface and an API interface, supporting AI-generated video scripts, customizable scripts, multiple HD video sizes, batch video generation, customizable video segment duration, multilingual video scripts, multiple voice synthesis options, subtitle generation with font customization, background music selection, access to high-definition and copyright-free video materials, and integration with various AI models like OpenAI, moonshot, Azure, and more. The tool aims to simplify the video creation process and offers future plans to enhance voice synthesis, add video transition effects, provide more video material sources, offer video length options, include free network proxies, enable real-time voice and music previews, support additional voice synthesis services, and facilitate automatic uploads to YouTube platform.

ChatGPT-airport-tizi-fanqiang
This repository provides a curated list of recommended airport proxies for accessing ChatGPT and other AI tools while bypassing internet restrictions. The proxies are tested and verified to ensure reliability and stability. The readme includes detailed instructions on how to set up and use the proxies with various devices and platforms. Additionally, the repository offers advanced tutorials on upgrading to GPT-4/Plus, deploying a 24/7 ChatGPT微信机器人 server, and using Claude-3 securely and for free.

AIResume
AIResume is an open-source resume creation platform that helps users easily create professional resumes, integrating AI technology to assist users in polishing their resumes. The project allows for template development using Vue 3, Vite, TypeScript, and Ant Design Vue. Users can edit resumes, export them as PDFs, switch between multiple resume templates, and collaborate on template development. AI features include resume refinement, deep optimization based on individual projects or experiences, and simulated interviews for user practice. Additional functionalities include theme color switching, high customization options, dark/light mode switching, real-time preview, drag-and-drop resume scaling, data export/import, data clearing, sample data prefilling, template market showcasing, and more.

xhs_ai_publisher
xhs_ai_publisher is an automation tool designed for publishing articles on the Xiaohongshu platform. It combines a graphical user interface with automation scripts to generate content using large model technology. The tool simplifies the content creation and publishing process by automatically logging in and publishing articles through a web browser.
For similar tasks

Azure-Analytics-and-AI-Engagement
The Azure-Analytics-and-AI-Engagement repository provides packaged Industry Scenario DREAM Demos with ARM templates (Containing a demo web application, Power BI reports, Synapse resources, AML Notebooks etc.) that can be deployed in a customer’s subscription using the CAPE tool within a matter of few hours. Partners can also deploy DREAM Demos in their own subscriptions using DPoC.

sorrentum
Sorrentum is an open-source project that aims to combine open-source development, startups, and brilliant students to build machine learning, AI, and Web3 / DeFi protocols geared towards finance and economics. The project provides opportunities for internships, research assistantships, and development grants, as well as the chance to work on cutting-edge problems, learn about startups, write academic papers, and get internships and full-time positions at companies working on Sorrentum applications.

tidb
TiDB is an open-source distributed SQL database that supports Hybrid Transactional and Analytical Processing (HTAP) workloads. It is MySQL compatible and features horizontal scalability, strong consistency, and high availability.

zep-python
Zep is an open-source platform for building and deploying large language model (LLM) applications. It provides a suite of tools and services that make it easy to integrate LLMs into your applications, including chat history memory, embedding, vector search, and data enrichment. Zep is designed to be scalable, reliable, and easy to use, making it a great choice for developers who want to build LLM-powered applications quickly and easily.

telemetry-airflow
This repository codifies the Airflow cluster that is deployed at workflow.telemetry.mozilla.org (behind SSO) and commonly referred to as "WTMO" or simply "Airflow". Some links relevant to users and developers of WTMO: * The `dags` directory in this repository contains some custom DAG definitions * Many of the DAGs registered with WTMO don't live in this repository, but are instead generated from ETL task definitions in bigquery-etl * The Data SRE team maintains a WTMO Developer Guide (behind SSO)

mojo
Mojo is a new programming language that bridges the gap between research and production by combining Python syntax and ecosystem with systems programming and metaprogramming features. Mojo is still young, but it is designed to become a superset of Python over time.

pandas-ai
PandasAI is a Python library that makes it easy to ask questions to your data in natural language. It helps you to explore, clean, and analyze your data using generative AI.

databend
Databend is an open-source cloud data warehouse that serves as a cost-effective alternative to Snowflake. With its focus on fast query execution and data ingestion, it's designed for complex analysis of the world's largest datasets.
For similar jobs

weave
Weave is a toolkit for developing Generative AI applications, built by Weights & Biases. With Weave, you can log and debug language model inputs, outputs, and traces; build rigorous, apples-to-apples evaluations for language model use cases; and organize all the information generated across the LLM workflow, from experimentation to evaluations to production. Weave aims to bring rigor, best-practices, and composability to the inherently experimental process of developing Generative AI software, without introducing cognitive overhead.

LLMStack
LLMStack is a no-code platform for building generative AI agents, workflows, and chatbots. It allows users to connect their own data, internal tools, and GPT-powered models without any coding experience. LLMStack can be deployed to the cloud or on-premise and can be accessed via HTTP API or triggered from Slack or Discord.

VisionCraft
The VisionCraft API is a free API for using over 100 different AI models. From images to sound.

kaito
Kaito is an operator that automates the AI/ML inference model deployment in a Kubernetes cluster. It manages large model files using container images, avoids tuning deployment parameters to fit GPU hardware by providing preset configurations, auto-provisions GPU nodes based on model requirements, and hosts large model images in the public Microsoft Container Registry (MCR) if the license allows. Using Kaito, the workflow of onboarding large AI inference models in Kubernetes is largely simplified.

PyRIT
PyRIT is an open access automation framework designed to empower security professionals and ML engineers to red team foundation models and their applications. It automates AI Red Teaming tasks to allow operators to focus on more complicated and time-consuming tasks and can also identify security harms such as misuse (e.g., malware generation, jailbreaking), and privacy harms (e.g., identity theft). The goal is to allow researchers to have a baseline of how well their model and entire inference pipeline is doing against different harm categories and to be able to compare that baseline to future iterations of their model. This allows them to have empirical data on how well their model is doing today, and detect any degradation of performance based on future improvements.

tabby
Tabby is a self-hosted AI coding assistant, offering an open-source and on-premises alternative to GitHub Copilot. It boasts several key features: * Self-contained, with no need for a DBMS or cloud service. * OpenAPI interface, easy to integrate with existing infrastructure (e.g Cloud IDE). * Supports consumer-grade GPUs.

spear
SPEAR (Simulator for Photorealistic Embodied AI Research) is a powerful tool for training embodied agents. It features 300 unique virtual indoor environments with 2,566 unique rooms and 17,234 unique objects that can be manipulated individually. Each environment is designed by a professional artist and features detailed geometry, photorealistic materials, and a unique floor plan and object layout. SPEAR is implemented as Unreal Engine assets and provides an OpenAI Gym interface for interacting with the environments via Python.

Magick
Magick is a groundbreaking visual AIDE (Artificial Intelligence Development Environment) for no-code data pipelines and multimodal agents. Magick can connect to other services and comes with nodes and templates well-suited for intelligent agents, chatbots, complex reasoning systems and realistic characters.