Spaces:
Sleeping
Sleeping
minor promt fix
Browse files- __pycache__/agents.cpython-310.pyc +0 -0
- __pycache__/multi_agent.cpython-310.pyc +0 -0
- __pycache__/prompts.cpython-310.pyc +0 -0
- __pycache__/tools.cpython-310.pyc +0 -0
- multi_agent.py +1 -13
- prompts.py +5 -2
__pycache__/agents.cpython-310.pyc
CHANGED
|
Binary files a/__pycache__/agents.cpython-310.pyc and b/__pycache__/agents.cpython-310.pyc differ
|
|
|
__pycache__/multi_agent.cpython-310.pyc
CHANGED
|
Binary files a/__pycache__/multi_agent.cpython-310.pyc and b/__pycache__/multi_agent.cpython-310.pyc differ
|
|
|
__pycache__/prompts.cpython-310.pyc
CHANGED
|
Binary files a/__pycache__/prompts.cpython-310.pyc and b/__pycache__/prompts.cpython-310.pyc differ
|
|
|
__pycache__/tools.cpython-310.pyc
CHANGED
|
Binary files a/__pycache__/tools.cpython-310.pyc and b/__pycache__/tools.cpython-310.pyc differ
|
|
|
multi_agent.py
CHANGED
|
@@ -12,18 +12,6 @@ import agents
|
|
| 12 |
def orchestrate(message, file_path):
|
| 13 |
final_prompt = prompts.get_manager_prompt(message, file_path)
|
| 14 |
initial_answer = agents.create_manager_agent(message).run(message)
|
| 15 |
-
|
| 16 |
final_answer = agents.create_final_answer_agent(message).run(prompts.get_final_answer_prompt(message, initial_answer))
|
| 17 |
|
| 18 |
-
return final_answer
|
| 19 |
-
# def run_manager_workflow(message, file_path=None):
|
| 20 |
-
# final_prompt = prompts.get_manager_prompt(message, file_path)
|
| 21 |
-
# initial_answer = agents.create_simple_web_search_agent(message).run(message)
|
| 22 |
-
|
| 23 |
-
# final_answer = agents.create_final_answer_agent(message).run(prompts.get_final_answer_prompt(message, initial_answer))
|
| 24 |
-
|
| 25 |
-
# return final_answer
|
| 26 |
-
|
| 27 |
-
# final_answer = run_manager_workflow(message)
|
| 28 |
-
|
| 29 |
-
# return final_answer
|
|
|
|
| 12 |
def orchestrate(message, file_path):
|
| 13 |
final_prompt = prompts.get_manager_prompt(message, file_path)
|
| 14 |
initial_answer = agents.create_manager_agent(message).run(message)
|
|
|
|
| 15 |
final_answer = agents.create_final_answer_agent(message).run(prompts.get_final_answer_prompt(message, initial_answer))
|
| 16 |
|
| 17 |
+
return final_answer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
prompts.py
CHANGED
|
@@ -3,6 +3,7 @@
|
|
| 3 |
def get_web_search_prompt(message, file_path=None):
|
| 4 |
prompt = f"""
|
| 5 |
As an expert web search assistant, you search the web to answer the question. Your task is to search the web and provide accurate answers to the question: {message}
|
|
|
|
| 6 |
"""
|
| 7 |
|
| 8 |
return prompt
|
|
@@ -10,6 +11,7 @@ def get_web_search_prompt(message, file_path=None):
|
|
| 10 |
def get_image_analysis_prompt(message, file_path=None):
|
| 11 |
prompt = f"""
|
| 12 |
As an expert image analysis assistant, you analyze the image to answer the question. Given a question and image file, analyze the image and answer the question: {message}
|
|
|
|
| 13 |
"""
|
| 14 |
|
| 15 |
return prompt
|
|
@@ -17,6 +19,7 @@ def get_image_analysis_prompt(message, file_path=None):
|
|
| 17 |
def get_audio_analysis_prompt(message, file_path=None):
|
| 18 |
prompt = f"""
|
| 19 |
As an expert audio analysis assistant, you analyze the audio to answer the question. Given a question and audio file, analyze the audio and answer the question: {message}
|
|
|
|
| 20 |
"""
|
| 21 |
|
| 22 |
return prompt
|
|
@@ -33,7 +36,7 @@ def get_manager_prompt(message, file_path=None):
|
|
| 33 |
|
| 34 |
In case you cannot answer the question and there is not a good coworker, delegate to the Code Generation Agent.\n.
|
| 35 |
|
| 36 |
-
The final answer must always be
|
| 37 |
|
| 38 |
Question: {message}
|
| 39 |
"""
|
|
@@ -65,7 +68,7 @@ def get_final_answer_prompt(message: str, initial_answer: str):
|
|
| 65 |
|
| 66 |
**Final answer:**
|
| 67 |
|
| 68 |
-
The final answer must always be
|
| 69 |
"""
|
| 70 |
|
| 71 |
return prompt
|
|
|
|
| 3 |
def get_web_search_prompt(message, file_path=None):
|
| 4 |
prompt = f"""
|
| 5 |
As an expert web search assistant, you search the web to answer the question. Your task is to search the web and provide accurate answers to the question: {message}
|
| 6 |
+
The final answer must always be in text format and no other formats are acceptable.
|
| 7 |
"""
|
| 8 |
|
| 9 |
return prompt
|
|
|
|
| 11 |
def get_image_analysis_prompt(message, file_path=None):
|
| 12 |
prompt = f"""
|
| 13 |
As an expert image analysis assistant, you analyze the image to answer the question. Given a question and image file, analyze the image and answer the question: {message}
|
| 14 |
+
The final answer must always be in text format and no other formats are acceptable.
|
| 15 |
"""
|
| 16 |
|
| 17 |
return prompt
|
|
|
|
| 19 |
def get_audio_analysis_prompt(message, file_path=None):
|
| 20 |
prompt = f"""
|
| 21 |
As an expert audio analysis assistant, you analyze the audio to answer the question. Given a question and audio file, analyze the audio and answer the question: {message}
|
| 22 |
+
The final answer must always be in text format and no other formats are acceptable.
|
| 23 |
"""
|
| 24 |
|
| 25 |
return prompt
|
|
|
|
| 36 |
|
| 37 |
In case you cannot answer the question and there is not a good coworker, delegate to the Code Generation Agent.\n.
|
| 38 |
|
| 39 |
+
The final answer must always be in text format and no other formats are acceptable.
|
| 40 |
|
| 41 |
Question: {message}
|
| 42 |
"""
|
|
|
|
| 68 |
|
| 69 |
**Final answer:**
|
| 70 |
|
| 71 |
+
The final answer must always be in text format and no other formats are acceptable.
|
| 72 |
"""
|
| 73 |
|
| 74 |
return prompt
|