mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-10-16 14:43:42 +08:00
🎨 Change the method of getting channel parameters
This commit is contained in:
@@ -32,9 +32,9 @@ type AliProvider struct {
|
||||
func (p *AliProvider) GetRequestHeaders() (headers map[string]string) {
|
||||
headers = make(map[string]string)
|
||||
p.CommonRequestHeaders(headers)
|
||||
headers["Authorization"] = fmt.Sprintf("Bearer %s", p.Context.GetString("api_key"))
|
||||
if p.Context.GetString("plugin") != "" {
|
||||
headers["X-DashScope-Plugin"] = p.Context.GetString("plugin")
|
||||
headers["Authorization"] = fmt.Sprintf("Bearer %s", p.Channel.Key)
|
||||
if p.Channel.Other != "" {
|
||||
headers["X-DashScope-Plugin"] = p.Channel.Other
|
||||
}
|
||||
|
||||
return headers
|
||||
|
Reference in New Issue
Block a user