Update multi_agent.py
Browse files- multi_agent.py +13 -21
multi_agent.py
CHANGED
@@ -50,9 +50,15 @@ def run_multi_agent(llm, message):
|
|
50 |
max_turns=10
|
51 |
)
|
52 |
|
|
|
|
|
|
|
|
|
|
|
53 |
image_data = read_image_file("/home/user/app/coding/ytd_stock_gains.png")
|
54 |
markdown_code_png = generate_markdown_image(image_data)
|
55 |
|
|
|
56 |
file_name_py = ""
|
57 |
file_name_sh = ""
|
58 |
|
@@ -78,27 +84,13 @@ def run_multi_agent(llm, message):
|
|
78 |
print(f"Error reading file '{file_path_sh}': {e.strerror}")
|
79 |
except Exception as e:
|
80 |
print(f"An unexpected error occurred: {e}")
|
|
|
|
|
|
|
|
|
81 |
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
#print("===")
|
86 |
-
#print(chat_result.chat_history)
|
87 |
-
#print("===")
|
88 |
-
#print(chat_result.chat_history[0])
|
89 |
-
#print("===")
|
90 |
-
chat = ""
|
91 |
-
|
92 |
-
for message in chat_result.chat_history:
|
93 |
-
chat += f"**{message['role']}**\n{message['content']}\n\n"
|
94 |
-
print("===")
|
95 |
-
#
|
96 |
-
|
97 |
-
#result = f"{markdown_code_png}\n{markdown_code_sh}\n{markdown_code_py}\n{chat}"
|
98 |
-
result = f"{markdown_code_png}\n\n\n{chat}"
|
99 |
-
|
100 |
-
#print("===")
|
101 |
-
#print(result)
|
102 |
-
#print("===")
|
103 |
|
104 |
return result
|
|
|
50 |
max_turns=10
|
51 |
)
|
52 |
|
53 |
+
chat = ""
|
54 |
+
|
55 |
+
for message in chat_result.chat_history:
|
56 |
+
chat += f"**{message['role']}**\n{message['content']}\n\n"
|
57 |
+
|
58 |
image_data = read_image_file("/home/user/app/coding/ytd_stock_gains.png")
|
59 |
markdown_code_png = generate_markdown_image(image_data)
|
60 |
|
61 |
+
'''
|
62 |
file_name_py = ""
|
63 |
file_name_sh = ""
|
64 |
|
|
|
84 |
print(f"Error reading file '{file_path_sh}': {e.strerror}")
|
85 |
except Exception as e:
|
86 |
print(f"An unexpected error occurred: {e}")
|
87 |
+
'''
|
88 |
+
|
89 |
+
#result = f"{markdown_code_png}\n\n{markdown_code_sh}\n\n{markdown_code_py}\n\n{chat}"
|
90 |
+
result = f"{markdown_code_png}\n\n{chat}"
|
91 |
|
92 |
+
print("===")
|
93 |
+
print(result)
|
94 |
+
print("===")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
|
96 |
return result
|