Refactor so we use array_of_objects_to_string + added debugging file and AgentConvo method to copy js code to clipboard so it can be pasted into OpenAI playground for easier debugging

This commit is contained in:
Zvonimir Sabljic
2023-08-01 08:46:29 +02:00
parent 9b2db0bf13
commit 4f2edb015f
3 changed files with 48 additions and 4 deletions

View File

@@ -133,8 +133,7 @@ def get_os_info():
os_info["Mac Version"] = platform.mac_ver()[0]
# Convert the dictionary to a readable text format
output = "\n".join(f"{key}: {value}" for key, value in os_info.items())
return output
return array_of_objects_to_string(os_info)
def execute_step(matching_step, current_step):
@@ -146,3 +145,6 @@ def execute_step(matching_step, current_step):
def generate_app_data(args):
return {'app_id': args['app_id'], 'app_type': args['app_type']}
def array_of_objects_to_string(array):
return '\n'.join([f'{key}: {value}' for key, value in array.items()])