Respan instrumentation plugin for Mistral AI
Project description
Respan Mistral AI instrumentation
Trace the official mistralai Python SDK with Respan.
This package wraps openinference-instrumentation-mistralai and registers
Respan's OpenInference translator so Mistral AI spans are emitted with the
canonical traceloop.*, gen_ai.*, llm.*, and respan.* fields expected by
the Respan OTLP pipeline.
Install
pip install respan-ai respan-instrumentation-mistralai mistralai
Usage
import os
from mistralai.client import Mistral
from respan import Respan
from respan_instrumentation_mistralai import MistralAIInstrumentor
respan = Respan(
api_key=os.environ["RESPAN_API_KEY"],
instrumentations=[MistralAIInstrumentor()],
)
with Mistral(api_key=os.environ["MISTRAL_API_KEY"]) as client:
response = client.chat.complete(
model="mistral-large-latest",
messages=[
{
"role": "user",
"content": "Reply with one concise sentence about tracing.",
}
],
)
print(response.choices[0].message.content)
respan.flush()
respan.shutdown()
Any keyword arguments passed to MistralAIInstrumentor(...) are forwarded to the
underlying OpenInference instrumentor.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file respan_instrumentation_mistralai-0.1.0.tar.gz.
File metadata
- Download URL: respan_instrumentation_mistralai-0.1.0.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.4 CPython/3.12.12 Darwin/25.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
640d6be3cbcd33468c5f586d523f0c0b458c8ce654fe069c933f68a76726eb14
|
|
| MD5 |
5c63236a05dc53594d5a6833f4706a57
|
|
| BLAKE2b-256 |
61fb139a9a3a718afa456113db62f984ecbb27deb05f2fc7c3fa3648879643db
|
File details
Details for the file respan_instrumentation_mistralai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: respan_instrumentation_mistralai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.4 CPython/3.12.12 Darwin/25.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12f3560e2134e51cc2eb5cc22d04f465d90f18f58ecbb244e14c38b04b128883
|
|
| MD5 |
cec7d3e32caa02ef8a8f94634d2a89d8
|
|
| BLAKE2b-256 |
e86dc1a32a773617c63c5a5acb4e0148363a15e78a383ddad9f849395a16a685
|