diff --git a/scripts/chat.py b/scripts/chat.py index e16cee383..afec22193 100644 --- a/scripts/chat.py +++ b/scripts/chat.py @@ -69,7 +69,7 @@ def chat_with_ai( logger.debug(f"Token limit: {token_limit}") send_token_limit = token_limit - 1000 - relevant_memory = permanent_memory.get_relevant(str(full_message_history[-9:]), 10) + relevant_memory = '' if len(full_message_history) ==0 else permanent_memory.get_relevant(str(full_message_history[-9:]), 10) logger.debug(f'Memory Stats: {permanent_memory.get_stats()}')