sirine1712 commited on
Commit
9b927a8
·
verified ·
1 Parent(s): 518f90d

Update multiagents.py

Browse files
Files changed (1) hide show
  1. multiagents.py +11 -5
multiagents.py CHANGED
@@ -112,11 +112,17 @@ class MultiAgent:
112
  Finding the correct answer to the question need reasoning and plannig, read the question carrefully, think step by step and do not skip any steps.
113
  """
114
 
115
- question = prefix + "\nTHE QUESTION:\n" + question + '\n' + myprompts.output_format
116
-
117
- fixed_answer = ""
118
-
119
- fixed_answer = manager_agent.run(question)
 
 
 
 
 
 
120
 
121
  return fixed_answer
122
  except Exception as e:
 
112
  Finding the correct answer to the question need reasoning and plannig, read the question carrefully, think step by step and do not skip any steps.
113
  """
114
 
115
+ full_prompt = (
116
+ prefix.strip()
117
+ + "\n\nTHE QUESTION:\n"
118
+ + question.strip()
119
+ + "\n\n"
120
+ + myprompts.output_format.strip()
121
+ )
122
+ if not isinstance(full_prompt, str):
123
+ full_prompt = str(full_prompt)
124
+
125
+ fixed_answer = manager_agent.run(full_prompt)
126
 
127
  return fixed_answer
128
  except Exception as e: