FD900 commited on
Commit
3c82864
·
verified ·
1 Parent(s): 4ed3db0

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +4 -4
agent.py CHANGED
@@ -11,11 +11,11 @@ def load_tasks():
11
  with open("metadata.jsonl", "r", encoding="utf-8") as f:
12
  for line in f:
13
  item = json.loads(line)
14
- task_id = item.get("task_id") or item.get("question_id")
15
  question = item.get("Question") or item.get("question")
16
- if task_id and question:
17
  tasks.append({
18
- "task_id": task_id,
19
  "question": question
20
  })
21
  return tasks
@@ -28,6 +28,6 @@ def solve_task(task, tools=TOOLS):
28
  response = mistral.run(prompt)
29
 
30
  return {
31
- "task_id": task["task_id"],
32
  "submitted_answer": response.strip()
33
  }
 
11
  with open("metadata.jsonl", "r", encoding="utf-8") as f:
12
  for line in f:
13
  item = json.loads(line)
14
+ question_id = item.get("question_id")
15
  question = item.get("Question") or item.get("question")
16
+ if question_id and question:
17
  tasks.append({
18
+ "question_id": task_id,
19
  "question": question
20
  })
21
  return tasks
 
28
  response = mistral.run(prompt)
29
 
30
  return {
31
+ "question_id": task["question_id"],
32
  "submitted_answer": response.strip()
33
  }