修复自定义模型的对话问题
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,
|
stream=True,
|
||||||
)
|
)
|
||||||
for chunk in response:
|
for chunk in response:
|
||||||
yield chunk.choices[0].delta
|
if len(chunk.choices) > 0:
|
||||||
|
yield chunk.choices[0].delta
|
||||||
|
|
||||||
def _get_response(self, messages):
|
def _get_response(self, messages):
|
||||||
response = self.client.chat.completions.create(
|
response = self.client.chat.completions.create(
|
||||||
|
|||||||
@ -183,7 +183,7 @@
|
|||||||
type="link"
|
type="link"
|
||||||
>
|
>
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<StopOutlined v-if="isStreaming" />
|
<PauseOutlined v-if="isStreaming" />
|
||||||
<ArrowUpOutlined v-else />
|
<ArrowUpOutlined v-else />
|
||||||
</template>
|
</template>
|
||||||
</a-button>
|
</a-button>
|
||||||
@ -220,7 +220,7 @@ import {
|
|||||||
BulbOutlined,
|
BulbOutlined,
|
||||||
CaretRightOutlined,
|
CaretRightOutlined,
|
||||||
DeploymentUnitOutlined,
|
DeploymentUnitOutlined,
|
||||||
StopOutlined,
|
PauseOutlined,
|
||||||
ReloadOutlined,
|
ReloadOutlined,
|
||||||
CopyOutlined
|
CopyOutlined
|
||||||
} from '@ant-design/icons-vue'
|
} from '@ant-design/icons-vue'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user