sync : vendor (#13901)

* sync : vendor

ggml-ci

* cont : fix httplib version

ggml-ci

* cont : fix lint

* cont : fix lint

* vendor : move to common folder /vendor

ggml-ci

* cont : fix lint

* cont : move httplib to /vendor + use json_fwd.hpp

ggml-ci

* cont : fix server build

ggml-ci

* cont : add missing headers

ggml-ci

* cont : header clean-up

ggml-ci
This commit is contained in:
Georgi Gerganov
2025-05-30 16:25:45 +03:00
committed by GitHub
parent db38704f01
commit 53f925074d
27 changed files with 2084 additions and 1096 deletions

View File

@ -23,8 +23,7 @@ add_library(mtmd_helper OBJECT
target_link_libraries(mtmd_helper PRIVATE ggml llama mtmd ${CMAKE_THREAD_LIBS_INIT})
target_include_directories(mtmd_helper PUBLIC .)
target_include_directories(mtmd_helper PRIVATE ./vendor)
target_include_directories(mtmd_helper PRIVATE ../..)
target_include_directories(mtmd_helper PRIVATE ../../vendor)
target_compile_features(mtmd_helper PRIVATE cxx_std_17)
if (BUILD_SHARED_LIBS)

View File

@ -27,10 +27,10 @@
#define MA_NO_ENGINE
#define MA_NO_GENERATION
#define MA_API static
#include "vendor/miniaudio.h"
#include "miniaudio/miniaudio.h"
#define STB_IMAGE_IMPLEMENTATION
#include "vendor/stb_image.h"
#include "stb/stb_image.h"
#define LOG_INF(...) fprintf(stdout, __VA_ARGS__)
#define LOG_ERR(...) fprintf(stderr, __VA_ARGS__)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,13 @@
#include "chat.h"
#include "common.h"
#include "llama-cpp.h"
#include "log.h"
#include "linenoise.cpp/linenoise.h"
#define JSON_ASSERT GGML_ASSERT
#include <nlohmann/json.hpp>
#if defined(_WIN32)
# include <windows.h>
# include <io.h>
@ -24,13 +34,6 @@
#include <string>
#include <vector>
#include "chat.h"
#include "common.h"
#include "json.hpp"
#include "linenoise.cpp/linenoise.h"
#include "llama-cpp.h"
#include "log.h"
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) || defined(_WIN32)
[[noreturn]] static void sigint_handler(int) {
printf("\n" LOG_COL_DEFAULT);

View File

@ -12,7 +12,6 @@ endif()
set(TARGET_SRCS
server.cpp
utils.hpp
httplib.h
)
set(PUBLIC_ASSETS
index.html.gz

File diff suppressed because it is too large Load Diff

View File

@ -11,9 +11,6 @@
#include "mtmd.h"
#include "mtmd-helper.h"
// Change JSON_ASSERT from assert() to GGML_ASSERT:
#define JSON_ASSERT GGML_ASSERT
#include "json.hpp"
// mime type for sending response
#define MIMETYPE_JSON "application/json; charset=utf-8"

View File

@ -7,17 +7,16 @@
#include "base64.hpp"
#include "mtmd.h"
#include "mtmd-helper.h"
#include "chat.h"
// increase max payload length to allow use of larger context size
#define CPPHTTPLIB_FORM_URL_ENCODED_PAYLOAD_MAX_LENGTH 1048576
// disable Nagle's algorithm
#define CPPHTTPLIB_TCP_NODELAY true
#include "httplib.h"
#include <cpp-httplib/httplib.h>
// Change JSON_ASSERT from assert() to GGML_ASSERT:
#define JSON_ASSERT GGML_ASSERT
#include "json.hpp"
#include "chat.h"
#include <nlohmann/json.hpp>
#include <random>
#include <sstream>

View File

@ -5,7 +5,9 @@
#include "sampling.h"
#include "log.h"
#include "llama.h"
#include "json.hpp"
#define JSON_ASSERT GGML_ASSERT
#include <nlohmann/json.hpp>
#include <algorithm>
#include <cmath>