Skip to content

Commit af13c9a

Browse files
authored
Add mikupad to ik_llama as an alternative WebUI (#558)
* mikupad.html in ik_llama.cpp (functional but WIP) * Remove hardcoded extension and add error handling to extension loading * Update version number and add features array to version * Make version endpoint always accessible * Fix case with empty sql * Add useful error message when launched without sql file * Add sigma sampler * Update sigma step and max based on docs * Remove selectedSessionId and handle it with URL fragment * Export All (code only, no UI) * Add compression to server.cpp * Major UI work (and also add update backend endpoints to accomadate) * Finalize UI * Fix visual bug * fix merge conflict issue * Pull in full sqlite_modern_cpp repo for the license as it is not attached to source files * Make compression not show in sidebar if extension is not loaded * Finalize build, Put support behing LLAMA_SERVER_SQLITE3: command not found build option, and update error message to include the build option is not passed situation * Fix compile without flag on systems without it installed
1 parent e008c0e commit af13c9a

File tree

15 files changed

+9914
-3
lines changed

15 files changed

+9914
-3
lines changed

common/common.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,6 +1478,16 @@ bool gpt_params_find_arg(int argc, char ** argv, const std::string & arg, gpt_pa
14781478
}
14791479
return true;
14801480
}
1481+
if (arg == "--sql-save-file") {
1482+
CHECK_ARG
1483+
params.sql_save_file = argv[i];
1484+
return true;
1485+
}
1486+
if (arg == "--sqlite-zstd-ext-file") {
1487+
CHECK_ARG
1488+
params.sqlite_zstd_ext_file = argv[i];
1489+
return true;
1490+
}
14811491
if (arg == "--chat-template") {
14821492
CHECK_ARG
14831493
if (!llama_chat_verify_template(nullptr, argv[i], false)) {

common/common.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,8 @@ struct gpt_params {
250250
bool log_json = false;
251251

252252
std::string slot_save_path;
253+
std::string sql_save_file;
254+
std::string sqlite_zstd_ext_file;
253255

254256
float slot_prompt_similarity = 0.5f;
255257

examples/server/CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
set(TARGET llama-server)
22
option(LLAMA_SERVER_VERBOSE "Build verbose logging option for Server" ON)
33
option(LLAMA_SERVER_SSL "Build SSL support for the server" OFF)
4+
option(LLAMA_SERVER_SQLITE3 "Build SQlite3 support for the server" OFF)
45

56
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
67

@@ -44,7 +45,7 @@ if (MSVC)
4445
)
4546
endif()
4647
# target_link_libraries(${TARGET} PRIVATE "/STACK:104857600")
47-
target_include_directories(${TARGET} PRIVATE ${CMAKE_SOURCE_DIR})
48+
target_include_directories(${TARGET} PRIVATE ${CMAKE_SOURCE_DIR})
4849
target_link_libraries(${TARGET} PRIVATE common ${CMAKE_THREAD_LIBS_INIT})
4950

5051
if (LLAMA_SERVER_SSL)
@@ -53,6 +54,13 @@ if (LLAMA_SERVER_SSL)
5354
target_compile_definitions(${TARGET} PRIVATE CPPHTTPLIB_OPENSSL_SUPPORT)
5455
endif()
5556

57+
if (LLAMA_SERVER_SQLITE3)
58+
find_package(SQLite3 REQUIRED)
59+
target_link_libraries(${TARGET} PRIVATE SQLite::SQLite3)
60+
target_include_directories(${TARGET} PUBLIC ./sqlite_modern_cpp/hdr)
61+
target_compile_definitions(${TARGET} PRIVATE SQLITE3_MODERN_CPP_SUPPORT)
62+
endif()
63+
5664
if (WIN32)
5765
TARGET_LINK_LIBRARIES(${TARGET} PRIVATE ws2_32)
5866
endif()

0 commit comments

Comments
 (0)