Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public class PromptFormat {
public static final String SYSTEM_PLACEHOLDER = "{{ system_prompt }}";
public static final String USER_PLACEHOLDER = "{{ user_prompt }}";
public static final String ASSISTANT_PLACEHOLDER = "{{ assistant_response }}";
public static final String DEFAULT_SYSTEM_PROMPT = "Answer the questions in a few sentences";

public static String getSystemPromptTemplate(ModelType modelType) {
switch (modelType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class SettingsActivity extends AppCompatActivity {
public SettingsFields mSettingsFields;

private DemoSharedPreferences mDemoSharedPreferences;
public static double TEMPERATURE_MIN_VALUE = 0.1;
public static double TEMPERATURE_MIN_VALUE = 0.0;

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand Down Expand Up @@ -120,6 +120,7 @@ private void setupLoadModelButton() {
public void onClick(DialogInterface dialog, int whichButton) {
mSettingsFields.saveLoadModelAction(true);
mLoadModelButton.setEnabled(false);
onBackPressed();
}
})
.setNegativeButton(android.R.string.no, null)
Expand Down Expand Up @@ -208,8 +209,7 @@ public void afterTextChanged(Editable s) {
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
// Clear the messageAdapter and sharedPreference
mSystemPromptEditText.setText(
PromptFormat.getSystemPromptTemplate(mModelType));
mSystemPromptEditText.setText(PromptFormat.DEFAULT_SYSTEM_PROMPT);
}
})
.setNegativeButton(android.R.string.no, null)
Expand Down
Loading