zasharepw77 commited on
Commit
4fba449
·
1 Parent(s): 184931c

тестпростого запуска 3

Browse files
Files changed (1) hide show
  1. app.py +14 -1
app.py CHANGED
@@ -1,7 +1,20 @@
1
  from smolagents import ToolCallingAgent, DuckDuckGoSearchTool, HfApiModel
2
  import os
3
 
4
- agent = ToolCallingAgent(tools=[DuckDuckGoSearchTool()], model=HfApiModel(token=os.getenv('hf_token')))
 
 
 
 
 
 
 
 
 
 
 
 
 
5
 
6
  result = agent.run("Search for the best music recommendations for a party at the Wayne's mansion.")
7
 
 
1
  from smolagents import ToolCallingAgent, DuckDuckGoSearchTool, HfApiModel
2
  import os
3
 
4
+ #model=HfApiModel(token=os.getenv('hf_token'))
5
+
6
+ os.environ['SAMBANOVA_API_KEY'] = os.getenv('sambanova_token')
7
+ model = LiteLLMModel(
8
+ model_id="sambanova/Qwen2.5-Coder-32B-Instruct",
9
+ max_tokens=2096,
10
+ temperature=0.1,
11
+ # api_base="https://api.sambanova.ai/v1",
12
+ num_ctx=8192
13
+ )
14
+
15
+ agent = ToolCallingAgent(
16
+ tools=[DuckDuckGoSearchTool()],
17
+ model=model)
18
 
19
  result = agent.run("Search for the best music recommendations for a party at the Wayne's mansion.")
20