bstraehle commited on
Commit
8e11aba
1 Parent(s): b08075f

Update multi_agent.py

Browse files
Files changed (1) hide show
  1. multi_agent.py +5 -3
multi_agent.py CHANGED
@@ -1,4 +1,4 @@
1
- import base64, os
2
 
3
  from autogen import ConversableAgent, AssistantAgent
4
  from autogen.coding import LocalCommandLineCodeExecutor
@@ -51,8 +51,10 @@ def run_multi_agent(llm, message):
51
  )
52
 
53
  chat_history = ""
54
-
55
- for message in chat_history.messages:
 
 
56
  chat_history += f"Role: {message['role']}, Content: {message['content']}\n"
57
 
58
  image_data = read_image_file("/home/user/app/coding/ytd_stock_gains.png")
 
1
+ import base64, json, os
2
 
3
  from autogen import ConversableAgent, AssistantAgent
4
  from autogen.coding import LocalCommandLineCodeExecutor
 
51
  )
52
 
53
  chat_history = ""
54
+
55
+ chat_json = json.loads(chat_history_str)
56
+
57
+ for message in chat_json["messages"]:
58
  chat_history += f"Role: {message['role']}, Content: {message['content']}\n"
59
 
60
  image_data = read_image_file("/home/user/app/coding/ytd_stock_gains.png")