Skip to content

Commit

Permalink
bug fix: wrong location to reset self.segments
Browse files Browse the repository at this point in the history
  • Loading branch information
Maplemx committed Mar 26, 2024
1 parent 6709f0c commit 8ad370c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/agent_component/Segment.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ async def _suffix(self, event:str, data: any):
return None
try:
if len(self.segments) > 0:
self.segments = {}
if event == "response:delta":
for char in data:
'''For Debug
Expand Down Expand Up @@ -167,6 +166,7 @@ async def _suffix(self, event:str, data: any):
for async_task in self.async_tasks:
await async_task
# clean request runtime
self.segments = {}
self.response_segments_cache = {}
self.parse_stage = 0
self.current_segment = ""
Expand Down

0 comments on commit 8ad370c

Please sign in to comment.