Skip to main content

OpenInference Pipecat Instrumentation

Project description

OpenInference Pipecat Instrumentation

Python auto-instrumentation library for Pipecat. This library allows you to convert Pipecat traces to OpenInference, which is OpenTelemetry compatible, and view those traces in Arize Phoenix.

Installation

pip install openinference-instrumentation-pipecat

Quickstart

This quickstart shows you how to setup tracing in your Pipecat application:

from phoenix.otel import register
from openinference.instrumentation.pipecat import PipecatInstrumentor

# Set up the tracer provider
tracer_provider = register(
    project_name="default" #Phoenix project name
)

# Add auto-instrumentor at the top of the application
PipecatInstrumentor().instrument(tracer_provider=tracer_provider)

# Build your Pipecat pipeline
# ... (add your Pipecat pipeline code here)

### CONFIGURATION SETUP (Transport, LLM, STT, TTS) ###

### PIPELINE ###
pipeline = Pipeline(...)

### TASK ###
task = PipelineTask(
    pipeline,
    conversation_id=conversation_id,  # conversation id is used for session tracking in Arize or Phoenix
)

### EVENT HANDLING
@transport.event_handler("on_client_connected")
async def on_client_connected(transport, client):
    await task.queue_frames([LLMRunFrame()])

### PIPELINE RUNNER ###
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
await runner.run(task)

After configuring tracing, exchanges in the running application are logged to your project in Phoenix or Arize AX.

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

Built Distribution

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

File details

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

File metadata

File hashes

Hashes for openinference_instrumentation_pipecat-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c5077f2a53ff550c9cb3c5c71f11dae8091cfcbecc2c80621375ec055be25a8d
MD5 56981d36e536c32387a9570d70cc615f
BLAKE2b-256 626513e4485f2565fd0aa05296b2d0bb9d3d9ec7d59abac3fb16e07ec5db14e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openinference_instrumentation_pipecat-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fe6494beb4168f2c41340f2c565bd577df5882ca5bab9b6faafd0097b2529bcf
MD5 ffa96c098be6a5cbd1c0087c5478ffa0
BLAKE2b-256 23735ba3a10ff7fe4fe76ef3ac1a7af98f2e62d431aaa9bbb95defc720791480

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