feat: 增强模型选择和错误处理机制
优化模型ID传递逻辑,支持请求级别的模型覆盖;完善流式响应的错误处理
This commit is contained in:
@@ -34,6 +34,7 @@ export const useMenuStore = defineStore('menuStore', () => {
|
||||
const isFirstSession = ref(false)
|
||||
const firstQuery = ref('')
|
||||
const firstMentionedItems = ref<any[]>([])
|
||||
const firstModelId = ref('')
|
||||
|
||||
const applyMenuTranslations = () => {
|
||||
menuArr.forEach(item => {
|
||||
@@ -92,9 +93,10 @@ export const useMenuStore = defineStore('menuStore', () => {
|
||||
isFirstSession.value = payload
|
||||
}
|
||||
|
||||
const changeFirstQuery = (payload: string, mentionedItems: any[] = []) => {
|
||||
const changeFirstQuery = (payload: string, mentionedItems: any[] = [], modelId: string = '') => {
|
||||
firstQuery.value = payload
|
||||
firstMentionedItems.value = mentionedItems
|
||||
firstModelId.value = modelId
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -102,6 +104,7 @@ export const useMenuStore = defineStore('menuStore', () => {
|
||||
isFirstSession,
|
||||
firstQuery,
|
||||
firstMentionedItems,
|
||||
firstModelId,
|
||||
clearMenuArr,
|
||||
updatemenuArr,
|
||||
updataMenuChildren,
|
||||
|
||||
Reference in New Issue
Block a user