Initial commit: PodcastYes — AI podcast platform

This commit is contained in:
Leon Serfaty
2026-06-07 03:58:32 -04:00
commit 155507f21a
151 changed files with 19826 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
import OpenAI from "openai";
let client: OpenAI | null = null;
/** Lazily-constructed OpenAI client (used for GPT-4 scripts and DALL·E art). */
export function openai(): OpenAI {
if (!client) {
const apiKey = process.env.OPENAI_API_KEY;
if (!apiKey) throw new Error("OPENAI_API_KEY is not set");
client = new OpenAI({ apiKey });
}
return client;
}
export const SCRIPT_MODEL = process.env.OPENAI_SCRIPT_MODEL ?? "gpt-4o";
export const ART_MODEL = process.env.OPENAI_ART_MODEL ?? "dall-e-3";