mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-06-25 06:53:05 +00:00
Do not specify "success" as error for unsupported models
Signed-off-by: niansa/tuxifan <tuxifan@posteo.de>
This commit is contained in:
parent
09ae04cee9
commit
5eee16c97c
@ -39,8 +39,13 @@ llmodel_model llmodel_model_create2(const char *model_path, const char *build_va
|
|||||||
delete std::exchange(wrapper, nullptr);
|
delete std::exchange(wrapper, nullptr);
|
||||||
// Get errno and error message if none
|
// Get errno and error message if none
|
||||||
if (error_code == 0) {
|
if (error_code == 0) {
|
||||||
error_code = errno;
|
if (errno != 0) {
|
||||||
last_error_message = std::strerror(error_code);
|
error_code = errno;
|
||||||
|
last_error_message = std::strerror(error_code);
|
||||||
|
} else {
|
||||||
|
error_code = ENOTSUP;
|
||||||
|
last_error_message = "Model format not supported (no matching implementation found)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Set error argument
|
// Set error argument
|
||||||
if (error) {
|
if (error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user