Skip to content

Commit

Permalink
perf: revert to openAIAPIURL, avoid breaking user config
Browse files Browse the repository at this point in the history
  • Loading branch information
tisfeng committed Mar 7, 2024
1 parent 520a116 commit 4907c2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@
},
{
"title": "OpenAI Endpoint",
"name": "openAIEndpoint",
"name": "openAIAPIURL",
"type": "textfield",
"required": false,
"description": "Your OpenAI Endpoint",
Expand Down
4 changes: 2 additions & 2 deletions src/preferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export interface MyPreferences {

enableOpenAITranslate: boolean;
openAIAPIKey: string;
openAIEndpoint: string;
openAIAPIURL: string;
openAIModel: string;
}

Expand Down Expand Up @@ -102,7 +102,7 @@ export class AppKeyStore {
static volcanoSecretKey = myPreferences.volcanoAccessKeySecret.trim();

static openAIAPIKey = myPreferences.openAIAPIKey.trim();
static openAIEndpoint = myPreferences.openAIEndpoint.trim() || "https://api.openai.com/v1/chat/completions";
static openAIEndpoint = myPreferences.openAIAPIURL.trim() || "https://api.openai.com/v1/chat/completions";
static openAIModel = myPreferences.openAIModel.trim() || "gpt-3.5-turbo";
}

Expand Down

0 comments on commit 4907c2e

Please sign in to comment.