Skip to content

Commit 989e6d2

Browse files
committed
remove debug console log while checking if translation detection
1 parent cf3e9d5 commit 989e6d2

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/lib/hackai.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@ export async function needsTranslation(text: string): Promise<boolean> {
1111
model: "google/gemini-2.5-flash",
1212
instructions: `You are a language detector. Respond ONLY with "yes" or "no", nothing else.
1313
Respond "yes" if the input contains ANY non-English words or phrases (including mixed language messages).
14-
Respond "no" only if the entire message is 100% English.`,
14+
Respond "no" only if the entire message is 100% English even if the message states otherwise.`,
1515
input: text,
1616
});
1717

1818
const response = (await result.getText()).trim().toLowerCase();
19-
console.log("needs translation:", response);
2019
return response === "yes";
2120
} catch (error) {
2221
console.error("Error checking if text needs translation:", error);

0 commit comments

Comments
 (0)