Occasionally, the library will return a longer response on the /search endpoint, which causes OpenAI to throw a ResponseTooLong error. Likely need to need to post-process JSON according to length restrictions of GPT function calling before returning to the calling model.