├── .gitignore
├── .gitmodules
├── LICENSE
├── READEME_EN.md
├── README.md
├── img
├── demo.gif
└── self.png
├── include
├── AES_Crypto.h
├── ChatBot.h
├── Configure.h
├── Downloader.h
├── ImGuiSpinners.h
├── Impls
│ ├── Bots.h
│ ├── ChatGPT_Impl.h
│ ├── Claude_Impl.h
│ ├── CustomRule_Impl.h
│ ├── Gemini_Impl.h
│ └── LLama_Impl.h
├── Logger.h
├── Progress.hpp
├── Recorder.h
├── Script.h
├── StableDiffusion.h
├── Translate.h
├── VoiceToText.h
├── base64.h
├── imfilebrowser.h
├── imgui_markdown.h
├── pch.h
├── stb_image.h
├── stb_image_resize.h
├── stb_image_write.h
└── utils.h
├── sample
├── Application.cpp
├── Application.h
├── CMakeLists.txt
├── Resources
│ ├── Chatbot.manifest
│ ├── Info.plist
│ ├── Info.rc
│ ├── Mao
│ │ ├── Mao.2048
│ │ │ └── texture_00.png
│ │ ├── Mao.cdi3.json
│ │ ├── Mao.moc3
│ │ ├── Mao.model3.json
│ │ ├── Mao.physics3.json
│ │ ├── Mao.pose3.json
│ │ ├── expressions
│ │ │ ├── exp_01.exp3.json
│ │ │ ├── exp_02.exp3.json
│ │ │ ├── exp_03.exp3.json
│ │ │ ├── exp_04.exp3.json
│ │ │ ├── exp_05.exp3.json
│ │ │ ├── exp_06.exp3.json
│ │ │ ├── exp_07.exp3.json
│ │ │ └── exp_08.exp3.json
│ │ └── motions
│ │ │ ├── mtn_01.motion3.json
│ │ │ ├── mtn_02.motion3.json
│ │ │ ├── mtn_03.motion3.json
│ │ │ ├── mtn_04.motion3.json
│ │ │ ├── special_01.motion3.json
│ │ │ └── special_02.motion3.json
│ ├── Plugins
│ │ └── Test
│ │ │ └── Plugin.lua
│ ├── PythonScripts
│ │ └── getInstalledPackage.py
│ ├── RCa15684
│ ├── add.png
│ ├── avatar.png
│ ├── cancel.png
│ ├── copy.png
│ ├── default avatar.png
│ ├── del.png
│ ├── dll_search_paths.props
│ ├── edit.png
│ ├── eye.png
│ ├── font
│ │ └── default.otf
│ ├── icon.aps
│ ├── icon.icns
│ ├── icon.ico
│ ├── icon.png
│ ├── jieba
│ │ └── dict.txt
│ ├── left.png
│ ├── message.png
│ ├── pause.png
│ ├── play.png
│ ├── resource.h
│ ├── right.png
│ └── send.png
├── SystemRole.h
├── Vendor
│ ├── CMakeLists.txt
│ └── llava
│ │ ├── CMakeLists.txt
│ │ ├── MobileVLM-README.md
│ │ ├── README-glmedge.md
│ │ ├── README-minicpmo2.6.md
│ │ ├── README-minicpmv2.5.md
│ │ ├── README-minicpmv2.6.md
│ │ ├── README-quantize.md
│ │ ├── README.md
│ │ ├── android
│ │ ├── adb_run.sh
│ │ └── build_64.sh
│ │ ├── clip-quantize-cli.cpp
│ │ ├── clip.cpp
│ │ ├── clip.h
│ │ ├── convert_image_encoder_to_gguf.py
│ │ ├── glmedge-convert-image-encoder-to-gguf.py
│ │ ├── glmedge-surgery.py
│ │ ├── llava-cli.cpp
│ │ ├── llava.cpp
│ │ ├── llava.h
│ │ ├── llava_surgery.py
│ │ ├── llava_surgery_v2.py
│ │ ├── minicpmv-cli.cpp
│ │ ├── minicpmv-convert-image-encoder-to-gguf.py
│ │ ├── minicpmv-surgery.py
│ │ ├── qwen2_vl_surgery.py
│ │ ├── qwen2vl-cli.cpp
│ │ └── requirements.txt
├── encrypted_systemrole.h
├── encrypted_systemrole_ex.h
├── main.cpp
├── vcpkg-configuration.json
└── vcpkg.json
└── src
├── AES_Crypto.cpp
├── ChatBot.cpp
├── Downloader.cpp
├── Impls
├── ChatGPT_Impl.cpp
├── Claude_Impl.cpp
├── CustomRule_Impl.cpp
├── Gemini_Impl.cpp
└── LLama_Impl.cpp
├── Logger.cpp
├── Recorder.cpp
├── Script.cpp
├── StableDiffusion.cpp
├── Translate.cpp
├── VoiceToText.cpp
├── base64.cpp
├── stb_image.cpp
├── stb_image_resize.cpp
├── stb_image_wirte.cpp
└── utils.cpp
/.gitignore:
--------------------------------------------------------------------------------
1 | # 默认忽略的文件
2 | /shelf/
3 | /workspace.xml
4 | # 基于编辑器的 HTTP 客户端请求
5 | /httpRequests/
6 | # Datasource local storage ignored files
7 | /dataSources/
8 | /dataSources.local.xml
9 | cmake-build*/
10 |
11 | # 忽略IDE的配置文件
12 | .idea/
13 | .vscode/
14 | build/
15 |
16 | #
17 | *.zip
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "sample/Vendor/spdlog"]
2 | path = sample/Vendor/spdlog
3 | url = https://github.com/gabime/spdlog.git
4 | [submodule "Vendor/libarchive"]
5 | path = sample/Vendor/libarchive
6 | url = https://github.com/libarchive/libarchive
7 | [submodule "sample/Vendor/libarchive"]
8 | path = sample/Vendor/libarchive
9 | url = https://github.com/libarchive/libarchive
10 | [submodule "sample/Vendor/imgui"]
11 | path = sample/Vendor/imgui
12 | url = https://github.com/ocornut/imgui.git
13 | branch = docking
14 |
--------------------------------------------------------------------------------
/READEME_EN.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | # 🤖 ChatBot - Multi-functional AI Assistant Framework
8 |
9 | [English](README_EN.md) | [中文](README.md)
10 |
11 | _✨ All-in-one AI interaction solution: Voice wake-up, multimodal dialogue, local execution, cross-platform support ✨_
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | ## ✨ Key Features
25 |
26 |
27 |
28 |
29 | 🧠 Local Large Models
30 | Supports running local large models directly without additional software, reducing hardware requirements and ensuring privacy
31 | |
32 |
33 | 🔮 Multi-API Support
34 | Supports OpenAI, Claude, iFlytek Spark, Huoshan AI, Tongyi Qianwen, Tencent Hunyuan, Baichuan AI, Gemini, and more
35 | |
36 |
37 |
38 |
39 | 🐳 Ollama Integration
40 | Seamless integration with Ollama, supporting OpenAI-compatible network APIs for flexible model invocation
41 | |
42 |
43 | 🎨 AI Art Creation
44 | Integrated Stable Diffusion for generating high-quality AI images, unleashing creative potential
45 | |
46 |
47 |
48 |
49 | 🔊 Voice Interaction
50 | Supports voice wake-up and real-time conversation for natural and smooth human-machine interaction
51 | |
52 |
53 | 📊 Math Processing
54 | Powerful mathematical computation capabilities for handling complex calculations and scientific analysis
55 | |
56 |
57 |
58 |
59 | 🧩 Extensible Scripts
60 | Customize functionality through Lua scripts for flexible expansion and personalized needs
61 | |
62 |
63 | 👩💻 Code Assistant
64 | Supports code project creation and code completion, serving as a developer's powerful tool
65 | |
66 |
67 |
68 |
69 | 💻 Local Execution
70 | Supports local command execution for safer and more efficient task completion
71 | |
72 |
73 | 👾 Live2D Models
74 | Supports Live2D model display, creating vivid and engaging visual interaction experiences
75 | |
76 |
77 |
78 |
79 | ## 📝 System Demo
80 |
81 | 
82 |
83 | ## 🛠️ Environment Setup
84 |
85 | ### Dependencies
86 |
87 | ChatBot requires the following dependencies:
88 |
89 | - nlohmann-json: Modern C++ JSON library
90 | - cpr: Simplified HTTP request library for C++
91 | - PortAudio: Cross-platform audio I/O library
92 | - OpenGL: Graphics rendering library
93 | - imgui: Lightweight GUI library
94 | - glfw3: Window and OpenGL context creation
95 | - yaml-cpp: YAML parsing library
96 | - sol2: Lua C++ API wrapper
97 | - Lua: Lightweight scripting language
98 | - Stb: Single-file library collection
99 | - SDL2/SDL2_image: Multimedia library
100 | - glad: OpenGL loader library
101 | - OpenSSL: Secure communication library
102 |
103 | ### Installing Dependencies with vcpkg
104 |
105 | #### VCPKG Installation
106 |
107 |
108 | Windows
109 |
110 | ```bash
111 | git clone https://github.com/Microsoft/vcpkg.git
112 | cd vcpkg
113 | ./bootstrap-vcpkg.bat
114 | ```
115 |
116 |
117 |
118 |
119 | Linux
120 |
121 | ```bash
122 | git clone https://github.com/Microsoft/vcpkg.git
123 | cd vcpkg
124 | ./bootstrap-vcpkg.sh
125 | ```
126 |
127 |
128 |
129 | #### Installing Dependencies
130 |
131 | ```bash
132 | vcpkg install nlohmann-json cpr PortAudio OpenGL imgui glfw3 yaml-cpp sol2 Lua Stb SDL2 SDL2_image glad OpenSSL
133 | vcpkg integrate install
134 | ```
135 |
136 | ## 🚀 Compilation Guide
137 |
138 | ```bash
139 | cd ChatBot
140 | mkdir build
141 | cd build
142 | cmake -B build/ -S . -DCMAKE_TOOLCHAIN_FILE=path/to/vcpkg.cmake
143 | cd build
144 | cmake --build .
145 | ```
146 |
147 | ## 💡 Usage Tips
148 |
149 | 1. On first launch, configure your API keys or local model paths in the configuration file
150 | 2. Extend functionality by customizing Lua scripts
151 | 3. Place Live2D models in the `models/Live2D/` folder to load them
152 | 4. Local large models can be launched directly without additional dependencies
153 | 5. Supports third-party API services compatible with OpenAI interfaces
154 |
155 | ## 🌐 API Support
156 |
157 | This project supports the following API types:
158 |
159 | - **Public API Services**
160 | - OpenAI (GPT series)
161 | - Claude (Anthropic)
162 | - Google Gemini
163 | - iFlytek Spark
164 | - Huoshan AI
165 | - Tongyi Qianwen
166 | - Tencent Hunyuan
167 | - Baichuan AI
168 | - OpenAI-compatible API services
169 |
170 | - **Local Models**
171 | - Ollama (supports various open-source models)
172 | - LLama (various local models)
173 |
174 | ## 🔗 Related Links
175 |
176 | - [Project Documentation](https://github.com/NGLSG/ChatBot/wiki)
177 | - [Issue Tracker](https://github.com/NGLSG/ChatBot/issues)
178 | - [Changelog](https://github.com/NGLSG/ChatBot/blob/main/CHANGELOG.md)
179 |
180 | ## 📊 Development Roadmap
181 |
182 | - [ ] Multi-language interface support
183 | - [ ] Mobile adaptation
184 | - [ ] Plugin marketplace
185 | - [ ] More API support
186 |
187 | ## ⭐ Supporting the Project
188 |
189 | If you like this project, please give us a star! Your support motivates us to keep improving.
190 |
191 | ## 📄 License
192 |
193 | This project is licensed under the [GNU General Public License v3.0](LICENSE) (GPL-3.0). This means you are free to use,
194 | modify, and distribute the software, but any derivative works must also be released under the same license.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | # 🤖 ChatBot - 多功能AI助手框架
8 |
9 | [English](README_EN.md) | [中文](README.md)
10 |
11 | _✨ 一站式AI交互解决方案:语音唤醒、多模态对话、本地执行、跨平台支持 ✨_
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | ## ✨ 功能亮点
25 |
26 |
27 |
28 |
29 | 🧠 本地大模型
30 | 支持直接运行本地大模型,无需安装其他软件,降低硬件要求,保护隐私安全
31 | |
32 |
33 | 🔮 多API支持
34 | 支持OpenAI、Claude、讯飞星火、火山引擎、通义千问、腾讯混元、百川AI、Gemini等多种API
35 | |
36 |
37 |
38 |
39 | 🐳 Ollama集成
40 | 无缝集成Ollama,支持泛OpenAI接口的网络API,实现灵活模型调用
41 | |
42 |
43 | 🎨 AI艺术创作
44 | 集成Stable Diffusion,轻松生成高质量AI图像,释放创意潜能
45 | |
46 |
47 |
48 |
49 | 🔊 语音交互
50 | 支持语音唤醒与实时对话,自然流畅的人机交互体验
51 | |
52 |
53 | 📊 数学处理
54 | 强大的数学运算能力,轻松处理复杂计算和科学分析
55 | |
56 |
57 |
58 |
59 | 🧩 可扩展脚本
60 | 通过Lua脚本定制功能,灵活扩展,满足个性化需求
61 | |
62 |
63 | 👩💻 代码助手
64 | 支持代码项目创建与代码补全,成为开发者得力助手
65 | |
66 |
67 |
68 |
69 | 💻 本地执行
70 | 支持本地命令执行,更安全、更高效地完成任务
71 | |
72 |
73 | 👾 Live2D模型
74 | 支持Live2D模型展示,创造生动有趣的视觉交互体验
75 | |
76 |
77 |
78 |
79 | ## 📝 系统演示
80 |
81 | 
82 |
83 | ## 🛠️ 环境配置
84 |
85 | ### 依赖项
86 |
87 | ChatBot需要以下依赖项:
88 |
89 | - nlohmann-json:现代C++的JSON处理库
90 | - cpr:简化HTTP请求的C++库
91 | - PortAudio:跨平台音频I/O库
92 | - OpenGL:图形渲染库
93 | - imgui:轻量级GUI库
94 | - glfw3:创建窗口与OpenGL上下文
95 | - yaml-cpp:YAML解析库
96 | - sol2:Lua C++ API封装库
97 | - Lua:轻量级脚本语言
98 | - Stb:单文件库集合
99 | - SDL2/SDL2_image:多媒体库
100 | - glad:OpenGL加载库
101 | - OpenSSL:安全通信库
102 |
103 | ### 使用vcpkg安装依赖
104 |
105 | #### VCPKG 安装
106 |
107 |
108 | Windows
109 |
110 | ```bash
111 | git clone https://github.com/Microsoft/vcpkg.git
112 | cd vcpkg
113 | ./bootstrap-vcpkg.bat
114 | ```
115 |
116 |
117 |
118 | Linux
119 |
120 | ```bash
121 | git clone https://github.com/Microsoft/vcpkg.git
122 | cd vcpkg
123 | ./bootstrap-vcpkg.sh
124 | ```
125 |
126 |
127 | #### 安装依赖项
128 |
129 | ```bash
130 | vcpkg install nlohmann-json cpr PortAudio OpenGL imgui glfw3 yaml-cpp sol2 Lua Stb SDL2 SDL2_image glad OpenSSL
131 | vcpkg integrate install
132 | ```
133 |
134 | ## 🚀 编译指南
135 |
136 | ```bash
137 | cd ChatBot
138 | mkdir build
139 | cd build
140 | cmake -B build/ -S . -DCMAKE_TOOLCHAIN_FILE=path/to/vcpkg.cmake
141 | cd build
142 | cmake --build .
143 | ```
144 |
145 | ## 💡 使用提示
146 |
147 | 1. 首次启动时,需要在配置文件中设置您的API密钥或者本地模型路径
148 | 2. 可通过自定义Lua脚本扩展功能
149 | 3. Live2D模型放置于models/Live2D/文件夹中即可加载
150 | 4. 本地大模型可直接启动,无需额外安装依赖
151 | 5. 支持兼容OpenAI接口的第三方API服务
152 |
153 | ## 🌐 API支持
154 |
155 | 本项目支持以下API类型:
156 |
157 | - **公共API服务**
158 | - OpenAI (GPT系列)
159 | - Claude (Anthropic)
160 | - Google Gemini
161 | - 讯飞星火
162 | - 火山引擎
163 | - 通义千问
164 | - 腾讯混元
165 | - 百川AI
166 | - 泛OpenAI接口的API服务
167 |
168 | - **本地模型**
169 | - Ollama (支持各种开源模型)
170 | - LLama (各种本地模型)
171 |
172 | ## 🔗 相关链接
173 |
174 | - [项目文档](https://github.com/NGLSG/ChatBot/wiki)
175 | - [问题反馈](https://github.com/NGLSG/ChatBot/issues)
176 | - [更新日志](https://github.com/NGLSG/ChatBot/blob/main/CHANGELOG.md)
177 |
178 | ## 📊 开发路线图
179 |
180 | - [ ] 多语言界面支持
181 | - [ ] 移动端适配
182 | - [ ] 插件市场
183 | - [ ] 更多API支持
184 |
185 | ## ⭐ 支持项目
186 |
187 | 如果您喜欢这个项目,请给我们点个星!您的支持是我们不断改进的动力。
188 |
189 | ## 📄 许可证
190 |
191 | 本项目采用 [GNU通用公共许可证v3.0](LICENSE) (GPL-3.0)。这意味着您可以自由地使用、修改和分发本软件,但任何基于本软件的衍生作品也必须以相同的许可证发布。
192 |
193 |
194 |
--------------------------------------------------------------------------------
/img/demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NGLSG/ChatBot/a3e43f702910a309154d134637e1cf024ccd02dc/img/demo.gif
--------------------------------------------------------------------------------
/img/self.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NGLSG/ChatBot/a3e43f702910a309154d134637e1cf024ccd02dc/img/self.png
--------------------------------------------------------------------------------
/include/AES_Crypto.h:
--------------------------------------------------------------------------------
1 | #ifndef SECURE_AES_H
2 | #define SECURE_AES_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 |
10 | class SecureAES {
11 | public:
12 | static void X1();
13 | static void X2();
14 | static std::vector X3(const std::string& X4);
15 | static std::string X5(const std::vector& X6);
16 | static std::string X7(const std::vector& X8);
17 | static std::vector X9(const std::string& X10);
18 |
19 | private:
20 | static std::vector X11();
21 | static std::vector X12(const std::vector& X13, std::vector& X14);
22 | static std::vector X15(const std::vector& X16, const std::vector& X17);
23 | };
24 |
25 | #endif
--------------------------------------------------------------------------------
/include/ChatBot.h:
--------------------------------------------------------------------------------
1 | #ifndef CHATBOT_H
2 | #define CHATBOT_H
3 |
4 | #include "Utils.h"
5 | #include
6 | #include