feat: support model remap now

This commit is contained in:
JustSong
2023-06-27 13:42:45 +08:00
parent 431d505f79
commit 0941e294bf
5 changed files with 57 additions and 12 deletions

View File

@@ -88,6 +88,7 @@ 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.Request.Header.Set("Authorization", fmt.Sprintf("Bearer %s", channel.Key))
c.Set("base_url", channel.BaseURL)
if channel.Type == common.ChannelTypeAzure {