NodeJs chatbot WhatsApp Library v 2.0#
NodeJs chatbot WhatsApp Library v 2.0 is a modern library for creating a WhatsApp bot with state support and OpenAI GPT integration, built on whatsapp-chatbot-python and GREEN-API. To use the library, you need to get a registration token and instance ID in your console. For testing, we recommend using the free "Developer" plan.
API#
The documentation for the REST API is located at link. The library is a wrapper for the REST API, so the documentation at the link above also applies to the library itself.
Authorization#
To send a message or execute other GREEN-API methods, the WhatsApp account in the phone application must be in an authorized state. To authorize the instance, go to personal account and scan the QR code using the WhatsApp application.
Features#
- Integration with OpenAI GPT models for intelligent responses
- Support for various GPT models (GPT-3.5, GPT-4, GPT-4o, o1)
- Multimodal capabilities with image processing support
- Voice message transcription using Whisper API
- Comprehensive handling of various WhatsApp media message types
- Middleware architecture for customizing message and response handling
- Built-in conversation history management
- State system inherited from the core library
- TypeScript support
Installation and Quick Start#
Use Cases#
Main Components#
Message Processing#
Session Data#
Utilities#
Supported OpenAI Models#
Advanced Configuration#
Bot Examples#
GREEN-API Demo Chatbot 🔥#
Service Method Documentation#
License#
Licensed under Creative Commons Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0) . LICENSE.