import os
from openai import OpenAI
import lunary
MISTRAL_API_KEY = os.environ.get("MISTRAL_API_KEY")
client = OpenAI(api_key=MISTRAL_API_KEY, base_url="https://api.mistral.ai/v1/")
lunary.monitor(client) # This line sets up monitoring for all calls made through the 'openai' module
chat_completion = client.chat.completions.create(
model="mistral-small-latest",
messages=[{"role": "user", "content": "Hello world"}]
)