Skip to content

Commit c1b0d43

Browse files
authored
Merge pull request #19 from pipecat-ai/pk/use-llm-context-elide-large-values
Use LLMContext instead of removed OpenAILLMContext
2 parents dd4530d + b97683a commit c1b0d43

4 files changed

Lines changed: 739 additions & 1191 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- Switched from removed `OpenAILLMContext` to universal `LLMContext` for
13+
Pipecat 1.0 compatibility. Context messages are now serialized using
14+
`get_messages(truncate_large_values=True)` for compact output.
15+
16+
- Bumped `pipecat-ai` dependency to `>=1.0.0`.
17+
1018
### Fixed
1119

1220
- Fixed a Whisker client issue that caused processor blinking to be delayed

pipecat/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description = "A real-time debugger for Pipecat"
99
license = "BSD-2-Clause"
1010
license-files = ["LICENSE"]
1111
readme = "README.md"
12-
requires-python = ">=3.10"
12+
requires-python = ">=3.11"
1313
keywords = ["pipecat", "debug", "ai"]
1414
classifiers = [
1515
"Development Status :: 5 - Production/Stable",
@@ -23,7 +23,7 @@ dependencies = [
2323
"aiofiles>=24.1.0,<25",
2424
"loguru>=0.7.3,<1",
2525
"msgpack>=1.1.1,<2",
26-
"pipecat-ai>=0.0.81",
26+
"pipecat-ai>=1.0.0",
2727
"websockets>=13.1,<16.0",
2828
]
2929

pipecat/src/pipecat_whisker/observer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
from pipecat.frames.frames import BotSpeakingFrame, Frame, InputAudioRawFrame
3838
from pipecat.observers.base_observer import BaseObserver, FrameProcessed, FramePushed
3939
from pipecat.pipeline.base_pipeline import BasePipeline
40-
from pipecat.processors.aggregators.openai_llm_context import OpenAILLMContext
40+
from pipecat.processors.aggregators.llm_context import LLMContext
4141
from pipecat.processors.frame_processor import FrameProcessor
4242
from pydantic import BaseModel
4343
from websockets import ConnectionClosedOK, serve
@@ -73,8 +73,8 @@ def whisker_obj_serializer(obj: Any) -> Any:
7373
return {k: whisker_obj_serializer(v) for k, v in obj.items() if v is not None}
7474
elif isinstance(obj, BaseModel):
7575
return obj.model_dump(exclude_none=True)
76-
elif isinstance(obj, OpenAILLMContext):
77-
return obj.get_messages_for_logging()
76+
elif isinstance(obj, LLMContext):
77+
return [whisker_obj_serializer(m) for m in obj.get_messages(truncate_large_values=True)]
7878
elif isinstance(obj, (int, float, bool, str)):
7979
return obj
8080
else:

0 commit comments

Comments
 (0)