mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
🎨 Azure OpenAI AI support https://github.com/siyuan-note/siyuan/issues/8095
This commit is contained in:
parent
7e87c8c8ad
commit
a2f95e3920
9 changed files with 47 additions and 8 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue