fix: use model from model hub not load correct model in thread screen (#2368)
Signed-off-by: James <james@jan.ai> Co-authored-by: James <james@jan.ai>
This commit is contained in:
parent
58e12f35c9
commit
3e27e97110
@ -74,11 +74,15 @@ export const useCreateNewThread = () => {
|
|||||||
|
|
||||||
const defaultModel = model ?? recommendedModel ?? downloadedModels[0]
|
const defaultModel = model ?? recommendedModel ?? downloadedModels[0]
|
||||||
|
|
||||||
// check last thread message, if there empty last message use can not create thread
|
if (!model) {
|
||||||
const lastMessage = threads[0]?.metadata?.lastMessage
|
// if we have model, which means user wants to create new thread from Model hub. Allow them.
|
||||||
|
|
||||||
if (!lastMessage && threads.length) {
|
// check last thread message, if there empty last message use can not create thread
|
||||||
return null
|
const lastMessage = threads[0]?.metadata?.lastMessage
|
||||||
|
|
||||||
|
if (!lastMessage && threads.length) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// modify assistant tools when experimental on, retieval toggle enabled in default
|
// modify assistant tools when experimental on, retieval toggle enabled in default
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user