optionEdge commited on
Commit
8aefc6f
·
verified ·
1 Parent(s): e3c3d8f

Update BasicAgent.py

Browse files
Files changed (1) hide show
  1. BasicAgent.py +4 -4
BasicAgent.py CHANGED
@@ -19,16 +19,16 @@ from smolagents import (
19
  class newAgent:
20
  """Adapts smolagents.CodeAgent to the HF course template API."""
21
  def __init__(self):
22
- model_id = "meta-llama/Meta-Llama-3.1-8B-Instruct" # correct repo name
23
  hf_token = os.getenv("HUGGINGFACEHUB_API_TOKEN") # read real secret
24
  if not hf_token:
25
  raise RuntimeError("HUGGINGFACEHUB_API_TOKEN not set in Space secrets")
26
  #*
27
  system_prompt=(
28
  "You are an agent that answers exam questions. "
29
- "Your answers should contain only what is asked for in the question, without any other content. "
30
  "Be exact and concise in your answers. "
31
- "Avoid adding explanations or additional information unless explicitly requested. "
32
  "If asked for a list, provide ONLY the items requested separated by commas."
33
 
34
  )
@@ -41,7 +41,7 @@ class newAgent:
41
  tools=tools,
42
  model=model,
43
  add_base_tools=True,
44
- max_steps=5 # limit reasoning time
45
  )
46
 
47
  def __call__(self, question: str) -> str:
 
19
  class newAgent:
20
  """Adapts smolagents.CodeAgent to the HF course template API."""
21
  def __init__(self):
22
+ model_id = "Qwen/Qwen2.5-Coder-32B-Instruct" # correct repo name
23
  hf_token = os.getenv("HUGGINGFACEHUB_API_TOKEN") # read real secret
24
  if not hf_token:
25
  raise RuntimeError("HUGGINGFACEHUB_API_TOKEN not set in Space secrets")
26
  #*
27
  system_prompt=(
28
  "You are an agent that answers exam questions. "
29
+ "Your answers should contain exactly what is asked for in the question. "
30
  "Be exact and concise in your answers. "
31
+ "Do not add explanations or additional information. "
32
  "If asked for a list, provide ONLY the items requested separated by commas."
33
 
34
  )
 
41
  tools=tools,
42
  model=model,
43
  add_base_tools=True,
44
+ max_steps=3 # limit reasoning time
45
  )
46
 
47
  def __call__(self, question: str) -> str: