From ffeb2527b35b56397bddb1070e9dd1ac11d077aa Mon Sep 17 00:00:00 2001 From: ThomasTaroni Date: Fri, 25 Apr 2025 18:58:40 +0200 Subject: [PATCH] Refactor log handling in deepresearch module Removed the unnecessary `logs` initialization and streamlined the `CustomLogsHandler` setup. This simplifies the code and avoids redundant log storage. --- src/phoenix_technologies/gptresearch/deepresearch.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/phoenix_technologies/gptresearch/deepresearch.py b/src/phoenix_technologies/gptresearch/deepresearch.py index 4a21a1e..919811c 100644 --- a/src/phoenix_technologies/gptresearch/deepresearch.py +++ b/src/phoenix_technologies/gptresearch/deepresearch.py @@ -20,8 +20,7 @@ class ReportGenerator: self.query = query self.report_type = report_type # Initialize researcher with a custom WebSocket - self.logs = [] - self.custom_logs_handler = CustomLogsHandler(self.logs) + self.custom_logs_handler = CustomLogsHandler() self.researcher = GPTResearcher(query, report_type, websocket=self.custom_logs_handler)