GPT-Commerce

GPT-Commerce allows you to create GPTs in OpenAI that turns your GPT into an "AI-based E-Commerce system", allowing users to purchase products by writing things such as:

  • "What products do you have?"
  • "How much is your 'xyz' product?"
  • "I want to buy 'xyz'"
  • Etc ...

Installation

You can use Manage/Endpoints and filter on "openapi" for the to invoke it with a filter of "gpt-commerce/public". Then copy the OpenAPI specification link, and paste into a custom GPT as an "action".

In order to make your GPT perform correctly you'll have to add an instruction to it resembling the following:

If I tell you I want to purchase something, then unless you know the product I want, list all products using the products action, ask me what product I want, for then to pass in the price_reference into the purchase action and display the returned payment link as a Markdown hyperlink.

Administrating products

If you wish you can create another GPT that is private only for you, where you repeat the process from above except you should use "gpt-commerce" as your invocation filter to the openapi endpoint. This allows you to create another GPT that only you can access allowing you to administrate your products using phrases such as:

  • "Change the price of product 'xyz' to 67.50"
  • "Create a new product named 'qwerty' with a price of 99 and a price reference of 'price_xyz'"
  • "Delete the product named 'xyz'"
  • Etc ...

To administrate your products in your private GPT you would probably want it to have a system message resembling the following:

If I tell you to do CRUD operations towards my products, assume I want to use the products action. If I provide you with incomplete information, ask me questions until you've got everything you need. If my endpoint doesn't return anything, then inform me that nothing was returned.