Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

CodeSignal

Recipe Generation & Extraction with AI and Node.js

via CodeSignal

Overview

Add intelligence to your app using OpenAI’s SDK. Generate structured recipes from ingredients with prompt templates, call the API, and process outputs. Build a script to extract recipes from messy HTML and store them cleanly.

Syllabus

  • Unit 1: Making Your First LLM Call
    • Initialize OpenAI Client
    • System Prompt Persona Transformation
    • Update User Prompt to Arrow Functions in TypeScript
    • Exploring Temperature Effects on AI Responses
    • Model Selection and Comparison Loop
  • Unit 2: Prompt Templates and Variables
    • Implement loadTemplate Function for Static Prompts
    • Implement renderTemplate Function
    • Implement Custom Variable Substitution in Template Renderer
    • Complete renderPromptFromFile Function
    • Recipe Generator Prompt Template
  • Unit 3: Building the LLM Manager
    • Setup OpenAI Client in LLM Service
    • Implement Prompt Rendering in generateResponse Function
    • Integrate OpenAI Chat Completion in generateResponse
    • Add Robust Error Handling to LLM Manager API Calls
  • Unit 4: AI Recipe Generation
    • Create Prompt Templates for Recipe Generation
    • Implement Input Validation for Recipe Generation Route
    • AI Recipe Generation Integration
    • Implement Recipe Parsing Foundation
    • Implement Recipe Parsing Logic
    • Complete Recipe Generation Endpoint
  • Unit 5: Extracting Recipes from HTML
    • Create Recipe Extraction Prompt Templates
    • Implement the extractRecipeFromHtml Function
    • Implement parseRecipeString Function
    • Implement Recipe Database Storage with Duplicate Check
    • Implement Recipe Extraction CLI

Reviews

Start your review of Recipe Generation & Extraction with AI and Node.js

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.