Observers
A lightweight library for (generative) AI observability.
$pipinstallobservers
OpenAI API Compatible
Just wrap your client and start observing to a local DuckDB database.
from observers.observers.models.openai import wrap_openai
from openai import OpenAI
openai_client = OpenAI(
base_url="https://api-inference.huggingface.co/v1/",
api_key=api_key
)
client = wrap_openai(openai_client)
response = client.chat.completions.create(
model="Qwen/Qwen2.5-Coder-32B-Instruct",
messages=[{"role": "user", "content": "Tell me a joke."}],
)