Преглед на файлове

Merge pull request #773 from wellcoming/patch-1

fix: Fix Ollama channel authentication
Calcium-Ion преди 1 година
родител
ревизия
6e0046f73c
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  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
 }