mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 21:58:52 +02:00
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user