"A Python shell. Use this to execute python commands. Input should be a valid python command. If you expect output it should be printed out.",
)
def_get_requests()->Tool:
returnTool(
"Requests",
RequestsWrapper().run,
"A portal to the internet. Use this when you need to get specific content from a site. Input should be a specific url, and the output will be all the text on that page.",
)
def_get_terminal()->Tool:
returnTool(
"Terminal",
BashProcess().run,
"Executes commands in a terminal. Input should be valid commands, and the output will be any output from running that command.",
)
_BASE_TOOLS={
"python_repl":_get_python_repl,
"requests":_get_requests,
"terminal":_get_terminal,
}
def_get_pal_math(llm:BaseLLM)->Tool:
returnTool(
"PAL-MATH",
PALChain.from_math_prompt(llm).run,
"A language model that is really good at solving complex word math problems. Input should be a fully worded hard word math problem.",
)
def_get_pal_colored_objects(llm:BaseLLM)->Tool:
returnTool(
"PAL-COLOR-OBJ",
PALChain.from_colored_object_prompt(llm).run,
"A language model that is really good at reasoning about position and the color attributes of objects. Input should be a fully worded hard reasoning problem. Make sure to include all information about the objects AND the final question you want to answer.",
"Useful for when you want to get weather information from the OpenMeteo API. The input should be a question in natural language that this API can answer.",
"Use this when you want to get information about the top headlines of current news stories. The input should be a question in natural language that this API can answer.",
"A wrapper around Wolfram Alpha. Useful for when you need to answer questions about Math, Science, Technology, Culture, Society and Everyday Life. Input should be a search query.",
)
def_get_google_search(**kwargs:Any)->Tool:
returnTool(
"Google Search",
GoogleSearchAPIWrapper(**kwargs).run,
"A wrapper around Google Search. Useful for when you need to answer questions about current events. Input should be a search query.",