File tree Expand file tree Collapse file tree 4 files changed +15
-9
lines changed Expand file tree Collapse file tree 4 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 5353        },
5454        "ai-lab.inferenceRuntime" : {
5555          "type" : " string" 
56-           "default" : " llama-cpp" 
5756          "enum" : [
5857            " llama-cpp" 
59-             " whisper-cpp " 
60-             " none " 
58+             " openvino " 
59+             " vllm " 
6160          ],
6261          "description" : " Choose the default inferencing runtime for AI Lab" 
6362        },
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ const CONFIGURATION_SECTIONS: string[] = [
3434] ; 
3535
3636const  API_PORT_DEFAULT  =  10434 ; 
37- const   INFERENCE_RUNTIME_DEFAULT   =   'llama-cpp' ; 
37+ 
3838export  class  ConfigurationRegistry  extends  Publisher < ExtensionConfiguration >  implements  Disposable  { 
3939  #configuration: Configuration ; 
4040  #configurationPodmanDesktop: Configuration ; 
@@ -55,7 +55,7 @@ export class ConfigurationRegistry extends Publisher<ExtensionConfiguration> imp
5555      modelsPath : this . getModelsPath ( ) , 
5656      experimentalGPU : this . #configuration. get < boolean > ( 'experimentalGPU' )  ??  false , 
5757      apiPort : this . #configuration. get < number > ( 'apiPort' )  ??  API_PORT_DEFAULT , 
58-       inferenceRuntime : this . #configuration. get < string > ( 'inferenceRuntime' )  ??  INFERENCE_RUNTIME_DEFAULT , 
58+       inferenceRuntime : this . #configuration. get < string > ( 'inferenceRuntime' )  ??  'none' , 
5959      experimentalTuning : this . #configuration. get < boolean > ( 'experimentalTuning' )  ??  false , 
6060      modelUploadDisabled : this . #configuration. get < boolean > ( 'modelUploadDisabled' )  ??  false , 
6161      showGPUPromotion : this . #configuration. get < boolean > ( 'showGPUPromotion' )  ??  true , 
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ function handleOnChange(nValue: (ModelInfo & { label: string; value: string }) |
4747  value  =  nValue ; 
4848} 
4949
50- let  defaultRuntime:  string  =   ' llama-cpp ' 
50+ let  defaultRuntime:  string  |   undefined   =   $state () ;
5151
5252onMount (() =>  {
5353  return  configuration .subscribe (values  =>  { 
@@ -56,6 +56,13 @@ onMount(() => {
5656    } 
5757  }); 
5858}); 
59+ 
60+ function  filterModel(model :  ModelInfo ):  boolean  {
61+   //  If the defaultRuntime is undefined we should not filter any model 
62+   if  (! defaultRuntime ) return  true ; 
63+ 
64+   return  model .backend  ===  defaultRuntime ; 
65+ } 
5966script >
6067
6168<Select 
@@ -66,7 +73,7 @@ onMount(() => {
6673  onchange ={handleOnChange }
6774  placeholder =" Select model to use" 
6875  items ={models 
69-     .filter (model   =>   model . backend   ===   defaultRuntime )
76+     .filter (filterModel )
7077    .toSorted ((a , b ) =>  getModelSortingScore (a ) -  getModelSortingScore (b ))
7178    .map (model  =>  ({ ... model , value: model .id , label: model .name  }))}>
7279  <div  slot =" item" let:item >
Original file line number Diff line number Diff line change @@ -103,12 +103,12 @@ function openContribution(): void {
103103  studioClient .openURL (' https://github.com/containers/ai-lab-recipes/blob/main/CONTRIBUTING.md' catch (console .error ); 
104104} 
105105
106- let  defaultRuntime:  string  =  $state (' llama-cpp ' 
106+ let  defaultRuntime:  string  |   undefined   =  $state ();
107107
108108onMount (() =>  {
109109  const =  $configuration ?.inferenceRuntime ; 
110110  if  (inferenceRuntime ) defaultRuntime  =  inferenceRuntime ; 
111-   onFilterChange (' tools' defaultRuntime ); 
111+   onFilterChange (' tools' defaultRuntime   ??   ' all '  
112112}); 
113113script >
114114
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments