Deprecate llm-function-call message

This commit is contained in:
Mark Backman
2026-02-04 11:17:23 -05:00
parent e0e3b5250b
commit cc68e00125

View File

@@ -77,10 +77,7 @@ from pipecat.metrics.metrics import (
TTSUsageMetricsData, TTSUsageMetricsData,
) )
from pipecat.observers.base_observer import BaseObserver, FramePushed from pipecat.observers.base_observer import BaseObserver, FramePushed
from pipecat.processors.aggregators.openai_llm_context import ( from pipecat.processors.aggregators.openai_llm_context import OpenAILLMContextFrame
OpenAILLMContext,
OpenAILLMContextFrame,
)
from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.processors.frame_processor import FrameDirection, FrameProcessor
from pipecat.services.llm_service import ( from pipecat.services.llm_service import (
FunctionCallParams, # TODO(aleix): we shouldn't import `services` from `processors` FunctionCallParams, # TODO(aleix): we shouldn't import `services` from `processors`
@@ -581,6 +578,9 @@ class RTVILLMFunctionCallMessageData(BaseModel):
"""Data for LLM function call notification. """Data for LLM function call notification.
Contains function call details including name, ID, and arguments. Contains function call details including name, ID, and arguments.
.. deprecated:: 0.0.102
Use ``RTVILLMFunctionCallInProgressMessageData`` instead.
""" """
function_name: str function_name: str
@@ -592,6 +592,10 @@ class RTVILLMFunctionCallMessage(BaseModel):
"""Message notifying of an LLM function call. """Message notifying of an LLM function call.
Sent when the LLM makes a function call. Sent when the LLM makes a function call.
.. deprecated:: 0.0.102
Use ``RTVILLMFunctionCallInProgressMessage`` with the
``llm-function-call-in-progress`` event type instead.
""" """
label: RTVIMessageLiteral = RTVI_MESSAGE_LABEL label: RTVIMessageLiteral = RTVI_MESSAGE_LABEL
@@ -1652,7 +1656,20 @@ class RTVIProcessor(FrameProcessor):
Args: Args:
params: The function call parameters. params: The function call parameters.
.. deprecated:: 0.0.102
This method is deprecated. Function call events are now automatically
sent by ``RTVIObserver`` using the ``llm-function-call-in-progress`` event.
Configure reporting level via ``RTVIObserverParams.function_call_report_level``.
""" """
import warnings
warnings.warn(
"handle_function_call is deprecated. Function call events are now "
"automatically sent by RTVIObserver using llm-function-call-in-progress.",
DeprecationWarning,
stacklevel=2,
)
fn = RTVILLMFunctionCallMessageData( fn = RTVILLMFunctionCallMessageData(
function_name=params.function_name, function_name=params.function_name,
tool_call_id=params.tool_call_id, tool_call_id=params.tool_call_id,