Explorar o código

fix: Fix Ollama channel authentication

Coming hai 1 ano
pai
achega
a13f4d6c56
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      relay/channel/ollama/adaptor.go

+ 1 - 0
relay/channel/ollama/adaptor.go

@@ -39,6 +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)
 	return nil
 }