0

I'm having trouble importing something to the new APP directory API route. When I use the following code, everything works fine and I get a 200 status response:

export async function POST(request) {
  return new Response("hello world", {
    status: 200,
  });
}

However, when I try to import the ChatGPTAPI from chatgpt, as shown below, I only receive a 404 page response. I have no idea what the problem is and I'm hoping someone can help me.

import { ChatGPTAPI } from "chatgpt";
export async function POST(request) {
  return new Response("hello world", {
    status: 200,
  });
}
kerim p.
  • 35
  • 6

0 Answers0