forked from lobehub/lobe-chat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ feat: Add SiliconCloud model provider (lobehub#3092)
* feat: Add SiliconCloud as a model provider * model icon * Update index.ts * Update siliconcloud.ts * Update .env.example * Add docs * Update siliconcloud.ts * Update siliconcloud.ts * Update siliconcloud.ts * Update siliconcloud.ts
- Loading branch information
Showing
16 changed files
with
279 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
title: Using SiliconCloud API Key in LobeChat | ||
description: Learn how to configure and use SiliconCloud's large language models in LobeChat, get your API key, and start chatting. | ||
tags: | ||
- LobeChat | ||
- SiliconCloud | ||
- API Key | ||
- Web UI | ||
--- | ||
|
||
# Using SiliconCloud in LobeChat | ||
|
||
|
||
[SiliconCloud](https://siliconflow.cn/zh-cn/siliconcloud) is a cost-effective large model service provider, offering various services such as text generation and image generation. | ||
|
||
This document will guide you on how to use SiliconCloud in LobeChat: | ||
|
||
<Steps> | ||
|
||
### Step 1: Get your SiliconCloud API Key | ||
|
||
- First, you need to register and log in to [SiliconCloud](https://cloud.siliconflow.cn/auth/login) | ||
|
||
<Callout type={'info'}>Currently, new users can get 14 yuan free credit upon registration</Callout> | ||
|
||
- Go to the `API Key` menu and click `Create New API Key` | ||
|
||
- Click copy API key and keep it safe | ||
|
||
### Step 2: Configure SiliconCloud in LobeChat | ||
|
||
- Visit the `App Settings` interface of LobeChat | ||
|
||
- Under `Language Model`, find the `SiliconCloud` settings | ||
|
||
- Enable SiliconCloud and enter the obtained API key | ||
|
||
- Choose a SiliconCloud model for your assistant and start chatting | ||
|
||
<Callout type={'warning'}> | ||
You may need to pay the API service provider during use. Please refer to SiliconCloud's relevant fee policy. | ||
</Callout> | ||
|
||
</Steps> | ||
|
||
Now you can use the models provided by SiliconCloud for conversation in LobeChat. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
title: 在 LobeChat 中使用 SiliconCloud API Key | ||
description: 学习如何在 LobeChat 中配置和使用 SiliconCloud 提供的大语言模型,获取 API 密钥并开始对话。 | ||
tags: | ||
- LobeChat | ||
- SiliconCloud | ||
- API密钥 | ||
- Web UI | ||
--- | ||
|
||
# 在 LobeChat 中使用 SiliconCloud | ||
|
||
|
||
[SiliconCloud](https://siliconflow.cn/zh-cn/siliconcloud) 是高性价比的大模型服务提供商,提供文本生成与图片生成等多种服务。 | ||
|
||
本文档将指导你如何在 LobeChat 中使用 SiliconCloud: | ||
|
||
<Steps> | ||
|
||
### 步骤一:获取 SiliconCloud API 密钥 | ||
|
||
- 首先,你需要注册并登录 [SiliconCloud](https://cloud.siliconflow.cn/auth/login) | ||
|
||
<Callout type={'info'}>当前新用户注册可获赠 14 元免费额度</Callout> | ||
|
||
- 进入 `API密钥` 菜单,并点击 `创建新API密钥` | ||
|
||
- 点击复制 API 密钥并妥善保存 | ||
|
||
### 步骤二:在 LobeChat 中配置 SiliconCloud | ||
|
||
- 访问 LobeChat 的 `应用设置` 界面 | ||
|
||
- 在 `语言模型` 下找到 `SiliconCloud` 的设置项 | ||
|
||
- 打开 SiliconCloud 并填入获取的 API 密钥 | ||
|
||
- 为你的助手选择一个 SiliconCloud 模型即可开始对话 | ||
|
||
<Callout type={'warning'}> | ||
在使用过程中你可能需要向 API 服务提供商付费,请参考 SiliconCloud 的相关费用政策。 | ||
</Callout> | ||
|
||
</Steps> | ||
|
||
至此你已经可以在 LobeChat 中使用 SiliconCloud 提供的模型进行对话了。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
import { ModelProviderCard } from '@/types/llm'; | ||
|
||
// ref https://siliconflow.cn/zh-cn/models | ||
const SiliconCloud: ModelProviderCard = { | ||
chatModels: [ | ||
{ | ||
enabled: true, | ||
id: 'Qwen/Qwen2-72B-Instruct', | ||
tokens: 32_768, | ||
}, | ||
{ | ||
enabled: true, | ||
id: 'Qwen/Qwen2-Math-72B-Instruct', | ||
tokens: 32_768, | ||
}, | ||
{ | ||
enabled: true, | ||
id: 'Qwen/Qwen2-57B-A14B-Instruct', | ||
tokens: 32_768, | ||
}, | ||
{ | ||
id: 'Qwen/Qwen2-7B-Instruct', | ||
tokens: 32_768, | ||
}, | ||
{ | ||
id: 'Qwen/Qwen2-1.5B-Instruct', | ||
tokens: 32_768, | ||
}, | ||
{ | ||
id: 'Qwen/Qwen1.5-110B-Chat', | ||
tokens: 32_768, | ||
}, | ||
{ | ||
id: 'Qwen/Qwen1.5-32B-Chat', | ||
tokens: 32_768, | ||
}, | ||
{ | ||
id: 'Qwen/Qwen1.5-14B-Chat', | ||
tokens: 32_768, | ||
}, | ||
{ | ||
id: 'Qwen/Qwen1.5-7B-Chat', | ||
tokens: 32_768, | ||
}, | ||
{ | ||
id: 'deepseek-ai/DeepSeek-Coder-V2-Instruct', | ||
tokens: 32_768, | ||
}, | ||
{ | ||
enabled: true, | ||
id: 'deepseek-ai/DeepSeek-V2-Chat', | ||
tokens: 32_768, | ||
}, | ||
{ | ||
id: 'deepseek-ai/deepseek-llm-67b-chat', | ||
tokens: 32_768, | ||
}, | ||
{ | ||
id: 'THUDM/glm-4-9b-chat', | ||
tokens: 32_768, | ||
}, | ||
{ | ||
id: 'THUDM/chatglm3-6b', | ||
tokens: 32_768, | ||
}, | ||
{ | ||
enabled: true, | ||
id: '01-ai/Yi-1.5-34B-Chat-16K', | ||
tokens: 16_384, | ||
}, | ||
{ | ||
id: '01-ai/Yi-1.5-9B-Chat-16K', | ||
tokens: 16_384, | ||
}, | ||
{ | ||
id: '01-ai/Yi-1.5-6B-Chat', | ||
tokens: 4096, | ||
}, | ||
{ | ||
id: 'internlm/internlm2_5-7b-chat', | ||
tokens: 32_768, | ||
}, | ||
{ | ||
id: 'google/gemma-2-9b-it', | ||
tokens: 8192, | ||
}, | ||
{ | ||
id: 'google/gemma-2-27b-it', | ||
tokens: 8192, | ||
}, | ||
{ | ||
id: 'internlm/internlm2_5-20b-chat', | ||
tokens: 32_768, | ||
}, | ||
{ | ||
id: 'meta-llama/Meta-Llama-3.1-8B-Instruct', | ||
tokens: 32_768, | ||
}, | ||
{ | ||
enabled: true, | ||
id: 'meta-llama/Meta-Llama-3.1-70B-Instruct', | ||
tokens: 32_768, | ||
}, | ||
{ | ||
id: 'meta-llama/Meta-Llama-3.1-405B-Instruct', | ||
tokens: 32_768, | ||
}, | ||
{ | ||
id: 'meta-llama/Meta-Llama-3-70B-Instruct', | ||
tokens: 8192, | ||
}, | ||
{ | ||
id: 'mistralai/Mistral-7B-Instruct-v0.2', | ||
tokens: 32_768, | ||
}, | ||
{ | ||
id: 'mistralai/Mixtral-8x7B-Instruct-v0.1', | ||
tokens: 32_768, | ||
}, | ||
], | ||
checkModel: 'Qwen/Qwen2-1.5B-Instruct', | ||
id: 'siliconcloud', | ||
modelList: { showModelFetcher: true }, | ||
name: 'SiliconCloud', | ||
}; | ||
|
||
export default SiliconCloud; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.