Skip to content

Commit

Permalink
removed API key completely from settings preview
Browse files Browse the repository at this point in the history
  • Loading branch information
DevEmperor committed Nov 21, 2024
1 parent bd220c6 commit d148d30
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,8 @@ public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
EditTextPreference apiKeyPreference = findPreference("net.devemperor.wristassist.api_key");
if (apiKeyPreference != null) {
apiKeyPreference.setSummaryProvider((Preference.SummaryProvider<EditTextPreference>) preference -> {
String key = preference.getText();
if (TextUtils.isEmpty(key)) return getString(R.string.wristassist_no_api_key);
if (key.length() <= 40) return key;
return key.substring(0, 40) + "...";
if (TextUtils.isEmpty(preference.getText())) return getString(R.string.wristassist_no_api_key);
return getString(R.string.wristassist_api_key_set);
});

apiKeyPreference.setOnBindEditTextListener(editText -> {
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-de-rDE/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,5 @@
<string name="changelog_md_31">### Version 3.1.1 \n#### Neues GPT-4 Omni Mini Modell \nOpenAI hat ihr neues Modell GPT-4o mini veröffentlicht, das ihr kostengünstigstes kleines Modell ist – intelligenter und billiger als GPT-3.5 Turbo und hat auch Vision-Fähigkeiten. Das Modell hat einen Kontext von 128K und eine Wissensgrenze bis Oktober 2023. Du kannst in den Einstellungen zu diesem Modell wechseln, das 60% günstiger ist als GPT-3.5 Turbo. \n</string>
<string name="wristassist_whisper_count" formatted="false">Transkriptionszeit:\n%1$d min, %2$d s</string>
<string name="changelog_md_32">### Version 3.2.0 \n#### Whisper-Transkription hinzugefügt \nWenn du die Freisprech-Eingabe nutzt, verwendet WristAssist jetzt OpenAI Whisper, das zuverlässiger ist als die meisten Transkriptions-Engines von verschiedenen Tastaturen. \n#### Neue Chat-Modelle \nDie neuen o1-Modelle von OpenAI wurden hinzugefügt. \n#### Verschiedene Bugfixes und Designänderungen \n</string>
<string name="wristassist_api_key_set">API-Schlüssel festgelegt</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,5 @@
<string name="changelog_md_31">### Version 3.1.1 \n#### New GPT-4 Omni mini model \nOpenAI released their new model GPT-4o mini, which is their most cost-efficient small model that\'s smarter and cheaper than GPT-3.5 Turbo, and has vision capabilities. The model has 128K context and an October 2023 knowledge cutoff. You can switch to this model, which is 60% cheaper than GPT-3.5 Turbo, in the settings. \n</string>
<string name="wristassist_whisper_count" formatted="false">Transcription time:\n%1$d min, %2$d s</string>
<string name="changelog_md_32">### Version 3.2.0 \n#### Added Whisper transcription \nIf you use hands-free input, WristAssist now uses OpenAI Whisper, which works more reliable than most transcription engines from different keyboards. \n#### New chat models \nOpenAI\'s new o1 models were added in this release. \n#### Several bugfixes and design changes \n</string>
<string name="wristassist_api_key_set">API key set</string>
</resources>

0 comments on commit d148d30

Please sign in to comment.