소스 검색

fix: Fix Ollama channel authentication

Coming 1 년 전
부모
커밋
a13f4d6c56
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
 }