Skip to content

Commit c5acf97

Browse files
committed
fix: register TokenizerModule constructor & fix concept usages
1 parent b676862 commit c5acf97

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

packages/react-native-executorch/common/rnexecutorch/RnExecutorchInstaller.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ REGISTER_CONSTRUCTOR(ObjectDetection, std::string,
2828
std::shared_ptr<react::CallInvoker>);
2929
REGISTER_CONSTRUCTOR(BaseModel, std::string,
3030
std::shared_ptr<react::CallInvoker>);
31+
REGISTER_CONSTRUCTOR(TokenizerModule, std::string,
32+
std::shared_ptr<react::CallInvoker>);
3133

3234
using namespace facebook;
3335

packages/react-native-executorch/common/rnexecutorch/host_objects/ModelHostObject.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ template <typename Model> class ModelHostObject : public JsiHostObject {
4646
"generate"));
4747
}
4848

49-
if constexpr (HasEncode<Model>) {
49+
if constexpr (meta::HasEncode<Model>) {
5050
addFunctions(JSI_EXPORT_FUNCTION(ModelHostObject<Model>,
5151
promiseHostFunction<&Model::encode>,
5252
"encode"));
5353
}
5454

55-
if constexpr (HasDecode<Model>) {
55+
if constexpr (meta::HasDecode<Model>) {
5656
addFunctions(JSI_EXPORT_FUNCTION(ModelHostObject<Model>,
5757
promiseHostFunction<&Model::decode>,
5858
"decode"));

0 commit comments

Comments
 (0)