Shortcode and “how to edit prompt”
-
Hi and thanks for this very nifty plugin. I have two questions though:
- Somewhere in the documentation is mentioned a shortcode for displaying the summary frontend. I simply cant find it ??
- If I need to adjust the prompt – how would I do that?
Thanks!
-
Hi Johan,
Thank you for the kind words about the plugin! I’m glad you’ve found it.
Regarding your questions:
Shortcode for Displaying the Summary: The shortcode you mentioned was originally intended to allow customization of the title, button, colors, and other elements. However, you can now achieve all of this through the “Override” checkbox available on each post or page. This gives you more control directly within the editor without needing to use a shortcode. The documentation will be updated. Thank you for letting me know.
Adjusting the Prompt: Since this is an AI-powered assistant, it’s more than just a prompt. There is an initial set of instructions but what sets this apart is that it’s using function calling via the Assistant. You can fine tune these by logging into the OpenAI Playground. Simply head over to the “Assistants” section, and you’ll find your assistant and the options to tweak the prompt to your liking. This sounds like a good idea for the next update though!
The main parts are very simple.
‘description’ => ‘This Assistant extracts the top 5 key points from a given article and returns them in a JSON format being sure to use the
extract_key_points
function.’
‘instruction’ => “When provided with a message containing the content of an article, analyze the article and identify the top 5 key points. Call theextract_key_points
function to return these points in a JSON format.The ‘extract_key_points’ function just makes sure the Assistant gives us back the format we need every single time.
I hope this helps! If you have any more questions or need further assistance, feel free to reach out.
Best regards,
JamesThanks again for your questions and for bringing up such a great idea! I’m excited to let you know that based on your feedback, I’ve gone ahead and made some updates.What’s New:
- Adjusting the Prompt: You can now prepend your own custom instructions directly in the plugin settings without breaking the main functionality. While it still uses the core instructions, this update gives you more flexibility to tailor the AI’s behavior.
- Updated Documentation: I’ve removed the reference to the shortcode from the documentation, so it’s clearer that customization happens through the editor using the “Override” checkbox.
If you have any other suggestions or run into anything else, feel free to reach out again. I really appreciate your input!
Best regards,
JamesWauw, this is really a step up! And so quickly implemented ??
I found where to edit the Assistant. I wanted to go from 5 to 4 points, so I think I need to edit the assistant anyway. But the option to edit the prompt inside WordPress is still excellent.
About the shortcode: Actually a shortcode outputting the result would still be useful. I would like to test having the summary inside a harmonica. And maybe having this harmonica below the heading (I am building with Bricks Builder). This would be easy to accomplish with a shortcode OR maybe even better knowing how to call the fields with dynamic tags or PHP.
Anyway, you can see here how we have implemented so far. We are actually really thrilled about it: https://danwatch.dk/danske-pensionskasser-investerer-millioner-i-amerikanske-faengsler-der-anklages-for-tvangsarbejde/
I’m happy you’re finding it useful! To change the number of points, just delete the ones you don’t want. It will create five but if you delete a few of them, in any order, it will display only the points that have content. Simply remove the text from any of the points.
I’ve also added the shortcode with expanded capability. See the readme for real documentation, but the short version is that you can put it inside any element and it will show up there instead of what’s in the settings. You can override every piece.
[summaraize]
would work with all the defaults from your settings.[summaraize view="popup" mode="dark" title="Quick Points" list_type="ordered"]
would override anything else and show with your attributes.You could even put more than one on a page using the post ID. Like this:
[summaraize id="123"]
Some other content
[summaraize id="456"]
If you’re into theming, you could also use it in there with a
do_shortcode("[summaraize]")
.I hope these new options and the shortcode flexibility give you more ways to customize the summary display to fit your needs. Let me know if you have any other questions!
I have to say, it’s so cool to see someone out there in the world using it. Thanks again for trying it out.
- You must be logged in to reply to this topic.