Code Monkey home page Code Monkey logo

esp32-chatglm's Introduction

ESP32-ChatGLM for Custom Conversations - 中文文档

Technological achievements from Tsinghua University ---> "ChatGLM" 🇨🇳 on Espressif's ESP32 platform by Arduino!

ESP32-ChatGLM Project

Use the official asynchronous calling method to request its API. The API is obtained from the following websites:

API receive : https://open.bigmodel.cn/

1

Please Following Steps below⚠️:

Steps 1

Download Arduino IDE and install it. Open the IDE and find the File -> Perference.

Please Use ESP32 Addritional boards manager URLs.

Step 2

Download the Project and Download libraries. (Build in just use it, otherwise download it) These are libraries for this project:

#include <Arduino.h>            //build in 
#include <CustomJWT.h>          //find from library
#include <ESPAsyncWebServer.h>  // Get from https://github.com/me-no-dev/ESPAsyncWebServer
#include <ArduinoJson.h>        //find from library
#include <WiFiClientSecure.h>   //build in
#include <WiFiUdp.h>            //build in
#include <time.h>               //build in
#include <HTTPClient.h>         //find from library

Step 3(Hard step) 🤨

FInd the library folder and find the CustomJWT Folder. (I also upload CustomJWT.h file☝️)

(Watch here!)

Find the CustomJWT.h file in src folder. to add some code in CustomJWT(........) (in brackets)

char *sign_type = "SIGN" add under char *typ = "JWT" for each CustomJWT method!

Image

IMPORTANT! there got a problem for Library JWT library(The Library name called: CustomJWT)

Incorrect Code in CustomJWT.h file

sprintf(headerJSON, "{\"alg\": \"%s\",\"typ\":\"%s\",\"sign_type\":\"%s\"}", alg, typ, sign_type);

Error: The is a problem between "alg": "%s"which has a space between "alg": and "%s"! Please delete it! if not it will show different Base64 code.

Fix the Code in CustomJWT.h file

sprintf(headerJSON, "{\"alg\":\"%s\",\"typ\":\"%s\",\"sign_type\":\"%s\"}", alg, typ, sign_type);

Step4 📄

Paste the project for ChatGLM.ino and index.h into your own project folder and start it to change your personal API and WiFI(You can change your own local the NTP) and even you can design your personal Webpage for index.h file

Step 5 💻

Connect the ESP32 Module by Serial Port and PC's USB. Please choose correct ESP32 board to PC, Mine is ESP32-S3

Image

Finally Happy Flashing your ESP32 device! 😄🥇


Last thanks to @JoinChang and other libraries providers 👍

esp32-chatglm's People

Contributors

blueokanna avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.