diff --git a/libraries/nestjs-libraries/src/openai/openai.service.ts b/libraries/nestjs-libraries/src/openai/openai.service.ts index 709ce0ea..eb2999d5 100644 --- a/libraries/nestjs-libraries/src/openai/openai.service.ts +++ b/libraries/nestjs-libraries/src/openai/openai.service.ts @@ -34,7 +34,7 @@ export class OpenaiService { async generatePromptForPicture(prompt: string) { return ( ( - await openai.beta.chat.completions.parse({ + await openai.chat.completions.parse({ model: 'gpt-4.1', messages: [ { @@ -55,7 +55,7 @@ export class OpenaiService { async generateVoiceFromText(prompt: string) { return ( ( - await openai.beta.chat.completions.parse({ + await openai.chat.completions.parse({ model: 'gpt-4.1', messages: [ { @@ -163,7 +163,7 @@ export class OpenaiService { const posts = ( - await openai.beta.chat.completions.parse({ + await openai.chat.completions.parse({ model: 'gpt-4.1', messages: [ { @@ -186,7 +186,7 @@ export class OpenaiService { return { posts: await Promise.all( - posts.map(async (post) => { + posts.map(async (post: any) => { if (post.length <= len) { return post; } @@ -196,7 +196,7 @@ export class OpenaiService { try { return ( ( - await openai.beta.chat.completions.parse({ + await openai.chat.completions.parse({ model: 'gpt-4.1', messages: [ { @@ -230,7 +230,7 @@ export class OpenaiService { const message = `You are an assistant that takes a text and break it into slides, each slide should have an image prompt and voice text to be later used to generate a video and voice, image prompt should capture the essence of the slide and also have a back dark gradient on top, image prompt should not contain text in the picture, generate between 3-5 slides maximum`; return ( ( - await openai.beta.chat.completions.parse({ + await openai.chat.completions.parse({ model: 'gpt-4.1', messages: [ {