RafalWilinski / telegram-chatgpt-concierge-bot

Interact with OpenAI's ChatGPT via Telegram and Voice.
https://chatwithcloud.ai
1.13k stars 110 forks source link

Google Search Tool throws error #3

Open leoplusx opened 1 year ago

leoplusx commented 1 year ago

Bot crashes as soon as it tries to perform a Google search:

telegram-chatgpt-concierge-bot/node_modules/googlethis/lib/core/main.js:70 throw new Utils.SearchError('Could not execute search', { ^ SearchError: Could not execute search at Object.search (/home/other_projects/telegram-chatgpt-concierge-bot/node_modules/googlethi/lib/core/main.js:70:11) at processTicksAndRejections (node:internal/process/task_queues:95:5) { info: { status_code: 0, message: 'Request failed with status code 429' }, date: 2023-04-10T14:41:33.375Z, version: '1.7.1' }

Why does that happen?

Also, if it does happen, wouldn't it be better to let ChatGPT handle the error? Like, having the tool answer "Sorry, Google unavailable", so GPT can answer based on its own knowledge (maybe with a little disclaimer that it wasn't able to perform the search)?