-
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathpipelineConfig.ts
More file actions
105 lines (104 loc) · 4.31 KB
/
pipelineConfig.ts
File metadata and controls
105 lines (104 loc) · 4.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
import { defineField, defineType } from "sanity";
export default defineType({
name: "pipelineConfig",
title: "Pipeline Config",
type: "document",
icon: () => "🔧",
fields: [
defineField({
name: "geminiModel",
title: "Gemini Model",
type: "string",
description: "The Google Gemini model used for script generation and content analysis (e.g., gemini-2.0-flash, gemini-2.5-pro)",
initialValue: "gemini-2.0-flash",
}),
defineField({
name: "elevenLabsVoiceId",
title: "ElevenLabs Voice ID",
type: "string",
description: "ElevenLabs voice ID for text-to-speech narration. Find voice IDs at elevenlabs.io/voice-library",
initialValue: "pNInz6obpgDQGcFmaJgB",
}),
defineField({
name: "youtubeUploadVisibility",
title: "YouTube Upload Visibility",
type: "string",
description: "Default visibility for uploaded YouTube videos. Use 'private' for testing, 'unlisted' for review, 'public' for production",
initialValue: "private",
options: {
list: ["private", "unlisted", "public"],
},
}),
defineField({
name: "youtubeChannelId",
title: "YouTube Channel ID",
type: "string",
description: "Your YouTube channel ID — used for analytics and upload targeting",
initialValue: "",
}),
defineField({
name: "enableNotebookLmResearch",
title: "Enable NotebookLM Research",
type: "boolean",
description: "When enabled, the ingest cron creates a NotebookLM notebook for deep research before script generation. Requires NOTEBOOKLM_AUTH_JSON env var",
initialValue: false,
}),
defineField({
name: "enableDeepResearch",
title: "Enable Deep Research",
type: "boolean",
description: "When enabled, the ingest cron uses Gemini Deep Research API for comprehensive topic research before script generation. Replaces NotebookLM research.",
initialValue: false,
}),
defineField({
name: "deepResearchAgent",
title: "Deep Research Agent",
type: "string",
description: "The Gemini Deep Research agent model ID. This is the agent used for autonomous web research via the Interactions API",
initialValue: "deep-research-pro-preview-12-2025",
}),
defineField({
name: "deepResearchPromptTemplate",
title: "Deep Research Prompt Template",
type: "text",
description: "Template for Deep Research queries. Use {topic} as placeholder for the trend topic. Sent to the Deep Research agent for autonomous web research",
initialValue: "Research comprehensively: \"{topic}\"\n\nFocus areas:\n- What is it and why does it matter?\n- How does it work technically?\n- Key features and capabilities\n- Comparison with alternatives\n- Getting started guide\n- Common pitfalls and best practices\n\nTarget audience: Web developers learning new tech.\nTone: Educational, accessible, engaging.",
}),
defineField({
name: "infographicModel",
title: "Infographic Model",
type: "string",
description: "Model used for generating brand-consistent infographics from research data. Imagen 4 Fast ($0.02/image) supports seed-based reproducibility",
initialValue: "imagen-4-fast",
}),
defineField({
name: "qualityThreshold",
title: "Quality Threshold",
type: "number",
description: "Minimum quality score (0-100) from the AI critic. Videos scoring below this are flagged for manual review instead of auto-publishing",
initialValue: 50,
validation: (rule) => rule.min(0).max(100),
}),
defineField({
name: "stuckTimeoutMinutes",
title: "Stuck Timeout Minutes",
type: "number",
description: "Minutes before a pipeline document is considered stuck and auto-flagged. Sub-statuses use proportional timeouts (infographics: 50%, enriching: 33%)",
initialValue: 30,
validation: (rule) => rule.min(5).max(120),
}),
defineField({
name: "maxIdeasPerRun",
title: "Max Ideas Per Run",
type: "number",
description: "Maximum number of content ideas to process per ingest cron run. Keep low (1-3) to stay within serverless time limits",
initialValue: 1,
validation: (rule) => rule.min(1).max(10),
}),
],
preview: {
prepare() {
return { title: "Pipeline Config" };
},
},
});