Spaces:
Sleeping
Sleeping
shan gao
commited on
Commit
·
062578a
1
Parent(s):
e9b8f0b
change
Browse files
agent.py
CHANGED
|
@@ -572,7 +572,10 @@ def solve_multimodal_node(state: AgentState) -> AgentState:
|
|
| 572 |
sys = SystemMessage(content=(
|
| 573 |
"You solve GAIA tasks using the provided evidence and attached images.\n"
|
| 574 |
"Be precise, quote numbers/strings exactly. If uncertain, say so.\n"
|
| 575 |
-
"Your answer to the GAIA tasks should 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
|
|
|
|
|
|
|
|
|
|
| 576 |
))
|
| 577 |
|
| 578 |
# Summarized text evidence (ASR/OCR/PDF text)
|
|
@@ -617,12 +620,16 @@ def solve_text_only_node(state: "AgentState") -> "AgentState":
|
|
| 617 |
|
| 618 |
# LLM (text-only). Swap model as you like.
|
| 619 |
# llm = ChatOpenAI(model="gpt-4o-mini", temperature=0)
|
| 620 |
-
llm = ChatOpenAI(model="gpt-4o", temperature=0)
|
|
|
|
| 621 |
|
| 622 |
sys = SystemMessage(content=(
|
| 623 |
"You solve GAIA tasks. Use careful step-by-step reasoning but keep it concise.\n"
|
| 624 |
-
"You can use the provided textual evidence if there is any
|
| 625 |
-
"Your answer to the GAIA tasks should 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
|
|
|
|
|
|
|
|
|
|
| 626 |
))
|
| 627 |
|
| 628 |
user = HumanMessage(content=(
|
|
|
|
| 572 |
sys = SystemMessage(content=(
|
| 573 |
"You solve GAIA tasks using the provided evidence and attached images.\n"
|
| 574 |
"Be precise, quote numbers/strings exactly. If uncertain, say so.\n"
|
| 575 |
+
"Your answer to the GAIA tasks should 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.\n"
|
| 576 |
+
"If your answer include word of number, represent the number in digit.\n"
|
| 577 |
+
"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.\n"
|
| 578 |
+
"If your answer only include a single word, make the first letter capital.\n" + end_instr
|
| 579 |
))
|
| 580 |
|
| 581 |
# Summarized text evidence (ASR/OCR/PDF text)
|
|
|
|
| 620 |
|
| 621 |
# LLM (text-only). Swap model as you like.
|
| 622 |
# llm = ChatOpenAI(model="gpt-4o-mini", temperature=0)
|
| 623 |
+
# llm = ChatOpenAI(model="gpt-4o", temperature=0)
|
| 624 |
+
llm = ChatOpenAI(model="gpt-5-mini", temperature=0)
|
| 625 |
|
| 626 |
sys = SystemMessage(content=(
|
| 627 |
"You solve GAIA tasks. Use careful step-by-step reasoning but keep it concise.\n"
|
| 628 |
+
"You can use the provided textual evidence if there is any.\n"
|
| 629 |
+
"Your answer to the GAIA tasks should 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.\n"
|
| 630 |
+
"If your answer include word of number, represent the number in digit.\n"
|
| 631 |
+
"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.\n"
|
| 632 |
+
"If your answer only include a single word, make the first letter capital.\n" + end_instr
|
| 633 |
))
|
| 634 |
|
| 635 |
user = HumanMessage(content=(
|