Skip to content

Commit

Permalink
Feat: Add Zephyr-7B-β bot (#628)
Browse files Browse the repository at this point in the history
* add Zephyr bot

* set name & use transparent icon

* change fullname to Zephyr-7B-β

---------

Co-authored-by: Sun Zhigang <[email protected]>
  • Loading branch information
samanhappy and sunner authored Nov 25, 2023
1 parent 3ed50a8 commit 6843a42
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Typical users of ChatALL are:
| [WizardLM 13B & 70B](https://github.com/nlpxucan/WizardLM) | Yes | No API | |
| [Falcon 180B](https://huggingface.co/tiiuae/falcon-180B-chat) | Yes | No API | |
| [Phind](https://www.phind.com/) | Yes | No API | |
| [Zephyr](https://huggingface.co/spaces/HuggingFaceH4/zephyr-chat) | Yes | No API | |

More is coming. Upvote your favorite bots in [these issues](https://github.com/sunner/ChatALL/labels/more%20LLMs).

Expand Down
Binary file added public/bots/zephyr-7b-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/bots/huggingface/HuggingChatBot.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default class HuggingChatBot extends Bot {

try {
const response = await fetch(
`https://huggingface.co/chat/conversation/${conversationId}`,
`${this.constructor._loginUrl}conversation/${conversationId}`,
{
method: "POST",
headers: {
Expand Down Expand Up @@ -125,7 +125,7 @@ export default class HuggingChatBot extends Bot {
async createChatContext() {
let conversationId = "";
await axios
.post("https://huggingface.co/chat/conversation", {
.post(`${this.constructor._loginUrl}conversation`, {
model: this.constructor._model,
})
.then(({ data: resp }) => {
Expand Down
16 changes: 16 additions & 0 deletions src/bots/huggingface/Zephyr7bBot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import HuggingChatBot from "@/bots/huggingface/HuggingChatBot";

export default class Zephyr7bBot extends HuggingChatBot {
static _className = "Zephyr7bBot"; // Class name of the bot
static _logoFilename = "zephyr-7b-logo.png"; // Place it in public/bots/
static _loginUrl = "https://huggingfaceh4-zephyr-chat.hf.space/";
static _model = "HuggingFaceH4/zephyr-7b-beta";

constructor() {
super();
}

getFullname() {
return "Zephyr-7B-β";
}
}
4 changes: 4 additions & 0 deletions src/bots/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import Wizardlm70bBot from "./lmsys/Wizardlm70bBot";
import FalconHC180bBot from "./huggingface/FalconHC180bBot";
import CodeLlamaHCBot from "./huggingface/CodeLlamaHCBot";
import WenxinQianfan4Bot from "./baidu/WenxinQianfan4Bot";
import Zephyr7bBot from "./huggingface/Zephyr7bBot";

const all = [
Qihoo360AIBrainBot.getInstance(),
Expand Down Expand Up @@ -105,6 +106,7 @@ const all = [
VicunaBot.getInstance(),
Wizardlm13bBot.getInstance(),
Wizardlm70bBot.getInstance(),
Zephyr7bBot.getInstance(),
YouChatBot.getInstance(),
];

Expand Down Expand Up @@ -166,6 +168,7 @@ export const botTags = {
bots.getBotByClassName("Wizardlm13bBot"),
bots.getBotByClassName("Wizardlm70bBot"),
bots.getBotByClassName("FalconHC180bBot"),
bots.getBotByClassName("Zephyr7bBot"),
],
paid: [
bots.getBotByClassName("ChatGPT4Bot"),
Expand Down Expand Up @@ -195,6 +198,7 @@ export const botTags = {
bots.getBotByClassName("Wizardlm13bBot"),
bots.getBotByClassName("Wizardlm70bBot"),
bots.getBotByClassName("FalconHC180bBot"),
bots.getBotByClassName("Zephyr7bBot"),
],
api: [
bots.getBotByClassName("AzureOpenAIAPIBot"),
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@
"codellamaCodeLlama-34b-Instruct-hf": "Code Llama",
"OpenAssistantoasst-sft-6-llama-30b-xor": "oasst-sft-6-llama-30b",
"meta-llamaLlama-2-70b-chat-hf": "llama-2-70b",
"tiiuaefalcon-180B-chat": "falcon-180b"
"tiiuaefalcon-180B-chat": "falcon-180b",
"HuggingFaceH4zephyr-7b-beta": "zephyr-7b"
},
"gradio": {
"fnIndex": "fn_index",
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@
"codellamaCodeLlama-34b-Instruct-hf": "Code Llama",
"OpenAssistantoasst-sft-6-llama-30b-xor": "oasst-sft-6-llama-30b",
"meta-llamaLlama-2-70b-chat-hf": "llama-2-70b",
"tiiuaefalcon-180B-chat": "falcon-180b"
"tiiuaefalcon-180B-chat": "falcon-180b",
"HuggingFaceH4zephyr-7b-beta": "zephyr-7b"
},
"gradio": {
"fnIndex": "fn_index",
Expand Down

1 comment on commit 6843a42

@vercel
Copy link

@vercel vercel bot commented on 6843a42 Nov 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

chatall – ./

chatall-llm.vercel.app
chatall-sunner.vercel.app
chatall-git-main-sunner.vercel.app

Please sign in to comment.