(Context context)
| 165 | } |
| 166 | |
| 167 | private static String getUri(Context context) { |
| 168 | SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); |
| 169 | String endpoint = prefs.getString("openai_uri", BuildConfig.OPENAI_ENDPOINT); |
| 170 | if (!endpoint.endsWith("/")) |
| 171 | endpoint += "/"; |
| 172 | return endpoint; |
| 173 | } |
| 174 | |
| 175 | private static JSONObject call(Context context, String method, String path, JSONObject args) throws JSONException, IOException { |
| 176 | SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); |
no test coverage detected