sanic-web
一个轻量级、支持全链路且易于二次开发的大模型应用项目 基于 Dify 、Ollama&Vllm、Sanic 和 Text2SQL 📊 等技术构建的一站式大模型应用开发项目,采用 Vue3、TypeScript 和 Vite 5 打造现代UI。它支持通过 ECharts 📈 实现基于大模型的数据图形化问答,具备处理 CSV 文件 📂 表格问答的能力。同时,能方便对接第三方开源 RAG 系统 检索系统 🌐等,以支持广泛的通用知识问答。
Stars: 68
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:
🌟 项目简介
一个轻量级、支持全链路且易于二次开发的大模型应用项目
基于 Dify 、Ollama&Vllm、Sanic 和 Text2SQL 📊 等技术构建的一站式大模型应用开发项目,采用 Vue3、TypeScript 和 Vite 5 打造现代UI。它支持通过 ECharts 📈 实现基于大模型的数据图形化问答,具备处理 CSV 文件 📂 表格问答的能力。同时,能方便对接第三方开源 RAG 系统 检索系统 🌐等,以支持广泛的通用知识问答。
作为轻量级的大模型应用开发项目,Sanic-Web 🛠️ 支持快速迭代与扩展,助力大模型项目快速落地。🚀
🌈 Live Demo
在线体验即将上线,敬请期待!
- 核心技术栈:Dify + Ollama + RAG + LLM + 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模式。
- 内存: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
-
安装Dify
- 官方参考文档
- 为了兼顾第一次接触大模型应用的同学,本项目提供了一键拉起Dify服务方便大家快速体验。
- Dify本机访问地址:http://localhost:18000 账号/密码: 需自己注册
# 拉起内置的dify服务 cd docker/dify/docker docker-compose up -d
-
Dify配置
- 添加Dify大模型提供商Ollama,配置Qwen2.5模型
- 导入项目根目录下的docker/dify/数据问答_v1.1.0.yml画布至Dify并获取对应的api-key
- 具体步骤如下:
- 第一步克隆代码到本地
- 第二步参考上面大模型部署先安装Ollama部署Qwen2.5模型
- 第三步Dify环境配置直接参考上面Dify环境配置 这步很重要!!!!
- 第四步启动服务具体步骤如下:
-
克隆仓库
git clone https://github.com/apconw/sanic-web.git
-
启动服务
- 修改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
- 修改chat-service服务里的MINIO_开头的环境变量重启服务
# 重新拉起前后端服务和中间件 cd docker docker compose up -d
-
数据初始化
cd docker ./init.sh 或执行 cd docker python3 ../common/initialize_mysql.py
-
访问服务
- 第一步克隆代码到本地
- 第二步参考上面大模型部署先安装Ollama部署Qwen2.5模型
- 第三步本地开发环境Dify配置,参考上面Dify环境配置 根据实际情况自行选择调整即可
- 第四步编辑项目根目录下的.env.dev文件里面的数据库等配置信息,默认不需要修改
- 第五步安装前后端项目依赖并启动前后端服务具体步骤如下:
-
后端依赖安装
- poetry安装 参考poetry官方文档
# 安装poetry pip install poetry # 安装依赖根目录执行 # 设置国内仓库 poetry source add --priority=primary mirrors https://pypi.tuna.tsinghua.edu.cn/simple/ poetry install
-
安装中间件
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,修改数据库连接信息即可
cd docker ./init.sh 或执行 cd docker python3 ../common/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
支持一下,你的支持是我们不断改进的动力,感谢! ^_^
如果你觉得这个项目对你有帮助,或者你喜欢我们所做的事情,欢迎点击右上角的 [⭐️ Star] 按钮来支持我们!你的每一个星标都是对我们莫大的鼓励,也是我们不断改进和发展的动力。感谢你的支持! ^_^
此外,如果你有任何建议或想参与项目的发展,也非常欢迎你通过以下方式联系我们:
- 提交Issue - 如果你发现了任何问题或有改进建议,可以在 Issues 中提交。
- 加入讨论 - 可以添加加入我们讨论群,进行交流讨论。 参与讨论。
- 贡献代码 - 如果你有兴趣贡献代码,可以参考 贡献指南。
再次感谢你的支持! 🙏
- 大模型应用交流群欢迎大家, 欢迎加进群讨论分享经验
- 关注下面的公众号点击·微信群菜单添加微信拉你入群
微信群 |
---|
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.
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.
AirPower4T
AirPower4T is a development base library based on Vue3 TypeScript Element Plus Vite, using decorators, object-oriented, Hook and other front-end development methods. It provides many common components and some feedback components commonly used in background management systems, and provides a lot of enums and decorators.
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.
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.
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.
ai_wiki
This repository provides a comprehensive collection of resources, open-source tools, and knowledge related to quantitative analysis. It serves as a valuable knowledge base and navigation guide for individuals interested in various aspects of quantitative investing, including platforms, programming languages, mathematical foundations, machine learning, deep learning, and practical applications. The repository is well-structured and organized, with clear sections covering different topics. It includes resources on system platforms, programming codes, mathematical foundations, algorithm principles, machine learning, deep learning, reinforcement learning, graph networks, model deployment, and practical applications. Additionally, there are dedicated sections on quantitative trading and investment, as well as large models. The repository is actively maintained and updated, ensuring that users have access to the latest information and resources.
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.
MouseTooltipTranslator
MouseTooltipTranslator is a Chrome extension that allows users to translate any text on a webpage by simply hovering over it. It supports both Google Translate and Bing Translate, and can also be used to listen to the pronunciation of words and phrases. Additionally, the extension can be used to translate text in input boxes and highlighted text, and to display translated tooltips for PDFs and YouTube videos. It also supports OCR, allowing users to translate text in images by holding down the left shift key and hovering over the image.
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.
siteproxy
Siteproxy 2.0 is a web proxy tool that utilizes service worker for enhanced stability and increased website coverage. It replaces express with hono for a 4x speed boost and supports deployment on Cloudflare worker. It enables reverse proxying, allowing access to YouTube/Google without VPN, and supports login for GitHub and Telegram web. The tool also features DuckDuckGo AI Chat with free access to GPT3.5 and Claude3. It offers a pure web-based online proxy with no client configuration required, facilitating reverse proxying to the internet.
Thinking_in_Java_MindMapping
Thinking_in_Java_MindMapping is a repository that started as a project to create mind maps based on the book 'Java Programming Ideas'. Over time, it evolved into a collection of programming notes, blog posts, book summaries, personal reflections, and even gaming content. The repository covers a wide range of topics, allowing the author to freely express thoughts and ideas. The content is diverse and reflects the author's dedication to consistency and creativity.
aid
Aid2 is a tool designed to authorize iOS devices and install apps similar to iTools. After authorizing with Aid2, the IPA files can be installed without entering the app ID and password. This second version of Aid supports both Windows and Mac systems, although the Mac system has not been fully tested yet. Version 2.1 added the functionality to install IPA files. Version 2.5 streamlined the authorization process, executing it on each device using a single thread to reduce code complexity and improve authorization speed. The tool requires a compilation environment with Vcpkg, gRPC, Protobuf, and OpenSSL, and users need to have access to a VPN for successful configuration.
Yi-Ai
Yi-Ai is a project based on the development of nineai 2.4.2. It is for learning and reference purposes only, not for commercial use. The project includes updates to popular models like gpt-4o and claude3.5, as well as new features such as model image recognition. It also supports various functionalities like model sorting, file type extensions, and bug fixes. The project provides deployment tutorials for both integrated and compiled packages, with instructions for environment setup, configuration, dependency installation, and project startup. Additionally, it offers a management platform with different access levels and emphasizes the importance of following the steps for proper system operation.
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.
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.
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.