DartBridgeModelPaths class
Model path utilities bridge. Wraps C++ rac_model_paths.h functions. Matches Swift's CppBridge.ModelPaths exactly.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
extractModelId(
String path) → String? - Extract model ID from a file path
-
getFrameworkDirectory(
InferenceFramework framework) → String? -
Get framework directory from C++.
Returns:
{base_dir}/RunAnywhere/Models/{framework}/Matches Swift: CppBridge.ModelPaths.getFrameworkDirectory() -
getModelFolder(
String modelId, InferenceFramework framework) → String? -
Get model folder from C++.
Returns:
{base_dir}/RunAnywhere/Models/{framework}/{modelId}/Matches Swift: CppBridge.ModelPaths.getModelFolder() -
getModelFolderAndCreate(
String modelId, InferenceFramework framework) → Future< String> - Get model folder, creating it if it doesn't exist. This is the main method for download service to use.
-
getModelsDirectory(
) → String? -
Get the models directory from C++.
Returns:
{base_dir}/RunAnywhere/Models/Matches Swift: CppBridge.ModelPaths.getModelsDirectory() -
isModelPath(
String path) → bool - Check if a path is within the models directory
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolveModelFilePath(
ModelInfo model) → Future< String?> - Resolve the actual model file path for loading. For single-file models (LlamaCpp), finds the actual .gguf file. For directory-based models (ONNX), returns the folder.
-
setBaseDirectory(
[String? path]) → Future< void> - Set the base directory for model storage. Must be called during SDK initialization. Matches Swift: CppBridge.ModelPaths.setBaseDirectory()
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → DartBridgeModelPaths
-
final