mirror of
https://github.com/linux-do/new-api.git
synced 2025-12-24 23:55:56 +08:00
fix: make the 'openai_organization' parameter actually work.
This commit is contained in:
@@ -155,6 +155,9 @@ func Distribute() func(c *gin.Context) {
|
||||
if channel.AutoBan != nil && *channel.AutoBan == 0 {
|
||||
ban = false
|
||||
}
|
||||
if nil != channel.OpenAIOrganization {
|
||||
c.Request.Header.Set("OpenAI-Organization", *channel.OpenAIOrganization)
|
||||
}
|
||||
c.Set("auto_ban", ban)
|
||||
c.Set("model_mapping", channel.GetModelMapping())
|
||||
c.Request.Header.Set("Authorization", fmt.Sprintf("Bearer %s", channel.Key))
|
||||
|
||||
Reference in New Issue
Block a user