Update multi_agent.py
Browse files- multi_agent.py +7 -1
multi_agent.py
CHANGED
|
@@ -59,10 +59,16 @@ def run_multi_agent(llm, message):
|
|
| 59 |
for file in os.listdir("coding"):
|
| 60 |
if file:
|
| 61 |
_, file_extension = os.path.splitext(file)
|
|
|
|
|
|
|
| 62 |
if file_extension == ".sh":
|
| 63 |
file_name_sh = file
|
| 64 |
|
| 65 |
try:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
file_path_sh = "coding/" + file_name_sh
|
| 67 |
code_sh = read_file(file_path_sh)
|
| 68 |
markdown_code_sh = format_as_markdown(code_sh)
|
|
@@ -73,7 +79,7 @@ def run_multi_agent(llm, message):
|
|
| 73 |
except Exception as e:
|
| 74 |
print(f"An unexpected error occurred: {e}")
|
| 75 |
|
| 76 |
-
result = markdown_code_png + "\n" + markdown_code_sh
|
| 77 |
|
| 78 |
print("===")
|
| 79 |
print(result)
|
|
|
|
| 59 |
for file in os.listdir("coding"):
|
| 60 |
if file:
|
| 61 |
_, file_extension = os.path.splitext(file)
|
| 62 |
+
if file_extension == ".py":
|
| 63 |
+
file_name_py = file
|
| 64 |
if file_extension == ".sh":
|
| 65 |
file_name_sh = file
|
| 66 |
|
| 67 |
try:
|
| 68 |
+
file_path_py = "coding/" + file_name_py
|
| 69 |
+
code_py = read_file(file_path_py)
|
| 70 |
+
markdown_code_py = format_as_markdown(code_py)
|
| 71 |
+
|
| 72 |
file_path_sh = "coding/" + file_name_sh
|
| 73 |
code_sh = read_file(file_path_sh)
|
| 74 |
markdown_code_sh = format_as_markdown(code_sh)
|
|
|
|
| 79 |
except Exception as e:
|
| 80 |
print(f"An unexpected error occurred: {e}")
|
| 81 |
|
| 82 |
+
result = markdown_code_png + "\n" + markdown_code_py + "\n" + markdown_code_sh
|
| 83 |
|
| 84 |
print("===")
|
| 85 |
print(result)
|