Update agent.py
Browse files
agent.py
CHANGED
|
@@ -31,7 +31,7 @@ MAX_ARXIV_RESULTS = 3
|
|
| 31 |
MAX_TOOL_ITERATIONS = 7
|
| 32 |
|
| 33 |
class GaiaAgent:
|
| 34 |
-
def __init__(self, model_name="
|
| 35 |
self.model_name = model_name
|
| 36 |
self.openai_client = openai.OpenAI() # Inizializza il client OpenAI
|
| 37 |
if TAVILY_API_KEY:
|
|
@@ -180,7 +180,7 @@ class GaiaAgent:
|
|
| 180 |
]
|
| 181 |
|
| 182 |
system_prompt = (
|
| 183 |
-
"You are a general AI assistant that uses the tools available. I will ask you a question. You must output only the exact answer to the question with no comments, so your final answer must be a number OR as few words as possible OR a comma separated list of numbers and/or strings. If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise. If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise. If you are asked for a comma separated list, apply the above rules depending of whether the element to be put in the list is a number or a string.
|
| 184 |
)
|
| 185 |
|
| 186 |
messages = [{"role": "system", "content": system_prompt}, {"role": "user", "content": question}]
|
|
|
|
| 31 |
MAX_TOOL_ITERATIONS = 7
|
| 32 |
|
| 33 |
class GaiaAgent:
|
| 34 |
+
def __init__(self, model_name="o3-mini"):
|
| 35 |
self.model_name = model_name
|
| 36 |
self.openai_client = openai.OpenAI() # Inizializza il client OpenAI
|
| 37 |
if TAVILY_API_KEY:
|
|
|
|
| 180 |
]
|
| 181 |
|
| 182 |
system_prompt = (
|
| 183 |
+
"You are a general AI assistant that uses the tools available. I will ask you a question. You must output only the exact answer to the question with no comments, so your final answer must be a number OR as few words as possible OR a comma separated list of numbers and/or strings. If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise. If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise. If you are asked for a comma separated list, apply the above rules depending of whether the element to be put in the list is a number or a string. If you are asked for a code number, give the code number nothing else. Do not add a dot at the end of the answer. Pay attention at the question and at the expected output."
|
| 184 |
)
|
| 185 |
|
| 186 |
messages = [{"role": "system", "content": system_prompt}, {"role": "user", "content": question}]
|