Merge branch 'songquanpeng:main' into main

This commit is contained in:
Calcium-Ion authored and GitHub committed 2023-09-18 22:52:10 +08:00
commit 7188dedd27
7 files changed
+51 -25

No files matched your search

+2 -2
View File
@@ -94,9 +94,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)