Lightweight LLM observability SDK
Project description
LLM Watch SDK
Lightweight SDK to send LLM usage telemetry to the LLM Watch backend.
Install
pip install llm-watch-sdk
Quickstart
from llm_watch import LLMWatch
watch = LLMWatch(
backend_url="http://YOUR_BACKEND",
project_api_key="YOUR_PROJECT_KEY",
)
Providers
Wrap your provider client with the matching adapter, then call invoke(...).
# OpenAI example
from openai import OpenAI
client = OpenAI(api_key="...")
oa = watch.openai(client, model="gpt-4o-mini")
resp = oa.invoke({"messages": [{"role": "user", "content": "hello"}]})
# Gemini example (google.genai)
from google import genai
client = genai.Client(api_key="...")
gm = watch.gemini(client, model="gemini-1.5-pro")
resp = gm.invoke({"contents": "hello"})
# Bedrock example
br = watch.bedrock(region="eu-north-1", model_id="arn:aws:bedrock:...")
resp = br.invoke({...})
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
llm_watch_sdk-0.1.0.tar.gz
(16.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llm_watch_sdk-0.1.0.tar.gz.
File metadata
- Download URL: llm_watch_sdk-0.1.0.tar.gz
- Upload date:
- Size: 16.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13b12714f89438d3ec5026ec7be533caa26d34876c5f7dfabe6ccb525189a54f
|
|
| MD5 |
62e8f9ffd01a6fcdecece29c7709b988
|
|
| BLAKE2b-256 |
27f9abf9c6c74d1099c488f33fa6a91f8856265e679de79bc7b45809a1e74964
|
File details
Details for the file llm_watch_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: llm_watch_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 27.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc620a6a33c1996382a68bebfef33d4739c68ad4ee6e2e7ce6ad428fdfe5d12b
|
|
| MD5 |
bd5a8a6038d99fcb6194e92a1d6a7d5d
|
|
| BLAKE2b-256 |
21ffea9043abe7c710544bc382e2cba003336c0146a0bed24a27d9b062d88aaa
|