Skip to content

Interact seamlessly with OpenAI through WhatsApp, enabling prompt-based conversations with AI models.

License

Notifications You must be signed in to change notification settings

balindam/WhaBot-AI-Companion

Repository files navigation

WhaBot AI Companion

Interact seamlessly with OpenAI through WhatsApp, enabling prompt-based conversations with AI models.

WhaBot AI Companion is a serverless solution designed to integrate OpenAI API (v4) with WhatsApp messaging. This project enables users to send queries through WhatsApp, processes them via OpenAI's API, and responds with the AI-generated output—all without manual intervention. The solution is hosted on AWS Lambda with API Gateway, leveraging Node.js modules packaged into a layer for efficient and scalable execution.

Features

  • WhatsApp Integration: Receive user queries via WhatsApp messaging.
  • OpenAI API Integration: Utilize OpenAI API (v4) for natural language processing and generate AI-powered responses.
  • Serverless Architecture: Hosted on AWS Lambda with API Gateway for seamless and scalable operations.
  • Node.js Modules as Layers: Dependencies are packaged into layers for easier management and deployment.
  • Infrastructure as Code (IaC): Utilizes Serverless YAML for defining and managing the infrastructure.

Getting Started

To set up and deploy the WhaBot AI Companion, follow these steps:

  1. Prerequisites: Ensure you have an AWS account set up with appropriate permissions and access to the OpenAI API.
  2. Configuration:
    • Update the necessary configurations such as API keys, WhatsApp number, and any specific settings in the designated configuration files.
  3. Deployment:
    • Use Serverless YAML to define the AWS infrastructure and deploy the solution.
  4. Testing:
    • Send messages to the configured WhatsApp number and observe the responses generated by the AI.

Directory Structure

WhaBot-AI-Companion/
│
├── src/
│   ├── lambdaFunction.js      # Main Lambda function handling WhatsApp requests and OpenAI integration
│   ├── openaiService.js       # Service for interacting with OpenAI API
│   └── ...                    # Other relevant files
│
├── serverless.yml             # Serverless framework configuration for AWS Lambda and API Gateway
├── package.json               # Node.js dependencies and scripts
├── .env.example               # Example environment variables configuration
└── README.md                  # Project documentation

Contributing

Contributions to WhaBot AI Companion are welcome! If you have suggestions, feature ideas, or want to report issues, please feel free to create an issue or submit a pull request.

License

This project is licensed under the MIT License.

About

Interact seamlessly with OpenAI through WhatsApp, enabling prompt-based conversations with AI models.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published