mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
fix truncation logic (#125)
This commit is contained in:
parent
8ce2ac7648
commit
a023fcae64
@ -14,7 +14,7 @@ class Agent:
|
||||
self.memory = LongTermMemory()
|
||||
|
||||
def add_event(self, event):
|
||||
if 'output' in event.args:
|
||||
if 'output' in event.args and len(event.args['output']) > MAX_OUTPUT_LENGTH:
|
||||
event.args['output'] = event.args['output'][:MAX_OUTPUT_LENGTH] + "..."
|
||||
self.monologue.add_event(event)
|
||||
self.memory.add_event(event)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user