- KazeiaLlmJni.kt : JNI bindings for 9 native fns (load/generate/setSystem/ reset/snapshot/stats/kvTokens/free). - LlamaCppLlmEngine.kt : implements core LlmEngine interface over KazeiaLlmJni, persistent KV cache across turns, streaming token callback. - jni/kazeia_llm_jni.cpp : JNI bridge to /opt/Kazeia/kazeia-llm/ C++ wrapper (compiled inline via CMakeLists). - jniLibs : libllama.so + ggml-* from /opt/Kazeia/llama-upstream/build-android (rebuilt with GGML_OPENMP=OFF to avoid libomp.so runtime dep). - KazeiaApplication.LLM_BACKEND config + runtime override via debug.kazeia.llm_backend (llamacpp|executorch). Default stays executorch for now; flip to llamacpp per-boot for the new path. - KazeiaService wires the selected engine at pipeline load. Validated on OPD2415: app loads Qwen3.5-4B-Q4_0 in ~4s via llama.cpp, ChatActivity opens, pipeline STT→LLM→TTS ready. Phase 2 complete. |
||
|---|---|---|
| .. | ||
| src/main | ||
| build.gradle.kts | ||
| proguard-rules.pro | ||