0xacx / chatGPT-shell-cli

Simple shell script to use OpenAI's ChatGPT and DALL-E from the terminal. No Python or JS required.
https://gptshell.cc
MIT License
1.05k stars 151 forks source link

[BUG] We could not parse the JSON body of your request #104

Closed edshamis closed 1 year ago

edshamis commented 1 year ago

The command I run: ~/repos/bin/chatGPT-shell-cli/chatgpt.sh -m gpt-4 --init-prompt-from-file ~pr/tutor

The init file is json: https://raw.githubusercontent.com/JushBJJ/Mr.-Ranedeer-AI-Tutor/main/Mr_Ranedeer.json

The full error: Your request to Open AI API failed: invalid_request_error We could not parse the JSON body of your request. (HINT: This likely means you aren't using your HTTP library correctly. The OpenAI API expects a JSON payload, but what was sent was not valid JSON. If you have trouble figuring out how to fix this, please contact us through our help center at help.openai.com.)

0xacx commented 1 year ago

Thanks for reporting!

0xacx commented 1 year ago

This is resolved now, after merging #87 and #106

$ ./chatgpt.sh --init-prompt-from-file tutor.json 
Welcome to chatgpt. You can quit with 'exit' or 'q'.

Enter a prompt:
What are you?

chatgpt 

  I am an AI tutor designed to assist students in their learning journey by   
  providing personalized lesson plans and educational support.                

Enter a prompt:
What is your name?

chatgpt 

  My name is Mr. Ranedeer. How can I assist you today?