Is there any way to retrieve those AI summaries via API call? We would like to display those AI summaries automatically in our wordpress blog on product pages.
AI-generated summary
jrgong asks if AI summaries can be retrieved via an API to automatically display them on WordPress product pages. pfaffman suggests that any UI element can be accessed via the API, possibly by appending .json to the URL, and recommends reviewing the Reverse engineer the Discourse API guide for more details.
sam provides the specific endpoint for retrieving summaries: https://SITE/discourse-ai/summarization/t/TOPIC_ID.json. For example: curl https://meta.discourse.org/discourse-ai/summarization/t/325562.json. Sam advises excluding the stream parameter, as it triggers the message bus for real-time updates, which is more complex. Additionally, an API key for a user belonging to a group with permission to generate summaries is required.
Anything that displays in the ux you can get with the API. You can probably just add .json to the url, but see Reverse engineer the Discourse API
Use the following endpoint:
https://SITE/discourse-ai/summarization/t/TOPIC_ID.json
Eg:
curl https://meta.discourse.org/discourse-ai/summarization/t/325562.json
Be sure not to include the stream parameter. The stream parameter will cause the message bus to deliver new summaries, which is a more complex protocol.
Also, be sure to use an API key for a user in a group that is able to generate summaries.