chore: unload model on message error - so users can attempt to start
This commit is contained in:
parent
40957f7686
commit
8ccbb56f95
@ -179,6 +179,9 @@ export default function EventHandler({ children }: { children: ReactNode }) {
|
|||||||
setIsGeneratingResponse(false)
|
setIsGeneratingResponse(false)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
} else if (message.status === MessageStatus.Error) {
|
||||||
|
setActiveModel(undefined)
|
||||||
|
setStateModel({ state: 'start', loading: false, model: undefined })
|
||||||
}
|
}
|
||||||
// Mark the thread as not waiting for response
|
// Mark the thread as not waiting for response
|
||||||
updateThreadWaiting(message.thread_id, false)
|
updateThreadWaiting(message.thread_id, false)
|
||||||
|
|||||||
@ -53,7 +53,7 @@ export function useActiveModel() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (activeModel) {
|
if (activeModel) {
|
||||||
stopModel(activeModel)
|
await stopModel(activeModel)
|
||||||
}
|
}
|
||||||
setPendingModelLoad(true)
|
setPendingModelLoad(true)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user