mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-10 16:13:42 +08:00
fix: make the 'openai_organization' parameter actually work.
This commit is contained in:
@@ -24,6 +24,7 @@ type RelayInfo struct {
|
||||
ApiVersion string
|
||||
PromptTokens int
|
||||
ApiKey string
|
||||
Organization string
|
||||
BaseUrl string
|
||||
}
|
||||
|
||||
@@ -52,6 +53,7 @@ func GenRelayInfo(c *gin.Context) *RelayInfo {
|
||||
ApiType: apiType,
|
||||
ApiVersion: c.GetString("api_version"),
|
||||
ApiKey: strings.TrimPrefix(c.Request.Header.Get("Authorization"), "Bearer "),
|
||||
Organization: c.GetString("channel_organization"),
|
||||
}
|
||||
if info.BaseUrl == "" {
|
||||
info.BaseUrl = common.ChannelBaseURLs[channelType]
|
||||
|
||||
Reference in New Issue
Block a user