Skip to content

Commit f2b0758

Browse files
committed
test me: is this needed
1 parent d61b1a5 commit f2b0758

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/codegate/pipeline/output.py

+4
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ async def process_stream(
160160
logger.error(f"Error processing stream: {e}")
161161
raise e
162162
finally:
163+
if cleanup_sensitive == False:
164+
return
165+
163166
# Process any remaining content in buffer when stream ends
164167
if self._context.buffer:
165168
final_content = "".join(self._context.buffer)
@@ -179,6 +182,7 @@ async def process_stream(
179182
model=self._buffered_chunk.model,
180183
object="chat.completion.chunk",
181184
)
185+
logger.error("Clearing buffer in finally")
182186
self._context.buffer.clear()
183187

184188
# Cleanup sensitive data through the input context

0 commit comments

Comments
 (0)