fix createBlogFromCaptions function default values

This commit is contained in:
Omer Sabic 2024-06-13 14:44:55 +02:00
parent bfe1c4fe0a
commit b4c44e7622

View File

@ -71,13 +71,14 @@ async function promptGPT(prompt, { model, is_json } = { model: "gpt-3.5-turbo",
export async function createBlogFromCaptions(captions, {
title,
description
}, {
}, options = {}) {
const {
length,
language,
format,
tone,
faq
} = { length: 700, language: "English", format: "summary", tone: "informal", faq: false }) {
} = Object.assign({ length: 700, language: "English", format: "summary", tone: "informal", faq: false }, options);
// const prompt = `Convert the following video transcript into a blog post. The approximate length should be around ${length || 500} characters, written in ${language || "English"}. The desired format of the blog post is a ${format || "summary"}. Please ensure the blog post has a ${tone || "informal"} tone throughout. Use markdown to format the article. You must always respond in the following json fromat: {"title": string, "content": string, "seo_friendly_slug": string}. \nHere is the transcript: `
// const prompt = `Convert the following video transcript into an engaging blog post. You must always respond in the following json fromat: {"title": string, "body": string, "seo_friendly_slug": string}. Do not, under any circumstance, include the title inside the body, it should only be reserved for the body of the article. Use markdown to format the article. Use "\\n" to add line-breaks. \nHere is the transcript: `;