Skip to content

Commit 93c1ed1

Browse files
Fix history.
1 parent 4daacf8 commit 93c1ed1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

autogpt/chat.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ def chat_with_ai(
6464
if len(full_message_history) == 0:
6565
relevant_memory = ""
6666
else:
67-
recent_history = full_message_history[-5:]
67+
recent_history = [history.to_dict() for history in full_message_history[-5:]]
68+
logger.debug(f"Recent history: {recent_history}")
6869
relevant_memories = permanent_memory.get_relevant(str(recent_history), 5)
6970
relevant_memory = str(relevant_memories)
7071

0 commit comments

Comments
 (0)