Skip to content
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

exit status 1 #4

Closed
hungphongtrn opened this issue May 25, 2023 · 1 comment
Closed

exit status 1 #4

hungphongtrn opened this issue May 25, 2023 · 1 comment

Comments

@hungphongtrn
Copy link

I am facing this error which I believe might relate to the mismatch version of Arduino_Json. Can you help me with this. Plenty of thank to your great work.

In file included from something\ChatGPT_Client\src/ChatGPT.hpp: In member function 'bool ChatGPT<T>::simple_message(const String&, const String&, const String&, String&)':
something\\Documents\Arduino\libraries\ChatGPT_Client\src/ChatGPT.hpp:30:7: error: 'DynamicJsonDocument' was not declared in this scope
       DynamicJsonDocument doc(result.length() + 200);
       ^~~~~~~~~~~~~~~~~~~
something\\Documents\Arduino\libraries\ChatGPT_Client\src/ChatGPT.hpp:31:7: error: 'DeserializationError' was not declared in this scope
       DeserializationError error = deserializeJson(doc, result.c_str());
       ^~~~~~~~~~~~~~~~~~~~
something\\Documents\Arduino\libraries\ChatGPT_Client\src/ChatGPT.hpp:32:11: error: 'error' was not declared in this scope
       if (error) {
           ^~~~~
something\\Documents\Arduino\libraries\ChatGPT_Client\src/ChatGPT.hpp:32:11: note: suggested alternative: 'perror'
       if (error) {
           ^~~~~
           Perror
something\\Documents\Arduino\libraries\ChatGPT_Client\src/ChatGPT.hpp:36:30: error: 'doc' was not declared in this scope
       const char* _content = doc["choices"][0]["message"]["content"];
                              ^~~

exit status 1
Compilation error: exit status 1
@0015
Copy link
Owner

0015 commented May 27, 2023

@yuufong Which ArduinoJson version are you using? It should be ArduinoJson 6.X. (The current version is 6.21.2)

@0015 0015 closed this as completed May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants