|
18 | 18 |
|
19 | 19 | #include <cmath>
|
20 | 20 | #pragma warning(push)
|
21 |
| -#pragma warning(disable : 6269 6294 6201) |
22 |
| -#include <opencv2/opencv.hpp> |
23 |
| -#pragma warning(pop) |
24 |
| -#pragma warning(push) |
25 | 21 | #pragma warning(disable : 6313)
|
26 | 22 | #include <rapidjson/stringbuffer.h>
|
27 | 23 | #include <rapidjson/writer.h>
|
@@ -143,7 +139,7 @@ static size_t appendChunkCallback(void* downloadedChunk, size_t size, size_t nme
|
143 | 139 | status = setopt; \
|
144 | 140 | }
|
145 | 141 |
|
146 |
| -static absl::Status downloadImage(const char* url, std::string& image, const int64& sizeLimit) { |
| 142 | +static absl::Status downloadImage(const char* url, std::string& image, const int64_t& sizeLimit) { |
147 | 143 | CURL* curl_handle = curl_easy_init();
|
148 | 144 | auto status = curl_easy_setopt(curl_handle, CURLOPT_URL, url);
|
149 | 145 | CURL_SETOPT(curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, appendChunkCallback))
|
@@ -234,7 +230,7 @@ absl::Status OpenAIChatCompletionsHandler::parseMessages() {
|
234 | 230 | }
|
235 | 231 | } else if (std::regex_match(url.c_str(), std::regex("^(https?:\\/\\/)?([\\da-z\\.-]+)\\.([a-z\\.]{2,6})([\\/\\w \\.-]*)*\\/?$"))) {
|
236 | 232 | curl_global_init(CURL_GLOBAL_ALL);
|
237 |
| - int64 sizeLimit = 20000000; // restrict single image size to 20MB |
| 233 | + int64_t sizeLimit = 20000000; // restrict single image size to 20MB |
238 | 234 | auto status = downloadImage(url.c_str(), decoded, sizeLimit);
|
239 | 235 | if (status != absl::OkStatus()) {
|
240 | 236 | return status;
|
|
0 commit comments