File tree Expand file tree Collapse file tree
Botticelli.AI.YaGpt/Settings Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ namespace Botticelli.AI.YaGpt.Settings;
44
55public class YaGptSettings : AiSettings
66{
7- public string ApiKey { get ; set ; }
87 public string Model { get ; set ; }
98 public double Temperature { get ; set ; }
109 public string Instruction { get ; set ; }
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ private HttpClient GetClient()
9595
9696 client . BaseAddress = new Uri ( Settings . Value . Url ) ;
9797 client . DefaultRequestHeaders . Authorization =
98- new AuthenticationHeaderValue ( "Bearer" , Settings . Value . ApiKey ) ;
98+ new AuthenticationHeaderValue ( Settings . Value . AuthMethod , Settings . Value . ApiKey ) ;
9999
100100 return client ;
101101 }
Original file line number Diff line number Diff line change 33public class AiSettings : ProviderSettings
44{
55 public string ? Url { get ; set ; }
6- public string AiName { get ; set ; }
6+ public required string AiName { get ; set ; }
77 public bool StreamGeneration { get ; set ; }
8- public string ApiKey { get ; set ; }
8+ public string AuthMethod { get ; set ; } = "Bearer" ;
9+ public string ? ApiKey { get ; set ; }
910}
You can’t perform that action at this time.
0 commit comments