Skip to content

Commit c2e4e17

Browse files
rthrashtheboxer
authored andcommitted
docs: update README.md
document the new sparkle buttons, plus the upcoming TV implementation
1 parent e100400 commit c2e4e17

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

core/components/modai/README.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# modAI
2-
A proof of concept Extras to auto-create SEO-related content including page titles, meta titles, meta descriptions, page summaries, and images/alt text that can be used for Open Graph sharing images or hero sections of pages.
2+
A proof of concept Extra to auto-create SEO-related content including page titles, meta titles, meta descriptions, page summaries, and images/alt text that can be used for Open Graph sharing images or hero sections of pages.
33

4-
The Plugin adds a magician’s wand emoji symbol (🪄) next to various field labels in the back-end Manager. When clicked, it should:
4+
The Plugin adds a sparkle (✦) button next to field or labels in the back-end Manager. When clicked, it:
55

66
- use prompts based on the type of content being created,
77
- use the ChatGPT API to create said content, and
8-
- dumps the result into the appropriate field.
8+
- dumps the result into the appropriate field or a textarea that you can copy/paste from (e.g., for the Content field).
99

1010
## Requirements
1111

@@ -27,26 +27,28 @@ The base prompt is appended to every prompt you generate. It can be considered s
2727

2828
**Note:** modAI also works with SEO Suite, which uses the longtitle and description fields (see below). It also supports image+ for things like Open Graph sharing preview images, hero section images, etc.
2929

30-
The `modai.prompt.base` can be used for **{INSERT DESCRIPTION HERE}**
30+
The `modai.prompt.base` can be thought of as the equivalent to a light version of ChatGPT’s custom instructions: it appends the base prompt to ever other prompt for your site.
3131

32-
If you wish to override a model or model configuration for a specific field, or to attach to additional fields, you do so by creating a system setting in the format of `modai.prompt.{field}`, where field is any of the built in fields in MODX. You can also attach modAI to Template Variables (TVs) with input options of text, textarea or image TVs. It will always attach to Image+ TVs, with support for the alt attribute generation. **[TODO: confirm TVs]**
32+
If you wish to override a model or model configuration for a specific field, or to attach to additional fields, you do so by creating a system setting in the format of `modai.prompt.{field}.{setting}` substituting for the relevant `{field}` and `{setting}` as appropriate.
33+
34+
You can attach modAI to text, textarea or image Template Variables (TVs) using similar settings to the built in fields: `modai.prompt.{tv-name}.{setting}` (setting is optional). It will always attach to Image+ TVs, with support for the alt attribute generation using the vision models to describe the images for you.
3335

3436
## Usage
3537

36-
Wherever you see a 🪄, you can click it to call the chatGPT api to create content in those fileds. It will automatically attach that behavior to several fields defined below. You can delete the prompt settings below to remove modAI from generative AI content creation:
38+
Wherever you see a field or a label with a “sparkle” button next to it (✦), click it to call the chatGPT api to create content in those fileds based on the prompts stored in the system settings. It will automatically attach that behavior to several fields defined below. Delete the prompt settings below will remove modAI from generative AI content creation for those fields:
3739

38-
- pagetitle – sometimes used for an H1 tag (~60 characters)
39-
- longtitle – often used for the SEO Meta Title (should be ~70 characters)
40-
- description – often used for the SEO Meta Description (should be ~155 characters)
41-
- introtext – aka Summary, this is used to create a brief summary of the page content field and used to generate images
42-
- image+ Image fields – it will use the introtext/summary as a default prompt which can be overwritten before requesting an image generation. It also uses the vision API to create 120 character alt tag descriptions if enabled for your Image+ TVs.
40+
- **pagetitle** – sometimes used for an H1 tag (~60 characters)
41+
- **longtitle** – often used for the SEO Meta Title (should be ~70 characters)
42+
- **description** – often used for the SEO Meta Description (should be ~155 characters)
43+
- **introtext** – aka Summary, this is used to create a brief summary of the page content field and used to generate images
44+
- **image+ TVs** – it will use the introtext/summary as a default prompt which can be overwritten before requesting an image generation. It also uses the vision API to create 120 character alt tag descriptions if enabled for your Image+ TVs.
4345

44-
If you’re not happy with what it generates, click the icon again to generate another variation. You can then use the small arrows to go between the options. When you save, it keeps the option shown and discards the rest.
46+
If you’re not happy with what it generates, click the sparkle button again to generate another variation. You can then use the small arrows to go between the options. When you save, it keeps the option shown and discards the rest.
4547

4648
For details on current models supported, consult the documentation at https://platform.openai.com/docs/models, https://platform.openai.com/docs/guides/text-generation, https://platform.openai.com/docs/guides/vision, and https://platform.openai.com/docs/guides/images.
4749

4850
## Costs
4951

5052
OpenAI API credits must be purchased for this Extra to work. You can find costs for the various models at https://openai.com/api/pricing/.
5153

52-
To learn more about maanging cost, make sure to use the most optimal models for the type of content you expect your prompts to generate. For example, [1000 tokes is roughly equal to 750 words](https://platform.openai.com/docs/guides/production-best-practices#text-generation); make sure the [model you choose](https://platform.openai.com/docs/guides/model-selection) is the right one for the job at hand.
54+
To learn more about maanging cost, make sure to use the most optimal models for the type of content you expect your prompts to generate. For example, [1000 tokes is roughly equal to 750 words](https://platform.openai.com/docs/guides/production-best-practices#text-generation); make sure the [model you choose](https://platform.openai.com/docs/guides/model-selection) is the right one for the job at hand.

0 commit comments

Comments
 (0)