Merge remote-tracking branch 'upstream/main'

This commit is contained in:
Hk-Gosuto
2024-04-21 12:58:47 +08:00
11 changed files with 617 additions and 305 deletions

View File

@@ -126,7 +126,13 @@ export class GeminiProApi implements LLMApi {
};
const accessStore = useAccessStore.getState();
let baseUrl = accessStore.googleUrl;
let baseUrl = "";
if (accessStore.useCustomConfig) {
baseUrl = accessStore.googleUrl;
}
const isApp = !!getClientConfig()?.isApp;
let shouldStream = !!options.config.stream;
@@ -134,8 +140,8 @@ export class GeminiProApi implements LLMApi {
options.onController?.(controller);
try {
let googleChatPath = visionModel
? Google.VisionChatPath
: Google.ChatPath;
? Google.VisionChatPath(modelConfig.model)
: Google.ChatPath(modelConfig.model);
let chatPath = this.path(googleChatPath);
if (!baseUrl) {