Skip to content

Commit

Permalink
Merge pull request #168 from Dhanushkumar-S-G/main
Browse files Browse the repository at this point in the history
added args to get_sys_message
  • Loading branch information
LeonOstrez authored Oct 10, 2023
2 parents dba38e7 + 801c8c7 commit 56b0947
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pilot/helpers/AgentConvo.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(self, agent):
self.high_level_step = self.agent.project.current_step

# add system message
system_message = get_sys_message(self.agent.role)
system_message = get_sys_message(self.agent.role,self.agent.project.args)
logger.info('\n>>>>>>>>>> System Prompt >>>>>>>>>>\n%s\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>',
system_message['content'])
self.messages.append(system_message)
Expand Down
4 changes: 2 additions & 2 deletions pilot/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ def get_prompt_components():
return prompts_components


def get_sys_message(role):
def get_sys_message(role,args=None):
"""
:param role: 'product_owner', 'architect', 'dev_ops', 'tech_lead', 'full_stack_developer', 'code_monkey'
:return: { "role": "system", "content": "You are a {role}... You do..." }
"""
content = get_prompt(f'system_messages/{role}.prompt')
content = get_prompt(f'system_messages/{role}.prompt',args)

return {
"role": "system",
Expand Down

0 comments on commit 56b0947

Please sign in to comment.