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