INNER CODE UNIT · TypeScript

podcastContent

miantiao-me/hacker-podcast · workflow/index.ts:80

  const podcastContent = await step.do(stepNames.generatePodcastScript, thinkingModelRetryConfig, async ({ attempt }) => {
    const { text, usage, finishReason } = await generateText({
      model: ctx.openai(getContentGenerationModel(ctx, attempt)),
      system: summarizePodcastPrompt,
      prompt: allStories.join('\n\n---\n\n'),
      maxOutputTokens: ctx.maxTokens,
      maxRetries: 0,
    })

    console.info(`create hacker podcast content success`, { text, usage, finishReason })

    return text
  })

  console.info('podcast content:\n', ctx.isDev ? podcastContent : podcastContent.slice(0, 100))

  await step.sleep(stepNames.pauseAfterPodcastScript, ctx.breakTime)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…