Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit 900b6d4

Browse files
authored
[Android] Skip if token is system token <...> (#958)
1 parent a95f24d commit 900b6d4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

android/torchchat/app/src/main/java/org/pytorch/torchchat/MainActivity.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ public class MainActivity extends Activity implements Runnable, LlamaCallback {
3737

3838
@Override
3939
public void onResult(String result) {
40+
if (result.startsWith("<") && result.endsWith(">")) {
41+
return;
42+
}
4043
mResultMessage.appendText(result);
4144
run();
4245
}

0 commit comments

Comments
 (0)