dv-pipecat-ai 0.0.85.dev862__py3-none-any.whl → 0.0.85.dev864__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dv-pipecat-ai might be problematic. Click here for more details.
- {dv_pipecat_ai-0.0.85.dev862.dist-info → dv_pipecat_ai-0.0.85.dev864.dist-info}/METADATA +1 -1
- {dv_pipecat_ai-0.0.85.dev862.dist-info → dv_pipecat_ai-0.0.85.dev864.dist-info}/RECORD +8 -8
- pipecat/frames/frames.py +32 -0
- pipecat/processors/transcript_processor.py +3 -1
- pipecat/serializers/asterisk_chan_websocket_original.py +10 -37
- {dv_pipecat_ai-0.0.85.dev862.dist-info → dv_pipecat_ai-0.0.85.dev864.dist-info}/WHEEL +0 -0
- {dv_pipecat_ai-0.0.85.dev862.dist-info → dv_pipecat_ai-0.0.85.dev864.dist-info}/licenses/LICENSE +0 -0
- {dv_pipecat_ai-0.0.85.dev862.dist-info → dv_pipecat_ai-0.0.85.dev864.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
dv_pipecat_ai-0.0.85.
|
|
1
|
+
dv_pipecat_ai-0.0.85.dev864.dist-info/licenses/LICENSE,sha256=DWY2QGf2eMCFhuu2ChairtT6CB7BEFffNVhXWc4Od08,1301
|
|
2
2
|
pipecat/__init__.py,sha256=j0Xm6adxHhd7D06dIyyPV_GlBYLlBnTAERVvD_jAARQ,861
|
|
3
3
|
pipecat/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
pipecat/adapters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -79,7 +79,7 @@ pipecat/extensions/voicemail/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
|
|
|
79
79
|
pipecat/extensions/voicemail/voicemail_detector.py,sha256=JxmU2752iWP_1_GmzZReNESUTFAeyEa4XBPL20_C208,30004
|
|
80
80
|
pipecat/frames/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
81
81
|
pipecat/frames/frames.proto,sha256=JXZm3VXLR8zMOUcOuhVoe2mhM3MQIQGMJXLopdJO_5Y,839
|
|
82
|
-
pipecat/frames/frames.py,sha256=
|
|
82
|
+
pipecat/frames/frames.py,sha256=bB960rgNgJ6nDr8KUDQiSL-WoVUV7e7yYZyu28SVm80,52072
|
|
83
83
|
pipecat/frames/protobufs/frames_pb2.py,sha256=VHgGV_W7qQ4sfQK6RHb5_DggLm3PiSYMr6aBZ8_p1cQ,2590
|
|
84
84
|
pipecat/metrics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
85
85
|
pipecat/metrics/connection_metrics.py,sha256=8rBsEeufL3meWyJHcUbe35TS963W9B0wSnz0dQkv12A,1734
|
|
@@ -114,7 +114,7 @@ pipecat/processors/idle_frame_processor.py,sha256=z8AuhGap61lA5K35P6XCaOpn4kkmK_
|
|
|
114
114
|
pipecat/processors/logger.py,sha256=8xa4KKekXQIETlQR7zoGnwUpLNo8CeDVm7YjyXePN-w,2385
|
|
115
115
|
pipecat/processors/producer_processor.py,sha256=iIIOHZd77APvUGP7JqFbznAHUnCULcq_qYiSEjwXHcc,3265
|
|
116
116
|
pipecat/processors/text_transformer.py,sha256=LnfWJYzntJhZhrQ1lgSSY4D4VbHtrQJgrC227M69ZYU,1718
|
|
117
|
-
pipecat/processors/transcript_processor.py,sha256=
|
|
117
|
+
pipecat/processors/transcript_processor.py,sha256=P-JLoeZid4HKpYnGVxrOb8qQK3jkT5yVztbRrxiu-08,12559
|
|
118
118
|
pipecat/processors/two_stage_user_idle_processor.py,sha256=uf2aZh_lfW-eMxmFogP3R4taAJ1yXOSqjKsR7oXtD0Y,2938
|
|
119
119
|
pipecat/processors/user_idle_processor.py,sha256=Dl-Kcg0B4JZqWXXiyGuvYszGimbu2oKOyOJC92R9_hE,9140
|
|
120
120
|
pipecat/processors/aggregators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -156,7 +156,7 @@ pipecat/runner/types.py,sha256=zHjbAiU17fG0ypLXCEzPu7bpDOutAg-4gE7TESvK8n0,1761
|
|
|
156
156
|
pipecat/runner/utils.py,sha256=Ve9rjRvbt1o8e9by0nIrCJzUDGcuJUeYYhkqycmgHXc,18682
|
|
157
157
|
pipecat/serializers/__init__.py,sha256=84syrm66hb3nqxHGIjLOAT5hgMMAj9jikPjQ9urhB9g,940
|
|
158
158
|
pipecat/serializers/asterisk.py,sha256=QLJMXkU3DZ0sgFw3Vq2Zf8PHKkQQguL_v-l2Io4lZ_M,6729
|
|
159
|
-
pipecat/serializers/asterisk_chan_websocket_original.py,sha256=
|
|
159
|
+
pipecat/serializers/asterisk_chan_websocket_original.py,sha256=wZ9YQnJGzhfr_JIis-nzXn5sRkh0gY-NhUFsUUC-3-c,13666
|
|
160
160
|
pipecat/serializers/base_serializer.py,sha256=V5TIDRjvzCOtGD1qcwBDY_4mc4nbQWLn8SXkkKfFmok,2152
|
|
161
161
|
pipecat/serializers/convox.py,sha256=fj9NkFTB74B9k8qWEuICQNGUQtEV0DusaHohkOqNLa8,11145
|
|
162
162
|
pipecat/serializers/custom.py,sha256=clUEqOazGe3B2XoUFRN9zkFpMd6aIZeVRTqBRHAzavM,9071
|
|
@@ -418,7 +418,7 @@ pipecat/utils/tracing/service_decorators.py,sha256=fwzxFpi8DJl6BJbK74G0UEB4ccMJg
|
|
|
418
418
|
pipecat/utils/tracing/setup.py,sha256=7TEgPNpq6M8lww8OQvf0P9FzYc5A30xICGklVA-fua0,2892
|
|
419
419
|
pipecat/utils/tracing/turn_context_provider.py,sha256=ikon3plFOx0XbMrH6DdeHttNpb-U0gzMZIm3bWLc9eI,2485
|
|
420
420
|
pipecat/utils/tracing/turn_trace_observer.py,sha256=dma16SBJpYSOE58YDWy89QzHyQFc_9gQZszKeWixuwc,9725
|
|
421
|
-
dv_pipecat_ai-0.0.85.
|
|
422
|
-
dv_pipecat_ai-0.0.85.
|
|
423
|
-
dv_pipecat_ai-0.0.85.
|
|
424
|
-
dv_pipecat_ai-0.0.85.
|
|
421
|
+
dv_pipecat_ai-0.0.85.dev864.dist-info/METADATA,sha256=ZTdIYT9jKhorO_SVRcRrRRt13CjoGKBXtV-w4iiu-Ew,32955
|
|
422
|
+
dv_pipecat_ai-0.0.85.dev864.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
423
|
+
dv_pipecat_ai-0.0.85.dev864.dist-info/top_level.txt,sha256=kQzG20CxGf-nSsHmtXHx3hY2-8zHA3jYg8jk0TajqXc,8
|
|
424
|
+
dv_pipecat_ai-0.0.85.dev864.dist-info/RECORD,,
|
pipecat/frames/frames.py
CHANGED
|
@@ -1055,6 +1055,38 @@ class MetricsFrame(SystemFrame):
|
|
|
1055
1055
|
data: List[MetricsData]
|
|
1056
1056
|
|
|
1057
1057
|
|
|
1058
|
+
@dataclass
|
|
1059
|
+
class FunctionCallTrackingFrame(SystemFrame):
|
|
1060
|
+
"""Frame for tracking completed function call execution details.
|
|
1061
|
+
|
|
1062
|
+
Emitted when functions complete to track timing, parameters,
|
|
1063
|
+
responses, and status for analytics and debugging.
|
|
1064
|
+
|
|
1065
|
+
Parameters:
|
|
1066
|
+
message_id: ID of the transcript message that triggered this function
|
|
1067
|
+
function_name: Name of the function being called
|
|
1068
|
+
function_type: Type of function ('pre_call' or 'on_call')
|
|
1069
|
+
node_id: Flow node that triggered the function (optional)
|
|
1070
|
+
request_params: Parameters passed to the function
|
|
1071
|
+
response_data: Response returned by the function
|
|
1072
|
+
status_code: HTTP status code or function exit code
|
|
1073
|
+
latency_ms: Function execution time in milliseconds
|
|
1074
|
+
error_details: Error details if function failed
|
|
1075
|
+
metadata: Additional metadata (e.g., query_kb top results)
|
|
1076
|
+
"""
|
|
1077
|
+
|
|
1078
|
+
message_id: str = ""
|
|
1079
|
+
function_name: str = ""
|
|
1080
|
+
function_type: str = "" # 'pre_call' or 'on_call'
|
|
1081
|
+
node_id: Optional[str] = None
|
|
1082
|
+
request_params: Optional[Dict[str, Any]] = None
|
|
1083
|
+
response_data: Optional[Dict[str, Any]] = None
|
|
1084
|
+
status_code: Optional[int] = None
|
|
1085
|
+
latency_ms: Optional[float] = None
|
|
1086
|
+
error_details: Optional[Dict[str, Any]] = None
|
|
1087
|
+
metadata: Optional[Dict[str, Any]] = None
|
|
1088
|
+
|
|
1089
|
+
|
|
1058
1090
|
@dataclass
|
|
1059
1091
|
class FunctionCallFromLLM:
|
|
1060
1092
|
"""Represents a function call returned by the LLM.
|
|
@@ -11,6 +11,7 @@ transcript messages with timestamps, enabling conversation history tracking and
|
|
|
11
11
|
"""
|
|
12
12
|
|
|
13
13
|
from typing import List, Optional
|
|
14
|
+
import uuid
|
|
14
15
|
|
|
15
16
|
from loguru import logger
|
|
16
17
|
|
|
@@ -91,7 +92,7 @@ class UserTranscriptProcessor(BaseTranscriptProcessor):
|
|
|
91
92
|
user_id=frame.user_id,
|
|
92
93
|
content=frame.text,
|
|
93
94
|
timestamp=frame.timestamp,
|
|
94
|
-
message_id=
|
|
95
|
+
message_id=str(uuid.uuid4()),
|
|
95
96
|
)
|
|
96
97
|
await self._emit_update([message])
|
|
97
98
|
elif isinstance(frame, TranscriptDropFrame):
|
|
@@ -190,6 +191,7 @@ class AssistantTranscriptProcessor(BaseTranscriptProcessor):
|
|
|
190
191
|
role="assistant",
|
|
191
192
|
content=content,
|
|
192
193
|
timestamp=self._aggregation_start_time,
|
|
194
|
+
message_id=str(uuid.uuid4()),
|
|
193
195
|
)
|
|
194
196
|
await self._emit_update([message])
|
|
195
197
|
else:
|
|
@@ -62,7 +62,6 @@ class AsteriskWsFrameSerializer(FrameSerializer):
|
|
|
62
62
|
Args:
|
|
63
63
|
params: Configuration parameters.
|
|
64
64
|
"""
|
|
65
|
-
self._asterisk_command_format = None # Will be set to "json" or "plain-text" after receiving the first MEDIA_START event
|
|
66
65
|
self._input_resampler = create_stream_resampler()
|
|
67
66
|
self._media_buffering_started = False
|
|
68
67
|
self._output_resampler = create_stream_resampler()
|
|
@@ -252,27 +251,15 @@ class AsteriskWsFrameSerializer(FrameSerializer):
|
|
|
252
251
|
|
|
253
252
|
if not self._media_buffering_started:
|
|
254
253
|
self._media_buffering_started = True
|
|
255
|
-
command =
|
|
256
|
-
|
|
257
|
-
if self._asterisk_command_format == "plain-text"
|
|
258
|
-
else '{"command": "START_MEDIA_BUFFERING"}'
|
|
259
|
-
)
|
|
260
|
-
return (command, serialized_data)
|
|
254
|
+
command = "START_MEDIA_BUFFERING"
|
|
255
|
+
return command, serialized_data
|
|
261
256
|
|
|
262
257
|
return serialized_data
|
|
263
258
|
|
|
264
259
|
elif isinstance(frame, InterruptionFrame):
|
|
265
|
-
return
|
|
266
|
-
"FLUSH_MEDIA"
|
|
267
|
-
if self._asterisk_command_format == "plain-text"
|
|
268
|
-
else '{"command": "FLUSH_MEDIA"}'
|
|
269
|
-
)
|
|
260
|
+
return "FLUSH_MEDIA"
|
|
270
261
|
elif isinstance(frame, (EndFrame, CancelFrame)):
|
|
271
|
-
return
|
|
272
|
-
"HANGUP"
|
|
273
|
-
if self._asterisk_command_format == "plain-text"
|
|
274
|
-
else '{"command": "HANGUP"}'
|
|
275
|
-
)
|
|
262
|
+
return "HANGUP"
|
|
276
263
|
|
|
277
264
|
# Return None for unhandled frames
|
|
278
265
|
return None
|
|
@@ -308,28 +295,14 @@ class AsteriskWsFrameSerializer(FrameSerializer):
|
|
|
308
295
|
return audio_frame
|
|
309
296
|
|
|
310
297
|
elif isinstance(data, str):
|
|
311
|
-
# Identify the format of signalling event from Asterisk websocket channel message based
|
|
312
|
-
# on the first message in the channel: "MEDIA_START", it might be json or plain-text
|
|
313
|
-
if self._asterisk_command_format is None and "MEDIA_START" in data:
|
|
314
|
-
try:
|
|
315
|
-
message = json.loads(data)
|
|
316
|
-
if message.get("event") == "MEDIA_START":
|
|
317
|
-
self._asterisk_command_format = "json"
|
|
318
|
-
except json.JSONDecodeError:
|
|
319
|
-
self._asterisk_command_format = "plain-text"
|
|
320
|
-
|
|
321
298
|
# Parse the message - try JSON first, fall back to plain-text
|
|
322
299
|
event = {}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
for entry in event_entries[1:]:
|
|
330
|
-
if ":" in entry:
|
|
331
|
-
key, value = entry.split(":", 1)
|
|
332
|
-
event[key] = value
|
|
300
|
+
event_entries = data.split(" ")
|
|
301
|
+
event["event"] = event_entries[0]
|
|
302
|
+
for entry in event_entries[1:]:
|
|
303
|
+
if ":" in entry:
|
|
304
|
+
key, value = entry.split(":", 1)
|
|
305
|
+
event[key] = value
|
|
333
306
|
|
|
334
307
|
handler = self._asterisk_event_handlers.get(event.get("event"))
|
|
335
308
|
if handler:
|
|
File without changes
|
{dv_pipecat_ai-0.0.85.dev862.dist-info → dv_pipecat_ai-0.0.85.dev864.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{dv_pipecat_ai-0.0.85.dev862.dist-info → dv_pipecat_ai-0.0.85.dev864.dist-info}/top_level.txt
RENAMED
|
File without changes
|