Skip to content

Commit 24010fe

Browse files
author
Olivier Chafik
committed
avoid ggml_assert in server for grammar triggers inconsistency
1 parent 00db465 commit 24010fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/server/server.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,8 @@ struct server_task {
395395
}
396396
}
397397
}
398-
if (params.sampling.grammar_lazy) {
399-
GGML_ASSERT(!params.sampling.grammar_triggers.empty());
398+
if (params.sampling.grammar_lazy && params.sampling.grammar_triggers.empty()) {
399+
throw std::runtime_error("Error: no triggers set for lazy grammar!");
400400
}
401401
}
402402

0 commit comments

Comments
 (0)