jassi004 commited on
Commit
c3cc8ba
·
verified ·
1 Parent(s): 81917a3

Upload agent (2).py

Browse files
Files changed (1) hide show
  1. agent (2).py +10 -0
agent (2).py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ from smol_agent import SmolAgent
2
+
3
+ # Define the agent with a set of useful tools
4
+ tools = ["search", "calculator", "python", "code"]
5
+ agent = SmolAgent(tools=tools)
6
+
7
+ def run_agent(question: str) -> str:
8
+ prompt = f"You are a helpful AI assistant. Answer the following question as clearly and accurately as possible:\n\n{question}"
9
+ response = agent.run(prompt)
10
+ return response