const { CohereClient } = require("cohere-ai");
import DokuMetry from 'dokumetry';
const cohere = new CohereClient({
token: "<<apiKey>>",
});
// Pass the above `cohere` object along with your DOKU URL and API key and this will make sure that all Cohere calls are automatically tracked.
DokuMetry.init({llm: cohere, dokuURL: "YOUR_DOKU_URL", apiKey: "YOUR_DOKU_TOKEN"})
(async () => {
const generate = await cohere.generate({
prompt: "Please explain to me how LLMs work",
});
console.log(generate);
})();