Metadata-Version: 2.4
Name: openinference-instrumentation-pipecat
Version: 0.1.1
Summary: OpenInference Pipecat Instrumentation
Project-URL: Homepage, https://github.com/Arize-ai/openinference/tree/main/python/instrumentation/openinference-instrumentation-pipecat
Author-email: OpenInference Authors <oss@arize.com>
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: <3.15,>=3.9
Requires-Dist: opentelemetry-api
Requires-Dist: opentelemetry-instrumentation
Requires-Dist: opentelemetry-semantic-conventions
Requires-Dist: websockets<16.0,>=13.1
Provides-Extra: examples
Requires-Dist: aiortc; extra == 'examples'
Requires-Dist: arize-otel; extra == 'examples'
Requires-Dist: arize-phoenix; extra == 'examples'
Requires-Dist: daily-python; extra == 'examples'
Requires-Dist: fastapi; extra == 'examples'
Requires-Dist: onnxruntime<2,>=1.20.1; extra == 'examples'
Requires-Dist: pipecat-ai-small-webrtc-prebuilt; extra == 'examples'
Requires-Dist: python-dotenv; extra == 'examples'
Requires-Dist: transformers; extra == 'examples'
Requires-Dist: uvicorn; extra == 'examples'
Requires-Dist: websockets<16.0,>=13.1; extra == 'examples'
Provides-Extra: instruments
Requires-Dist: pipecat-ai; extra == 'instruments'
Provides-Extra: test
Requires-Dist: mypy>=1.18.2; extra == 'test'
Requires-Dist: opentelemetry-exporter-otlp-proto-http; extra == 'test'
Requires-Dist: opentelemetry-sdk>=1.20.0; extra == 'test'
Requires-Dist: pipecat-ai; extra == 'test'
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'test'
Requires-Dist: pytest-recording; extra == 'test'
Description-Content-Type: text/markdown

# 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](https://github.com/Arize-ai/phoenix).

## Installation

```shell
pip install openinference-instrumentation-pipecat
```

## Quickstart

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

```python
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.
