Skip to content

Commit

Permalink
change master prompt to system prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
waynehamadi authored and p-i- committed Apr 16, 2023
1 parent 3b80253 commit 89e0e89
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions autogpt/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def main() -> None:
parse_arguments()
logger.set_level(logging.DEBUG if cfg.debug_mode else logging.INFO)
ai_name = ""
master_prompt = construct_prompt()
system_prompt = construct_prompt()
# print(prompt)
# Initialize variables
full_message_history = []
Expand All @@ -40,7 +40,7 @@ def main() -> None:
memory=memory,
full_message_history=full_message_history,
next_action_count=next_action_count,
master_prompt=master_prompt,
system_prompt=system_prompt,
triggering_prompt=triggering_prompt,
)
agent.start_interaction_loop()
Expand Down
14 changes: 7 additions & 7 deletions autogpt/agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ class Agent:
memory: The memory object to use.
full_message_history: The full message history.
next_action_count: The number of actions to execute.
master_prompt: The master prompt is the initial prompt that defines everything the AI needs to know to achieve its task successfully.
Currently, the dynamic and customizable information in the master prompt are ai_name, description and goals.
system_prompt: The system prompt is the initial prompt that defines everything the AI needs to know to achieve its task successfully.
Currently, the dynamic and customizable information in the system prompt are ai_name, description and goals.
triggering_prompt: The last sentence the AI will see before answering. For Auto-GPT, this prompt is:
Determine which next command to use, and respond using the format specified above:
The triggering prompt is not part of the master prompt because between the master prompt and the triggering
The triggering prompt is not part of the system prompt because between the system prompt and the triggering
prompt we have contextual information that can distract the AI and make it forget that its goal is to find the next task to achieve.
MASTER PROMPT
SYSTEM PROMPT
CONTEXTUAL INFORMATION (memory, previous conversations, anything relevant)
TRIGGERING PROMPT
Expand All @@ -39,14 +39,14 @@ def __init__(
memory,
full_message_history,
next_action_count,
master_prompt,
system_prompt,
triggering_prompt,
):
self.ai_name = ai_name
self.memory = memory
self.full_message_history = full_message_history
self.next_action_count = next_action_count
self.master_prompt = master_prompt
self.system_prompt = system_prompt
self.triggering_prompt = triggering_prompt

def start_interaction_loop(self):
Expand All @@ -71,7 +71,7 @@ def start_interaction_loop(self):
# Send message to AI, get response
with Spinner("Thinking... "):
assistant_reply = chat_with_ai(
self.master_prompt,
self.system_prompt,
self.triggering_prompt,
self.full_message_history,
self.memory,
Expand Down

0 comments on commit 89e0e89

Please sign in to comment.