mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-09 14:57:59 -05:00
Co-authored-by: Calvin Smith <calvin@all-hands.dev> Co-authored-by: Graham Neubig <neubig@gmail.com>
20 lines
589 B
Python
20 lines
589 B
Python
from __future__ import annotations
|
|
|
|
from openhands.core.config.condenser_config import NoOpCondenserConfig
|
|
from openhands.memory.condenser.condenser import Condensation, Condenser, View
|
|
|
|
|
|
class NoOpCondenser(Condenser):
|
|
"""A condenser that does nothing to the event sequence."""
|
|
|
|
def condense(self, view: View) -> View | Condensation:
|
|
"""Returns the list of events unchanged."""
|
|
return view
|
|
|
|
@classmethod
|
|
def from_config(cls, config: NoOpCondenserConfig) -> NoOpCondenser:
|
|
return NoOpCondenser()
|
|
|
|
|
|
NoOpCondenser.register_config(NoOpCondenserConfig)
|