romain-fayoux commited on
Commit
7a26e4a
·
verified ·
1 Parent(s): 56ece30

Update llm_only_agent.py

Browse files
Files changed (1) hide show
  1. llm_only_agent.py +16 -0
llm_only_agent.py CHANGED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from smolagents import CodeAgent, HfApiModel, FinalAnswerTool
2
+
3
+ # Basic inference model
4
+ model = HfApiModel(
5
+ max_tokens=2096,
6
+ temperature=0.5,
7
+ model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
8
+ custom_role_conversions=None,
9
+ )
10
+
11
+ # Code Agent
12
+ agent = CodeAgent(
13
+ model=model,
14
+ tools=[FinalAnswerTool()],
15
+ max_steps=2
16
+ )