Skip to main content

Respan instrumentation plugin for IBM watsonx.ai

Project description

Respan IBM watsonx.ai Instrumentation

Native Respan instrumentation for the official ibm-watsonx-ai Python SDK.

Installation

pip install respan-ai respan-instrumentation-watsonx ibm-watsonx-ai

Usage

from respan import Respan
from respan_instrumentation_watsonx import WatsonxInstrumentor

respan = Respan(
    api_key="RESPAN_API_KEY",
    instrumentations=[WatsonxInstrumentor()],
)

The instrumentor traces:

  • ModelInference.generate()
  • ModelInference.generate_text()
  • ModelInference.generate_text_stream()
  • ModelInference.chat()
  • ModelInference.chat_stream()
  • ModelInference.agenerate()
  • ModelInference.agenerate_stream()
  • ModelInference.achat()
  • ModelInference.achat_stream()
  • Embeddings.generate()
  • Embeddings.embed_query()
  • Embeddings.embed_documents()
  • Embeddings.agenerate()
  • Embeddings.aembed_query()
  • Embeddings.aembed_documents()

Chat and text-generation spans use canonical GenAI fields such as gen_ai.prompt.*, gen_ai.completion.*, llm.request.functions, and token usage attributes. Embedding spans record the input and usage metadata but do not export embedding vectors.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

respan_instrumentation_watsonx-0.1.0.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

respan_instrumentation_watsonx-0.1.0-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file respan_instrumentation_watsonx-0.1.0.tar.gz.

File metadata

File hashes

Hashes for respan_instrumentation_watsonx-0.1.0.tar.gz
Algorithm Hash digest
SHA256 85b7d32185fe76934c8bb75eb4295ba5bd84a55203589375fabad94e9b82942a
MD5 793b2c841697ed4cd837f4ab2440b8e8
BLAKE2b-256 1b657f03502d225d60e56d72661fd1d20432edc1f46ea44f4fb9c4fd95886ed7

See more details on using hashes here.

File details

Details for the file respan_instrumentation_watsonx-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for respan_instrumentation_watsonx-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 38487034e48b5eb41b16f9033791cc9c125b1a66c12facc4028f56848e56a90e
MD5 263e7bc95cb274ea06936a9e113568d1
BLAKE2b-256 5b35fc8b5b748a366573f9608c44b38b2b0f7f9ae060e8477e9cacd06224b6a2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page