feat: remove beta
This commit is contained in:
parent
6fe4d49d11
commit
2461e9b874
|
|
@ -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: [
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue