0.0.6 • Published 2 months ago

@0xtender/bhashini-sdk v0.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
2 months ago

bhashini-sdk

import { initialize, textToText } from "sdk";


const auth = initialize({
  meity_config_url: process.env.BHASHINI_MEITY_CONFIG_URL!,
  dhruva_compute_url: process.env.BHASHINI_DHRUVA_COMPUTE_URL!,
  user_id: process.env.BHASHINI_USER_ID!,
  api_key: process.env.BHASHINI_API_KEY!,
  pipeline_id: process.env.BHASHINI_PIPELINE_ID!,
});

const data = await textToText(
    {
      text: ["Some Text", "More data"],
      sourceLanguage: "en",
      targetLanguage: "hi",
    },
    auth
  );
console.log(data.output);

/** output
 * [
 * { source: 'Some Text', target: 'कुछ पाठ' },
 * { source: 'More data', target: 'अधिक जानकारी' }
 * ]
 */
0.0.6

2 months ago

0.0.5

6 months ago

0.0.4

6 months ago

0.0.3

6 months ago

0.0.2

6 months ago

0.0.1

6 months ago