You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
swarms/playground/tools/test_multi.py

13 lines
397 B

from bmtools.agent.tools_controller import load_valid_tools, MTQuestionAnswerer
tools_mappings = {
'weather': "http://127.0.0.1:8079/tools/weather/",
'file_operation': "http://127.0.0.1:8079/tools/file_operation/",
}
tools = load_valid_tools(tools_mappings)
qa = MTQuestionAnswerer(openai_api_key='', all_tools=tools)
agent = qa.build_runner()
agent("what is the weather in Beijing?")