mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-10-14 14:30:26 +00:00
fix: fix unable to set zero value for base url & model mapping
This commit is contained in:
@@ -82,9 +82,9 @@ func Distribute() func(c *gin.Context) {
|
||||
c.Set("channel", channel.Type)
|
||||
c.Set("channel_id", channel.Id)
|
||||
c.Set("channel_name", channel.Name)
|
||||
c.Set("model_mapping", channel.ModelMapping)
|
||||
c.Set("model_mapping", channel.GetModelMapping())
|
||||
c.Request.Header.Set("Authorization", fmt.Sprintf("Bearer %s", channel.Key))
|
||||
c.Set("base_url", channel.BaseURL)
|
||||
c.Set("base_url", channel.GetBaseURL())
|
||||
switch channel.Type {
|
||||
case common.ChannelTypeAzure:
|
||||
c.Set("api_version", channel.Other)
|
||||
|
Reference in New Issue
Block a user