diff --git a/README.md b/README.md index c64ea233..66db4b30 100644 --- a/README.md +++ b/README.md @@ -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` | #### 添加新模型供应商 diff --git a/src/models/chat_model.py b/src/models/chat_model.py index d85826a0..49c1ca85 100644 --- a/src/models/chat_model.py +++ b/src/models/chat_model.py @@ -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): diff --git a/src/static/models.yaml b/src/static/models.yaml index a7a813c3..a1f1f371 100644 --- a/src/static/models.yaml +++ b/src/static/models.yaml @@ -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 diff --git a/web/src/assets/providers/ark.png b/web/src/assets/providers/ark.png new file mode 100644 index 00000000..a81fdbd7 Binary files /dev/null and b/web/src/assets/providers/ark.png differ diff --git a/web/src/assets/providers/dashscope.png b/web/src/assets/providers/dashscope.png new file mode 100644 index 00000000..93d5a4a2 Binary files /dev/null and b/web/src/assets/providers/dashscope.png differ diff --git a/web/src/assets/providers/deepseek.png b/web/src/assets/providers/deepseek.png new file mode 100644 index 00000000..7ee99e74 Binary files /dev/null and b/web/src/assets/providers/deepseek.png differ diff --git a/web/src/assets/providers/lingyiwanwu.png b/web/src/assets/providers/lingyiwanwu.png new file mode 100644 index 00000000..5e535c2c Binary files /dev/null and b/web/src/assets/providers/lingyiwanwu.png differ diff --git a/web/src/assets/providers/openai.png b/web/src/assets/providers/openai.png new file mode 100644 index 00000000..bf945a33 Binary files /dev/null and b/web/src/assets/providers/openai.png differ diff --git a/web/src/assets/providers/siliconflow.png b/web/src/assets/providers/siliconflow.png new file mode 100644 index 00000000..f32fc6eb Binary files /dev/null and b/web/src/assets/providers/siliconflow.png differ diff --git a/web/src/assets/providers/together.ai.png b/web/src/assets/providers/together.ai.png new file mode 100644 index 00000000..f5a6fdc0 Binary files /dev/null and b/web/src/assets/providers/together.ai.png differ diff --git a/web/src/assets/providers/zhipuai.png b/web/src/assets/providers/zhipuai.png new file mode 100644 index 00000000..9f02470f Binary files /dev/null and b/web/src/assets/providers/zhipuai.png differ diff --git a/web/src/utils/modelIcon.js b/web/src/utils/modelIcon.js new file mode 100644 index 00000000..b0b0e35f --- /dev/null +++ b/web/src/utils/modelIcon.js @@ -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 +} diff --git a/web/src/views/SettingView.vue b/web/src/views/SettingView.vue index 1e307d59..8fb8f41d 100644 --- a/web/src/views/SettingView.vue +++ b/web/src/views/SettingView.vue @@ -160,7 +160,10 @@
-
+ +
+ 模型图标 +

{{ modelNames[item].name }}

@@ -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;