Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've found that with GPT one of the simplest ways to get exactly what you want is to ask for JSON. I am building a site that takes a drink name (real or imagined) and gives you back a recipe with an image, ingredients list, mixologist's notes, and instructions. I get the prompt for dall-e and everything else in a single call to gpt-3.5-turbo by asking for the model to complete a JSON object, something like:

  {title: <user submitted>,
   description: <str 150 chars>,
   product_photo_prompt_for_dalle: <str 150 chars never includes the title>,
   ingredients: [<str like '1.5 oz whiskey'>,...],
   instructions: [<str like 'add whiskey and soda to a rocks glass'>,...]
   mixologists_notes: <250 char, public-facing, promotional tone>
  }


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: