Skip to content

Commit 455639b

Browse files
authored
Handle dataPath = null case (#15326)
### Summary Handle dataPath = null case ### Test plan CI
1 parent 7a34ea7 commit 455639b

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)