File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
src/lib/migrations/routines Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ const updateAssistantsModels: Migration = {
77 name : "Update deprecated models in assistants with the default model" ,
88 up : async ( ) => {
99 const models = ( await import ( "$lib/server/models" ) ) . models ;
10+ //@ts -expect-error the property doesn't exist anymore, keeping the script for reference
1011 const oldModels = ( await import ( "$lib/server/models" ) ) . oldModels ;
1112 const { assistants } = collections ;
1213
@@ -20,7 +21,7 @@ const updateAssistantsModels: Migration = {
2021 // has an old model
2122 let newModelId = defaultModelId ;
2223
23- const oldModel = oldModels . find ( ( m ) => m . id === assistant . modelId ) ;
24+ const oldModel = oldModels . find ( ( m : ( typeof models ) [ number ] ) => m . id === assistant . modelId ) ;
2425 if ( oldModel && oldModel . transferTo && ! ! models . find ( ( m ) => m . id === oldModel . transferTo ) ) {
2526 newModelId = oldModel . transferTo ;
2627 }
You can’t perform that action at this time.
0 commit comments