修复自定义模型的对话问题

This commit is contained in:
Wenjie Zhang 2025-03-30 19:26:43 +08:00
parent 63d124bf03
commit f23583f2fa
3 changed files with 4 additions and 9 deletions

6
package-lock.json generated
View File

@ -1,6 +0,0 @@
{
"name": "Yuxi-Know",
"lockfileVersion": 3,
"requires": true,
"packages": {}
}

View File

@ -28,7 +28,8 @@ class OpenAIBase():
stream=True,
)
for chunk in response:
yield chunk.choices[0].delta
if len(chunk.choices) > 0:
yield chunk.choices[0].delta
def _get_response(self, messages):
response = self.client.chat.completions.create(

View File

@ -183,7 +183,7 @@
type="link"
>
<template #icon>
<StopOutlined v-if="isStreaming" />
<PauseOutlined v-if="isStreaming" />
<ArrowUpOutlined v-else />
</template>
</a-button>
@ -220,7 +220,7 @@ import {
BulbOutlined,
CaretRightOutlined,
DeploymentUnitOutlined,
StopOutlined,
PauseOutlined,
ReloadOutlined,
CopyOutlined
} from '@ant-design/icons-vue'