Merge pull request #559 from Torantulino/memory-improvements
Tweaks how memory is presented to the AIpull/548/head^2
commit
3923c19524
|
@ -27,7 +27,7 @@ def generate_context(prompt, relevant_memory, full_message_history, model):
|
|||
current_context = [
|
||||
create_chat_message(
|
||||
"system", prompt), create_chat_message(
|
||||
"system", f"Permanent memory: {relevant_memory}")]
|
||||
"system", f"This reminds you of these events from your past:\n{relevant_memory}\n\n")]
|
||||
|
||||
# Add messages from the full message history until we reach the token limit
|
||||
next_message_to_add_index = len(full_message_history) - 1
|
||||
|
|
|
@ -109,7 +109,7 @@ def execute_command(command_name, arguments):
|
|||
elif command_name == "task_complete":
|
||||
shutdown()
|
||||
else:
|
||||
return f"Unknown command {command_name}"
|
||||
return f"Unknown command '{command_name}'. Please refer to the 'COMMANDS' list for availabe commands and only respond in the specified JSON format."
|
||||
# All errors, return "Error: + error message"
|
||||
except Exception as e:
|
||||
return "Error: " + str(e)
|
||||
|
|
Loading…
Reference in New Issue