frames: make FunctionCallResultFrame a SystemFrame
This commit is contained in:
@@ -53,6 +53,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
- `FunctionCallResultFrame`a are now system frames. This is to prevent function
|
||||||
|
call results to be discarded during interruptions.
|
||||||
|
|
||||||
- Pipecat services have been reorganized into packages. Each package can have
|
- Pipecat services have been reorganized into packages. Each package can have
|
||||||
one or more of the following modules (in the future new module names might be
|
one or more of the following modules (in the future new module names might be
|
||||||
needed) depending on the services implemented:
|
needed) depending on the services implemented:
|
||||||
|
|||||||
@@ -377,25 +377,6 @@ class LLMEnablePromptCachingFrame(DataFrame):
|
|||||||
enable: bool
|
enable: bool
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
|
||||||
class FunctionCallResultProperties:
|
|
||||||
"""Properties for a function call result frame."""
|
|
||||||
|
|
||||||
run_llm: Optional[bool] = None
|
|
||||||
on_context_updated: Optional[Callable[[], Awaitable[None]]] = None
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
|
||||||
class FunctionCallResultFrame(DataFrame):
|
|
||||||
"""A frame containing the result of an LLM function (tool) call."""
|
|
||||||
|
|
||||||
function_name: str
|
|
||||||
tool_call_id: str
|
|
||||||
arguments: Any
|
|
||||||
result: Any
|
|
||||||
properties: Optional[FunctionCallResultProperties] = None
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class TTSSpeakFrame(DataFrame):
|
class TTSSpeakFrame(DataFrame):
|
||||||
"""A frame that contains a text that should be spoken by the TTS in the
|
"""A frame that contains a text that should be spoken by the TTS in the
|
||||||
@@ -652,6 +633,25 @@ class FunctionCallCancelFrame(SystemFrame):
|
|||||||
tool_call_id: str
|
tool_call_id: str
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class FunctionCallResultProperties:
|
||||||
|
"""Properties for a function call result frame."""
|
||||||
|
|
||||||
|
run_llm: Optional[bool] = None
|
||||||
|
on_context_updated: Optional[Callable[[], Awaitable[None]]] = None
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class FunctionCallResultFrame(SystemFrame):
|
||||||
|
"""A frame containing the result of an LLM function (tool) call."""
|
||||||
|
|
||||||
|
function_name: str
|
||||||
|
tool_call_id: str
|
||||||
|
arguments: Any
|
||||||
|
result: Any
|
||||||
|
properties: Optional[FunctionCallResultProperties] = None
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class STTMuteFrame(SystemFrame):
|
class STTMuteFrame(SystemFrame):
|
||||||
"""System frame to mute/unmute the STT service."""
|
"""System frame to mute/unmute the STT service."""
|
||||||
|
|||||||
Reference in New Issue
Block a user