🤗 聊天界面
一个开源聊天界面,支持工具、网络搜索、多模态和许多 API 提供商。该应用程序在后台使用 MongoDB 和 SvelteKit。尝试名为 HuggingChat on hf.co/chat 的应用程序的实时版本,或 设置您自己的实例。
🔧 工具:使用自定义工具进行函数调用,并支持 零 GPU 空间
🔍 网络搜索:所有模型的自动网络搜索、抓取和 RAG
🐙 多模态:在受支持的提供商上接受图像文件上传
👤 OpenID:可以选择设置 OpenID 进行用户身份验证
工具



网络搜索



快速入门
由于聊天界面的 llama.cpp 服务器支持,您可以快速拥有一个本地运行的聊天界面和 LLM 文本生成服务器。
步骤 1(启动 llama.cpp 服务器)
# install llama.cpp
brew install llama.cpp
# start llama.cpp server (using hf.co/microsoft/Phi-3-mini-4k-instruct-gguf as an example)
llama-server --hf-repo microsoft/Phi-3-mini-4k-instruct-gguf --hf-file Phi-3-mini-4k-instruct-q4.gguf -c 4096
一个本地 LLaMA.cpp HTTP 服务器将在 https://127.0.0.1:8080
上启动。阅读更多 信息。
步骤 2(告诉聊天界面使用本地 llama.cpp 服务器)
将以下内容添加到您的 .env.local
MODELS=`[
{
"name": "Local microsoft/Phi-3-mini-4k-instruct-gguf",
"tokenizer": "microsoft/Phi-3-mini-4k-instruct-gguf",
"preprompt": "",
"chatPromptTemplate": "<s>{{preprompt}}{{#each messages}}{{#ifUser}}<|user|>\n{{content}}<|end|>\n<|assistant|>\n{{/ifUser}}{{#ifAssistant}}{{content}}<|end|>\n{{/ifAssistant}}{{/each}}",
"parameters": {
"stop": ["<|end|>", "<|endoftext|>", "<|assistant|>"],
"temperature": 0.7,
"max_new_tokens": 1024,
"truncate": 3071
},
"endpoints": [{
"type" : "llamacpp",
"baseURL": "https://127.0.0.1:8080"
}],
},
]`
阅读更多 信息。
步骤 3(确保您在本地运行 MongoDb)
docker run -d -p 27017:27017 --name mongo-chatui mongo:latest
阅读更多 信息。
步骤 4(启动聊天界面)
git clone https://github.com/huggingface/chat-ui
cd chat-ui
npm install
npm run dev -- --open
阅读更多 信息。

