skip getting relevant memory if no message history
parent
cc8fc99c50
commit
c5188d5611
|
@ -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()}')
|
||||
|
||||
|
|
Loading…
Reference in New Issue