Removed OpenAI moderation

This commit is contained in:
M66B
2024-05-14 14:45:31 +02:00
parent a0775944a1
commit 3f06073664
3 changed files with 2 additions and 35 deletions

View File

@@ -2704,13 +2704,6 @@ public class FragmentCompose extends FragmentBase {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
String model = prefs.getString("openai_model", OpenAI.DEFAULT_MODEL);
float temperature = prefs.getFloat("openai_temperature", OpenAI.DEFAULT_TEMPERATURE);
boolean moderation = prefs.getBoolean("openai_moderation", false);
if (moderation)
for (OpenAI.Message message : result)
for (OpenAI.Content content : message.getContent())
if (OpenAI.CONTENT_TEXT.equals(content.getContent()))
OpenAI.checkModeration(context, content.getContent());
OpenAI.Message[] completions =
OpenAI.completeChat(context, model, result.toArray(new OpenAI.Message[0]), temperature, 1);