lunary
docs
Documentation
Getting Started
Integrations
JavaScript
Python
LangChain
API
Others
Features
Observability
Prompts
Threads
Evaluations
Radars
Users
Feedback
Tags
More
Security
Concepts
Self-hosting
Our Python SDK includes automatic integration with OpenAI's module.
1
Learn how to setup the Python SDK
2
With our SDKs, tracking OpenAI calls is super simple.
from openai import OpenAIimport lunary client = OpenAI() lunary.monitor(client) # This line sets up monitoring for all calls made through the 'openai' module chat_completion = client.chat.completions.create( model="gpt-4o", messages=[{"role": "user", "content": "Hello world"}] )
3
You can now tag requests and identify users.
chat_completion = client.chat.completions.create( model="gpt-4o", user_id="user_123", # Optional: user ID user_props={"name": "John Doe"}, # Optional: user properties tags=["chat", "support"], # Optional: add tags messages=[{"role": "user", "content": "Hello world"}] )
Comparer
Produit
Entreprise
Écosystème
© 2024 Lunary LLC. Tous droits réservés.