Explorar el Código

fix: Correct Ollama channel authentication header setting

1808837298@qq.com hace 1 año
padre
commit
60aac77c08
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      relay/channel/ollama/adaptor.go

+ 1 - 1
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
 }