const extractionResult = await ai.generate({
model: youtubeModel,
prompt: [
{
text: `Analyze the video content from the provided YouTube URL. The video is titled "${title}" by the channel "${channelName}". Your task is to extract the following information and return it as a single, valid JSON object:
1. summary: A concise, one-paragraph summary of the video's content.
2. primaryTopics: An array of 3-5 primary topics discussed.
3. transcript: A full and clean transcript of all spoken content in the video.`,
},
{
media: {
url: videoUrl,
contentType: 'video/mp4',
},
},
],
output: {
schema: LlmOutputSchema,
},
config: {
temperature: 0.2,
// not supported here?
},
});
const extractionResult = await ai.generate({
model: youtubeModel,
prompt: [
{
text: `Analyze the video content from the provided YouTube URL. The video is titled "${title}" by the channel "${channelName}". Your task is to extract the following information and return it as a single, valid JSON object:
1. summary: A concise, one-paragraph summary of the video's content.
2. primaryTopics: An array of 3-5 primary topics discussed.
3. transcript: A full and clean transcript of all spoken content in the video.`,
},
{
media: {
url: videoUrl,
contentType: 'video/mp4',
},
},
],
output: {
schema: LlmOutputSchema,
},
config: {
temperature: 0.2,
// not supported here?
},
});