AI Content Writer
This AI module allows users to generate content based on the given inputs. It takes the input from the UI and makes an API call to the /api/ai-modules/content-writer
route in the same project. This API route creates content using OpenAI and returns the response as a stream. The stream response is then displayed in the UI.
Additionally, you can connect Supabase and store the content in the database if required.
This is how it will look when you import and run the app:
How to use?
Simply import the ContentWriter component where you want to use the Content Writer module as shown below:
import ContentWriter from '@/components/ai-modules/content-writer';
export default async function ContentWriterPage() {
return <ContentWriter />
}
For testing, you can go to /src/app/ai-modules/page.tsx
in the main
branch and enable the ContentWriter as shown below: