πŸ€—πŸ”­ Introducing Observers: A Lightweight SDK for AI Observability πŸ”­πŸ€—

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

Hugging Face Datasets

Argilla

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