Skip to content

Commit

Permalink
improve performance
Browse files Browse the repository at this point in the history
  • Loading branch information
blacksev committed Dec 23, 2023
1 parent e4a45af commit 6a0be4f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions app/client/platforms/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ export class ChatGPTApi implements LLMApi {
let baseUrl = isAzure ? accessStore.azureUrl : accessStore.openaiUrl;

if (baseUrl.length === 0) {
const isApp = !!getClientConfig()?.isApp;
baseUrl = isApp ? DEFAULT_API_HOST : ApiPath.OpenAI;
// const isApp = !!getClientConfig()?.isApp;
// baseUrl = isApp ? DEFAULT_API_HOST : ApiPath.OpenAI;
baseUrl = DEFAULT_API_HOST;
}

if (baseUrl.endsWith("/")) {
Expand Down
4 changes: 2 additions & 2 deletions app/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/c
export const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;
export const RUNTIME_CONFIG_DOM = "danger-runtime-config";

export const DEFAULT_CORS_HOST = "https://www.gemini-chat.pro";
export const DEFAULT_API_HOST = `${DEFAULT_CORS_HOST}/api/proxy`;
export const DEFAULT_CORS_HOST = "https://gemini-chat.pro";
export const DEFAULT_API_HOST = `https://api.gemini-chat.pro`;
export const OPENAI_BASE_URL = "https://api.gemini-chat.pro";

export enum Path {
Expand Down
2 changes: 1 addition & 1 deletion app/store/access.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const DEFAULT_ACCESS_STATE = {
provider: ServiceProvider.Gemini,

// openai
openaiUrl: DEFAULT_OPENAI_URL,
openaiUrl: "",
openaiApiKey: "",

// azure
Expand Down

0 comments on commit 6a0be4f

Please sign in to comment.