main : pass nullptr when regex is empty (#2070)

This commit is contained in:
Georgi Gerganov 2024-04-17 12:23:47 +03:00 committed by GitHub
parent a750868428
commit b0c3cbf2e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1068,7 +1068,7 @@ int main(int argc, char ** argv) {
wparams.tdrz_enable = params.tinydiarize; // [TDRZ]
wparams.suppress_regex = params.suppress_regex.c_str();
wparams.suppress_regex = params.suppress_regex.empty() ? nullptr : params.suppress_regex.c_str();
wparams.initial_prompt = params.prompt.c_str();