修复自定义模型的对话问题
This commit is contained in:
parent
63d124bf03
commit
f23583f2fa
6
package-lock.json
generated
6
package-lock.json
generated
@ -1,6 +0,0 @@
|
||||
{
|
||||
"name": "Yuxi-Know",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {}
|
||||
}
|
||||
@ -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(
|
||||
|
||||
@ -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'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user