fix: make the 'openai_organization' parameter actually work.

This commit is contained in:
我秦始皇
2024-03-18 02:19:59 -07:00
committed by GitHub
parent 0fb98e44a7
commit f63ad9c03c
3 changed files with 5 additions and 6 deletions

View File

@@ -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]