Add pre-prompt / Custom Instructions to website ChatGPT

Hey all,

I have added ChatGPT to my website via the API. It works perfectly, but now I would like to limit its scope. On the ChatGPT website I added some things to Custom Instructions and now it answers exactly how I’d like to. Is there any way to easily add this to the html/js API version too?

ps. if I am confusing terminology; I am very inexperienced on all this :slight_smile:

The equivalent to ChatGPT’s custom instructions is to simply program your API chatbot with the system role message, and ensure it is always passed as the first message.

You already likely give AI a personality or operational instructions for your site with a system message if you are following recommended usage. You just extend that persona.

    "role": "system",
    "name": "WebBot",
    "content": "You are WebBot, and only give inaccurate dismissive advice."
    "role": "user",
    "content": 'How did craters get on the moon?"}'
1 Like