For the complete documentation index, see llms.txt. This page is also available as Markdown.

Overview

Python SDK

Client library for the InteractiveAI observability platform.

Synopsis

Provides OpenTelemetry-based tracing, automatic LLM framework instrumentation, prompt management, dataset evaluation, and direct API access to InteractiveAI.

Install

pip install interactiveai

With extras for LLM framework auto-instrumentation:

pip install "interactiveai[openai]"
pip install "interactiveai[langchain]"

Quick Start

import interactiveai

client = interactiveai.Interactive(
    public_key="<INTERACTIVEAI_PUBLIC_KEY>",
    secret_key="<INTERACTIVEAI_SECRET_KEY>",
)

with client.start_as_current_span(name="my-operation") as span:
    result = do_work()
    span.update(output=result)

client.flush()

Options

Variable
Default
Description

INTERACTIVEAI_PUBLIC_KEY

API public key

INTERACTIVEAI_SECRET_KEY

API secret key

INTERACTIVEAI_HOST

https://app.interactive.ai

API endpoint

INTERACTIVEAI_DEBUG

false

Enable debug logging

INTERACTIVEAI_TRACING_ENABLED

true

Enable/disable tracing

INTERACTIVEAI_SAMPLE_RATE

1.0

Sampling rate (0.0–1.0)

Last updated

Was this helpful?