Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for some of the issues #33

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion generate/eleven.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ const imagePrompt = async (title) => {
console.log('💭 Generating image prompt for:', title);
try {
const response = await openai.chat.completions.create({
model: 'ft:gpt-3.5-turbo-1106:personal::8TEhcfKm',
model: 'gpt-4o-mini',
messages: [{ role: 'user', content: title }],
});
console.log('✅ Prompt generated:', response.choices[0]?.message.content);
Expand Down
2 changes: 1 addition & 1 deletion generate/remotion.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { enableTailwind } from '@remotion/tailwind';

Config.setVideoImageFormat('jpeg');
Config.setOverwriteOutput(true);
Config.setConcurrency(8);
Config.setConcurrency(4);
// Config.setChromiumMultiProcessOnLinux(true);

// This template processes the whole audio file on each thread which is heavy.
Expand Down
4 changes: 3 additions & 1 deletion generate/transcript.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const groq = new Groq({
apiKey: process.env.GROQ_API_KEY,
});

const dialogueTransitions = 5;

async function generateTranscript(topic, agentA, agentB, duration) {
console.log('📝 Starting generateTranscript with params:', {
topic,
Expand All @@ -32,7 +34,7 @@ async function generateTranscript(topic, agentA, agentB, duration) {
'_',
' '
)} offers a deep, analytical perspective. The dialogue should be engaging and include light humor, yet still provide meaningful insights into ${topic}. Limit the dialogue to a maximum of ${
duration * 7
duration * dialogueTransitions
} exchanges, aiming for a concise transcript that would last between ${duration} minutes. The person attribute should either be ${agentA} or ${agentB}. The line attribute should be that character's line of dialogue. It should be risque and edgy, so as to be interesting to watch. I also need an asset description under the asset attribute which would be a relevant search query to find an image which should be relevant to the overall topic of the conversation. The asset descriptions shouldn't be vague, but a description of something that you think would be a good image to go along with the conversation. Specificity is key. And don't include a direct mention of a politician in assets, if for example, Trump is mentioned, don't use the word Trump in the asset description, but instead something like white male with blonde hair combover ya know. The JSON format WHICH MUST BE ADHERED TO ALWAYS is as follows: { transcript: { [ {'person': 'the exact value of ${agentA} or ${agentB} depending on who is talking', 'line': 'their line of conversation in the dialog', asset: 'relevant search query based on the current line'} ] } }`,
},
{
Expand Down