Spaces:
Sleeping
Sleeping
testing models
Browse files- __pycache__/agents.cpython-310.pyc +0 -0
- __pycache__/prompts.cpython-310.pyc +0 -0
- agents.py +2 -2
- prompts.py +0 -5
- requirements.txt +2 -1
__pycache__/agents.cpython-310.pyc
CHANGED
|
Binary files a/__pycache__/agents.cpython-310.pyc and b/__pycache__/agents.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
|
|
|
agents.py
CHANGED
|
@@ -6,7 +6,7 @@ import prompts
|
|
| 6 |
|
| 7 |
MANAGER_MODEL = "deepseek-ai/DeepSeek-R1"
|
| 8 |
AGENT_MODEL = "Qwen/Qwen2.5-Coder-32B-Instruct"
|
| 9 |
-
FINAL_ANSWER_MODEL = "
|
| 10 |
WEB_SEARCH_MODEL = "Qwen/Qwen2.5-Coder-32B-Instruct"
|
| 11 |
IMAGE_ANALYSIS_MODEL = "HuggingFaceM4/idefics2-8b"
|
| 12 |
AUDIO_ANALYSIS_MODEL = "Qwen/Qwen2.5-Coder-32B-Instruct"
|
|
@@ -105,7 +105,7 @@ def create_final_answer_agent(message):
|
|
| 105 |
return CodeAgent(
|
| 106 |
name="final_answer_agent",
|
| 107 |
description="Given a question and an initial answer, return the final refined answer following strict formatting rules.",
|
| 108 |
-
model=
|
| 109 |
max_steps=3,
|
| 110 |
tools=[],
|
| 111 |
)
|
|
|
|
| 6 |
|
| 7 |
MANAGER_MODEL = "deepseek-ai/DeepSeek-R1"
|
| 8 |
AGENT_MODEL = "Qwen/Qwen2.5-Coder-32B-Instruct"
|
| 9 |
+
FINAL_ANSWER_MODEL = "gpt-4o" # OpenAIServerModel
|
| 10 |
WEB_SEARCH_MODEL = "Qwen/Qwen2.5-Coder-32B-Instruct"
|
| 11 |
IMAGE_ANALYSIS_MODEL = "HuggingFaceM4/idefics2-8b"
|
| 12 |
AUDIO_ANALYSIS_MODEL = "Qwen/Qwen2.5-Coder-32B-Instruct"
|
|
|
|
| 105 |
return CodeAgent(
|
| 106 |
name="final_answer_agent",
|
| 107 |
description="Given a question and an initial answer, return the final refined answer following strict formatting rules.",
|
| 108 |
+
model=OpenAIServerModel(FINAL_ANSWER_MODEL),
|
| 109 |
max_steps=3,
|
| 110 |
tools=[],
|
| 111 |
)
|
prompts.py
CHANGED
|
@@ -3,7 +3,6 @@
|
|
| 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,7 +10,6 @@ def get_web_search_prompt(message, file_path=None):
|
|
| 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,7 +17,6 @@ def get_image_analysis_prompt(message, file_path=None):
|
|
| 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,8 +33,6 @@ def get_manager_prompt(message, file_path=None):
|
|
| 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 |
"""
|
| 43 |
|
|
|
|
| 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 |
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 |
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 |
|
| 34 |
In case you cannot answer the question and there is not a good coworker, delegate to the Code Generation Agent.\n.
|
| 35 |
|
|
|
|
|
|
|
| 36 |
Question: {message}
|
| 37 |
"""
|
| 38 |
|
requirements.txt
CHANGED
|
@@ -3,4 +3,5 @@ requests
|
|
| 3 |
smolagents
|
| 4 |
pandas
|
| 5 |
duckduckgo-search
|
| 6 |
-
markdownify
|
|
|
|
|
|
| 3 |
smolagents
|
| 4 |
pandas
|
| 5 |
duckduckgo-search
|
| 6 |
+
markdownify
|
| 7 |
+
smolagents[openai]
|