There are already APIs that give chatGPT the ability to use web searches (as Browser Add ons) and also a Huggingface site where chatGPT decides if it needs help from other APIs to solve a question (eg Wolfram Alpha)