strapi-plugin-open-ai icon indicating copy to clipboard operation
strapi-plugin-open-ai copied to clipboard

Add a "context" box

Open philohelp opened this issue 1 year ago • 2 comments

Not a bug, a suggestion. When you make a request to openAi in a content type, sometimes you have to prompt with two different elements: a context and a request. The idea is that you can keep the same context to apply it to different requests.

Like, for instance: {"context":"Reshape this text to fit the following format: one paragraph for general informations and one for various announcements.", "request":"[The text to reshape]"

Then you do const globalPrompt = ${context}${request}

This is how I implemented it using the plugin: Capture d’écran 2023-02-26 à 22 12 24

philohelp avatar Feb 26 '23 21:02 philohelp