File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 182
182
endpoint = " http://localhost:11434/api/tags" ;
183
183
response = webread(endpoint );
184
184
mdls = string({response .models .name }).' ;
185
+ baseMdls = unique(extractBefore(mdls ," :" ));
186
+ % remove all those "mistral:latest", iff those are the only
187
+ % model entries pointing at some model
188
+ for base= baseMdls .'
189
+ found = startsWith(mdls ,base +" :" );
190
+ if nnz(found ) == 1
191
+ mdls(found ) = [];
192
+ end
193
+ end
194
+ mdls = unique([mdls(: ); baseMdls ]);
195
+ mdls(strlength(mdls ) < 1 ) = [];
185
196
end
186
197
end
187
198
end
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ function queryModels(testCase)
128
128
models = ollamaChat .models ;
129
129
testCase .verifyClass(models ," string" );
130
130
testCase .verifyThat(models , ...
131
- matlab .unittest .constraints .IsSupersetOf(" mistral:latest " ));
131
+ matlab .unittest .constraints .IsSupersetOf(" mistral" ));
132
132
end
133
133
end
134
134
end
You can’t perform that action at this time.
0 commit comments