Reorganized module directories under `phoenix_technologies` for better namespace clarity and maintainability. Updated the Dockerfile to use an environment variable for the application entry point, enhancing flexibility in deployment. Additionally, revamped the README to reflect the new structure and provide clearer project documentation.
5.4 KiB
GPT Researcher
Project Description
GPT Researcher is a Python-based tool designed to assist researchers and knowledge seekers in generating detailed research insights efficiently and accurately. This project combines powerful machine learning-backed methodologies with intuitive features for processing and analyzing research data. The project revolves around managing research queries, obtaining resourceful insights, and enabling the creation of detailed research outputs. It provides flexibility for both quick general searches and deep explorations of specific topics. Additionally, it comes with a robust system for managing logs, exceptions, and user-defined custom responses. The application is containerized with Docker, making it easier to deploy in any environment. It is built to utilize modular components for research management, formatting responses, and enhancing the overall research experience.
Features
Key Highlights:
- Research Operations
- Perform deep-dives into specific topics through a systematic research mechanism.
- Quickly search for general information in a fast and lightweight fashion (
quick_search
). - Retrieve necessary sources for research with flexibility.
- Resource Management
- Organize and store research results for later analysis.
- Format research sources and context to create user-friendly reports.
- Generate customizable research prompts for optimized research requests.
- Logging and Error Handling
- Employ a custom logging handler (
CustomLogsHandler
) to manage logs effectively. - Provide user-friendly error responses with flexible exception handling.
- Report Generation
- Automate the creation of research reports in reusable templates.
- Aggregate research resources and contexts while ensuring professional quality formatting.
- Web Server Support
- Run a backend server with the
run_server
function for handling client-side operations and queries.
- Containerized Deployment
- Fully Dockerized to allow for fast setup and consistent deployment across environments.
Installation
To get the project up and running locally, follow these steps:
Prerequisites
- Python 3.13+
- Docker Engine (for containerized deployments)
pip
for managing necessary Python packages
Steps:
- Clone the Repository:
git clone <repository-url>
cd gpt_researcher
- Install Dependencies: If you are working outside of Docker:
pip install -r requirements.txt
- Run the Application:
python src/mcp/gpt_researcher/server.py
- Using Docker: Build and run the Docker container:
docker build -t gpt-researcher .
docker run -p 8000:8000 gpt-researcher
The app will be available at http://localhost:8000
.
File Structure
Overview:
src/
├── mcp/
│ ├── gpt_researcher/
│ │ ├── server.py # Main entrypoint for research workflow and server
│ │ └── utils.py # Utility functions for research formatting and storage
Dockerfile # Defines the container runtime environment
requirements.txt # Python dependencies for the project
Key Components:
- **
server.py
**:
-
Implements the main research operations:
deep_research
,quick_search
, andwrite_report
.
-
Contains functions to retrieve research sources, manage contexts, and execute research prompts.
- **
utils.py
**:
- Provides utilities for:
- Managing research storage.
- Formatting sources and context for readable outputs.
- Generating responses to different types of user interactions.
- **
Dockerfile
**:
- A configuration file for containerizing the application using the official Python 3.13-slim image.
Usage Instructions
Available Endpoints
Once the server is running successfully, you can interact with the application by sending API requests to the available endpoints. Below are the core functionalities:
- Quick Research:
- Quickly get general insights based on a query.
- Deep Research:
- Run comprehensive research on a specific topic.
- Custom Research Reports:
- Combine sources and analysis to create detailed user reports.
- Access Research Context:
- Retrieve the context and sources behind a result for deeper understanding.
Contributing
We follow a code of conduct that expects all contributors to maintain a respectful and inclusive environment.
Contribution Guidelines:
- Fork the repository and make your development locally.
- Create a branch for your changes.
git checkout -b feature-name
- Make your changes and test them thoroughly.
- Submit a pull request with a clear description of the changes.
Code of Conduct
As contributors and maintainers of this project, we pledge to respect all members of the community by fostering a positive and inclusive environment. Instances of abuse, harassment, or unacceptable behavior will not be tolerated. For details, please refer to the Code of Conduct.
License
This project is licensed under the MIT License. For more information, refer to the LICENSE file in the repository.
Feedback and Support
For any queries, suggestions, or feedback, feel free to open an issue in this repository. You can also contact the maintainers directly via email or GitHub. Please feel free to expand or modify this README according to your project's future needs!