mirror of
https://github.com/wassname/chatGPTBox.git
synced 2026-08-10 12:00:23 +08:00
fix: model switch not work when autoRegenAfterSwitchModel is false
This commit is contained in:
@@ -214,8 +214,9 @@ function ConversationCard(props) {
|
||||
required
|
||||
onChange={(e) => {
|
||||
const modelName = e.target.value
|
||||
if (config.autoRegenAfterSwitchModel)
|
||||
getRetryFn({ ...session, modelName, aiName: t(Models[modelName].desc) })()
|
||||
const newSession = { ...session, modelName, aiName: t(Models[modelName].desc) }
|
||||
if (config.autoRegenAfterSwitchModel) getRetryFn(newSession)()
|
||||
else setSession(newSession)
|
||||
}}
|
||||
>
|
||||
{Object.entries(Models).map(([key, model]) => {
|
||||
|
||||
Reference in New Issue
Block a user