Skip to content

Commit acf1b2b

Browse files
cmodi-metafacebook-github-bot
authored andcommitted
Add Echo Parameter In Android App
Summary: If echo = true then token_callback for output will also include input (i.e. Text Completition) If echo = false then token_callback for output will not include input (i.e. Chat generation). We'll default to true since that will maintain the existing flow. Differential Revision: D61394870
1 parent cd8aed6 commit acf1b2b

File tree

1 file changed

+1
-1
lines changed
  • examples/demo-apps/android/LlamaDemo/app/src/main/java/com/example/executorchllamademo

1 file changed

+1
-1
lines changed

examples/demo-apps/android/LlamaDemo/app/src/main/java/com/example/executorchllamademo/MainActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ public void run() {
599599
});
600600
ETLogging.getInstance().log("Running inference.. prompt=" + prompt);
601601
long generateStartTime = System.currentTimeMillis();
602-
mModule.generate(prompt, MainActivity.this);
602+
mModule.generate(prompt, false, MainActivity.this);
603603
long generateDuration = System.currentTimeMillis() - generateStartTime;
604604
mResultMessage.setTotalGenerationTime(generateDuration);
605605
runOnUiThread(

0 commit comments

Comments
 (0)