mirror of
https://github.com/OMGeeky/gpt-pilot.git
synced 2026-01-06 11:19:33 +01:00
Added human intervention step + renamed verification to intervention
This commit is contained in:
@@ -100,7 +100,7 @@ class Project:
|
||||
with open(full_path, 'w', encoding='utf-8') as f:
|
||||
f.write(file_snapshot.content)
|
||||
|
||||
def ask_for_human_verification(self, message, description):
|
||||
def ask_for_human_intervention(self, message, description):
|
||||
print(colored(message, "yellow"))
|
||||
print(description)
|
||||
answer = ''
|
||||
|
||||
@@ -63,6 +63,8 @@ class Developer(Agent):
|
||||
code_monkey = CodeMonkey(self.project, self)
|
||||
updated_convo = code_monkey.implement_code_changes(convo, step['code_change_description'], i)
|
||||
self.test_code_changes(code_monkey, updated_convo)
|
||||
elif step['type'] == 'human_intervention':
|
||||
self.project.ask_for_human_intervention(step['human_intervention_description'])
|
||||
else:
|
||||
raise Exception('Step type must be either run_command or code_change.')
|
||||
|
||||
@@ -135,7 +137,7 @@ class Developer(Agent):
|
||||
code_monkey.implement_code_changes(convo, automated_test_description, 0)
|
||||
elif test_type == 'manual_test':
|
||||
# TODO make the message better
|
||||
self.project.ask_for_human_verification(
|
||||
self.project.ask_for_human_intervention(
|
||||
'Message from Euclid: I need your help. Can you please test if this was successful?',
|
||||
manual_test_description
|
||||
)
|
||||
|
||||
@@ -156,7 +156,7 @@ def run_command_until_success(command, timeout, convo):
|
||||
command = response
|
||||
|
||||
if not command_executed:
|
||||
convo.agent.project.ask_for_human_verification(
|
||||
convo.agent.project.ask_for_human_intervention(
|
||||
'It seems like I cannot debug this problem by myself. Can you please help me and try debugging it yourself?',
|
||||
command
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user