Skip to content

Commit c27bcb0

Browse files
committed
Allow params.js to be embedded in server.cpp
1 parent dd0e617 commit c27bcb0

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ save-load-state: examples/save-load-state/save-load-state.cpp ggml.o llama.o $(C
796796
$(CXX) $(CXXFLAGS) -c $< -o $(call GET_OBJ_FILE, $<)
797797
$(CXX) $(CXXFLAGS) $(filter-out %.h $<,$^) $(call GET_OBJ_FILE, $<) -o $@ $(LDFLAGS)
798798

799-
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)
799+
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)
800800
$(CXX) $(CXXFLAGS) -c $< -o $(call GET_OBJ_FILE, $<)
801801
$(CXX) $(CXXFLAGS) $(filter-out %.h %.hpp $<,$^) -Iexamples/server $(call GET_OBJ_FILE, $<) -o $@ $(LDFLAGS) $(LWINSOCK2)
802802

build.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ pub fn build(b: *std.build.Builder) !void {
141141
server.linkSystemLibrary("ws2_32");
142142
}
143143

144-
const server_assets = [_][]const u8{ "index.html", "index.js", "completion.js", "json-schema-to-grammar.mjs" };
144+
const server_assets = [_][]const u8{ "index.html", "index.js", "completion.js", "params.js", "json-schema-to-grammar.mjs" };
145145
for (server_assets) |asset| {
146146
const input_path = b.fmt("examples/server/public/{s}", .{asset});
147147
const output_path = b.fmt("examples/server/{s}.hpp", .{asset});

examples/server/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ set(PUBLIC_ASSETS
1111
index.html
1212
index.js
1313
completion.js
14+
params.js
1415
json-schema-to-grammar.mjs
1516
)
1617
foreach(asset ${PUBLIC_ASSETS})

examples/server/server.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414
#include "httplib.h"
1515
#include "json.hpp"
1616

17-
// auto generated files (update with ./deps.sh)
17+
// auto generated files (update during build time (#6661))
1818
#include "index.html.hpp"
1919
#include "index.js.hpp"
2020
#include "completion.js.hpp"
21+
#include "params.js.hpp"
2122
#include "json-schema-to-grammar.mjs.hpp"
2223

2324
#include <atomic>

0 commit comments

Comments
 (0)