🎨 Support custom AI request User-Agent header https://github.com/siyuan-note/siyuan/issues/10351

This commit is contained in:
Daniel 2024-02-15 10:59:37 +08:00
parent 3df54adcc5
commit 7e87c8c8ad
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
11 changed files with 59 additions and 8 deletions

View file

@ -92,7 +92,7 @@ func chatGPTContinueWrite(msg string, contextMsgs []string, cloud bool) (ret str
if cloud {
gpt = &CloudGPT{}
} else {
gpt = &OpenAIGPT{c: util.NewOpenAIClient(Conf.AI.OpenAI.APIKey, Conf.AI.OpenAI.APIProxy, Conf.AI.OpenAI.APIBaseURL)}
gpt = &OpenAIGPT{c: util.NewOpenAIClient(Conf.AI.OpenAI.APIKey, Conf.AI.OpenAI.APIProxy, Conf.AI.OpenAI.APIBaseURL, Conf.AI.OpenAI.APIUserAgent)}
}
buf := &bytes.Buffer{}