- Python
- Javascript
Synchronous Usage
default
from mistralai.client import MistralClient
import dokumetry
mistral = MistralClient(
api_key="YOUR_MISTRAL_API_KEY"
)
# Pass the above `mistral` object along with your Doku Ingester URL and API key and this will make sure that all Anthropic calls are automatically tracked.
dokumetry.init(llm=mistral, doku_url="YOUR_DOKU_INGESTER_URL", api_key="YOUR_DOKU_TOKEN")
response = mistral.embeddings(
model="mistral-embed",
input=["Monitor LLM Applications"]
)
print(response)
Asynchronous usage
default
import asyncio
from mistralai.client import AsyncMistralClient
import dokumetry
mistral = AsyncMistralClient(
api_key="YOUR_MISTRAL_API_KEY"
)
# Pass the above `mistral` object along with your Doku Ingester URL and API key and this will make sure that all Anthropic calls are automatically tracked.
dokumetry.init(llm=mistral, doku_url="YOUR_DOKU_INGESTER_URL", api_key="YOUR_DOKU_TOKEN")
async def main() -> None:
mistral.embeddings(
model="mistral-embed",
input=["Monitor LLM Applications"]
)
print(response)
asyncio.run(main())
default
import MistralClient from '@mistralai/mistralai';
import DokuMetry from 'dokumetry';
const mistral = new MistralClient("YOUR_MISTRAL_API_KEY");
// Pass the above `mistral` object along with your Doku Ingester URL and API key and this will make sure that all Anthropic calls are automatically tracked.
DokuMetry.init({llm: mistral, dokuUrl: "YOUR_DOKU_INGESTER_URL", apiKey: "YOUR_DOKU_TOKEN"})
async function main() {
const input = [];
for (let i = 0; i < 1; i++) {
input.push('LLM Monitoring');
}
const embeddingsBatchResponse = await mistral.embeddings({
model: 'mistral-embed',
input: input,
});
}
main();

