dzoba / gptrpg

A demo of an GPT-based agent existing in an RPG-like environment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use System Prompt for OpenAI API

dzoba opened this issue · 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.

Could you please elaborate more on System Prompt.

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

Specifically this line:

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