File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ export class PodmanConnection extends Publisher<ContainerProviderConnectionInfo[
156156
157157 protected parseVMType ( vmtype : string | undefined ) : VMType {
158158 if ( ! vmtype ) return VMType . UNKNOWN ;
159- const type = VMType [ vmtype . toUpperCase ( ) as keyof typeof VMType ] ;
159+ const type = Object . values ( VMType ) . find ( s => s === vmtype ) ;
160160 if ( type === undefined ) {
161161 return VMType . UNKNOWN ;
162162 }
Original file line number Diff line number Diff line change @@ -250,12 +250,10 @@ export class LlamaCppPython extends InferenceProvider {
250250 case VMType . WSL :
251251 return gpu ?. vendor === GPUVendor . NVIDIA ? llamacpp . cuda : llamacpp . default ;
252252 case VMType . LIBKRUN :
253+ case VMType . LIBKRUN_LABEL :
253254 return gpu ? llamacpp . vulkan : llamacpp . default ;
254255 // no GPU support
255- case VMType . QEMU :
256- case VMType . APPLEHV :
257- case VMType . HYPERV :
258- case VMType . UNKNOWN :
256+ default :
259257 return llamacpp . default ;
260258 }
261259 }
Original file line number Diff line number Diff line change 1919export enum VMType {
2020 WSL = 'wsl' ,
2121 LIBKRUN = 'libkrun' ,
22+ LIBKRUN_LABEL = 'GPU enabled (LibKrun)' ,
2223 QEMU = 'qemu' ,
2324 APPLEHV = 'applehv' ,
25+ APPLEHV_LABEL = 'default (Apple HyperVisor)' ,
2426 HYPERV = 'hyperv' ,
2527 UNKNOWN = 'unknown' ,
2628}
You can’t perform that action at this time.
0 commit comments