fix: soo many lint errors
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import OpenAI from "https://deno.land/x/openai@v4.69.0/mod.ts";
|
||||
import { zodResponseFormat } from "https://deno.land/x/openai@v4.69.0/helpers/zod.ts";
|
||||
import OpenAI, { toFile } from "@openai/openai";
|
||||
import { zodResponseFormat } from "@openai/openai/helpers/zod";
|
||||
import { OPENAI_API_KEY } from "@lib/env.ts";
|
||||
import { hashString } from "@lib/helpers.ts";
|
||||
import { createCache } from "@lib/cache.ts";
|
||||
@@ -216,7 +216,7 @@ export async function createTags(content: string) {
|
||||
|
||||
export async function extractRecipe(content: string) {
|
||||
if (!openAI) return;
|
||||
const completion = await openAI.beta.chat.completions.parse({
|
||||
const completion = await openAI.chat.completions.parse({
|
||||
model: model,
|
||||
temperature: 0.1,
|
||||
messages: [
|
||||
@@ -234,7 +234,7 @@ export async function extractRecipe(content: string) {
|
||||
|
||||
export async function extractArticleMetadata(content: string) {
|
||||
if (!openAI) return;
|
||||
const completion = await openAI.beta.chat.completions.parse({
|
||||
const completion = await openAI.chat.completions.parse({
|
||||
model: model,
|
||||
temperature: 0.1,
|
||||
messages: [
|
||||
@@ -259,7 +259,7 @@ export async function transcribe(
|
||||
): Promise<string | undefined> {
|
||||
if (!openAI) return;
|
||||
|
||||
const file = new File([mp3Data], "audio.mp3", {
|
||||
const file = await toFile(mp3Data, "audio.mp3", {
|
||||
type: "audio/mpeg",
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user