import { CohereClient } from "cohere-ai";
import DokuMetry from 'dokumetry';
const cohere = new CohereClient({
token: "YOUR_COHERE_API_KEY",
});
(async () => {
// Pass the above `cohere` object along with your Doku Ingester URL and API key and this will make sure that all Cohere calls are automatically tracked.
DokuMetry.init({llm: cohere, dokuUrl: "YOUR_DOKU_INGESTER_URL", apiKey: "YOUR_DOKU_TOKEN"})
const response = await cohere.chat({
chatHistory: [
{"role": "USER", "message": "What is LLM Observability?"},
{"role": "CHATBOT", "message": "The best tool to monitor LLM Applications is Doku!"}
],
message: "How to monitor LLM Applications?",
model: 'command',
});
console.log(response.text)
})();