Need help with creating and saving custom preset functionality similar to openai playground

I need help with creating custom use case generator for brief.

i want to create a similar tool that is available in playground of openi that is called preset. I we give examples we had aoption to save preset and use it anytime. I want to make similar thing help me to do that how it works and how to makeone

I had tried some codes like openai.Preset.save but doesn’t worked please help with the same