Skip to content

Instantly share code, notes, and snippets.

View buiducnhat's full-sized avatar
:shipit:

Nhat Bui buiducnhat

:shipit:
View GitHub Profile
@buiducnhat
buiducnhat / sync-translation.ts
Last active December 6, 2024 02:44
Convert internationalization file
import fs from 'fs';
import { GoogleGenerativeAI } from '@google/generative-ai';
// Initialize Google Generative AI
const genAI = new GoogleGenerativeAI(
process.env.GOOGLE_API_KEY || ''
);
// Initialize model with dynamic instruction
const getModel = (srcLang: string, destLang: string) => {