weather_agent = Agent(
name= "Weather agent",
instructions="You are a helpful agent who can talk to users about the
weather.",
tools=[get_weather],
)from agents import Agent, WebSearchTool, function_tool
@function_tool
def save_results(output):
db.insert({ : output, : datetime.time()})
return "File saved"
search_agent = Agent(
name="Search agent",
instructions="Help the user search the internet and save results if
asked.",
tools=[WebSearchTool(),save_results],
)| 欢迎光临 链载Ai (https://www.lianzai.com/) | Powered by Discuz! X3.5 |