Commit 48610bf
authored
## Description
Fixes the arguments passed to `LLMController.load` in
`LLMModule.fromModelName` to make loading VLMs work correctly.
### Introduces a breaking change?
- [ ] Yes
- [x] No
### Type of change
- [x] Bug fix (change which fixes an issue)
- [ ] New feature (change which adds functionality)
- [ ] Documentation update (improves or adds clarity to existing
documentation)
- [ ] Other (chores, tests, code style improvements etc.)
### Tested on
- [x] iOS
- [ ] Android
### Testing instructions
<!-- Provide step-by-step instructions on how to test your changes.
Include setup details if necessary. -->
Use this simple screen to test
```ts
import { useEffect } from 'react';
import { LLMModule, LFM2_VL_1_6B_QUANTIZED } from 'react-native-executorch';
export default function LLMModuleExample() {
useEffect(() => {
const run = async () => {
const llm = await LLMModule.fromModelName(
LFM2_VL_1_6B_QUANTIZED,
undefined,
(token) => console.log(token)
);
await llm.sendMessage('Hello!');
llm.delete();
};
run().catch(console.error);
}, []);
return null;
}
```
### Screenshots
<!-- Add screenshots here, if applicable -->
### Related issues
<!-- Link related issues here using #issue-number -->
Closes #998
### Checklist
- [x] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have updated the documentation accordingly
- [x] My changes generate no new warnings
### Additional notes
<!-- Include any additional information, assumptions, or context that
reviewers might need to understand this PR. -->
1 parent 27592da commit 48610bf
File tree
1 file changed
+1
-0
lines changed- packages/react-native-executorch/src/modules/natural_language_processing
1 file changed
+1
-0
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
0 commit comments