mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-02-01 19:24:58 +08:00
【增加】ChatGlm 对接 Image
This commit is contained in:
parent
dd76cc581c
commit
d14ba2ed9e
@ -61,7 +61,7 @@
|
||||
</el-select>
|
||||
</el-space>
|
||||
</div>
|
||||
<div class="group-item">
|
||||
<div class="group-item" v-if="otherPlatform !== AiPlatformEnum.CHATGLM">
|
||||
<div>
|
||||
<el-text tag="b">图片尺寸</el-text>
|
||||
</div>
|
||||
@ -79,7 +79,7 @@
|
||||
<script setup lang="ts">
|
||||
import {ImageApi, ImageDrawReqVO, ImageVO} from '@/api/ai/image'
|
||||
import {
|
||||
AiPlatformEnum,
|
||||
AiPlatformEnum, ChatGlmModels,
|
||||
ImageHotWords,
|
||||
ImageModelVO,
|
||||
OtherPlatformEnum,
|
||||
@ -159,6 +159,11 @@ const handlerPlatformChange = async (platform) => {
|
||||
models.value = TongYiWanXiangModels
|
||||
} else if (AiPlatformEnum.YI_YAN === platform) {
|
||||
models.value = QianFanModels
|
||||
} else if (AiPlatformEnum.CHATGLM === platform) {
|
||||
models.value = ChatGlmModels
|
||||
// ChatGlm 模型没有 width、height 随便默认一个值过后台必填检测
|
||||
height.value = 512
|
||||
width.value = 512
|
||||
} else {
|
||||
models.value = []
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ export const AiPlatformEnum = {
|
||||
STABLE_DIFFUSION: 'StableDiffusion', // Stability AI
|
||||
MIDJOURNEY: 'Midjourney', // Midjourney
|
||||
SUNO: 'Suno', // Suno AI
|
||||
CHATGLM: 'ChatGlm', // ChatGlm
|
||||
}
|
||||
|
||||
export const OtherPlatformEnum:ImageModelVO [] = [
|
||||
@ -31,6 +32,10 @@ export const OtherPlatformEnum:ImageModelVO [] = [
|
||||
{
|
||||
key: AiPlatformEnum.YI_YAN,
|
||||
name: '百度千帆'
|
||||
},
|
||||
{
|
||||
key: AiPlatformEnum.CHATGLM,
|
||||
name: '智铺 ChatGlm'
|
||||
}
|
||||
]
|
||||
|
||||
@ -266,6 +271,13 @@ export const QianFanModels: ImageModelVO[] = [
|
||||
}
|
||||
]
|
||||
|
||||
export const ChatGlmModels: ImageModelVO[] = [
|
||||
{
|
||||
key: 'cogview-3',
|
||||
name: 'cogview-3'
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
export const StableDiffusionClipGuidancePresets: ImageModelVO[] = [
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user