Update huggingface.js

Fixed thinking tag checks for Huggingface API
This commit is contained in:
Sweaterdog 2025-02-28 12:48:22 -08:00 committed by GitHub
parent 42dfe39862
commit 37417fcb92
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -55,7 +55,7 @@ export class HuggingFace {
const hasCloseTag = res.includes("</think>");
// If there's a partial mismatch, warn and retry the entire request.
if ((hasOpenTag && !hasCloseTag) || (!hasOpenTag && hasCloseTag)) {
if ((hasOpenTag && !hasCloseTag)) {
console.warn("Partial <think> block detected. Re-generating...");
continue;
}