eeenn commited on
Commit
aec8eb8
·
verified ·
1 Parent(s): 6f154c6

Update tools/party_song.py

Browse files
Files changed (1) hide show
  1. tools/party_song.py +7 -1
tools/party_song.py CHANGED
@@ -1,8 +1,14 @@
 
1
  from smolagents import CodeAgent, DuckDuckGoSearchTool, InferenceClientModel
2
 
 
 
3
  agent = CodeAgent(
4
  tools=[DuckDuckGoSearchTool()],
5
- model=InferenceClientModel()
 
 
 
6
  )
7
 
8
  agent.run("Search for the best music recommendations for a party at the Wayne's mansion.")
 
1
+ import os
2
  from smolagents import CodeAgent, DuckDuckGoSearchTool, InferenceClientModel
3
 
4
+ HF_TOKEN = os.getenv("HF_TOKEN")
5
+
6
  agent = CodeAgent(
7
  tools=[DuckDuckGoSearchTool()],
8
+ model=InferenceClientModel(
9
+ model_id="Qwen/Qwen2.5-Coder-7B-Instruct", # 或者你要用的模型
10
+ api_key=HF_TOKEN
11
+ )
12
  )
13
 
14
  agent.run("Search for the best music recommendations for a party at the Wayne's mansion.")