json: rm useless assert & ggml.h import

This commit is contained in:
Olivier Chafik 2024-04-12 14:01:19 +01:00
parent ba90d5b7e7
commit dfd4eb3aa6

View file

@ -8,7 +8,6 @@
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include "ggml.h"
using json = nlohmann::ordered_json;
@ -48,7 +47,6 @@ static std::string build_repetition(const std::string & item_rule, int min_items
} else {
std::string res = repeat("(" + content + " ", up_to_n);
// strip trailing space
GGML_ASSERT(!res.empty());
res = res.substr(0, res.length() - 1);
res += repeat(")?", up_to_n);
return res;