Skip to content

Commit

Permalink
Hotfix for chat_memory (#36)
Browse files Browse the repository at this point in the history
* Hotfix

* Lint
  • Loading branch information
Enias Cailliau committed Apr 14, 2023
1 parent 644d91f commit c659ae2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/steamship_langchain/memory/chat_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def saved_messages(self) -> List[BaseMessage]:
if b.text.startswith(self.HUMAN_PREFIX):
messages.append(HumanMessage(content=b.text[len(self.HUMAN_PREFIX) :]))
elif b.text.startswith(self.AI_PREFIX):
messages.append(HumanMessage(content=b.text[len(self.HUMAN_PREFIX) :]))
messages.append(HumanMessage(content=b.text[len(self.AI_PREFIX) :]))
else:
raise ValueError(f"Found unsupported message type: {b.text}")
return messages
Expand Down

0 comments on commit c659ae2

Please sign in to comment.