Here we will show you how to use an instruct model from OpenAI as an API call instead of a completion model.

Step 1: Setting up API call for OpenAI’s ChatGPT

  1. Navigate over to the plugins tab.

https://lh4.googleusercontent.com/hBbUt5iz0f3UCaJz-ujXp6v-Uc2uv_V0_BcrqPbdmkAhRQkJLKAqPcRy3fy6jYDaKV4pZfLGd7T7hmaTaD2js1-IZmuk-m2pOSYEwVzm7r-IHAXj0VPiocd5HBQqUhxQHfJOK0rXEA6wdWUpOT3uXW8

  1. Expand your API call for Open AI.

https://lh3.googleusercontent.com/dQyv0DB8F-lMFVwl_EZHdwk77FNbR4EPDybZYe2HQmN1_QrB348bjaZRNPL80vRCiup83TJWzD7BXoCtjLIKUtPRs5FWUZL6lujufF_H8xXyy_yc7Wk_Sl9vMtFJJgwL3BBUI0lNpXUd-XHCcBYEMFc

  1. Scroll down until you see the button “Add another call”

https://lh3.googleusercontent.com/8-Pyi0FDiqLO92vp9SxHte-H3hluAOTVxbbCZOMvdkE8QFiqSaGbo1ZYzt6lQuWi8Zf8Gn6YTebyZANQpN1UCM7zE5-FGNC33zj3qewEx39O-m_nwla5q6vcJ2tj_KDGFC2pDr0YfwDfCEirDNCmwFc

  1. Click on the button “Add another call”

https://lh4.googleusercontent.com/vM0BoQKPsok_QnEiXitXp2Vd0Ysg6u9djLrZccPRnJg4LUgUU95amWUdT0dfWrh2MzMUAkIv1TgXiqz9pY3rwgeRsxUal024bB0CcYD1PT9mfB04UKiL42xtDwu16knO8X6S8pXcN5HurqPjxx4bcPg

  1. Give the new API call a name.

https://lh5.googleusercontent.com/w-KeeArzxTTbi3yx262uLDJKJTkBeMbLj6Vx6QonX9bGLbR_bJiNdNnbHrW5c2aE0xvzD2EivfEJgZL1gREjkZOPURyCxJGFhMqQetxywxeINQa_ZWQ6HOArKhrUsPuhMZhIMyu9Te84Jmi7oel-IY4

  1. Click on the drop-down menu next to “Use as”, and select “Action.”

https://lh3.googleusercontent.com/B38wLC0PW3xCUgbnRY5ETJ-4t8SJVcWIKskVp_wEY26b9MLN_VWowK9RJh8X8Q9470bMSvP0A3V5R8YbNVLWsLuU_6i3PnEIP9I3s3X-PftbhPYwgcuRs3VBDY5uT3-bHsTxHFSpDowy8lP9HHDHqZU

  1. Click on the drop-down menu where it says “Name” and instead of POST select GET.

https://lh5.googleusercontent.com/lDxji35iVhiuiiqKNHirNjKxhWLhzS_lZ1o5AWNwRlYIkvd5z8lkoiw-C_OwQjlZ7R4QMADJ7yPZta6nHisJMRjhNtHvJ0lKUtd0IU7iuexlGFZic3MM1oyQyzp3ERdBa5SBC2XmytDjrjbfjttOEI4

  1. To the right of where it says “POST” copy the end point address of ChatGPT

https://api.openai.com/v1/chat/completions

Note: The end point address is different from the one used by Davinci and other completion models. Both addresses can be found here: https://platform.openai.com/docs/guides/gpt

https://lh5.googleusercontent.com/KAyB7QpMIa9QfKbMKkcCc57ZzWJ7OExwBJmdPYFBUqOz7oYF3CUzK52SihAPq3ms-i0gZQl1pFCU0_J77sRPxR--6JpEzxrojc1EqGQmIzh0Vg5y_H5YgXKZN4CUPZ0vktzrm38qqL-DQAqP3QZSLVE