feat: update openai
This commit is contained in:
parent
13d23d4f80
commit
cb5eeb40fd
@ -85,7 +85,7 @@ export async function createGenres(
|
||||
title = "unknown",
|
||||
) {
|
||||
if (!openAI) return;
|
||||
const chatCompletion = await openAI.createChatCompletion({
|
||||
const chatCompletion = await openAI.chat.completions.create({
|
||||
model: "gpt-3.5-turbo",
|
||||
messages: [
|
||||
{
|
||||
@ -114,7 +114,7 @@ export async function createKeywords(
|
||||
title = "unknown",
|
||||
) {
|
||||
if (!openAI) return;
|
||||
const chatCompletion = await openAI.createChatCompletion({
|
||||
const chatCompletion = await openAI.chat.completions.create({
|
||||
model: "gpt-3.5-turbo",
|
||||
messages: [
|
||||
{
|
||||
@ -142,7 +142,7 @@ export const getMovieRecommendations = (keywords: string, exclude: string[]) =>
|
||||
cacheFunction({
|
||||
fn: async () => {
|
||||
if (!openAI) return;
|
||||
const chatCompletion = await openAI.createChatCompletion({
|
||||
const chatCompletion = await openAI.chat.completions.create({
|
||||
model: "gpt-3.5-turbo",
|
||||
messages: [
|
||||
{
|
||||
@ -186,7 +186,7 @@ respond with a plain unordered list each item starting with the year the movie w
|
||||
|
||||
export async function createTags(content: string) {
|
||||
if (!openAI) return;
|
||||
const chatCompletion = await openAI.createChatCompletion({
|
||||
const chatCompletion = await openAI.chat.completions.create({
|
||||
model: "gpt-3.5-turbo",
|
||||
messages: [
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user