Skip to content

Commit 17cdb24

Browse files
committed
raise exception on invalid channel
1 parent da1e34a commit 17cdb24

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

common/chat.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1450,6 +1450,8 @@ static void common_chat_parse_gpt_oss(common_chat_msg_parser & builder) {
14501450
} else if (type == "commentary") {
14511451
commentary();
14521452
}
1453+
} else {
1454+
throw common_chat_msg_parse_exception("expected one of: analysis, final, commentary, got: " + consume_until_next());
14531455
}
14541456
} else {
14551457
throw common_chat_msg_parse_exception("expected: <|channel|>, got: " + consume_until_next());

0 commit comments

Comments
 (0)