diff --git a/src/phoenix_technologies/gptresearch/deepresearch.py b/src/phoenix_technologies/gptresearch/deepresearch.py index 3724c99..f10497e 100644 --- a/src/phoenix_technologies/gptresearch/deepresearch.py +++ b/src/phoenix_technologies/gptresearch/deepresearch.py @@ -9,11 +9,10 @@ class CustomLogsHandler: logs = [] self.logs = logs # Initialize logs to store data - async def send_json(self, data: Dict[str, Any]) -> AsyncGenerator[str, Any]: + async def send_json(self, data: Dict[str, Any]) -> None: """Send JSON data and log it.""" self.logs.append(data) # Append data to logs print(f"My custom Log: {data}") - yield f"My custom Log: {data}" class ReportGenerator: def __init__(self, query: str, report_type: str): @@ -64,6 +63,6 @@ class ReportGenerator: if self._log_index < len(self.logs): log = self.logs[self._log_index] self._log_index += 1 - return log # Return the next log + yield log # Return the next log else: raise StopAsyncIteration # Stop when logs are exhausted