@@ -35,7 +35,7 @@ public class GPT
35
35
public string SystemPrompt { set ; get ; }
36
36
37
37
[ JsonConverter ( typeof ( JsonStringEnumConverter < AuthType > ) ) ]
38
- public AuthType AuthType { set ; get ; } = AuthType . ApiKey ;
38
+ public AuthType AuthType { set ; get ; }
39
39
40
40
public GPT (
41
41
string name ,
@@ -80,7 +80,7 @@ public GPT(
80
80
}
81
81
82
82
// 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 )
84
84
{
85
85
throw new InvalidOperationException ( "EntraID authentication is only supported for Azure OpenAI service." ) ;
86
86
}
@@ -165,22 +165,22 @@ private void ShowEndpointInfo(IHost host)
165
165
new ( label : " Endpoint" , m => m . Endpoint ) ,
166
166
new ( label : " Deployment" , m => m . Deployment ) ,
167
167
new ( label : " Model" , m => m . ModelName ) ,
168
- new ( label : " Auth Type " , m => m . AuthType . ToString ( ) ) ,
168
+ new ( label : " AuthType " , m => m . AuthType . ToString ( ) ) ,
169
169
} ,
170
170
171
171
EndpointType . OpenAI =>
172
172
[
173
173
new ( label : " Type" , m => m . Type . ToString ( ) ) ,
174
174
new ( label : " Model" , m => m . ModelName ) ,
175
- new ( label : " Auth Type " , m => m . AuthType . ToString ( ) ) ,
175
+ new ( label : " AuthType " , m => m . AuthType . ToString ( ) ) ,
176
176
] ,
177
177
178
178
EndpointType . CompatibleThirdParty =>
179
179
[
180
180
new ( label : " Type" , m => m . Type . ToString ( ) ) ,
181
181
new ( label : " Endpoint" , m => m . Endpoint ) ,
182
182
new ( label : " Model" , m => m . ModelName ) ,
183
- new ( label : " Auth Type " , m => m . AuthType . ToString ( ) ) ,
183
+ new ( label : " AuthType " , m => m . AuthType . ToString ( ) ) ,
184
184
] ,
185
185
186
186
_ => throw new UnreachableException ( ) ,
0 commit comments