From e4c990c677d4ffd6d07564e3f7cd1d47e5b5fac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Mon, 20 May 2024 10:51:37 -0700 Subject: [PATCH] aggregators: expose LLM messages --- CHANGELOG.md | 7 +++++++ src/pipecat/processors/aggregators/llm_response.py | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e90e07d49..142605f90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to **pipecat** will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Changed + +- `LLMUserResponseAggregator` and `LLMAssistantResponseAggregator` internal + messages are now exposed through the `messages` property. + ## [0.0.18] - 2024-05-20 ### Fixed diff --git a/src/pipecat/processors/aggregators/llm_response.py b/src/pipecat/processors/aggregators/llm_response.py index 853217064..3886b0ff9 100644 --- a/src/pipecat/processors/aggregators/llm_response.py +++ b/src/pipecat/processors/aggregators/llm_response.py @@ -45,6 +45,14 @@ def __init__( # Reset our accumulator state. self._reset() + @property + def messages(self): + return self._messages + + @property + def role(self): + return self._role + # # Frame processor #