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.
Example
- Install dependencies
uv pip install -e '.[examples]'
or
uv pip install -r examples/trace/requirements.txt
- Run example
uv run python examples/trace/001-trace.py
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
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 openinference_instrumentation_pipecat-0.1.4.tar.gz.
File metadata
- Download URL: openinference_instrumentation_pipecat-0.1.4.tar.gz
- Upload date:
- Size: 30.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1cc8d145fae20e10821cf6c77acf63543013b548d559a4e937e290c8de31de8
|
|
| MD5 |
3fa202079da4a6c763c24e7f5cf85674
|
|
| BLAKE2b-256 |
682727fce991f4958c388479d2b99ae6cf465ba811301d8a0e8a7e5dd82893a1
|
File details
Details for the file openinference_instrumentation_pipecat-0.1.4-py3-none-any.whl.
File metadata
- Download URL: openinference_instrumentation_pipecat-0.1.4-py3-none-any.whl
- Upload date:
- Size: 24.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee2b876372f228204459dd468edcbe8a12a7bee6943a3d48ca65bd9e17529ab2
|
|
| MD5 |
b4d7d5ba4218bdfb1232dbf8b0c8acc9
|
|
| BLAKE2b-256 |
6dc36b88ac6ce6a6236b762cea04c243a5244e6320e029a52dc1728af11f889c
|