Built by

VariableVic

Category

Other

Version

0.0.4

Last updated

Oct 5, 2023, 09:20:08 AM2 months ago
</p>

Medusa Product AI Widget

A Medusa admin widget to improve product descriptions with AI. Built with Medusa UI, OpenAI and Vercel AI SDK.

Prerequisites

  1. This plugin requires an OpenAI API key and platform account. Go to https://platform.openai.com/account/api-keys to set this up.
  2. You need a Medusa server with the Admin installed. The fastest way to set this up is by using create-medusa-app.

Getting Started

  1. Install the package with
    Copy to clipboard
    yarn add medusa-product-ai-widget
    or
    Copy to clipboard
    npm i medusa-product-ai-widget
    .
  2. In
    Copy to clipboard
    medusa-config.js
    , add the plugin to the
    Copy to clipboard
    plugins
    array with the following options:
const plugins = [
// ... other plugins
{
resolve: `medusa-product-ai-widget`,
options: {
api_key: process.env.OPENAI_API_KEY,
enableUI: true
}
}
]
  1. In your
    Copy to clipboard
    .env
    file, add an
    Copy to clipboard
    OPENAI_API_KEY
    environment variable containing your API key:
OPENAI_API_KEY=<YOUR OPENAI API KEY>
  1. Start your dev server and log into the admin. Open any product that has a product description and the widget will appear on the bottom of the page!

Build your own plugins

Develop your own plugins with our API to speed up your processes.

Make your plugin available via npm for it to be shared in our Plugin Library with the broader Medusa community.