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.
This commit is contained in:
ThomasTaroni 2025-04-25 18:58:40 +02:00
parent 936eb6f394
commit ffeb2527b3

View file

@ -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)