♻️ refactor: split relay

This commit is contained in:
Martial BE
2023-11-28 18:32:26 +08:00
parent 53da7134b2
commit 902c2faa2c
58 changed files with 4248 additions and 3369 deletions

View File

@@ -80,7 +80,8 @@ func Distribute() func(c *gin.Context) {
c.Set("channel_id", channel.Id)
c.Set("channel_name", channel.Name)
c.Set("model_mapping", channel.GetModelMapping())
c.Request.Header.Set("Authorization", fmt.Sprintf("Bearer %s", channel.Key))
c.Set("api_key", channel.Key)
// c.Request.Header.Set("Authorization", fmt.Sprintf("Bearer %s", channel.Key))
c.Set("base_url", channel.GetBaseURL())
switch channel.Type {
case common.ChannelTypeAzure: