Introducing Observers: AI Observability with Hugging Face datasets through a lightweight SDK
Community Article
Published
November 21, 2024
We're excited to launch Observers, a powerful and flexible library designed to bring transparency and insight into generative AI interactions. Understanding and tracking your models is crucial β and that's exactly what Observers helps you do.
π What is Observers?
Observers is an open-source Python SDK that provides comprehensive observability for generative AI APIs. Our library makes it easy to:
- Track and record interactions with AI models
- Store observations in multiple backends
- Query and analyze your AI interactions with ease
π Why Observers?
- Transparency: Track every AI interaction
- Flexibility: Support for multiple providers and stores
- Ease of Use: Minimal configuration, maximum insights
- Open Source: Community-driven development
π¦ Quick Installation
Getting started is simple. Just use pip:
pip install observers
β¨ Key Features
1. Flexible Observers
- Wrap any OpenAI-compatible LLM provider
- Support for multiple AI model interactions
- Minimal setup required
- And more coming soon!
2. Powerful Stores
Store your AI interactions in various backends:
- Hugging Face Datasets
- DuckDB
- Argilla
- And more coming soon!
π Quick Example
import os
from observers.observers.models.openai import wrap_openai
from openai import OpenAI
api_key = os.environ["HF_TOKEN"]
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."}]
)
ποΈ Data Exploration Made Easy
Whether you prefer SQL queries in DuckDB or the Hugging Face Datasets Viewer, Observers makes your interaction data accessible and queryable.
DuckDB Queries
> duckdb store.db
> SELECT * FROM openai_records LIMIT 10;
Hugging Face Datasets
Argilla
π€ Contributing
Are you passionate about AI observability? We welcome contributions on GitHub!
π Coming Soon
- More store backends
- Enhanced filtering capabilities
- Advanced analytics tools
Ready to bring clarity to your AI interactions? Get started with Observers today!
π GitHub Repository