mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-01 15:46:39 +08:00
fix google bug
This commit is contained in:
parent
598018e7b5
commit
7d9e85b4f4
@ -1,4 +1,4 @@
|
|||||||
import { Google, REQUEST_TIMEOUT_MS } from "@/app/constant";
|
import { Google, REQUEST_TIMEOUT_MS, ApiPath } from "@/app/constant";
|
||||||
import { ChatOptions, getHeaders, LLMApi, LLMModel, LLMUsage } from "../api";
|
import { ChatOptions, getHeaders, LLMApi, LLMModel, LLMUsage } from "../api";
|
||||||
import { useAccessStore, useAppConfig, useChatStore } from "@/app/store";
|
import { useAccessStore, useAppConfig, useChatStore } from "@/app/store";
|
||||||
import { getClientConfig } from "@/app/config/client";
|
import { getClientConfig } from "@/app/config/client";
|
||||||
@ -110,7 +110,7 @@ export class GeminiProApi implements LLMApi {
|
|||||||
|
|
||||||
const accessStore = useAccessStore.getState();
|
const accessStore = useAccessStore.getState();
|
||||||
|
|
||||||
let baseUrl = "";
|
let baseUrl: string = ApiPath.Google;
|
||||||
|
|
||||||
if (accessStore.useCustomConfig) {
|
if (accessStore.useCustomConfig) {
|
||||||
baseUrl = accessStore.googleUrl;
|
baseUrl = accessStore.googleUrl;
|
||||||
|
@ -173,6 +173,7 @@ export class ChatGPTApi implements LLMApi {
|
|||||||
} else {
|
} else {
|
||||||
chatPath = this.path(OpenaiPath.ChatPath);
|
chatPath = this.path(OpenaiPath.ChatPath);
|
||||||
}
|
}
|
||||||
|
console.log('333333', chatPath)
|
||||||
const chatPayload = {
|
const chatPayload = {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: JSON.stringify(requestPayload),
|
body: JSON.stringify(requestPayload),
|
||||||
|
@ -706,7 +706,9 @@ export const useChatStore = createPersistStore(
|
|||||||
set(() => ({}));
|
set(() => ({}));
|
||||||
extAttr?.setAutoScroll(true);
|
extAttr?.setAutoScroll(true);
|
||||||
} else {
|
} else {
|
||||||
const api: ClientApi = getClientApi(modelConfig.providerName);
|
const api: ClientApi = getClientApi(modelConfig.providerName)
|
||||||
|
console.log('-------', modelConfig, '-----', api)
|
||||||
|
|
||||||
// make request
|
// make request
|
||||||
api.llm.chat({
|
api.llm.chat({
|
||||||
messages: sendMessages,
|
messages: sendMessages,
|
||||||
|
Loading…
Reference in New Issue
Block a user