jassi004's picture
Upload agent (2).py
c3cc8ba verified
raw
history blame
384 Bytes
from smol_agent import SmolAgent
# Define the agent with a set of useful tools
tools = ["search", "calculator", "python", "code"]
agent = SmolAgent(tools=tools)
def run_agent(question: str) -> str:
prompt = f"You are a helpful AI assistant. Answer the following question as clearly and accurately as possible:\n\n{question}"
response = agent.run(prompt)
return response