Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix: typo Bearer token (#8998)

Yongteng Leia2f73af1a4d2
diff --git a/rag/llm/embedding_model.py b/rag/llm/embedding_model.py
index 5c99a41397..415e9b7122 100644
--- a/rag/llm/embedding_model.py
+++ b/rag/llm/embedding_model.py
@@ -283,7 +283,7 @@ class OllamaEmbed(Base):
_special_tokens = ["<|endoftext|>"]
def __init__(self, key, model_name, **kwargs):
- self.client = Client(host=kwargs["base_url"]) if not key or key == "x" else Client(host=kwargs["base_url"], headers={"Authorization": f"Bear {key}"})
+ self.client = Client(host=kwargs["base_url"]) if not key or key == "x" else Client(host=kwargs["base_url"], headers={"Authorization": f"Bearer {key}"})
self.model_name = model_name
def encode(self, texts: list):
diff --git a/rag/llm/tts_model.py b/rag/llm/tts_model.py
index f606405468..32e7064b3b 100644
--- a/rag/llm/tts_model.py
+++ b/rag/llm/tts_model.py
@@ -314,7 +314,7 @@ class OllamaTTS(Base):
self.base_url = base_url
self.headers = {"Content-Type": "application/json"}
if key and key != "x":
- self.headers["Authorization"] = f"Bear {key}"
+ self.headers["Authorization"] = f"Bearer {key}"
def tts(self, text, voice="standard-voice"):
payload = {"model": self.model_name, "voice": voice, "input": text}