gptrpg icon indicating copy to clipboard operation
gptrpg copied to clipboard

Use System Prompt for OpenAI API

Open dzoba opened this issue 1 year ago • 2 comments

Right now we don't really use the chat history when we talk to OpenAI. It would be better to set up a system prompt and keep a history of chats when communicating with the API.

dzoba avatar May 02 '23 00:05 dzoba

Could you please elaborate more on System Prompt.

Anurag-Raut avatar May 02 '23 12:05 Anurag-Raut

Take a look here: https://platform.openai.com/docs/guides/chat/introduction

Specifically this line:

{"role": "system", "content": "You are a helpful assistant."},

dzoba avatar May 06 '23 19:05 dzoba