Give your users the power of AI
Add ChatGPT to any <form> field with a few lines of code.
How it works
1
Create a LeftField account and add your OpenAI API key
2
Install our NPM package:
npm install leftfieldai
3
Add some code to any input field you want to enhance with AI ✨
import { lfaiCreatePopup } from 'leftfieldai';
// ...
<input id="title" type="text" />
<a onClick={() => lfaiCreatePopup({ elementId: 'title', pubKey: 'lfai_xxxx' })}>Use AI for title suggestions</a>
4
Now your users can click a button or a link to get a mobile-friendly popup ChatGPT interface to help them get content suggestions and ideas.
You can optionally provide prompt suggestions for your users and context to the AI model to help your users get better suggestions and results.
5
When your users are done with their chat session, they can populate the target form field with any ChatGPT response they want.