Revert "Added OpenAI Uri option"

This reverts commit ca9001dcf5.
This commit is contained in:
M66B
2023-05-29 17:48:38 +02:00
parent ca9001dcf5
commit 30af9cebcf
3 changed files with 4 additions and 48 deletions

View File

@@ -154,17 +154,12 @@ public class OpenAI {
return choices;
}
private static String getUri(Context context) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
return prefs.getString("openai_uri", BuildConfig.OPENAI_ENDPOINT);
}
private static JSONObject call(Context context, String method, String path, JSONObject args) throws JSONException, IOException {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
String apikey = prefs.getString("openai_apikey", null);
// https://platform.openai.com/docs/api-reference/introduction
Uri uri = Uri.parse(getUri(context)).buildUpon().appendEncodedPath(path).build();
Uri uri = Uri.parse(BuildConfig.OPENAI_ENDPOINT).buildUpon().appendEncodedPath(path).build();
Log.i("OpenAI uri=" + uri);
long start = new Date().getTime();