添加 QWQ 在 DashScope上的支持,添加provider 的ICON。删除对于 百度千帆模型的支持。

This commit is contained in:
Wenjie Zhang 2025-03-07 12:38:39 +08:00
parent 15f52bfc8f
commit 6fdd134e26
13 changed files with 57 additions and 26 deletions

View File

@ -111,7 +111,6 @@ docker logs <容器名称> # 例如docker logs api-dev
| `arc`(豆包方舟) | `doubao-1-5-pro-32k-250115` | `ARK_API_KEY` |
| `zhipu`(智谱清言) | `glm-4-flash` | `ZHIPUAI_API_KEY` |
| `dashscope`(阿里) | `qwen-max-latest` | `DASHSCOPE_API_KEY` |
| `qianfan`(百度) | `ernie_speed` | `QIANFAN_ACCESS_KEY`, `QIANFAN_SECRET_KEY` |
#### 添加新模型供应商

View File

@ -127,7 +127,7 @@ class DashScope:
)
for chunk in response:
message = chunk.output.choices[0].message
message.is_full = True
message.is_full = False
yield chunk.output.choices[0].message
def _get_response(self, messages):

View File

@ -50,6 +50,7 @@ MODEL_NAMES:
- deepseek-ai/DeepSeek-R1-Distill-Qwen-7B
- Qwen/Qwen2.5-72B-Instruct
- Qwen/Qwen2.5-7B-Instruct
- Qwen/QwQ-32B
together.ai:
name: Together.ai
url: https://api.together.ai/models
@ -62,20 +63,6 @@ MODEL_NAMES:
- meta-llama/Llama-3.3-70B-Instruct-Turbo-Free
- deepseek-ai/DeepSeek-R1-Distill-Llama-70B-free
qianfan:
name: 百度千帆 (QianFan)
url: https://open.bigmodel.cn/dev/api
default: ERNIE-Speed
env:
- QIANFAN_ACCESS_KEY
- QIANFAN_SECRET_KEY
models:
- ERNIE-Speed
- ERNIE-Speed-8K
- ERNIE-Speed-128K
- ERNIE-Tiny-8K
- ERNIE-Lite-8K
- ERNIE-4.0-8K-Latest
dashscope:
name: 阿里百炼 (DashScope)
url: https://bailian.console.aliyun.com/?switchAgent=10226727&productCode=p_efm#/model-market
@ -84,12 +71,13 @@ MODEL_NAMES:
- DASHSCOPE_API_KEY
models:
- qwen-max-latest
- qwen-long-latest
- qwen2.5-72b-instruct
- qwen2.5-32b-instruct
- qwen2.5-7b-instruct
- qwen2.5-1.5b-instruct
- qwen2.5-0.5b-instruct
- qwq-plus-latest
- qwq-32b
ark:
name: 豆包Ark
url: https://console.volcengine.com/ark/region:ark+cn-beijing/model

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View File

@ -0,0 +1,23 @@
import openaiIcon from '@/assets/providers/openai.png'
import qianfanIcon from '@/assets/providers/qianfan.png'
import dashscopeIcon from '@/assets/providers/dashscope.png'
import togetherIcon from '@/assets/providers/together.ai.png'
import deepseekIcon from '@/assets/providers/deepseek.png'
import zhipuIcon from '@/assets/providers/zhipuai.png'
import siliconflowIcon from '@/assets/providers/siliconflow.png'
import arkIcon from '@/assets/providers/ark.png'
import lingyiwanwuIcon from '@/assets/providers/lingyiwanwu.png'
export const modelIcons = {
openai: openaiIcon,
qianfan: qianfanIcon,
dashscope: dashscopeIcon,
together: togetherIcon,
deepseek: deepseekIcon,
zhipu: zhipuIcon,
siliconflow: siliconflowIcon,
ark: arkIcon,
'together.ai': togetherIcon,
lingyiwanwu: lingyiwanwuIcon
}

View File

@ -160,7 +160,10 @@
</div>
<div class="model-provider-card" v-for="(item, key) in modelKeys" :key="key">
<div class="card-header">
<div v-if="modelStatus[item]" class="success"></div>
<!-- <div v-if="modelStatus[item]" class="success"></div> -->
<div :class="{'model-icon': true, 'available': modelStatus[item]}">
<img :src="modelIcons[item]" alt="模型图标">
</div>
<h3>{{ modelNames[item].name }}</h3>
<a :href="modelNames[item].url" target="_blank"><InfoCircleOutlined /></a>
</div>
@ -213,6 +216,8 @@ import {
import HeaderComponent from '@/components/HeaderComponent.vue';
import TableConfigComponent from '@/components/TableConfigComponent.vue';
import { notification, Button } from 'ant-design-vue';
import { modelIcons } from '@/utils/modelIcon'
const configStore = useConfigStore()
const items = computed(() => configStore.config._config_items)
@ -487,13 +492,29 @@ const sendRestart = () => {
border: 1px solid var(--gray-300);
background-color: white;
border-radius: 8px;
margin-bottom: 16px;
padding: 16px;
margin-bottom: 12px;
padding: 12px;
.card-header {
display: flex;
align-items: baseline;
align-items: center;
gap: 10px;
.model-icon {
width: 24px;
height: 24px;
//
filter: grayscale(100%);
img {
width: 100%;
height: 100%;
}
&.available {
filter: grayscale(0%);
}
}
h3 {
margin: 0;
font-size: 1rem;
@ -536,27 +557,27 @@ const sendRestart = () => {
.card-body {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 10px;
gap: 12px;
margin-top: 10px;
.card-models {
width: 100%;
border-radius: 8px;
border: 1px solid var(--gray-300);
padding: 10px 16px;
padding: 12px 16px;
display: flex;
gap: 6px;
justify-content: space-between;
align-items: center;
cursor: pointer;
box-sizing: border-box;
background-color: var(--gray-10);
background-color: var(--gray-50);
transition: box-shadow 0.1s;
&:hover {
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.model_name {
font-size: 14px;
color: var(--gray-800);
color: var(--gray-900);
}
.select-btn {
width: 16px;