Skip to content

Commit 76f9c7c

Browse files
fix: typing
1 parent 13f631e commit 76f9c7c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

  • packages/react-native-executorch/src

packages/react-native-executorch/src/hooks/natural_language_processing/useLLM.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const useLLM = ({ model, preventLoad = false }: LLMProps): LLMType => {
5151
await controllerInstance.load({
5252
modelSource: model.modelSource,
5353
tokenizerSource: model.tokenizerSource,
54-
tokenizerConfigSource: model.tokenizerConfigSource,
54+
tokenizerConfigSource: model.tokenizerConfigSource!,
5555
onDownloadProgressCallback: setDownloadProgress,
5656
});
5757
} catch (e) {

packages/react-native-executorch/src/types/llm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export interface LLMProps {
1919
/**
2020
* `ResourceSource` pointing to the JSON file which contains the tokenizer config.
2121
*/
22-
tokenizerConfigSource: ResourceSource;
22+
tokenizerConfigSource?: ResourceSource;
2323
};
2424
/**
2525
* Boolean that can prevent automatic model loading (and downloading the data if you load it for the first time) after running the hook.

0 commit comments

Comments
 (0)