This commit is contained in:
parent
008bbb3643
commit
f90c5361ed
|
|
@ -2,7 +2,7 @@ import { checkApiKey, getServerProfile } from "@/lib/server/server-chat-helpers"
|
|||
import { ServerRuntime } from "next"
|
||||
import OpenAI from "openai"
|
||||
|
||||
export const runtime: ServerRuntime = "edge"
|
||||
//export const runtime: ServerRuntime = "edge"
|
||||
|
||||
export async function GET() {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { ChatCompletionCreateParamsBase } from "openai/resources/chat/completion
|
|||
import { getRuntimeEnv } from "@/lib/runtime-env"
|
||||
|
||||
|
||||
export const runtime: ServerRuntime = "edge"
|
||||
//export const runtime: ServerRuntime = "edge"
|
||||
|
||||
export async function POST(request: Request) {
|
||||
const json = await request.json()
|
||||
|
|
@ -42,7 +42,7 @@ export async function POST(request: Request) {
|
|||
}
|
||||
|
||||
console.log("🎯 Using model:", customModel.base_url)
|
||||
|
||||
|
||||
const custom = new OpenAI({
|
||||
apiKey: customModel.api_key || "",
|
||||
baseURL: customModel.base_url
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { ServerRuntime } from "next"
|
|||
import OpenAI from "openai"
|
||||
import { ChatCompletionCreateParamsBase } from "openai/resources/chat/completions.mjs"
|
||||
|
||||
export const runtime: ServerRuntime = "edge"
|
||||
//export const runtime: ServerRuntime = "edge"
|
||||
|
||||
export async function POST(request: Request) {
|
||||
const json = await request.json()
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { ServerRuntime } from "next"
|
|||
import OpenAI from "openai"
|
||||
import { ChatCompletionCreateParamsBase } from "openai/resources/chat/completions.mjs"
|
||||
|
||||
export const runtime: ServerRuntime = "edge"
|
||||
//export const runtime: ServerRuntime = "edge"
|
||||
|
||||
export async function POST(request: Request) {
|
||||
const json = await request.json()
|
||||
|
|
|
|||
Loading…
Reference in New Issue