Skip to content

Commit

Permalink
Fix Blackbox provider
Browse files Browse the repository at this point in the history
  • Loading branch information
XInTheDark committed Feb 12, 2025
1 parent 004c4c9 commit 9bffc3c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/api/Providers/blackbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Preferences } from "#root/src/api/preferences.js";

// Implementation ported from gpt4free Blackbox provider.

const api_url = "https://www.blackbox.ai/api/chat";
const api_url = "https://api.blackbox.ai/api/chat";
const headers = {
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:133.0) Gecko/20100101 Firefox/133.0",
Accept: "*/*",
Expand Down Expand Up @@ -153,6 +153,7 @@ export const BlackboxProvider = {
userSelectedModel: userSelectedModelConfig[options.model] || undefined,
validated: validatedToken,
imageGenerationMode: false,
webSearchMode: false,
webSearchModePrompt: false,
deepSearchMode: false,
codeInterpreterMode: codeInterpreterMode,
Expand All @@ -168,7 +169,11 @@ export const BlackboxProvider = {
},
expires: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000).toISOString(),
},
webSearchMode: false,
subscriptionCache: {
expiryTimestamp: null,
lastChecked: Date.now() - 20 * 1000,
status: "PREMIUM",
},
...paramOverrides[options.model],
};

Expand Down

0 comments on commit 9bffc3c

Please sign in to comment.