Gemini: default model temperature

pull/215/head
M66B 8 months ago
parent b20b7dee10
commit 1fad4ad80c

@ -2790,7 +2790,7 @@ public class FragmentCompose extends FragmentBase {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
String model = prefs.getString("gemini_model", "gemini-pro"); String model = prefs.getString("gemini_model", "gemini-pro");
float temperature = prefs.getFloat("gemini_temperature", 0.5f); float temperature = prefs.getFloat("gemini_temperature", 0.9f);
Gemini.Message message = new Gemini.Message(Gemini.USER, new String[]{Gemini.truncateParagraphs(body)}); Gemini.Message message = new Gemini.Message(Gemini.USER, new String[]{Gemini.truncateParagraphs(body)});

@ -106,7 +106,7 @@ public class FragmentDialogSummarize extends FragmentDialogBase {
return sb.toString(); return sb.toString();
} else if (Gemini.isAvailable(context)) { } else if (Gemini.isAvailable(context)) {
String model = prefs.getString("gemini_model", "gemini-pro"); String model = prefs.getString("gemini_model", "gemini-pro");
float temperature = prefs.getFloat("gemini_temperature", 0.5f); float temperature = prefs.getFloat("gemini_temperature", 0.9f);
String prompt = prefs.getString("gemini_summarize", Gemini.SUMMARY_PROMPT); String prompt = prefs.getString("gemini_summarize", Gemini.SUMMARY_PROMPT);
Gemini.Message message = new Gemini.Message(Gemini.USER, new String[]{prompt, text}); Gemini.Message message = new Gemini.Message(Gemini.USER, new String[]{prompt, text});

@ -804,7 +804,7 @@ public class FragmentOptionsIntegrations extends FragmentBase implements SharedP
etGeminiModel.setText(prefs.getString("gemini_model", null)); etGeminiModel.setText(prefs.getString("gemini_model", null));
etGeminiModel.setEnabled(swGemini.isChecked()); etGeminiModel.setEnabled(swGemini.isChecked());
temperature = prefs.getFloat("gemini_temperature", 0.5f); temperature = prefs.getFloat("gemini_temperature", 0.9f);
tvGeminiTemperature.setText(getString(R.string.title_advanced_openai_temperature, NF.format(temperature))); tvGeminiTemperature.setText(getString(R.string.title_advanced_openai_temperature, NF.format(temperature)));
sbGeminiTemperature.setProgress(Math.round(temperature * 10)); sbGeminiTemperature.setProgress(Math.round(temperature * 10));
sbGeminiTemperature.setEnabled(swGemini.isChecked()); sbGeminiTemperature.setEnabled(swGemini.isChecked());

Loading…
Cancel
Save