Using OpenAi to reformulate content
We would like to be able to use OpenAI in order to reformulate content, creating unique content from a base.
For example, when a new user comes to participate in a "consultation public" we would like:
- The content provided in the back end to be sent to OpenAI
- Open AI response with a reformulated version
- This response is displayed to the user, which they can customise it before use
Tasks:
Back-end:
-
Model changes on ActionGroup && Consultation : Add checkbox to activate OpenAI module, when activated the API key should be informed in a dedicated field -
When called from the front end, a call to OpenAI is made with the wanted content. -
The response from OpenAI is loaded into the action/consultation page
Front-end:
-
The wanted content and API key is provided to the script making to call to OpenAI -
When the call to open AI is made, a "loading" message is displayed -
The new content is displayed to the user, they can customize it before using it
⚠ Make sure to:
-
Not allow a user to make too many calls for reformulation; ❓ Enable a max amount of calls per user? -
Encrypt the API key, this cannot be available to any third parties
❓ Things to figure out
- When is the content customized ? Is is :
- When the user can click on a button "reformulate with OpenAI"?
- The content is automatically customized by OpenAI when the user reaches a specific moment in the page?
--> We need to make sure that there are as few "useless" calls as possible
--> We need to make sure that one user cannot make dozens of calls, using up the quota for no reason
This feature can be used for:
- Emails to representatives
- Argumentation for "consultation public"