summaryrefslogtreecommitdiff
path: root/examples/llama.android/app/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'examples/llama.android/app/src/main/java/com')
-rw-r--r--examples/llama.android/app/src/main/java/com/example/llama/Llm.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/llama.android/app/src/main/java/com/example/llama/Llm.kt b/examples/llama.android/app/src/main/java/com/example/llama/Llm.kt
index 5f327037..d86afee3 100644
--- a/examples/llama.android/app/src/main/java/com/example/llama/Llm.kt
+++ b/examples/llama.android/app/src/main/java/com/example/llama/Llm.kt
@@ -71,7 +71,7 @@ class Llm {
batch: Long,
nLen: Int,
ncur: IntVar
- ): String
+ ): String?
private external fun kv_cache_clear(context: Long)
@@ -115,7 +115,7 @@ class Llm {
val ncur = IntVar(completion_init(state.context, state.batch, message, nlen))
while (ncur.value <= nlen) {
val str = completion_loop(state.context, state.batch, nlen, ncur)
- if (str.isEmpty()) {
+ if (str == null) {
break
}
emit(str)