Skip to content
This repository has been archived by the owner on Jan 4, 2025. It is now read-only.

Commit

Permalink
Update autodetect.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
SIPC committed Feb 13, 2024
1 parent 9c9f06e commit ea6b5e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/api/lib/autodetect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const detectionMap: Record<string, string> = {
export async function autodetect(content: string): Promise<string> {
try {
let data = JSON.stringify({"text": content})
const langResponse = await axios.post(`https://language.api.sipc.ink/language-identifier/identify`,data);
const langResponse = await axios.post(`https://api.translatedlabs.com/language-identifier/identify`,data);
const detectedLang = langResponse.data.code.substring(0, 2).toLowerCase();
return detectedLang;
} catch (axiosError) {
Expand Down

0 comments on commit ea6b5e4

Please sign in to comment.