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

openinference_instrumentation_pipecat-0.1.1.tar.gz (26.3 kB view details)

Uploaded Source

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.1.tar.gz.

File metadata

File hashes

Hashes for openinference_instrumentation_pipecat-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1a9f1585f20455bb6f7fcd7aeaff743382a8290aed006cd04a5dafcd0852e4cd
MD5 e823748ec0c72b9c5ce13258297796bb
BLAKE2b-256 d3b8ca1a4b047748e0cdc925b7965e97ef0da35e783e9e1a829f8eefd5a40823

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openinference_instrumentation_pipecat-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f1260cb3f4f62f0a60f0d43b670168e79b52c487146635e3c09f5efe89823990
MD5 ea2177eb32c8d260c5bac0a700cf55e3
BLAKE2b-256 538307b04fee73289a2309f3f27489bf604902314a09a9cf6b879a269cd930cf

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