ChuanhuChatGPT
GUI for ChatGPT API and many LLMs. Supports agents, file-based QA, GPT finetuning and query with web search. All with a neat UI.
Top Related Projects
🔮 ChatGPT Desktop Application (Mac, Windows and Linux)
用 Express 和 Vue3 搭建的 ChatGPT 演示网页
A cross-platform ChatGPT/Gemini UI (Web / PWA / Linux / Win / MacOS). 一键拥有你自己的跨平台 ChatGPT/Gemini 应用。
Minimal web UI for ChatGPT.
Quick Overview
ChuanhuChatGPT is an open-source ChatGPT API-based web application that provides a user-friendly interface for interacting with various language models. It supports multiple APIs, including OpenAI's GPT models, Claude, and others, offering a versatile platform for natural language processing tasks.
Pros
- Supports multiple language models and APIs, providing flexibility for users
- User-friendly interface with features like conversation history and model switching
- Actively maintained with frequent updates and improvements
- Offers both web-based and local deployment options
Cons
- Requires API keys for most supported models, which may involve costs
- Some advanced features may require technical knowledge to set up and use
- Performance may vary depending on the chosen model and API
Getting Started
To get started with ChuanhuChatGPT:
-
Clone the repository:
git clone https://github.com/GaiZhenbiao/ChuanhuChatGPT.git
-
Install dependencies:
pip install -r requirements.txt
-
Set up your API keys in the
config.json
file. -
Run the application:
python ChuanhuChatbot.py
-
Access the web interface at
http://localhost:7860
in your browser.
Competitor Comparisons
🔮 ChatGPT Desktop Application (Mac, Windows and Linux)
Pros of ChatGPT
- Cross-platform desktop application (Windows, macOS, Linux)
- Offers a more native desktop experience with system integrations
- Includes features like prompt library and export options
Cons of ChatGPT
- Requires installation and updates
- May have higher resource usage compared to web-based alternatives
- Limited customization options for the chat interface
Code Comparison
While both projects are different in nature (ChuanhuChatGPT being a web-based interface and ChatGPT a desktop application), we can compare some configuration aspects:
ChuanhuChatGPT (config.json):
{
"default_model": "gpt-3.5-turbo",
"api_key": "",
"language": "en",
"theme": "light"
}
ChatGPT (settings.json):
{
"openAIKey": "",
"model": "gpt-3.5-turbo",
"temperature": 0.7,
"maxTokens": 2000
}
Both projects allow configuration of API keys and model selection, but ChatGPT includes additional parameters like temperature and max tokens, offering more fine-grained control over the AI responses.
用 Express 和 Vue3 搭建的 ChatGPT 演示网页
Pros of chatgpt-web
- Sleek and modern user interface with a responsive design
- Built with Vue3 and TypeScript, offering better performance and type safety
- Supports multiple API endpoints and custom API keys
Cons of chatgpt-web
- Limited features compared to ChuanhuChatGPT (e.g., no file uploads or audio input)
- Less active community and fewer contributors
- Lacks advanced customization options for model parameters
Code Comparison
ChuanhuChatGPT (Python):
def predict(self, inputs, chatbot, stream=False, use_websearch=False, files=None, reply_language=""):
# Implementation details
chatgpt-web (TypeScript):
const fetchChatAPIProcess = async (
prompt: string,
options?: { conversationId?: string; parentMessageId?: string },
): Promise<ChatMessage> => {
// Implementation details
}
The code snippets show that ChuanhuChatGPT uses Python and offers more parameters for customization, while chatgpt-web uses TypeScript and focuses on a simpler API interaction. ChuanhuChatGPT's implementation includes features like websearch and file handling, which are not present in the chatgpt-web example.
A cross-platform ChatGPT/Gemini UI (Web / PWA / Linux / Win / MacOS). 一键拥有你自己的跨平台 ChatGPT/Gemini 应用。
Pros of ChatGPT-Next-Web
- More modern and visually appealing user interface
- Built with Next.js, offering better performance and SEO capabilities
- Supports multiple languages out of the box
Cons of ChatGPT-Next-Web
- Less extensive documentation compared to ChuanhuChatGPT
- Fewer customization options for advanced users
- Limited integration with external tools and services
Code Comparison
ChuanhuChatGPT (Python):
def chat_one(self, inputs, history, max_length, top_p, temperature, zhishiku=False):
response, history = self.model.chat(self.tokenizer, inputs, history=history)
return response, history
ChatGPT-Next-Web (TypeScript):
export async function chat(messages: Message[], options?: ChatOptions) {
const response = await fetch("/api/chat", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ messages, options }),
});
return response.json();
}
The code snippets show different approaches to handling chat functionality. ChuanhuChatGPT uses a Python-based model and tokenizer, while ChatGPT-Next-Web employs a TypeScript-based API call. This reflects the different tech stacks and architectures of the two projects.
Minimal web UI for ChatGPT.
Pros of chatgpt-demo
- Lightweight and easy to deploy, with a simple and clean user interface
- Built with modern web technologies (Vue 3, Vite) for better performance
- Supports multiple API providers (OpenAI, Azure, Claude)
Cons of chatgpt-demo
- Limited features compared to ChuanhuChatGPT (e.g., no file uploads or audio input)
- Less customization options for appearance and functionality
- Smaller community and fewer contributors
Code Comparison
ChuanhuChatGPT (Python):
def predict(self, inputs, chatbot, stream=False, use_websearch=False, files=None, reply_language=""):
# ... (implementation details)
chatgpt-demo (TypeScript):
const onSubmit = async () => {
if (loading) return
const inputValue = prompt.trim()
if (!inputValue) return
// ... (implementation details)
}
ChuanhuChatGPT offers more advanced features like websearch and file handling, while chatgpt-demo focuses on a streamlined chat experience. ChuanhuChatGPT is built with Python and Gradio, making it more suitable for data science and machine learning applications. In contrast, chatgpt-demo uses modern web technologies, making it easier to integrate into existing web applications and deploy as a standalone chat interface.
Pros of TaskMatrix
- Focuses on multi-modal AI tasks, integrating vision and language models
- Implements a flexible task planning system for complex problem-solving
- Supports a wider range of AI capabilities, including image generation and analysis
Cons of TaskMatrix
- Less user-friendly interface compared to ChuanhuChatGPT's web-based UI
- Requires more setup and configuration for different tasks
- May have a steeper learning curve for non-technical users
Code Comparison
TaskMatrix (Python):
def plan_and_execute(task):
plan = task_planner.generate_plan(task)
for step in plan:
result = execute_step(step)
return result
ChuanhuChatGPT (JavaScript):
async function sendMessage(message) {
const response = await fetch('/api/chat', {
method: 'POST',
body: JSON.stringify({ message })
});
return response.json();
}
TaskMatrix focuses on complex task planning and execution across multiple AI modalities, while ChuanhuChatGPT provides a more straightforward chat interface for interacting with language models. TaskMatrix offers greater flexibility for advanced AI tasks but may be more challenging to set up and use for beginners. ChuanhuChatGPT, on the other hand, provides a more accessible web-based interface for general chatbot interactions.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
å·è Chat ð¯ Chuanhu Chat
为ChatGPTçå¤ç§LLMæä¾äºä¸ä¸ªè½»å¿«å¥½ç¨çWebå¾å½¢çé¢åä¼å¤éå åè½
æ¯æ GPT-4 · åºäºæ件é®ç · LLMæ¬å°é¨ç½² · èç½æç´¢ · Agent å©ç · æ¯æ Fine-tune
è§é¢æç¨ Â· 2.0ä»ç»è§é¢ || å¨çº¿ä½éª · ä¸é®é¨ç½²ç®å½
æ¯æ模å | 使ç¨æå·§ | å®è£ æ¹å¼ | 常è§é®é¢ | ç»ä½è ä¹°å¯ä¹ð¥¤ | å å ¥Telegramç¾¤ç» |
---|
⨠5.0 éç£ æ´æ°ï¼
New! å ¨æ°çç¨æ·çé¢ï¼ç²¾è´å¾ä¸å Gradioï¼çè³ææ¯ç»çææï¼
New! éé äºç§»å¨ç«¯ï¼å æ¬å ¨é¢å±ææºçæå/åæµ·ï¼ï¼å±çº§æ´å æ¸ æ°ã
New! åå²è®°å½ç§»å°å·¦ä¾§ï¼ä½¿ç¨æ´å æ¹ä¾¿ã并ä¸æ¯ææç´¢ï¼æ¯ææ£åï¼ãå é¤ãéå½åã
New! ç°å¨å¯ä»¥è®©å¤§æ¨¡åèªå¨å½ååå²è®°å½ï¼éå¨è®¾ç½®æé ç½®æ件ä¸å¼å¯ï¼ã
New! ç°å¨å¯ä»¥å° å·èChat ä½ä¸º PWA åºç¨ç¨åºå®è£ ï¼ä½éªæ´å åçï¼æ¯æ Chrome/Edge/Safari çæµè§å¨ã
New! å¾æ éé å个平å°ï¼çèµ·æ¥æ´èæã
New! æ¯æ Finetuneï¼å¾®è°ï¼ GPT 3.5ï¼
æ¯æ模å
API è°ç¨æ¨¡å | å¤æ³¨ | æ¬å°é¨ç½²æ¨¡å | å¤æ³¨ |
---|---|---|---|
ChatGPT(GPT-4ãGPT-4o) | æ¯æå¾®è° gpt-3.5 | ChatGLM (ChatGLM2) (ChatGLM3) | |
Azure OpenAI | LLaMA | æ¯æ Lora 模å | |
Google Gemini Pro | StableLM | ||
讯é£æç«è®¤ç¥å¤§æ¨¡å | MOSS | ||
Inspur Yuan 1.0 | éä¹åé® | ||
MiniMax | |||
XMChat | ä¸æ¯ææµå¼ä¼ è¾ | ||
Midjourney | ä¸æ¯ææµå¼ä¼ è¾ | ||
Claude | ⨠ç°å·²æ¯æClaude 3 OpusãSonnetï¼Haikuå°ä¼å¨æ¨åºåç第ä¸æ¶é´æ¯æ | ||
DALL·E 3 |
使ç¨æå·§
ðª 强ååè½
- å·èå©çï¼ç±»ä¼¼ AutoGPTï¼å ¨èªå¨è§£å³ä½ çé®é¢ï¼
- **å¨çº¿æç´¢**ï¼ChatGPT çæ°æ®å¤ªæ§ï¼ç» LLM æä¸ç½ç»çç¿ èï¼
- ç¥è¯åºï¼è®© ChatGPT å¸®ä½ éåé读ï¼æ ¹æ®æ件åçé®é¢ã
- æ¬å°é¨ç½²LLMï¼ä¸é®é¨ç½²ï¼è·åå±äºä½ èªå·±ç大è¯è¨æ¨¡åã
- GPT 3.5å¾®è°ï¼æ¯æå¾®è° GPT 3.5ï¼è®© ChatGPT æ´å 个æ§åã
- **èªå®ä¹æ¨¡å**ï¼çµæ´»å°èªå®ä¹æ¨¡åï¼ä¾å¦å¯¹æ¥æ¬å°æ¨çæå¡ã
ð¤ System Prompt
- éè¿ System Prompt 设å®åææ¡ä»¶ï¼å¯ä»¥å¾ææå°è¿è¡è§è²æ®æ¼ï¼
- å·èChat é¢è®¾äºPrompt模æ¿ï¼ç¹å»
å è½½Prompt模æ¿
ï¼å éæ© Prompt 模æ¿éåï¼ç¶åå¨ä¸æ¹éæ©æ³è¦ç Promptã
ð¬ åºç¡å¯¹è¯
- å¦æåçä¸æ»¡æï¼å¯ä»¥ä½¿ç¨
éæ°çæ
æé®åè¯ä¸æ¬¡ï¼æè ç´æ¥å é¤è¿è½®å¯¹è¯
; - è¾å ¥æ¡æ¯ææ¢è¡ï¼æ Shift + Enterå³å¯ï¼
- å¨è¾å ¥æ¡æ â â æ¹åé®ï¼å¯ä»¥å¨åéè®°å½ä¸å¿«éåæ¢ï¼
- æ¯æ¬¡æ°å»ºä¸ä¸ªå¯¹è¯å¤ªéº»ç¦ï¼è¯è¯
å论对è¯
åè½ï¼ - åçæ°æ³¡æè¾¹çå°æé®ï¼ä¸ä»
è½
ä¸é®å¤å¶
ï¼è¿è½æ¥çMarkdownåæ
ï¼ - æå®åçè¯è¨ï¼è®© ChatGPT åºå®ä»¥æç§è¯è¨åçã
ð 对è¯åå²
- 对è¯åå²è®°å½ä¼è¢«èªå¨ä¿åï¼ä¸ç¨æ å¿é®å®ä¹åæ¾ä¸å°äºï¼
- å¤ç¨æ·åå²è®°å½é离ï¼é¤äºä½ é½çä¸å°ï¼
- éå½ååå²è®°å½ï¼æ¹ä¾¿æ¥åæ¥æ¾ï¼
- New! éæ³è¬èªå¨å½ååå²è®°å½ï¼è®© LLM ç解对è¯å 容ï¼å¸®ä½ èªå¨ä¸ºåå²è®°å½å½åï¼
- New! æç´¢åå²è®°å½ï¼æ¯ææ£å表达å¼ï¼
ð¼ï¸ å°èç¾çä½éª
- èªç Small-and-Beautiful 主é¢ï¼å¸¦ç»ä½ å°èç¾çä½éªï¼
- èªå¨äº®æè²åæ¢ï¼ç»ä½ ä»æ©å°æçèéä½éªï¼
- å®ç¾æ¸²æ LaTeX / è¡¨æ ¼ / 代ç åï¼æ¯æ代ç é«äº®ï¼
- New! é线æ§å¨ç»ãæ¯ç»çææï¼ç²¾è´å¾ä¸å Gradioï¼
- New! éé Windows / macOS / Linux / iOS / Androidï¼ä»å¾æ å°å ¨é¢å±éé ï¼ç»ä½ æåéçä½éªï¼
- New! æ¯æ以 PWAåºç¨ç¨åº å®è£ ï¼ä½éªæ´å åçï¼
ð¨âð» æ客åè½
- New! æ¯æ Fine-tuneï¼å¾®è°ï¼gpt-3.5ï¼
- 大é LLM åæ°å¯è°ï¼
- æ¯ææ´æ¢ api-hostï¼
- æ¯æèªå®ä¹ä»£çï¼
- æ¯æå¤ api-key è´è½½åè¡¡ã
âï¸ é¨ç½²ç¸å ³
- é¨ç½²å°æå¡å¨ï¼å¨
config.json
ä¸è®¾ç½®"server_name": "0.0.0.0", "server_port": <ä½ ç端å£å·>,
ã - è·åå
Œ
±é¾æ¥ï¼å¨
config.json
ä¸è®¾ç½®"share": true,
ã注æç¨åºå¿ é¡»å¨è¿è¡ï¼æè½éè¿å ¬å ±é¾æ¥è®¿é®ã - å¨Hugging Faceä¸ä½¿ç¨ï¼å»ºè®®å¨å³ä¸è§ å¤å¶Space å使ç¨ï¼è¿æ ·Appååºå¯è½ä¼å¿«ä¸ç¹ã
å¿«éä¸æ
å¨ç»ç«¯æ§è¡ä»¥ä¸å½ä»¤ï¼
git clone https://github.com/GaiZhenbiao/ChuanhuChatGPT.git
cd ChuanhuChatGPT
pip install -r requirements.txt
ç¶åï¼å¨é¡¹ç®æ件夹ä¸å¤å¶ä¸ä»½ config_example.json
ï¼å¹¶å°å
¶éå½å为 config.json
ï¼å¨å
¶ä¸å¡«å
¥ API-Key
ç设置ã
python ChuanhuChatbot.py
ä¸ä¸ªæµè§å¨çªå£å°ä¼èªå¨æå¼ï¼æ¤æ¶æ¨å°å¯ä»¥ä½¿ç¨ å·èChat ä¸ChatGPTæå ¶ä»æ¨¡åè¿è¡å¯¹è¯ã
Note
å ·ä½è¯¦å°½çå®è£ æç¨å使ç¨æç¨è¯·æ¥çæ¬é¡¹ç®çwiki页é¢ã
çé¾æç解å³
å¨éå°åç§é®é¢æ¥é ç¸å ³ä¿¡æ¯åï¼æ¨å¯ä»¥å å°è¯ æå¨æåæ¬é¡¹ç®çææ°æ´æ¹1 并 **æ´æ°ä¾èµåº2**ï¼ç¶åéè¯ãæ¥éª¤ä¸ºï¼
- ç¹å»ç½é¡µä¸ç
Download ZIP
æé®ï¼ä¸è½½ææ°ä»£ç 并解åè¦çï¼ægit pull https://github.com/GaiZhenbiao/ChuanhuChatGPT.git main -f
- å°è¯å次å®è£
ä¾èµï¼å¯è½æ¬é¡¹ç®å¼å
¥äºæ°çä¾èµï¼
pip install -r requirements.txt
å¾å¤æ¶åï¼è¿æ ·å°±å¯ä»¥è§£å³é®é¢ã
å¦æé®é¢ä»ç¶åå¨ï¼è¯·æ¥é 该页é¢ï¼å¸¸è§é®é¢
该页é¢ååºäºå ä¹æææ¨å¯è½éå°çåç§é®é¢ï¼å æ¬å¦ä½é 置代çï¼ä»¥åéå°é®é¢åæ¨è¯¥éåçæªæ½ï¼**请å¡å¿ 认çé 读**ã
äºè§£æ´å¤
è¥éäºè§£æ´å¤ä¿¡æ¯ï¼è¯·æ¥çæ们ç wikiï¼
Starchart
Contributors
æ款
ð¯å¦æè§å¾è¿ä¸ªè½¯ä»¶å¯¹ä½ ææ帮å©ï¼æ¬¢è¿è¯·ä½è åå¯ä¹ãååå¡ï½
èç³»ä½è ï¼è¯·å»æçbilibiliè´¦å·ç§ä¿¡æã
Top Related Projects
🔮 ChatGPT Desktop Application (Mac, Windows and Linux)
用 Express 和 Vue3 搭建的 ChatGPT 演示网页
A cross-platform ChatGPT/Gemini UI (Web / PWA / Linux / Win / MacOS). 一键拥有你自己的跨平台 ChatGPT/Gemini 应用。
Minimal web UI for ChatGPT.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot