diff --git a/Makefile b/Makefile index 9dc35410a..c1b63616b 100644 --- a/Makefile +++ b/Makefile @@ -796,7 +796,7 @@ save-load-state: examples/save-load-state/save-load-state.cpp ggml.o llama.o $(C $(CXX) $(CXXFLAGS) -c $< -o $(call GET_OBJ_FILE, $<) $(CXX) $(CXXFLAGS) $(filter-out %.h $<,$^) $(call GET_OBJ_FILE, $<) -o $@ $(LDFLAGS) -server: examples/server/server.cpp examples/server/utils.hpp examples/server/httplib.h common/json.hpp examples/server/index.html.hpp examples/server/index.js.hpp examples/server/completion.js.hpp examples/server/json-schema-to-grammar.mjs.hpp common/stb_image.h ggml.o llama.o $(COMMON_DEPS) grammar-parser.o $(OBJS) +server: examples/server/server.cpp examples/server/utils.hpp examples/server/httplib.h common/json.hpp examples/server/index.html.hpp examples/server/index.js.hpp examples/server/completion.js.hpp examples/server/params.js.hpp examples/server/json-schema-to-grammar.mjs.hpp common/stb_image.h ggml.o llama.o $(COMMON_DEPS) grammar-parser.o $(OBJS) $(CXX) $(CXXFLAGS) -c $< -o $(call GET_OBJ_FILE, $<) $(CXX) $(CXXFLAGS) $(filter-out %.h %.hpp $<,$^) -Iexamples/server $(call GET_OBJ_FILE, $<) -o $@ $(LDFLAGS) $(LWINSOCK2) diff --git a/build.zig b/build.zig index 96783574f..8ad48a3ab 100644 --- a/build.zig +++ b/build.zig @@ -141,7 +141,7 @@ pub fn build(b: *std.build.Builder) !void { server.linkSystemLibrary("ws2_32"); } - const server_assets = [_][]const u8{ "index.html", "index.js", "completion.js", "json-schema-to-grammar.mjs" }; + const server_assets = [_][]const u8{ "index.html", "index.js", "completion.js", "params.js", "json-schema-to-grammar.mjs" }; for (server_assets) |asset| { const input_path = b.fmt("examples/server/public/{s}", .{asset}); const output_path = b.fmt("examples/server/{s}.hpp", .{asset}); diff --git a/examples/server/CMakeLists.txt b/examples/server/CMakeLists.txt index 4b89c5302..937bf4b1d 100644 --- a/examples/server/CMakeLists.txt +++ b/examples/server/CMakeLists.txt @@ -11,6 +11,7 @@ set(PUBLIC_ASSETS index.html index.js completion.js + params.js json-schema-to-grammar.mjs ) foreach(asset ${PUBLIC_ASSETS}) diff --git a/examples/server/server.cpp b/examples/server/server.cpp index 2760aea8f..5ddb23bfb 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -14,10 +14,11 @@ #include "httplib.h" #include "json.hpp" -// auto generated files (update with ./deps.sh) +// auto generated files (update during build time (#6661)) #include "index.html.hpp" #include "index.js.hpp" #include "completion.js.hpp" +#include "params.js.hpp" #include "json-schema-to-grammar.mjs.hpp" #include