Skip to content

Commit 20c6d05

Browse files
committed
优化:CosyVoice模型调用方式
1 parent b6671b6 commit 20c6d05

File tree

5 files changed

+17
-10
lines changed

5 files changed

+17
-10
lines changed

electron/aigcserver/EasyServer.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ export const EasyServer = function (config: any) {
1717
entry: string,
1818
entryArgs: string[],
1919
envs: string[],
20+
content: string,
2021
functions: {
21-
soundTts?: object,
22-
soundClone?: object,
23-
videoGen?: object,
22+
[key: string]: {
23+
content?: string,
24+
param?: any[],
25+
},
2426
},
2527
}
2628
}
@@ -41,6 +43,7 @@ export const EasyServer = function (config: any) {
4143
msg: "ok",
4244
data: {
4345
httpUrl: null,
46+
content: this.serverConfig.easyServer.content || '',
4447
functions: this.serverConfig.easyServer.functions || {},
4548
}
4649
}

src/components/Server/ServerAddDialog.vue

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -252,15 +252,16 @@ const emit = defineEmits({
252252
<div class="border rounded-lg py-4 leading-10">
253253
<div class="flex">
254254
<div class="pr-3 text-right w-20">{{ t('名称') }}</div>
255-
<div>
256-
{{ modelInfo.title }}
257-
v{{ modelInfo.version }}
255+
<div class="flex flex-wrap items-center">
256+
<div class="mr-2 mb-1">{{ modelInfo.title }}</div>
257+
<div class="mr-2 text-sm bg-gray-100 px-2 leading-6 inline-block rounded-lg mb-1">
258+
v{{ modelInfo.version }}
259+
</div>
260+
<div class="mr-2 text-xs bg-gray-100 px-2 leading-6 inline-block rounded-lg mb-1">
261+
{{ modelInfo.name }}
262+
</div>
258263
</div>
259264
</div>
260-
<div class="flex">
261-
<div class="pr-3 text-right w-20">{{ t('标识') }}</div>
262-
<div>{{ modelInfo.name }}</div>
263-
</div>
264265
<div class="flex">
265266
<div class="pr-3 text-right w-20 flex-shrink-0">{{ t('描述') }}</div>
266267
<div>{{ modelInfo.description }}</div>

src/lang/en-US.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@
149149
"195c95f2": "The model runs offline locally, requiring certain computer performance",
150150
"19e9d021": "LLM Setting",
151151
"1aa56157": "Live data updated",
152+
"1b03e768": "File signature",
152153
"1bb341a5": "This product is open-source software under the AGPL-3.0 license.",
153154
"1cac5446": "Model platform not match",
154155
"1dc6780c": "Confirm clear?",

src/lang/source.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@
206206
"模型已存在,请先删除": "4ba41237",
207207
"模型市场": "3192b082",
208208
"模型平台不匹配": "1cac5446",
209+
"模型文件签名": "1b03e768",
209210
"模型服务未运行": "5c572228",
210211
"模型未启动": "00e5b339",
211212
"模型架构不匹配": "6ebdaf69",

src/lang/zh-CN.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@
148148
"195c95f2": "模型离线运行在本地,对电脑性能有一定要求。",
149149
"19e9d021": "大模型设置",
150150
"1aa56157": "直播数据已更新",
151+
"1b03e768": "模型文件签名",
151152
"1bb341a5": "本产品为开源软件,遵循 AGPL-3.0 license 协议。",
152153
"1cac5446": "模型平台不匹配",
153154
"1dc6780c": "确认清空?",

0 commit comments

Comments
 (0)