diff --git a/application/retriever/brave_search.py b/application/retriever/brave_search.py index 3d9ae89e..efcae8ab 100644 --- a/application/retriever/brave_search.py +++ b/application/retriever/brave_search.py @@ -74,12 +74,10 @@ class BraveRetSearch(BaseRetriever): if len(self.chat_history) > 1: for i in self.chat_history: if "prompt" in i and "response" in i: - messages_combine.append( - {"role": "user", "content": i["prompt"]} - ) - messages_combine.append( - {"role": "system", "content": i["response"]} - ) + messages_combine.append({"role": "user", "content": i["prompt"]}) + messages_combine.append( + {"role": "assistant", "content": i["response"]} + ) messages_combine.append({"role": "user", "content": self.question}) llm = LLMCreator.create_llm( diff --git a/application/retriever/duckduck_search.py b/application/retriever/duckduck_search.py index fa19ead0..321c6fd9 100644 --- a/application/retriever/duckduck_search.py +++ b/application/retriever/duckduck_search.py @@ -91,11 +91,9 @@ class DuckDuckSearch(BaseRetriever): if len(self.chat_history) > 1: for i in self.chat_history: if "prompt" in i and "response" in i: + messages_combine.append({"role": "user", "content": i["prompt"]}) messages_combine.append( - {"role": "user", "content": i["prompt"]} - ) - messages_combine.append( - {"role": "system", "content": i["response"]} + {"role": "assistant", "content": i["response"]} ) messages_combine.append({"role": "user", "content": self.question})