Spaces:
Sleeping
Sleeping
Merge branch 'main' of https://huggingface.co/spaces/Dkapsis/gaia_final_assignment
Browse files- agents.py +1 -1
- multi_agent.py +0 -1
- prompts.py +1 -3
- requirements.txt +2 -1
agents.py
CHANGED
@@ -123,7 +123,7 @@ def create_final_answer_agent(message):
|
|
123 |
return CodeAgent(
|
124 |
name="final_answer_agent",
|
125 |
description="Given a question and an initial answer, return the final refined answer following strict formatting rules.",
|
126 |
-
model=
|
127 |
max_steps=3,
|
128 |
tools=[],
|
129 |
)
|
|
|
123 |
return CodeAgent(
|
124 |
name="final_answer_agent",
|
125 |
description="Given a question and an initial answer, return the final refined answer following strict formatting rules.",
|
126 |
+
model=OpenAIServerModel(FINAL_ANSWER_MODEL),
|
127 |
max_steps=3,
|
128 |
tools=[],
|
129 |
)
|
multi_agent.py
CHANGED
@@ -12,7 +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
|
|
|
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
@@ -33,8 +33,6 @@ 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 a string and no other formats are acceptable.
|
37 |
-
|
38 |
Question: {message}
|
39 |
"""
|
40 |
|
@@ -65,7 +63,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
|
|
|
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 |
|
|
|
63 |
|
64 |
**Final answer:**
|
65 |
|
66 |
+
The final answer must always be in text format and no other formats are acceptable.
|
67 |
"""
|
68 |
|
69 |
return prompt
|
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]
|