We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d61b1a5 commit f2b0758Copy full SHA for f2b0758
src/codegate/pipeline/output.py
@@ -160,6 +160,9 @@ async def process_stream(
160
logger.error(f"Error processing stream: {e}")
161
raise e
162
finally:
163
+ if cleanup_sensitive == False:
164
+ return
165
+
166
# Process any remaining content in buffer when stream ends
167
if self._context.buffer:
168
final_content = "".join(self._context.buffer)
@@ -179,6 +182,7 @@ async def process_stream(
179
182
model=self._buffered_chunk.model,
180
183
object="chat.completion.chunk",
181
184
)
185
+ logger.error("Clearing buffer in finally")
186
self._context.buffer.clear()
187
188
# Cleanup sensitive data through the input context
0 commit comments