Skip to content

Commit b46639c

Browse files
committed
undefined member fix
1 parent 7b0b6c0 commit b46639c

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎packages/react-native-executorch/src/constants/modelUrls.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,6 @@ export const GEMMA4_E2B = {
141141
Platform.OS === `android` ? GEMMA4_E2B_VULKAN : GEMMA4_E2B_XNNPACK,
142142
tokenizerSource: GEMMA4_TOKENIZER,
143143
tokenizerConfigSource: GEMMA4_TOKENIZER_CONFIG,
144-
audioConfig: {
145-
samplesPerBlock: 7680,
146-
tokensPerBlock: 12,
147-
},
148144
} as const;
149145

150146
/**
@@ -157,6 +153,10 @@ export const GEMMA4_E2B_MM = {
157153
tokenizerSource: GEMMA4_TOKENIZER,
158154
tokenizerConfigSource: GEMMA4_TOKENIZER_CONFIG,
159155
capabilities: ['vision', 'audio'],
156+
audioConfig: {
157+
samplesPerBlock: 7680,
158+
tokensPerBlock: 12,
159+
},
160160
} as const;
161161

162162
/**

‎packages/react-native-executorch/src/controllers/LLMController.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export class LLMController {
117117
this.nativeModule.unload();
118118
}
119119

120-
if ('audio' in (model.capabilities ?? [])) {
120+
if ((model.capabilities ?? []).find((c) => c == 'audio')) {
121121
this.audioConfig = model.audioConfig;
122122
}
123123

0 commit comments

Comments
 (0)