diff --git a/app/api/common.ts b/app/api/common.ts index bc428a29..06a67931 100644 --- a/app/api/common.ts +++ b/app/api/common.ts @@ -1,6 +1,6 @@ import { NextRequest } from "next/server"; -const OPENAI_URL = "api.askgptai.tech"; +const OPENAI_URL = "api.openai.com"; const DEFAULT_PROTOCOL = "https"; const PROTOCOL = process.env.PROTOCOL ?? DEFAULT_PROTOCOL; const BASE_URL = process.env.BASE_URL ?? OPENAI_URL; @@ -10,7 +10,7 @@ export async function requestOpenai(req: NextRequest) { const authValue = req.headers.get("Authorization") ?? ""; const openaiPath = `${req.nextUrl.pathname}${req.nextUrl.search}`.replaceAll( "/api/openai/", - "" + "", ); let baseUrl = BASE_URL;