diff --git a/app/api/search-func.ts b/app/api/search-func/route.ts similarity index 99% rename from app/api/search-func.ts rename to app/api/search-func/route.ts index edad1ee..bda7818 100644 --- a/app/api/search-func.ts +++ b/app/api/search-func/route.ts @@ -26,7 +26,7 @@ const openai = new OpenAIApi(config); export const runtime = "edge"; -export default async function handler(req: NextRequest) { +export async function POST(req: NextRequest) { try { if (!openAiKey) { throw new ApplicationError("Missing environment variable OPENAI_KEY");