Creates a new ExecuTorch embeddings instance.
Parameters for the instance.
Path or URL of the embedding model.
Path or URL of the tokenizer.
Prompt prepended to inputs without a more specific prompt.
Prompt prepended to documents being indexed.
Prompt prepended to search queries.
Download progress callback (0-1).
Generates an embedding vector for the given text.
Input string to embed.
Optionaloptions: EmbedOptionsWhether text is a document or a query, which selects the prompt.
Promise that resolves to the embedding vector.
Downloads (if needed) and loads the model and tokenizer via react-native-executorch.
Overlapping calls share one load. An unload issued while the load
is in flight wins unless load is called again before it settles.
Promise that resolves to the same instance.
Unloads the underlying model and releases its native resources. A load still in flight is awaited first so that nothing is left behind.
ExecuTorch-based implementation of Embeddings for React Native.