@@ -35,7 +35,7 @@ public class GPT
3535 public string SystemPrompt { set ; get ; }
3636
3737 [ JsonConverter ( typeof ( JsonStringEnumConverter < AuthType > ) ) ]
38- public AuthType AuthType { set ; get ; } = AuthType . ApiKey ;
38+ public AuthType AuthType { set ; get ; }
3939
4040 public GPT (
4141 string name ,
@@ -80,7 +80,7 @@ public GPT(
8080 }
8181
8282 // EntraID authentication is only supported for Azure OpenAI
83- if ( AuthType == AuthType . EntraID && Type != EndpointType . AzureOpenAI )
83+ if ( AuthType is AuthType . EntraID && Type is not EndpointType . AzureOpenAI )
8484 {
8585 throw new InvalidOperationException ( "EntraID authentication is only supported for Azure OpenAI service." ) ;
8686 }
@@ -165,22 +165,22 @@ private void ShowEndpointInfo(IHost host)
165165 new ( label : " Endpoint" , m => m . Endpoint ) ,
166166 new ( label : " Deployment" , m => m . Deployment ) ,
167167 new ( label : " Model" , m => m . ModelName ) ,
168- new ( label : " Auth Type " , m => m . AuthType . ToString ( ) ) ,
168+ new ( label : " AuthType " , m => m . AuthType . ToString ( ) ) ,
169169 } ,
170170
171171 EndpointType . OpenAI =>
172172 [
173173 new ( label : " Type" , m => m . Type . ToString ( ) ) ,
174174 new ( label : " Model" , m => m . ModelName ) ,
175- new ( label : " Auth Type " , m => m . AuthType . ToString ( ) ) ,
175+ new ( label : " AuthType " , m => m . AuthType . ToString ( ) ) ,
176176 ] ,
177177
178178 EndpointType . CompatibleThirdParty =>
179179 [
180180 new ( label : " Type" , m => m . Type . ToString ( ) ) ,
181181 new ( label : " Endpoint" , m => m . Endpoint ) ,
182182 new ( label : " Model" , m => m . ModelName ) ,
183- new ( label : " Auth Type " , m => m . AuthType . ToString ( ) ) ,
183+ new ( label : " AuthType " , m => m . AuthType . ToString ( ) ) ,
184184 ] ,
185185
186186 _ => throw new UnreachableException ( ) ,
0 commit comments