News for hackers. Stuff that matters.
Re:Introducing ChatGPT and Whisper APIs by cmelbye on Wednesday March 01, 2023 @03:23PM (#34987794)
This is explained in the OpenAI docs. There is a chat completion API and you pass in the prior messages from both the user and the assistant.
Re:Introducing ChatGPT and Whisper APIs by kgeist on Wednesday March 01, 2023 @06:23PM (#34989788)
I used the same trick with the previous GPT3 API (da-vinci) and it worked well, I'd pass as one big prompt:

  User: hello (previous prompt)
  Bot: hi (previous response)
  User: who are you? (new prompt)
  Bot: (here it continues conversation)
I wonder how the new ChatGPT API differs, other than the fact that it's structured (you use JSON to represent the conversation memory separately instead of one large prompt).

I guess I will spend the next day playing around with the new API to figure it out.

Re:Introducing ChatGPT and Whisper APIs by kgeist on Wednesday March 01, 2023 @06:36PM (#34989918)
Judging by this[0] the new structured format is immune to "injections":

[0] https://github.com/openai/openai-python/blob/main/chatml.md