-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
the most of requests are err #3
Comments
#include <ArduinoJson.h>
#include <ESP8266WiFi.h>
#include <WiFiClientSecureBearSSL.h>
#include <ChatGPT.hpp>
static const char *ssid = "SSID";
static const char *password = "PASS";
BearSSL::WiFiClientSecure client;
ChatGPT<BearSSL::WiFiClientSecure> chat_gpt(&client, "v1", "KEY");
void setup() {
Serial.begin(115200);
Serial.println();
Serial.print("Connecting to WiFi network: ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
Serial.print(".");
delay(1000);
}
// Ignore SSL certificate validation
client.setInsecure();
Serial.println();
}
String rslt;
String inpt;
void loop() {
Serial.println();
Serial.println();
Serial.println("Enter your question");
while (!Serial.available()) delay(300);
inpt=Serial.readString();
inpt.trim();
Serial.println(inpt);
if (chat_gpt.simple_message("gpt-3.5-turbo-0301", "user", inpt, rslt)) {
Serial.println("===OK===");
Serial.println(rslt);
} else {
Serial.println("===ERROR===");
Serial.println(rslt);
}
delay(1000);
} |
@ESPboy-edu It seems that heap memory is running out when parsing with ArduinoJSON on ESP8266. |
I'm also having this problem. When replaced with full.message I no longer get an error, but I still don't get any reply from ChatGPT |
@ericTspel Which device are you using? |
I'm using an adafruit feather huzzah
…On Tue, Apr 25, 2023 at 5:53 PM Eric ***@***.***> wrote:
@ericTspel <https://github.com/ericTspel> Which device are you using?
—
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALDUFHH6NMAYIROPQQ244YTXDBBWLANCNFSM6AAAAAAWWY7DGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
the same problem on ESP8266 |
@ESPboy-edu adafruit feather huzzah is based on ESP8266. This is a problem with ESP8266. |
probably not enough memory for processing Json |
Using ESP8266
the most of requests are return error:
"[ERR] deserializeJson() failed: InvalidInput"
Interestingly, requests of the format: "trip for N days Somewhere" is always processed without errors :)
The text was updated successfully, but these errors were encountered: