Skip to content

Instantly share code, notes, and snippets.

@zacjones93
Created September 8, 2023 20:42
Show Gist options
  • Save zacjones93/3061251ae66b485d4fa210376c597aca to your computer and use it in GitHub Desktop.
Save zacjones93/3061251ae66b485d4fa210376c597aca to your computer and use it in GitHub Desktop.
import "@johnlindquist/kit"
const sanityClient = await npm("@sanity/client");
let { nanoid } = await npm("nanoid");
let eggheadUserToken = await env("EGGHEAD_AUTH_TOKEN");
let key = await env("SANITY_READ_WRITE_KEY");
const eggheadSanityClient = sanityClient({
projectId: "sb1i5dlc",
dataset: "production",
token: key,
useCdn: false, // `false` if you want to ensure fresh data
});
const courseData = {
_type: "course",
_id: "375228991004194061543",
railsCourseId: 1140063,
productionProcessState: "new",
slug: "build-ai-apps-with-chatgpt-dall-e-and-gpt-4-9bc61e99",
title: "Build AI Apps with ChatGPT, Dall-E and GPT-4",
description: null,
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/full/eggheadlogo.png",
resources: [
{
_id: "cIYBhQzGqEkr8nPWsrWrA",
_type: "lesson",
path: "/lessons/egghead-getting-an-openai-api-key",
title: "Getting an OpenAI API Key",
railsLessonId: 10048,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "G3t1-2DvQj9Nx0pf6XE5J",
_type: "lesson",
path: "/lessons/egghead-getting-info-for-fetch-request",
title: "Getting Info for fetch Request",
railsLessonId: 10049,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "AqcEh0jD0aFIMqlpuVqX5",
_type: "lesson",
path: "/lessons/egghead-building-an-openai-fetch-request",
title: "Building an OpenAI Fetch Request\n",
railsLessonId: 10050,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "aXxIBFocV0lsrNtJjk9K0",
_type: "lesson",
path: "/lessons/egghead-the-first-ai-fetch-request",
title: "The First AI Fetch Request",
railsLessonId: 10051,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "24CJf_Wg31fwbpigSulkz",
_type: "lesson",
path: "/lessons/egghead-models",
title: "Models",
railsLessonId: 10052,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "GVqWANJONscxhQ_lFKKIW",
_type: "lesson",
path: "/lessons/egghead-tools",
title: "Tools",
railsLessonId: 10053,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "XnSe4uWLw5SdFLzGBjLce",
_type: "lesson",
path: "/lessons/egghead-refactor-to-use-dependency-i-env-variable",
title: "Refactor to Use Dependency I - .env Variable",
railsLessonId: 10054,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "NwI_hvqJJa-Kg5NVXNPHC",
_type: "lesson",
path: "/lessons/egghead-refactor-to-use-dependency-ii-the-dependency",
title: "Refactor to Use Dependency II - The Dependency",
railsLessonId: 10055,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "w2TzSiAUPBwHg001GYS3_",
_type: "lesson",
path: "/lessons/egghead-refactor-to-use-dependency-iii-update-fetchreply",
title: "Refactor to Use Dependency III - Update fetchReply",
railsLessonId: 10056,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "kfWPrccZLWXF_igd_iGJa",
_type: "lesson",
path: "/lessons/egghead-take-out-of-scrimba",
title: "Take Out of Scrimba",
railsLessonId: 10057,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "gLj5-c1oxKYiZ8v5IP_t0",
_type: "lesson",
path: "/lessons/egghead-personalising-the-message",
title: "Personalising the Message",
railsLessonId: 10058,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "VusC5INbzxR0aT-7WEwm6",
_type: "lesson",
path: "/lessons/egghead-tokens",
title: "Tokens",
railsLessonId: 10059,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "I83ltautnIiF04fdwCI6f",
_type: "lesson",
path: "/lessons/egghead-fetchsynopsis",
title: "fetchSynopsis",
railsLessonId: 10060,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "qMScKmdBq4ikfGXe8EWBo",
_type: "lesson",
path: "/lessons/egghead-aside-few-shot-approach",
title: "Aside: Few Shot Approach",
railsLessonId: 10061,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "MEVchaZMl5qZWaVrNvkSV",
_type: "lesson",
path: "/lessons/egghead-aside-few-shot-approach-ii",
title: "Aside: Few Shot Approach II",
railsLessonId: 10062,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "ZRf8tcwIe7oeC7rFL4A89",
_type: "lesson",
path: "/lessons/egghead-refactor-fetchsynopsis",
title: "Refactor fetchSynopsis",
railsLessonId: 10063,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "opFqEAmhoWdsthhaPhjBb",
_type: "lesson",
path: "/lessons/egghead-architecture",
title: "Architecture",
railsLessonId: 10064,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "cWdsX3uwaaTuq5RbPcz0E",
_type: "lesson",
path: "/lessons/egghead-title-and-temperature",
title: "Title and Temperature",
railsLessonId: 10065,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "1BjIzIs5kBUG7QJadw4Ax",
_type: "lesson",
path: "/lessons/egghead-reaching-for-the-stars",
title: "Reaching for the Stars",
railsLessonId: 10066,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "E_8ieod9rJ0Bz3UiaIsA5",
_type: "lesson",
path: "/lessons/egghead-aside-createimage",
title: "Aside: createImage",
railsLessonId: 10067,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "FVbrhiW74zImcQ8GxlOg6",
_type: "lesson",
path: "/lessons/egghead-fetchimageprompt",
title: "fetchImagePrompt",
railsLessonId: 10068,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "BPWVXIGDCOB4aa5clo5LU",
_type: "lesson",
path: "/lessons/egghead-displaying-the-image-and-finishing-off-the-ux",
title: "Displaying the Image and Finishing off the UX",
railsLessonId: 10069,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "hmxKF9x_-m_fbmCNFIBn9",
_type: "lesson",
path: "/lessons/outro-63626fb2",
title: "Outro",
railsLessonId: 10118,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "HcE40zfqqhv4kW9IebelL",
_type: "lesson",
path: "/lessons/knowitall-intro-904e33fb",
title: "KnowItAll Intro",
railsLessonId: 10071,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "igT-EZgzhFwqjyY-Uq6St",
_type: "lesson",
path: "/lessons/egghead-starter-code",
title: "Starter Code",
railsLessonId: 10072,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "G2DFIXzPthOU00bXAgA5M",
_type: "lesson",
path: "/lessons/egghead-aside-how-chatgpt-models-work-for-chatbots",
title: "Aside: How ChatGPT Models Work for Chatbots",
railsLessonId: 10073,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "5vHhPIPa2e1bRYaHFRAz7",
_type: "lesson",
path: "/lessons/egghead-conversation-and-instructions",
title: "Conversation and Instructions",
railsLessonId: 10074,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "E8qPSuMEW5GNryoyNv31y",
_type: "lesson",
path: "/lessons/egghead-add-user-input-to-conversation-array",
title: "Add User input to Conversation Array",
railsLessonId: 10075,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "GxhYC4G9eS4WYOtnb3hEo",
_type: "lesson",
path: "/lessons/egghead-the-createchatcompletion-endpoint",
title: "The createChatCompletion Endpoint",
railsLessonId: 10076,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "x8Gc2_I2XM4a5XMDGGY1N",
_type: "lesson",
path: "/lessons/egghead-the-model-and-object",
title: "The Model and Object",
railsLessonId: 10077,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "CMBO2vvURx1_ZZBnxePKF",
_type: "lesson",
path: "/lessons/egghead-render-the-output-update-the-array",
title: "Render the Output, Update the Array",
railsLessonId: 10078,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "ZpQ_uAvDyHGG7S-AzNXwD",
_type: "lesson",
path: "/lessons/egghead-aside-theory-frequency-and-presence-penalties",
title: "Aside: Theory: Frequency and Presence Penalties",
railsLessonId: 10079,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "LwtA9uuNsaloUF-Tzeoow",
_type: "lesson",
path: "/lessons/egghead-presence_penalty-practice",
title: "presence_penalty Practice",
railsLessonId: 10080,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "B8tp32plTFi3RcBejdOVG",
_type: "lesson",
path: "/lessons/egghead-frequency_penalty-practice",
title: "frequency_penalty Practice",
railsLessonId: 10081,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "mNfqUjPzurXxHC85EXFCT",
_type: "lesson",
path: "/lessons/egghead-the-chatbot-s-personality",
title: "The Chatbot's Personality",
railsLessonId: 10082,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "N5y4u9WgvypayUeoVOx_Y",
_type: "lesson",
path: "/lessons/egghead-firebase-intro",
title: "Firebase Intro",
railsLessonId: 10083,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "KQIap-krz06v0I4lXFIG3",
_type: "lesson",
path: "/lessons/egghead-firebase-account-and-database-set-up",
title: "Firebase Account and Database Set Up",
railsLessonId: 10084,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "PXaPaltYislA5kzWDReyg",
_type: "lesson",
path: "/lessons/egghead-firebase-dependency-and-set-up",
title: "Firebase Dependency and Set Up",
railsLessonId: 10085,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "jbRRh5aOlnzFo4NScnHFB",
_type: "lesson",
path: "/lessons/egghead-push-method-and-instructions-object",
title: "Push Method and Instructions Object",
railsLessonId: 10086,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "VoUg59ZvYgQx7DvNqIteh",
_type: "lesson",
path: "/lessons/update-fetchreply-44a4f530",
title: "Update fetchReply",
railsLessonId: 10114,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "OU-tJ-3Ehkwy-wOL0Bujn",
_type: "lesson",
path: "/lessons/egghead-update-fetchreply-2",
title: "Update fetchReply 2",
railsLessonId: 10088,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "VGWCysTDP7-SPbmWuJVhH",
_type: "lesson",
path: "/lessons/egghead-update-the-database",
title: "Update the Database",
railsLessonId: 10089,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "lQ413vOBgVVsuyZVHlKF_",
_type: "lesson",
path: "/lessons/egghead-render-the-conversation-from-the-db",
title: "Render the Conversation From the DB",
railsLessonId: 10090,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "Vh4ynu5B5mgOsMX8qAlPv",
_type: "lesson",
path: "/lessons/egghead-the-start-over-button",
title: 'The "Start Over" Button',
railsLessonId: 10091,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "OOK2l4ncpzoLJ0br_VinN",
_type: "lesson",
path: "/lessons/outro-38d7c118",
title: "Outro",
railsLessonId: 10092,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "UGTBHam9aC_Hdsj76UWae",
_type: "lesson",
path: "/lessons/intro-to-fine-tuning-d4c59ad4",
title: "Intro to fine-tuning",
railsLessonId: 10093,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "W1z0ri5ee4i8jfLSrAs5l",
_type: "lesson",
path: "/lessons/egghead-convert-the-chatbot-to-we-wingit",
title: "Convert the Chatbot to We-Wingit",
railsLessonId: 10094,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "TeKLz1b50ImrvsvnUtyg7",
_type: "lesson",
path: "/lessons/egghead-an-overview-of-the-ai",
title: "An Overview of the AI",
railsLessonId: 10095,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "oW14xSaay3mX8eQyrCHJM",
_type: "lesson",
path: "/lessons/egghead-data-for-fine-tuning",
title: "Data for fine-tuning",
railsLessonId: 10096,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "KJc2wxsPrx_4AGicTZrnG",
_type: "lesson",
path: "/lessons/egghead-the-data-we-re-using",
title: "The Data We're Using\n",
railsLessonId: 10097,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "lq0U_VkfkqvQccAvygjsq",
_type: "lesson",
path: "/lessons/egghead-cli-1-setting-up-the-environment",
title: "CLI 1: Setting Up The Environment",
railsLessonId: 10098,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "B192CKZTPdWlqgHdLbZNM",
_type: "lesson",
path: "/lessons/egghead-cli-2-data-preparation-tool",
title: "CLI 2: Data Preparation Tool",
railsLessonId: 10099,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "49hX10PZNc8hWl5viRnvr",
_type: "lesson",
path: "/lessons/egghead-cli-3-tuning-the-model",
title: "CLI 3: Tuning The Model",
railsLessonId: 10100,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "OZP_44c29ybZ4mdABGVl6",
_type: "lesson",
path: "/lessons/egghead-updating-the-js-1",
title: "Updating the JS 1",
railsLessonId: 10101,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "W5mpU4UTc-dj9rGzQC9-2",
_type: "lesson",
path: "/lessons/egghead-updating-the-js-2",
title: "Updating the JS 2",
railsLessonId: 10102,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "83oFQIs8t3lCBHwseEC5D",
_type: "lesson",
path: "/lessons/egghead-updating-the-js-3",
title: "Updating the JS 3",
railsLessonId: 10103,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "o8cL9OEvpr5kxPA7VS9eV",
_type: "lesson",
path: "/lessons/egghead-the-separator",
title: "The Separator",
railsLessonId: 10104,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "SbDx4m8GWaJEIvhCemdxu",
_type: "lesson",
path: "/lessons/egghead-aside-stop-sequence",
title: "Aside: Stop Sequence",
railsLessonId: 10105,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "GRG6j1N5pGQmcCD7AyeFc",
_type: "lesson",
path: "/lessons/egghead-adding-the-stop-sequence",
title: "Adding the Stop Sequence",
railsLessonId: 10106,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "vrvN2xI4qL1hc0YAVp6Cu",
_type: "lesson",
path: "/lessons/egghead-n_epochs",
title: "n_epochs",
railsLessonId: 10107,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "Md4FbUjkLyfz0QJ2b_VM8",
_type: "lesson",
path: "/lessons/egghead-intro-to-deployment",
title: "Intro to Deployment",
railsLessonId: 10108,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "c9M9OvmLdAsYRZlL0IY3z",
_type: "lesson",
path: "/lessons/egghead-download-and-github",
title: "Download and GitHub",
railsLessonId: 10109,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "jejl4AiYmCSF33NajAtd1",
_type: "lesson",
path: "/lessons/egghead-netlify-sign-up",
title: "Netlify sign-up",
railsLessonId: 10110,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "Ehvh_ukh2h8YeCbLOYdqR",
_type: "lesson",
path: "/lessons/egghead-add-netlify-env-var",
title: "Add Netlify env var",
railsLessonId: 10111,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "bw5TrN0S5PRCldlFOlOve",
_type: "lesson",
path: "/lessons/egghead-netlify-cli",
title: "Netlify CLI",
railsLessonId: 10112,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "VeqeFgk5v5Q7ZqGKSYXoy",
_type: "lesson",
path: "/lessons/egghead-netlify-serverless-function-1",
title: "Netlify Serverless Function 1",
railsLessonId: 10113,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "mFYLtP5mrDFBNckM8rsOb",
_type: "lesson",
path: "/lessons/egghead-update-fetchreply",
title: "Update fetchReply",
railsLessonId: 10087,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "YmJrB4DYyKSskdz0QoUx0",
_type: "lesson",
path: "/lessons/egghead-serverless-function-2",
title: "Serverless Function 2",
railsLessonId: 10115,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "ZELqFRo6rq7x5QxWzopIh",
_type: "lesson",
path: "/lessons/egghead-serverless-function-3",
title: "Serverless Function 3",
railsLessonId: 10116,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "5b0hmhQbUOI5jbXbGEPDQ",
_type: "lesson",
path: "/lessons/egghead-serverless-function-4",
title: "Serverless Function 4",
railsLessonId: 10117,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "gQEbiCHRJpRstEl7DU6T5",
_type: "lesson",
path: "/lessons/egghead-outro",
title: "Outro",
railsLessonId: 10070,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
],
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
};
let firstSection = [
{
_id: "le4ecsIBmXTTIxhApOz58",
_type: "lesson",
path: "/lessons/course-intro-e04827f0",
title: "Course Intro",
railsLessonId: 10045,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_id: "JXvkOk9PMHu-0IVdB72fq",
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "001ahhYiEck_xu8HkVK7S",
_type: "lesson",
path: "/lessons/moviepitch-intro-c2c75491",
title: "MoviePitch Intro",
railsLessonId: 10046,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_id: "JXvkOk9PMHu-0IVdB72fq",
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "e5Rkd4rdn8TIZg52bOtF9",
_type: "lesson",
path: "/lessons/the-boilerplate-bf824f78",
title: "The Boilerplate",
railsLessonId: 10047,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_id: "JXvkOk9PMHu-0IVdB72fq",
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "cIYBhQzGqEkr8nPWsrWrA",
_type: "lesson",
path: "/lessons/egghead-getting-an-openai-api-key",
title: "Getting an OpenAI API Key",
railsLessonId: 10048,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "G3t1-2DvQj9Nx0pf6XE5J",
_type: "lesson",
path: "/lessons/egghead-getting-info-for-fetch-request",
title: "Getting Info for fetch Request",
railsLessonId: 10049,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "AqcEh0jD0aFIMqlpuVqX5",
_type: "lesson",
path: "/lessons/egghead-building-an-openai-fetch-request",
title: "Building an OpenAI Fetch Request\n",
railsLessonId: 10050,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "aXxIBFocV0lsrNtJjk9K0",
_type: "lesson",
path: "/lessons/egghead-the-first-ai-fetch-request",
title: "The First AI Fetch Request",
railsLessonId: 10051,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "24CJf_Wg31fwbpigSulkz",
_type: "lesson",
path: "/lessons/egghead-models",
title: "Models",
railsLessonId: 10052,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "GVqWANJONscxhQ_lFKKIW",
_type: "lesson",
path: "/lessons/egghead-tools",
title: "Tools",
railsLessonId: 10053,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "XnSe4uWLw5SdFLzGBjLce",
_type: "lesson",
path: "/lessons/egghead-refactor-to-use-dependency-i-env-variable",
title: "Refactor to Use Dependency I - .env Variable",
railsLessonId: 10054,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "NwI_hvqJJa-Kg5NVXNPHC",
_type: "lesson",
path: "/lessons/egghead-refactor-to-use-dependency-ii-the-dependency",
title: "Refactor to Use Dependency II - The Dependency",
railsLessonId: 10055,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "w2TzSiAUPBwHg001GYS3_",
_type: "lesson",
path: "/lessons/egghead-refactor-to-use-dependency-iii-update-fetchreply",
title: "Refactor to Use Dependency III - Update fetchReply",
railsLessonId: 10056,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "kfWPrccZLWXF_igd_iGJa",
_type: "lesson",
path: "/lessons/egghead-take-out-of-scrimba",
title: "Take Out of Scrimba",
railsLessonId: 10057,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "gLj5-c1oxKYiZ8v5IP_t0",
_type: "lesson",
path: "/lessons/egghead-personalising-the-message",
title: "Personalising the Message",
railsLessonId: 10058,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "VusC5INbzxR0aT-7WEwm6",
_type: "lesson",
path: "/lessons/egghead-tokens",
title: "Tokens",
railsLessonId: 10059,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "I83ltautnIiF04fdwCI6f",
_type: "lesson",
path: "/lessons/egghead-fetchsynopsis",
title: "fetchSynopsis",
railsLessonId: 10060,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "qMScKmdBq4ikfGXe8EWBo",
_type: "lesson",
path: "/lessons/egghead-aside-few-shot-approach",
title: "Aside: Few Shot Approach",
railsLessonId: 10061,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "MEVchaZMl5qZWaVrNvkSV",
_type: "lesson",
path: "/lessons/egghead-aside-few-shot-approach-ii",
title: "Aside: Few Shot Approach II",
railsLessonId: 10062,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "ZRf8tcwIe7oeC7rFL4A89",
_type: "lesson",
path: "/lessons/egghead-refactor-fetchsynopsis",
title: "Refactor fetchSynopsis",
railsLessonId: 10063,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "opFqEAmhoWdsthhaPhjBb",
_type: "lesson",
path: "/lessons/egghead-architecture",
title: "Architecture",
railsLessonId: 10064,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "cWdsX3uwaaTuq5RbPcz0E",
_type: "lesson",
path: "/lessons/egghead-title-and-temperature",
title: "Title and Temperature",
railsLessonId: 10065,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "1BjIzIs5kBUG7QJadw4Ax",
_type: "lesson",
path: "/lessons/egghead-reaching-for-the-stars",
title: "Reaching for the Stars",
railsLessonId: 10066,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "E_8ieod9rJ0Bz3UiaIsA5",
_type: "lesson",
path: "/lessons/egghead-aside-createimage",
title: "Aside: createImage",
railsLessonId: 10067,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "FVbrhiW74zImcQ8GxlOg6",
_type: "lesson",
path: "/lessons/egghead-fetchimageprompt",
title: "fetchImagePrompt",
railsLessonId: 10068,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "BPWVXIGDCOB4aa5clo5LU",
_type: "lesson",
path: "/lessons/egghead-displaying-the-image-and-finishing-off-the-ux",
title: "Displaying the Image and Finishing off the UX",
railsLessonId: 10069,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "hmxKF9x_-m_fbmCNFIBn9",
_type: "lesson",
path: "/lessons/outro-63626fb2",
title: "Outro",
railsLessonId: 10118,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},]
let secondSection = [{
_id: "HcE40zfqqhv4kW9IebelL",
_type: "lesson",
path: "/lessons/knowitall-intro-904e33fb",
title: "KnowItAll Intro",
railsLessonId: 10071,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "igT-EZgzhFwqjyY-Uq6St",
_type: "lesson",
path: "/lessons/egghead-starter-code",
title: "Starter Code",
railsLessonId: 10072,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "G2DFIXzPthOU00bXAgA5M",
_type: "lesson",
path: "/lessons/egghead-aside-how-chatgpt-models-work-for-chatbots",
title: "Aside: How ChatGPT Models Work for Chatbots",
railsLessonId: 10073,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "5vHhPIPa2e1bRYaHFRAz7",
_type: "lesson",
path: "/lessons/egghead-conversation-and-instructions",
title: "Conversation and Instructions",
railsLessonId: 10074,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "E8qPSuMEW5GNryoyNv31y",
_type: "lesson",
path: "/lessons/egghead-add-user-input-to-conversation-array",
title: "Add User input to Conversation Array",
railsLessonId: 10075,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "GxhYC4G9eS4WYOtnb3hEo",
_type: "lesson",
path: "/lessons/egghead-the-createchatcompletion-endpoint",
title: "The createChatCompletion Endpoint",
railsLessonId: 10076,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "x8Gc2_I2XM4a5XMDGGY1N",
_type: "lesson",
path: "/lessons/egghead-the-model-and-object",
title: "The Model and Object",
railsLessonId: 10077,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "CMBO2vvURx1_ZZBnxePKF",
_type: "lesson",
path: "/lessons/egghead-render-the-output-update-the-array",
title: "Render the Output, Update the Array",
railsLessonId: 10078,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "ZpQ_uAvDyHGG7S-AzNXwD",
_type: "lesson",
path: "/lessons/egghead-aside-theory-frequency-and-presence-penalties",
title: "Aside: Theory: Frequency and Presence Penalties",
railsLessonId: 10079,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "LwtA9uuNsaloUF-Tzeoow",
_type: "lesson",
path: "/lessons/egghead-presence_penalty-practice",
title: "presence_penalty Practice",
railsLessonId: 10080,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "B8tp32plTFi3RcBejdOVG",
_type: "lesson",
path: "/lessons/egghead-frequency_penalty-practice",
title: "frequency_penalty Practice",
railsLessonId: 10081,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "mNfqUjPzurXxHC85EXFCT",
_type: "lesson",
path: "/lessons/egghead-the-chatbot-s-personality",
title: "The Chatbot's Personality",
railsLessonId: 10082,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "N5y4u9WgvypayUeoVOx_Y",
_type: "lesson",
path: "/lessons/egghead-firebase-intro",
title: "Firebase Intro",
railsLessonId: 10083,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "KQIap-krz06v0I4lXFIG3",
_type: "lesson",
path: "/lessons/egghead-firebase-account-and-database-set-up",
title: "Firebase Account and Database Set Up",
railsLessonId: 10084,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "PXaPaltYislA5kzWDReyg",
_type: "lesson",
path: "/lessons/egghead-firebase-dependency-and-set-up",
title: "Firebase Dependency and Set Up",
railsLessonId: 10085,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "jbRRh5aOlnzFo4NScnHFB",
_type: "lesson",
path: "/lessons/egghead-push-method-and-instructions-object",
title: "Push Method and Instructions Object",
railsLessonId: 10086,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "VoUg59ZvYgQx7DvNqIteh",
_type: "lesson",
path: "/lessons/update-fetchreply-44a4f530",
title: "Update fetchReply",
railsLessonId: 10114,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "OU-tJ-3Ehkwy-wOL0Bujn",
_type: "lesson",
path: "/lessons/egghead-update-fetchreply-2",
title: "Update fetchReply 2",
railsLessonId: 10088,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "VGWCysTDP7-SPbmWuJVhH",
_type: "lesson",
path: "/lessons/egghead-update-the-database",
title: "Update the Database",
railsLessonId: 10089,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "lQ413vOBgVVsuyZVHlKF_",
_type: "lesson",
path: "/lessons/egghead-render-the-conversation-from-the-db",
title: "Render the Conversation From the DB",
railsLessonId: 10090,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "Vh4ynu5B5mgOsMX8qAlPv",
_type: "lesson",
path: "/lessons/egghead-the-start-over-button",
title: 'The "Start Over" Button',
railsLessonId: 10091,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "OOK2l4ncpzoLJ0br_VinN",
_type: "lesson",
path: "/lessons/outro-38d7c118",
title: "Outro",
railsLessonId: 10092,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},]
let thirdSection = [{
_id: "UGTBHam9aC_Hdsj76UWae",
_type: "lesson",
path: "/lessons/intro-to-fine-tuning-d4c59ad4",
title: "Intro to fine-tuning",
railsLessonId: 10093,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "W1z0ri5ee4i8jfLSrAs5l",
_type: "lesson",
path: "/lessons/egghead-convert-the-chatbot-to-we-wingit",
title: "Convert the Chatbot to We-Wingit",
railsLessonId: 10094,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "TeKLz1b50ImrvsvnUtyg7",
_type: "lesson",
path: "/lessons/egghead-an-overview-of-the-ai",
title: "An Overview of the AI",
railsLessonId: 10095,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "oW14xSaay3mX8eQyrCHJM",
_type: "lesson",
path: "/lessons/egghead-data-for-fine-tuning",
title: "Data for fine-tuning",
railsLessonId: 10096,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "KJc2wxsPrx_4AGicTZrnG",
_type: "lesson",
path: "/lessons/egghead-the-data-we-re-using",
title: "The Data We're Using\n",
railsLessonId: 10097,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "lq0U_VkfkqvQccAvygjsq",
_type: "lesson",
path: "/lessons/egghead-cli-1-setting-up-the-environment",
title: "CLI 1: Setting Up The Environment",
railsLessonId: 10098,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "B192CKZTPdWlqgHdLbZNM",
_type: "lesson",
path: "/lessons/egghead-cli-2-data-preparation-tool",
title: "CLI 2: Data Preparation Tool",
railsLessonId: 10099,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "49hX10PZNc8hWl5viRnvr",
_type: "lesson",
path: "/lessons/egghead-cli-3-tuning-the-model",
title: "CLI 3: Tuning The Model",
railsLessonId: 10100,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "OZP_44c29ybZ4mdABGVl6",
_type: "lesson",
path: "/lessons/egghead-updating-the-js-1",
title: "Updating the JS 1",
railsLessonId: 10101,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "W5mpU4UTc-dj9rGzQC9-2",
_type: "lesson",
path: "/lessons/egghead-updating-the-js-2",
title: "Updating the JS 2",
railsLessonId: 10102,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "83oFQIs8t3lCBHwseEC5D",
_type: "lesson",
path: "/lessons/egghead-updating-the-js-3",
title: "Updating the JS 3",
railsLessonId: 10103,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "o8cL9OEvpr5kxPA7VS9eV",
_type: "lesson",
path: "/lessons/egghead-the-separator",
title: "The Separator",
railsLessonId: 10104,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "SbDx4m8GWaJEIvhCemdxu",
_type: "lesson",
path: "/lessons/egghead-aside-stop-sequence",
title: "Aside: Stop Sequence",
railsLessonId: 10105,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "GRG6j1N5pGQmcCD7AyeFc",
_type: "lesson",
path: "/lessons/egghead-adding-the-stop-sequence",
title: "Adding the Stop Sequence",
railsLessonId: 10106,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "vrvN2xI4qL1hc0YAVp6Cu",
_type: "lesson",
path: "/lessons/egghead-n_epochs",
title: "n_epochs",
railsLessonId: 10107,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "Md4FbUjkLyfz0QJ2b_VM8",
_type: "lesson",
path: "/lessons/egghead-intro-to-deployment",
title: "Intro to Deployment",
railsLessonId: 10108,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "c9M9OvmLdAsYRZlL0IY3z",
_type: "lesson",
path: "/lessons/egghead-download-and-github",
title: "Download and GitHub",
railsLessonId: 10109,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "jejl4AiYmCSF33NajAtd1",
_type: "lesson",
path: "/lessons/egghead-netlify-sign-up",
title: "Netlify sign-up",
railsLessonId: 10110,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "Ehvh_ukh2h8YeCbLOYdqR",
_type: "lesson",
path: "/lessons/egghead-add-netlify-env-var",
title: "Add Netlify env var",
railsLessonId: 10111,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "bw5TrN0S5PRCldlFOlOve",
_type: "lesson",
path: "/lessons/egghead-netlify-cli",
title: "Netlify CLI",
railsLessonId: 10112,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "VeqeFgk5v5Q7ZqGKSYXoy",
_type: "lesson",
path: "/lessons/egghead-netlify-serverless-function-1",
title: "Netlify Serverless Function 1",
railsLessonId: 10113,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "mFYLtP5mrDFBNckM8rsOb",
_type: "lesson",
path: "/lessons/egghead-update-fetchreply",
title: "Update fetchReply",
railsLessonId: 10087,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "YmJrB4DYyKSskdz0QoUx0",
_type: "lesson",
path: "/lessons/egghead-serverless-function-2",
title: "Serverless Function 2",
railsLessonId: 10115,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "ZELqFRo6rq7x5QxWzopIh",
_type: "lesson",
path: "/lessons/egghead-serverless-function-3",
title: "Serverless Function 3",
railsLessonId: 10116,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "5b0hmhQbUOI5jbXbGEPDQ",
_type: "lesson",
path: "/lessons/egghead-serverless-function-4",
title: "Serverless Function 4",
railsLessonId: 10117,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},
{
_id: "gQEbiCHRJpRstEl7DU6T5",
_type: "lesson",
path: "/lessons/egghead-outro",
title: "Outro",
railsLessonId: 10070,
description: "",
image:
"https://d2eip9sf3oo6c2.cloudfront.net/tags/images/000/001/033/thumb/eggheadlogo.png",
collaborators: [
{
_key: nanoid(),
_ref: "c3cb0d6d-c56c-49c9-9972-dc50f0fe7a4f",
_type: "reference",
},
],
},]
let convertSectionToReference = (section) => {
return section.map((lesson) => {
return {
_key: nanoid(),
_type: "reference",
_ref: lesson._id,
}
})
}
try {
let lessonReferences = convertSectionToReference(thirdSection)
// section 1 id: 6337a9bc-0ff0-43a6-ac06-ca69a3f368b1
// section 2 id: 6dfd13a0-1232-4b38-b664-4ad968d205f4
// section 3 id: b39ed597-4bd8-4e59-bc73-cbeb7ed39c56
console.log({lessonReferences})
eggheadSanityClient.patch("b39ed597-4bd8-4e59-bc73-cbeb7ed39c56")
.set({resources: [...lessonReferences]}) // Shallow merge
.commit()
} catch(e) {
console
}
//! Create lessons in sanity
// try {
// test.map(async (lesson) => {
// let fullLesson = {
// slug: {
// _type: "slug",
// current: lesson.title.replace(/\s+/g, "-").toLowerCase(),
// },
// ...lesson,
// }
// let { title } = await eggheadSanityClient.createIfNotExists(fullLesson);
// console.log({title})
// // eggheadSanityClient.delete(lesson._id)
// })
// } catch(e) {
// console
// }
// Define section titles and the range of lesson indices for each section
// const sectionsData = [
// {
// sectionTitle: "First Section",
// lessonRange: [0, 25],
// },
// {
// sectionTitle: "Second Section",
// lessonRange: [26, 47],
// },
// {
// sectionTitle: "Third Section",
// lessonRange: [48, 74],
// },
// ];
// Helper function to create a section object
// function createSection(title, lessonRefs) {
// return {
// _type: "section",
// title,
// slug: {
// _type: "slug",
// current: title.replace(/\s+/g, "-").toLowerCase(),
// },
// resources: lessonRefs.map((lessonIndex) => console.log(lessonIndex) && ({
// _type: "reference",
// _ref: courseData.resources[lessonIndex]._id,
// })),
// };
// }
// // Create sections and add them to the courseData
// const sections = sectionsData.map(({ sectionTitle, lessonRange }) =>
// createSection(
// sectionTitle,
// Array.from(
// { length: lessonRange[1] - lessonRange[0] },
// (_, i) => lessonRange[0] + i
// ).map((lessonIndex) => courseData.resources[lessonIndex]["_id"])
// )
// );
// courseData.resources = sections;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment