Skip to content

Commit

Permalink
remove quote marks from translation
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoFro committed Nov 2, 2024
1 parent 016dbd5 commit 54c0757
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion utils/getTranslation.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ async function getTranslation(nativeText) {
}]
});

return response.content[0].text.trim();
const responseText = response.content[0].text.trim().replace(/"/g, '');

return responseText;
} catch (error) {
console.error('Error getting translation from Anthropic:', error.message);
throw error;
Expand Down

0 comments on commit 54c0757

Please sign in to comment.