diff --git a/lib/inference/hugging_face_text_embeddings.rb b/lib/inference/hugging_face_text_embeddings.rb index 1daab50b1..e30ce57fa 100644 --- a/lib/inference/hugging_face_text_embeddings.rb +++ b/lib/inference/hugging_face_text_embeddings.rb @@ -18,6 +18,7 @@ def perform!(content) if SiteSetting.ai_hugging_face_tei_api_key.present? headers["X-API-KEY"] = SiteSetting.ai_hugging_face_tei_api_key + headers["Authorization"] = "Bearer #{SiteSetting.ai_hugging_face_tei_api_key}" end conn = Faraday.new { |f| f.adapter FinalDestination::FaradayAdapter } @@ -44,6 +45,7 @@ def rerank(content, candidates) if SiteSetting.ai_hugging_face_tei_reranker_api_key.present? headers["X-API-KEY"] = SiteSetting.ai_hugging_face_tei_reranker_api_key + headers["Authorization"] = "Bearer #{SiteSetting.ai_hugging_face_tei_reranker_api_key}" end conn = Faraday.new { |f| f.adapter FinalDestination::FaradayAdapter }