We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4422c2 commit adcbf4bCopy full SHA for adcbf4b
src/store/modules/chat/index.ts
@@ -12,6 +12,7 @@ import {
12
fetchRenameChatRoom,
13
fetchUpdateChatRoomChatModel,
14
fetchUpdateChatRoomUsingContext,
15
+ fetchUpdateUserChatModel,
16
} from '@/api'
17
18
export const useChatStore = defineStore('chat-store', {
@@ -107,6 +108,9 @@ export const useChatStore = defineStore('chat-store', {
107
108
109
async setChatModel(chatModel: string, roomId: number) {
110
await fetchUpdateChatRoomChatModel(chatModel, roomId)
111
+ const userStore = useUserStore()
112
+ userStore.userInfo.config.chatModel = chatModel
113
+ await fetchUpdateUserChatModel(chatModel)
114
},
115
116
async addHistory(history: Chat.History, chatData: Chat.Chat[] = []) {
0 commit comments