Print fix after streaming GPT response + show CLI response when going into debugging

This commit is contained in:
Zvonimir Sabljic
2023-08-04 13:34:46 +02:00
parent 5ddec70bdc
commit b3e2009469
2 changed files with 4 additions and 0 deletions

View File

@@ -155,6 +155,9 @@ def run_command_until_success(command, timeout, convo):
if command_executed:
break
print(colored(f'Got incorrect CLI response:', 'red'))
print(cli_response)
print(colored('-------------------', 'red'))
debugging_plan = convo.send_message('dev_ops/debug.prompt',
{ 'command': command, 'debugging_try_num': i },
DEBUG_STEPS_BREAKDOWN)

View File

@@ -136,6 +136,7 @@ def stream_gpt_completion(data, req_type):
gpt_response += content
print(content, end='', flush=True)
print('\n')
if function_calls['arguments'] != '':
logger.info(f'Response via function call: {function_calls["arguments"]}')
function_calls['arguments'] = json_loads_with_escape(function_calls['arguments'])