antoncio commited on
Commit
a2b291c
·
verified ·
1 Parent(s): b412ed7

added calculator to tools in CodeAgent

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -67,10 +67,10 @@ final_answer = FinalAnswerTool()
67
  # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
68
 
69
  model = HfApiModel(
70
- max_tokens=2096,
71
- temperature=0.5,
72
- model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
73
- custom_role_conversions=None,
74
  )
75
 
76
 
@@ -82,7 +82,10 @@ with open("prompts.yaml", 'r') as stream:
82
 
83
  agent = CodeAgent(
84
  model=model,
85
- tools=[final_answer], ## add your tools here (don't remove final answer)
 
 
 
86
  max_steps=6,
87
  verbosity_level=1,
88
  grammar=None,
 
67
  # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
68
 
69
  model = HfApiModel(
70
+ max_tokens=2096,
71
+ temperature=0.5,
72
+ model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
73
+ custom_role_conversions=None,
74
  )
75
 
76
 
 
82
 
83
  agent = CodeAgent(
84
  model=model,
85
+ tools=[
86
+ calculator,
87
+ final_answer
88
+ ], ## add your tools here (don't remove final answer)
89
  max_steps=6,
90
  verbosity_level=1,
91
  grammar=None,