peakshift / makers.bolt.fun

https://makers.bolt.fun
GNU General Public License v3.0
31 stars 21 forks source link

Feat: generate story excerpt using AI service #279

Closed MTG2000 closed 9 months ago

MTG2000 commented 9 months ago

Model used: GPT 3.5 Turbo Prompt used: " The user will give you an article, & your job is to write a short description to it and to ALWAYS follow these rules:

Summarize this article which is surrounded by triple backticks: ``` ${data.story.title}

${data.story.body} ``` "

@johnsBeharry If you have any additions to the prompt or updates, let me know.

I can include almost any piece of data from the story in the prompt (author name, tags, date, project name)

Of course, to get the most meaningful summary, we should only include the most relevant pieces of information.

I think: title, story body, project name if any. Should be enough.

NOTE The description for a story will be generated ONLY once. When the story is first published. Any later updates to the story will NOT trigger the ai service again.

netlify[bot] commented 9 months ago

Deploy Preview for makers-bolt-fun-preview ready!

Name Link
Latest commit b4ad17ef76a170187381e7fdc397bb4fca180573
Latest deploy log https://app.netlify.com/sites/makers-bolt-fun-preview/deploys/655c6af77ef8bf0007d82761
Deploy Preview https://deploy-preview-279--makers-bolt-fun-preview.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] commented 9 months ago

Deploy Preview for makers-bolt-fun-stories ready!

Name Link
Latest commit b4ad17ef76a170187381e7fdc397bb4fca180573
Latest deploy log https://app.netlify.com/sites/makers-bolt-fun-stories/deploys/655c6af7a7266900086cf2b8
Deploy Preview https://deploy-preview-279--makers-bolt-fun-stories.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

johnsBeharry commented 9 months ago

tried testing with a social share debugger, and this is what shows for your story

https://deploy-preview-279--makers-bolt-fun-preview.netlify.app/story/sharing-my-fears-the-uncomfortable-journey-of-buildinpublic--23

Screenshot 2023-11-22 at 14 54 02
MTG2000 commented 9 months ago

Hmm Maybe it's an issue with the social preview tool.

I tried it on Telegram, & it seems to be working fine: image

johnsBeharry commented 9 months ago

@MTG2000 here's an update to the prompt. let me know what you think.

Write an og:description meta tag for an article:
- Create a compelling summary in 1-2 sentences, max 110 characters.
- Begin with the most engaging part to attract clicks.
- Output as a JSON object with key 'summary' for the description.

Summarize this article which is surrounded by triple backticks:
\```
Title: ${data.story.title}

${data.story.body}
\```
MTG2000 commented 9 months ago

Yeah, looks good. I updated the prompt to this.