diff --git a/README.md b/README.md index 176fe8b..6743d05 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,7 @@ docker run -d -p 56780:56780 --name godoos godoos/godoos:latest - 新增frpc客户端管理,无需下载,支持一键启动和停止frpc客户端,实现内网穿透。 - 新增本地代理管理,支持http/静态文件/udp转发代理,支持一键启动和停止本地代理服务。 - 新增后台锁屏管理,可设定管理员和密码 + ## 🎉 V1.0.4更新日志 - 新增配置远程存储状态下是否支持跨域 diff --git a/frontend/package.json b/frontend/package.json index f4c9f29..183f244 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "godoos", "private": true, - "version": "1.0.4", + "version": "1.0.6", "type": "module", "scripts": { "dev": "vite", diff --git a/frontend/src/stores/db.ts b/frontend/src/stores/db.ts index b5f99d5..2aef683 100644 --- a/frontend/src/stores/db.ts +++ b/frontend/src/stores/db.ts @@ -9,7 +9,7 @@ dbInit.version(1).stores({ // 模型标签 modelslabel: '++id,name,zhdesc,endesc,family,chanel,models,action,engine', // 模型列表 - modelslist: '++id,model,label,action,status,params,type,isdef,info,created_at', + modelslist: '++id,model,label,engine,action,status,params,type,isdef,info,created_at', // ai对话列表 aichatlist: '++id,title,model,engine,promptId,prompt,knowledgeId,createdAt', // ai对话消息 diff --git a/frontend/src/stores/labels/deepseek.ts b/frontend/src/stores/labels/deepseek.ts new file mode 100644 index 0000000..58159a0 --- /dev/null +++ b/frontend/src/stores/labels/deepseek.ts @@ -0,0 +1,49 @@ +export const deepseekLabels = { + name: "deepseek", + family: "deepseek", + action: "chat", + models: [ + { + model: "deepseek-r1:1.5b", + params: { + "stop": [ + "<|begin▁of▁sentence|>", + "<|end▁of▁sentence|>", + "<|User|>", + "<|Assistant|>" + ] + }, + info: { + engine: "ollama", + from: "ollama", + size: "1.1GB", + desk: "1.5GB", + cpu: "8GB", + gpu: "6GB", + quant: "q4" + } + }, + { + model: "deepseek-r1:7b", + params: { + "stop": [ + "<|begin▁of▁sentence|>", + "<|end▁of▁sentence|>", + "<|User|>", + "<|Assistant|>" + ] + }, + info: { + engine: "ollama", + from: "ollama", + size: "4.7GB", + desk: "5GB", + cpu: "16GB", + gpu: "8GB", + quant: "q4" + } + }, + ], + zhdesc: "DeepSeek-R1,是幻方量化旗下AI公司深度求索(DeepSeek)研发的推理模型。DeepSeek-R1采用强化学习进行后训练,旨在提升推理能力,尤其擅长数学、代码和自然语言推理等复杂任务。", + endesc: "DeepSeek-R1, It is an inference model developed by DeepSeek, an AI company under the umbrella of Magic Square Quantification. DeepSeek-R1 uses reinforcement learning for post training, aiming to improve reasoning ability, especially in complex tasks such as mathematics, code, and natural language reasoning." +} \ No newline at end of file diff --git a/frontend/src/stores/labels/index.ts b/frontend/src/stores/labels/index.ts index 3f35381..e7ea92f 100644 --- a/frontend/src/stores/labels/index.ts +++ b/frontend/src/stores/labels/index.ts @@ -1,4 +1,5 @@ import { qwenLabels } from './qwen.ts' +import { deepseekLabels } from './deepseek.ts' import { gemmaLabels } from './gemma.ts' import { chatglmLabels } from './chatglm.ts' import { llamaLabels } from './llama.ts' @@ -42,6 +43,7 @@ import { paraformerLabel } from './paraformer.ts' import { telespeechLabel } from './telespeech.ts' import { vitsLabel } from './vits.ts' export const aiLabels = [ + deepseekLabels, qwenLabels, gemmaLabels, chatglmLabels, diff --git a/frontend/src/stores/model.ts b/frontend/src/stores/model.ts index fe2b62b..cdfbee6 100644 --- a/frontend/src/stores/model.ts +++ b/frontend/src/stores/model.ts @@ -79,6 +79,7 @@ export const useModelStore = defineStore('modelStore', () => { if (d.action == "") { d.action = "chat" } + d.engine = "ollama" }); await db.clear("modelslist"); await db.addAll("modelslist", data); @@ -258,7 +259,8 @@ export const useModelStore = defineStore('modelStore', () => { } } async function initModel() { - await db.clear("modelslabel") + const num = await db.count("modelslabel") + if (num > 0) return await db.addAll("modelslabel", aiLabels); } diff --git a/frontend/src/system/config.ts b/frontend/src/system/config.ts index 40c78be..c7c414f 100644 --- a/frontend/src/system/config.ts +++ b/frontend/src/system/config.ts @@ -16,7 +16,7 @@ export const getSystemConfig = (ifset = false) => { // 初始化配置对象的各项属性,若本地存储中已存在则不进行覆盖 if (!config.version) { - config.version = '1.0.5'; + config.version = '1.0.6'; } if (!config.isFirstRun) { config.isFirstRun = false; diff --git a/frontend/src/util/markdown.ts b/frontend/src/util/markdown.ts index 4d9a354..fd3d2c2 100644 --- a/frontend/src/util/markdown.ts +++ b/frontend/src/util/markdown.ts @@ -2,11 +2,8 @@ import 'cherry-markdown/dist/cherry-markdown.css'; import CherryEngine from 'cherry-markdown/dist/cherry-markdown.engine.core'; export function renderMarkdown(currentText: string) { - //console.log(currentText) + currentText = currentText.replace("", '> '); + currentText = currentText.replace("", '\n'); const cherryEngineInstance:any = new CherryEngine({}); return cherryEngineInstance.makeHtml(currentText); - // const currentCherry = new Cherry(cherryConfig); - // currentCherry.setMarkdown(currentText); - // console.log(currentCherry.getHtml()) - // return currentCherry.getHtml(); } \ No newline at end of file