mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2026-08-28 19:24:01 +08:00
chore: 模型调整
This commit is contained in:
@@ -18,6 +18,7 @@ interface ImageSearchPayload {
|
||||
interface AIPPTOutlinePayload {
|
||||
content: string
|
||||
language: string
|
||||
provider: string
|
||||
model: string
|
||||
}
|
||||
|
||||
@@ -25,6 +26,7 @@ interface AIPPTPayload {
|
||||
content: string
|
||||
language: string
|
||||
style: string
|
||||
provider: string
|
||||
model: string
|
||||
}
|
||||
|
||||
@@ -45,6 +47,7 @@ export default {
|
||||
AIPPT_Outline({
|
||||
content,
|
||||
language,
|
||||
provider,
|
||||
model,
|
||||
}: AIPPTOutlinePayload): Promise<any> {
|
||||
return fetchRequest(`${SERVER_URL}/tools/aippt_outline`, {
|
||||
@@ -52,6 +55,7 @@ export default {
|
||||
body: JSON.stringify({
|
||||
content,
|
||||
language,
|
||||
provider,
|
||||
model,
|
||||
stream: true,
|
||||
}),
|
||||
@@ -62,6 +66,7 @@ export default {
|
||||
content,
|
||||
language,
|
||||
style,
|
||||
provider,
|
||||
model,
|
||||
}: AIPPTPayload): Promise<any> {
|
||||
return fetchRequest(`${SERVER_URL}/tools/aippt`, {
|
||||
@@ -69,6 +74,7 @@ export default {
|
||||
body: JSON.stringify({
|
||||
content,
|
||||
language,
|
||||
provider,
|
||||
model,
|
||||
style,
|
||||
stream: true,
|
||||
@@ -85,7 +91,6 @@ export default {
|
||||
body: JSON.stringify({
|
||||
content,
|
||||
command,
|
||||
model: 'glm-4.7-flash',
|
||||
stream: true,
|
||||
}),
|
||||
})
|
||||
|
||||
@@ -59,9 +59,9 @@
|
||||
style="width: 190px;"
|
||||
v-model:value="model"
|
||||
:options="[
|
||||
{ label: 'GLM-4.7-Flash', value: 'glm-4.7-flash' },
|
||||
{ label: 'Doubao-Seed-1.6-Flash', value: 'doubao-seed-1.6-flash' },
|
||||
{ label: 'DeepSeek-v4-Flash', value: 'deepseek-v4-flash' },
|
||||
{ label: 'Qwen3.7-Flash', value: 'qwen:qwen3.7-flash' },
|
||||
{ label: 'Doubao-Seed-2.0-mini', value: 'doubao:doubao-seed-2.0-mini' },
|
||||
{ label: 'DeepSeek-v4-Flash', value: 'qwen:deepseek-v4-flash-0731' },
|
||||
]"
|
||||
/>
|
||||
</div>
|
||||
@@ -153,7 +153,7 @@ const loading = ref(false)
|
||||
const outlineCreating = ref(false)
|
||||
const overwrite = ref(true)
|
||||
const step = ref<'setup' | 'outline' | 'template'>('setup')
|
||||
const model = ref('glm-4.7-flash')
|
||||
const model = ref('qwen:qwen3.7-flash')
|
||||
const outlineRef = useTemplateRef<HTMLElement>('outlineRef')
|
||||
const inputRef = useTemplateRef<InstanceType<typeof Input>>('inputRef')
|
||||
|
||||
@@ -186,11 +186,14 @@ const createOutline = async () => {
|
||||
|
||||
loading.value = true
|
||||
outlineCreating.value = true
|
||||
|
||||
const [provider, _model] = model.value.split(':')
|
||||
|
||||
const stream = await api.AIPPT_Outline({
|
||||
content: keyword.value,
|
||||
language: language.value,
|
||||
model: model.value,
|
||||
provider,
|
||||
model: _model,
|
||||
})
|
||||
if (typeof stream === 'object' && stream.state === -1) {
|
||||
loading.value = false
|
||||
@@ -232,17 +235,20 @@ const createPPT = async (template?: { slides: Slide[], theme: SlideTheme }) => {
|
||||
|
||||
if (overwrite.value) resetSlides()
|
||||
|
||||
const [provider, _model] = model.value.split(':')
|
||||
|
||||
const stream = await api.AIPPT({
|
||||
content: outline.value,
|
||||
language: language.value,
|
||||
style: style.value,
|
||||
model: model.value,
|
||||
provider,
|
||||
model: _model,
|
||||
})
|
||||
if (typeof stream === 'object' && stream.state === -1) {
|
||||
loading.value = false
|
||||
message.closeAll()
|
||||
mainStore.setAIPPTDialogState(true)
|
||||
return message.error('该模型API的并发数过高,请更换其他模型重试')
|
||||
return message.error('该模型不可用,请更换其他模型重试')
|
||||
}
|
||||
|
||||
if (img.value === 'test') {
|
||||
|
||||
Reference in New Issue
Block a user