mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
enhance: add Content-Type
to OpenAI request headers
This commit is contained in:
parent
ab54ecee42
commit
817f8919fd
1 changed files with 1 additions and 0 deletions
|
@ -105,6 +105,7 @@ namespace SourceGit.Models
|
|||
chat.AddMessage("user", question);
|
||||
|
||||
var client = new HttpClient() { Timeout = TimeSpan.FromSeconds(60) };
|
||||
client.DefaultRequestHeaders.Add("Content-Type", "application/json");
|
||||
if (!string.IsNullOrEmpty(ApiKey))
|
||||
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {ApiKey}");
|
||||
|
||||
|
|
Loading…
Reference in a new issue