fix roles in retriever layer

This commit is contained in:
Alex
2025-01-21 09:31:38 +00:00
parent 1086bfe1ba
commit 94f682e461
2 changed files with 6 additions and 10 deletions

View File

@@ -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(