@@ -119,7 +119,7 @@ public void ResetMediaProviders(IDbConnection db)
119119 private void LoadModelDefaults ( )
120120 {
121121 MediaModels = LoadModels < MediaModel > ( "media-models.json" )
122- . Where ( x => x is { ApiModels . Keys . Count : > 0 , ModelType :
122+ . Where ( x => x is { ApiModels . Keys . Count : > 0 , Type :
123123 ModelType . TextToImage or
124124 ModelType . TextToSpeech or
125125 ModelType . SpeechToText or
@@ -159,7 +159,7 @@ public MediaModel GetMediaModelByApiModel(MediaProvider provider, string apiMode
159159 public string ? GetQualifiedMediaModel ( ModelType modelType , string apiModel )
160160 {
161161 foreach ( var mediaModel in MediaModels
162- . Where ( x => x . ModelType == modelType ) )
162+ . Where ( x => x . Type == modelType ) )
163163 {
164164 foreach ( var entry in mediaModel . ApiModels )
165165 {
@@ -174,7 +174,7 @@ public MediaModel GetMediaModelByApiModel(MediaProvider provider, string apiMode
174174 {
175175 ArgumentNullException . ThrowIfNull ( provider ) ;
176176 var supportedTaskModels = MediaModelsMap . Values
177- . Where ( x => x . ModelType == GetModelTypeByAiTaskType ( taskType ) )
177+ . Where ( x => x . Type == GetModelTypeByAiTaskType ( taskType ) )
178178 . Where ( x => x . ApiModels . ContainsKey ( provider . MediaType ! . Id ) &&
179179 provider . Models != null &&
180180 provider . Models . Contains ( x . ApiModels [ provider . MediaType ! . Id ] ) ) ;
@@ -187,7 +187,7 @@ public MediaModel GetMediaModelByApiModel(MediaProvider provider, string apiMode
187187 public List < string > GetSupportedModels ( AiTaskType taskType )
188188 {
189189 return MediaModelsMap
190- . Where ( x => x . Value . ModelType == GetModelTypeByAiTaskType ( taskType ) )
190+ . Where ( x => x . Value . Type == GetModelTypeByAiTaskType ( taskType ) )
191191 . Select ( x => x . Key )
192192 . ToList ( ) ;
193193 }
@@ -196,7 +196,7 @@ public bool ProviderHasModelForTask(MediaProvider provider, AiTaskType taskType)
196196 {
197197 ArgumentNullException . ThrowIfNull ( provider ) ;
198198 return MediaModelsMap . Values
199- . Any ( x => x . ModelType == GetModelTypeByAiTaskType ( taskType ) &&
199+ . Any ( x => x . Type == GetModelTypeByAiTaskType ( taskType ) &&
200200 x . ApiModels . ContainsKey ( provider . MediaType ! . Id ) &&
201201 provider . Models != null &&
202202 provider . Models . Contains ( x . ApiModels [ provider . MediaType ! . Id ] ) ) ;
@@ -205,7 +205,7 @@ public bool ProviderHasModelForTask(MediaProvider provider, AiTaskType taskType)
205205 public bool ModelSupportsTask ( string modelId , AiTaskType taskType )
206206 {
207207 return MediaModelsMap . TryGetValue ( modelId , out var modelSettings ) &&
208- modelSettings . ModelType == GetModelTypeByAiTaskType ( taskType ) ;
208+ modelSettings . Type == GetModelTypeByAiTaskType ( taskType ) ;
209209 }
210210
211211 private ModelType GetModelTypeByAiTaskType ( AiTaskType taskType )
0 commit comments