Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

Merge pull request #233 from russellocean/master

Toran Bruce Richards672bb5e620d2
diff --cc scripts/main.py
index 2b76842f51,7f1f24b1e8..a79fd553ce
--- a/scripts/main.py
+++ b/scripts/main.py
@@@ -295,10 -289,9 +296,9 @@@ while True
prompt,
user_input,
full_message_history,
- mem.permanent_memory,
+ memory,
cfg.fast_token_limit) # TODO: This hardcodes the model to use GPT3.5. Make this an argument
- # print("assistant reply: "+assistant_reply)
# Print Assistant thoughts
print_assistant_thoughts(assistant_reply)
@@@ -355,13 -356,9 +363,15 @@@
result = f"Human feedback: {user_input}"
else:
result = f"Command {command_name} returned: {cmd.execute_command(command_name, arguments)}"
+ if next_action_count > 0:
+ next_action_count -= 1
+ memory_to_add = f"Assistant Reply: {assistant_reply} " \
+ f"\nResult: {result} " \
+ f"\nHuman Feedback: {user_input} "
+
+ memory.add(memory_to_add)
+
# Check if there's a result from the command append it to the message
# history
if result is not None: