| 188 | } |
| 189 | |
| 190 | std::string ResponseBuilder::buildErrorResponse(int status_code, |
| 191 | const std::string& error_type, |
| 192 | const std::string& message) { |
| 193 | nlohmann::json error_response = {{"error", |
| 194 | {{"message", message}, |
| 195 | {"type", error_type}, |
| 196 | {"param", nullptr}, |
| 197 | {"code", nullptr}}}}; |
| 198 | |
| 199 | return error_response.dump(); |
| 200 | } |
| 201 | |
| 202 | std::string ResponseBuilder::buildPartialResponse() { |
| 203 | return R"({"id":"incomplete","choices":[{"message":{"content":"partial)"; // Deliberately incomplete |
nothing calls this directly
no outgoing calls
no test coverage detected