This commit is contained in:
GH Action - Upstream Sync
2025-01-27 01:20:14 +00:00
4 changed files with 4 additions and 4 deletions

View File

@@ -71,7 +71,7 @@ class BraveRetSearch(BaseRetriever):
for doc in docs:
yield {"source": doc}
if len(self.chat_history) > 1:
if len(self.chat_history) > 0:
for i in self.chat_history:
if "prompt" in i and "response" in i:
messages_combine.append({"role": "user", "content": i["prompt"]})

View File

@@ -71,7 +71,7 @@ class ClassicRAG(BaseRetriever):
for doc in docs:
yield {"source": doc}
if len(self.chat_history) > 1:
if len(self.chat_history) > 0:
for i in self.chat_history:
if "prompt" in i and "response" in i:
messages_combine.append({"role": "user", "content": i["prompt"]})

View File

@@ -88,7 +88,7 @@ class DuckDuckSearch(BaseRetriever):
for doc in docs:
yield {"source": doc}
if len(self.chat_history) > 1:
if len(self.chat_history) > 0:
for i in self.chat_history:
if "prompt" in i and "response" in i:
messages_combine.append({"role": "user", "content": i["prompt"]})