Run through gpt_4v agent pipeline

This commit is contained in:
Timothyxxx
2023-11-29 20:21:57 +08:00
parent 28c6edd6b3
commit 3d0d9d7758
8 changed files with 135 additions and 47 deletions

View File

@@ -11,13 +11,9 @@ def execute_command():
# Execute the command without any safety checks.
try:
process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = process.communicate()
subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
return jsonify({
'status': 'success',
'output': stdout.decode(),
'error': stderr.decode()
})
except Exception as e:
return jsonify({