Zain-ul-din / whatsapp-ai-bot

This is a WhatsApp AI bot that uses various AI models, including Gemini, GPT, DALL-E, and StabilityAI, to generate responses to user input.
https://wa-ai-seven.vercel.app/
MIT License
161 stars 89 forks source link

not working?? #6

Closed devil-mo closed 1 year ago

devil-mo commented 1 year ago
✖ ChatGPTModel request fail | An error occur, at ChatGptModel.ts sendMessage(prompt, msg) err: Error: OpenAI error 429: {
    "error": {
        "message": "You exceeded your current quota, please check your plan and billing details.",
        "type": "insufficient_quota",
        "param": null,
        "code": null
    }
}

/workspaces/whatsapp-ai-bot/node_modules/whatsapp-web.js/src/structures/Message.js:91 this.deviceType = data.id.id.length > 21 ? 'android' : data.id.id.substring(0, 2) == '3A' ? 'ios' : 'web'; ^

TypeError: data.id.id.substring is not a function at Message._patch (/workspaces/whatsapp-ai-bot/node_modules/whatsapp-web.js/src/structures/Message.js:91:75) at new Message (/workspaces/whatsapp-ai-bot/node_modules/whatsapp-web.js/src/structures/Message.js:18:24) at Client.sendMessage (/workspaces/whatsapp-ai-bot/node_modules/whatsapp-web.js/src/Client.js:699:16) at processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v19.9.0 error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Zain-ul-din commented 1 year ago

Please read the error carefully it's saying your open ai API key quota has been exceeded.

- "error": {
-       "message": "You exceeded your current quota, please check your plan and billing details.",
-        "type": "insufficient_quota",
-        "param": null,
-        "code": null
-   }

Possible Solutions

Check how to setup bot on local machine

devil-mo commented 1 year ago

Thank you sincerely for taking the time to respond. While I appreciate the solutions you offered, it seems that the problem persists despite implementing them. Nonetheless, I want to express my utmost admiration for your exceptional ideas, and I wholeheartedly encourage and stand by you. Your dedication and innovative thinking are truly inspiring. Keep pushing forward, my esteemed Arab brother, as your potential knows no bounds.

Zain-ul-din commented 1 year ago

You're most welcome! I truly appreciate your kind words and encouragement. If there's anything else I can assist you with, please don't hesitate to reach out. I'm here to help.

Happy Coding ♥