Commit graph

13 commits

Author SHA1 Message Date
73e929ca00 Refactor report generation with simplified log streaming
Replaced custom log handler and async report generation logic with a simplified fake data streamer for the StreamingResponse. Added uvicorn server startup code for direct script execution.
2025-04-26 08:38:02 +02:00
e2b4ba5a7d Refactor log streaming and report generation logic
Simplified the logic for log streaming by consolidating into a single async generator (`log_stream`). Removed redundant tasks and streamlined report generation to improve code readability and maintainability.
2025-04-25 22:11:19 +02:00
1472e277bc Refactor report generation with async streaming and logging
Enhanced report generation by integrating `CustomLogsHandler` and separating tasks for generating reports and streaming logs. Replaced the previous implementation with a unified async generator to handle concurrent execution and improve error handling. Updated module exports to include the new `CustomLogsHandler` component.
2025-04-25 22:07:25 +02:00
6ee47f02c0 Fix incorrect attribute access for generator completion check
Replaced `generator.researcher.complete` with the correct `generator.complete`. This resolves a potential logic error and ensures the completion condition is properly evaluated.
2025-04-25 19:57:01 +02:00
79be94afd2 Refactor generator completion checks for consistency.
Replaced `.is_complete()` method calls with direct `.complete` attribute access to streamline the code. Removed the redundant `is_complete()` method from `deepresearch.py` to reduce unnecessary indirection. This simplifies the logic and improves readability.
2025-04-25 19:53:59 +02:00
b16305e369 Fix missing parentheses in is_complete method call
The is_complete method was incorrectly referenced without parentheses, causing a potential runtime error. This fix ensures proper method invocation and prevents the loop from behaving incorrectly.
2025-04-25 19:51:38 +02:00
cb5fe35d24 Refactor report generation flow to include progress streaming
Modified the report generation process to stream logs incrementally during execution. Introduced new methods `init` and `is_complete` to enhance modularity and track completion status. Adjusted generator logic to better manage and yield logs in real-time.
2025-04-25 19:47:34 +02:00
ae4e81906e Add progress messages to report generation process
This change introduces status updates to indicate the start and successful completion of the report generation. These progress messages improve user feedback during the asynchronous operation.
2025-04-25 19:26:18 +02:00
936eb6f394 Refactor report generation and logging handlers.
Introduced `CustomLogsHandler` to streamline log management and updated `ReportGenerator` to simplify report generation output. Removed unused asynchronous iterator methods, improving code clarity and reducing complexity.
2025-04-25 18:56:41 +02:00
327758f00f Refactor async logging logic in report generation.
Removed unused log yielding in `main.py` to simplify the flow. Updated `send_json` in `deepresearch.py` to use an async generator for more flexible streaming of log data.
2025-04-25 18:42:40 +02:00
ade4511a87 Add report generation step to the main async process
The `generate_report` method is now explicitly called within the main process, ensuring the researcher's report generation is initiated properly. Updated its return type annotation for clarity in `deepresearch.py`.
2025-04-25 18:39:33 +02:00
14429fc6f7 Refactor logging and improve async iteration in report generation
Refactored `CustomLogsHandler` to accept an optional logs list and modified its method to append data instead of yielding. Enhanced `ReportGenerator` with proper asynchronous iterator implementation, enabling smooth log handling and retrieval. Simplified variable naming for better readability.
2025-04-25 18:35:30 +02:00
3d0d2b2770 Add FastAPI app for report generation with Docker support
Implement a modular FastAPI-based service for generating research reports using `GPTResearcher`. Includes secure API key authentication, a streaming response endpoint, and a Dockerized deployment setup. Also adds documentation, core dependencies, and project structure.
2025-04-25 08:34:18 +02:00