Skip to content

Commit b386eec

Browse files
committed
Handle dataPath = null case
1 parent 58bd91c commit b386eec

File tree

1 file changed

+6
-1
lines changed
  • extension/android/executorch_android/src/main/java/org/pytorch/executorch/extension/llm

1 file changed

+6
-1
lines changed

extension/android/executorch_android/src/main/java/org/pytorch/executorch/extension/llm/LlmModule.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,12 @@ public LlmModule(
7070
*/
7171
public LlmModule(
7272
int modelType, String modulePath, String tokenizerPath, float temperature, String dataPath) {
73-
this(modelType, modulePath, tokenizerPath, temperature, List.of(dataPath));
73+
this(
74+
modelType,
75+
modulePath,
76+
tokenizerPath,
77+
temperature,
78+
dataPath != null ? List.of(dataPath) : List.of());
7479
}
7580

7681
/** Constructs a LLM Module for a model with given model path, tokenizer, temperature. */

0 commit comments

Comments
 (0)