fix: gemini

This commit is contained in:
Hk-Gosuto
2024-02-09 12:58:54 +08:00
parent 0ed7402494
commit fee45f7b23
4 changed files with 16 additions and 31 deletions

View File

@@ -1,6 +1,6 @@
import { NextRequest, NextResponse } from "next/server";
import { getServerSideConfig } from "../config/server";
import { DEFAULT_MODELS, OPENAI_BASE_URL, GEMINI_BASE_URL } from "../constant";
import { DEFAULT_MODELS, OPENAI_BASE_URL } from "../constant";
import { collectModelTable } from "../utils/model";
import { makeAzurePath } from "../azure";

View File

@@ -1,7 +1,7 @@
import { NextRequest, NextResponse } from "next/server";
import { auth } from "../../auth";
import { getServerSideConfig } from "@/app/config/server";
import { GEMINI_BASE_URL, ModelProvider } from "@/app/constant";
import { GOOGLE_BASE_URL, ModelProvider } from "@/app/constant";
async function handle(
req: NextRequest,
@@ -17,7 +17,7 @@ async function handle(
const serverConfig = getServerSideConfig();
let baseUrl = serverConfig.googleBaseUrl || GEMINI_BASE_URL;
let baseUrl = serverConfig.googleBaseUrl || GOOGLE_BASE_URL;
if (!baseUrl.startsWith("http")) {
baseUrl = `https://${baseUrl}`;