Update server.cpp

This commit is contained in:
Behnam M 2024-01-10 00:25:45 -05:00 committed by GitHub
parent 139cdfc0de
commit 2fc0c248fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2801,6 +2801,8 @@ int main(int argc, char **argv)
httplib::Server svr;
ServerState server_state = LOADING_MODEL;
svr.set_default_headers({{"Server", "llama.cpp"},
{"Access-Control-Allow-Origin", "*"},
{"Access-Control-Allow-Headers", "content-type"}});
@ -2823,7 +2825,6 @@ int main(int argc, char **argv)
});
ServerState server_state = LOADING_MODEL;
// load the model
if (!llama.load_model(params))
{