From 60aac77c083b5174432f844627eda8d299a18592 Mon Sep 17 00:00:00 2001 From: "1808837298@qq.com" <1808837298@qq.com> Date: Thu, 20 Feb 2025 01:28:15 +0800 Subject: [PATCH] fix: Correct Ollama channel authentication header setting --- relay/channel/ollama/adaptor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relay/channel/ollama/adaptor.go b/relay/channel/ollama/adaptor.go index 609eaa6d..7e1c6237 100644 --- a/relay/channel/ollama/adaptor.go +++ b/relay/channel/ollama/adaptor.go @@ -39,7 +39,7 @@ func (a *Adaptor) GetRequestURL(info *relaycommon.RelayInfo) (string, error) { func (a *Adaptor) SetupRequestHeader(c *gin.Context, req *http.Header, info *relaycommon.RelayInfo) error { channel.SetupApiRequestHeader(info, c, req) - header.Set("Authorization", "Bearer "+info.ApiKey) + req.Set("Authorization", "Bearer "+info.ApiKey) return nil }