|
|
@@ -913,7 +913,7 @@ void Server::setupCORS() {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-void Server::handleHealthCheck(const httplib::Request& req, httplib::Response& res) {
|
|
|
+void Server::handleHealthCheck(const httplib::Request& /*req*/, httplib::Response& res) {
|
|
|
LOG_DEBUG("handleHealthCheck called");
|
|
|
try {
|
|
|
nlohmann::json response = {
|
|
|
@@ -2397,7 +2397,7 @@ std::pair<bool, std::string> Server::validateGenerationParameters(const nlohmann
|
|
|
if (prompt.empty()) {
|
|
|
return {false, "Prompt cannot be empty"};
|
|
|
}
|
|
|
- if (prompt.length() > m_config.maxPromptLength) {
|
|
|
+ if (static_cast<int>(prompt.length()) > m_config.maxPromptLength) {
|
|
|
return {false, "Prompt too long (max " + std::to_string(m_config.maxPromptLength) + " characters)"};
|
|
|
}
|
|
|
|
|
|
@@ -2406,7 +2406,7 @@ std::pair<bool, std::string> Server::validateGenerationParameters(const nlohmann
|
|
|
if (!params["negative_prompt"].is_string()) {
|
|
|
return {false, "Invalid 'negative_prompt' field, must be string"};
|
|
|
}
|
|
|
- if (params["negative_prompt"].get<std::string>().length() > m_config.maxNegativePromptLength) {
|
|
|
+ if (static_cast<int>(params["negative_prompt"].get<std::string>().length()) > m_config.maxNegativePromptLength) {
|
|
|
return {false, "Negative prompt too long (max " + std::to_string(m_config.maxNegativePromptLength) + " characters)"};
|
|
|
}
|
|
|
}
|