mirror of
https://github.com/yangjian102621/geekai.git
synced 2026-05-10 11:44:28 +08:00
acommpelish jimeng AI refactor for PC
This commit is contained in:
@@ -225,7 +225,7 @@ const initModelValue = (model) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
defaultValues.model = selectedModel.value.key
|
||||
defaultValues.req_key = selectedModel.value.key
|
||||
return defaultValues
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ const props = defineProps({
|
||||
|
||||
const typeClass = computed(() => {
|
||||
return {
|
||||
info: 'bg-blue-100 text-blue-500 border-blue-500',
|
||||
info: 'bg-blue-100 text-white-500 border-blue-500',
|
||||
success: 'bg-green-100 text-green-500 border-green-500',
|
||||
warning: 'bg-yellow-100 text-yellow-500 border-yellow-500',
|
||||
}[props.type]
|
||||
|
||||
@@ -537,6 +537,22 @@ export const JimengParams = {
|
||||
label: '21:9 (2016 * 864)',
|
||||
value: '2016x864',
|
||||
},
|
||||
{
|
||||
label: '9:16 (936 * 1664)',
|
||||
value: '936x1664',
|
||||
},
|
||||
{
|
||||
label: '2:3 (1056 * 1584)',
|
||||
value: '1056x1584',
|
||||
},
|
||||
{
|
||||
label: '3:4 (1104 * 1472)',
|
||||
value: '1104x1472',
|
||||
},
|
||||
{
|
||||
label: '9:21 (864 * 2016)',
|
||||
value: '864x2016',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
@@ -195,14 +195,19 @@ export const useJimengStore = defineStore('jimeng', () => {
|
||||
|
||||
try {
|
||||
submitting.value = true
|
||||
|
||||
const response = await httpPost('/api/jimeng/task', formData.value)
|
||||
if (response.data) {
|
||||
showMessageOK('任务提交成功')
|
||||
isOver.value = false
|
||||
await fetchData(1)
|
||||
startPolling()
|
||||
formData.value.type = activeFunction.value
|
||||
// 视频 duration 转成整数
|
||||
if (formData.value.duration) {
|
||||
formData.value.duration = parseInt(formData.value.duration)
|
||||
}
|
||||
if (formData.value.image_urls && !Array.isArray(formData.value.image_urls)) {
|
||||
formData.value.image_urls = [formData.value.image_urls]
|
||||
}
|
||||
const response = await httpPost('/api/jimeng/task', formData.value)
|
||||
showMessageOK('任务提交成功')
|
||||
isOver.value = false
|
||||
await fetchData(1)
|
||||
startPolling()
|
||||
} catch (error) {
|
||||
console.error('提交任务失败:', error)
|
||||
showMessageError(error.message || '提交任务失败')
|
||||
|
||||
@@ -24,10 +24,15 @@
|
||||
>
|
||||
和
|
||||
<a
|
||||
href="https://console.volcengine.com/ai/ability/detail/9"
|
||||
href="https://console.volcengine.com/ai/ability/detail/1"
|
||||
target="_blank"
|
||||
class="text-blue-500"
|
||||
>智能绘图</a
|
||||
>以及<a
|
||||
href="https://console.volcengine.com/ark/region:ark+cn-beijing/openManagement"
|
||||
target="_blank"
|
||||
class="text-blue-500"
|
||||
>火山方舟</a
|
||||
>
|
||||
服务。
|
||||
</p>
|
||||
@@ -41,6 +46,17 @@
|
||||
>
|
||||
获取。
|
||||
</p>
|
||||
<p>
|
||||
3. ApiKey 请在火山方舟控制台 ->
|
||||
<a
|
||||
href="https://console.volcengine.com/ark/region:ark+cn-beijing/apiKey?apikey=%7B%7D"
|
||||
target="_blank"
|
||||
class="text-blue-500"
|
||||
>
|
||||
API Key管理</a
|
||||
>
|
||||
获取。
|
||||
</p>
|
||||
</Alert>
|
||||
</div>
|
||||
<el-form-item label="AccessKey" prop="access_key">
|
||||
@@ -49,6 +65,19 @@
|
||||
<el-form-item label="SecretKey" prop="secret_key">
|
||||
<el-input v-model="jimengConfig.secret_key" placeholder="请输入即梦AI的SecretKey" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="api_key">
|
||||
<template #label>
|
||||
<div class="text-sm">
|
||||
火山方舟服务API Key(<span class="text-red-400"
|
||||
>目前火山方舟服务只支持API Key验证</span
|
||||
>)
|
||||
</div>
|
||||
</template>
|
||||
<el-input v-model="jimengConfig.api_key" placeholder="请输入火山方舟服务API Key" />
|
||||
<div class="text-sm mt-2 text-gray-500">
|
||||
目前豆包生图 4.0 模型在即梦API中不支持,需要使用火山方舟服务。
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-divider />
|
||||
<!-- 算力配置分组 -->
|
||||
|
||||
Reference in New Issue
Block a user