Skip to content

Commit

Permalink
Merge pull request #25 from BillSchumacher/dev
Browse files Browse the repository at this point in the history
Fix history.
  • Loading branch information
BillSchumacher authored May 9, 2023
2 parents 593f3c5 + 93c1ed1 commit bdd07b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion autogpt/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ def chat_with_ai(
if len(full_message_history) == 0:
relevant_memory = ""
else:
recent_history = full_message_history[-5:]
recent_history = [history.to_dict() for history in full_message_history[-5:]]
logger.debug(f"Recent history: {recent_history}")
relevant_memories = permanent_memory.get_relevant(str(recent_history), 5)
relevant_memory = str(relevant_memories)

Expand Down

0 comments on commit bdd07b1

Please sign in to comment.