diff --git a/src/server.py b/src/server.py index 7914e43..fa8d222 100644 --- a/src/server.py +++ b/src/server.py @@ -37,6 +37,7 @@ logger = logging.getLogger(__name__) # Initialize FastMCP server mcp = FastMCP("GPT Researcher") +research_type = os.getenv("RESEARCH_TYPE", "deep") # Initialize researchers dictionary if not hasattr(mcp, "researchers"): @@ -65,7 +66,7 @@ async def research_resource(topic: str) -> str: logger.info(f"Conducting new research for resource on topic: {topic}") # Initialize GPT Researcher - researcher = GPTResearcher(topic) + researcher = GPTResearcher(topic, report_type=research_type) try: # Conduct the research @@ -107,7 +108,7 @@ async def deep_research(query: str) -> Dict[str, Any]: research_id = str(uuid.uuid4()) # Initialize GPT Researcher - researcher = GPTResearcher(query, report_type="deep") + researcher = GPTResearcher(query, report_type=research_type) # Start research try: