Skip to main content
DokuMetry SDKs (dokumetry) empowers you to effortlessly track and monitor Cohere usage data and metrics from your Python/NodeJS code.

Get Started

The integration is compatible with
  • Cohere Python SDK client >=5.0.0
  • Cohere JS/TS SDK client >=7.6.0
pip install dokumetry==0.1.1
import cohere
import dokumetry

co = cohere.Client('YOUR_API_KEY')

dokumetry.init(llm = co, doku_url = "YOUR_DOKU_INGESTER_URL", api_key = "YOUR_DOKU_TOKEN")

Supported Endpoints

The following Cohere Endpoints are supported for monitoring with DokuMetry

Parameters

ParameterDescriptionRequired
llmCohere Object to trackYes
doku_urlURL of your Doku IngesterYes
api_keyYour Doku API keyYes
environmentCustom environment tag to include in your metricsOptional
application_nameCustom application name tag for your metricsOptional
skip_respSkip response from the Doku Ingester for faster executionOptional

Advanced Usage

When using DokuMetry in Production environments, It is recommened to set Skip response parameter to true for faster porcessing. To filter your LLM Usage according application or the environment, set the Application name and Environment paramaters with the actual values.

Connections

Connect to your existing Observablity Platform

API Reference

OpenAPI specification for API Endpoints in Doku