openMultimodalProjectorFile method
void
openMultimodalProjectorFile( - String mmprojPath
)
Implementation
void openMultimodalProjectorFile(String mmprojPath) {
if (pLLm == nullptr) {
throw Exception("ailia LLM not initialized.");
}
int status;
if (Platform.isWindows) {
Pointer<WChar> path = mmprojPath.toNativeUtf16().cast<WChar>();
status = dllHandle.ailiaLLMOpenMultimodalProjectorFileW(pLLm.value, path);
malloc.free(path);
} else {
Pointer<Char> path = mmprojPath.toNativeUtf8().cast<Char>();
status = dllHandle.ailiaLLMOpenMultimodalProjectorFileA(pLLm.value, path);
malloc.free(path);
}
if (status != ailia_llm_dart.AILIA_LLM_STATUS_SUCCESS) {
throw Exception("ailiaLLMOpenMultimodalProjectorFile returned an error status $status");
}
_multimodalProjectorOpened = true;
}