This commit is contained in:
Daniel 2024-02-15 11:28:38 +08:00
parent 7e87c8c8ad
commit a2f95e3920
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
9 changed files with 47 additions and 8 deletions

View file

@ -36,6 +36,7 @@ type OpenAI struct {
APIMaxTokens int `json:"apiMaxTokens"`
APIBaseURL string `json:"apiBaseURL"`
APIUserAgent string `json:"apiUserAgent"`
APIProvider string `json:"apiProvider"` // OpenAI, Azure
}
func NewAI() *AI {
@ -44,6 +45,7 @@ func NewAI() *AI {
APIModel: openai.GPT3Dot5Turbo,
APIBaseURL: "https://api.openai.com/v1",
APIUserAgent: util.UserAgent,
APIProvider: "OpenAI",
}
openAI.APIKey = os.Getenv("SIYUAN_OPENAI_API_KEY")