-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig.py
More file actions
44 lines (35 loc) · 1.1 KB
/
config.py
File metadata and controls
44 lines (35 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
"""Configuration for the agentic research tool."""
import os
from typing import Optional
from dotenv import load_dotenv
load_dotenv(override=True)
# API Configuration
OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY")
# Model Configuration
MODEL_RESEARCH = "o4-mini-deep-research"
MODEL_CRITIQUE = "o3-pro"
MODEL_FINAL_REPORT = "o4-mini"
# Agent Configuration
MAX_TURNS_RESEARCH = 15
MAX_TURNS_CRITIQUE = 25
MAX_TURNS_FINAL_REPORT = 15
# File Configuration
RESULTS_DIR = "results"
DEFAULT_QUERY = (
"Find if Microsoft 365 Copilot has SOC2 and HIPAA compliance. "
"Do not be distracted with other products under Copilot brand. "
"Ground your answers in official data from Microsoft."
)
# Ensure results directory exists
os.makedirs(RESULTS_DIR, exist_ok=True)
# Exit codes for different failure types
EXIT_SUCCESS = 0
EXIT_VALIDATION_ERROR = 1
EXIT_RESEARCH_AGENT_ERROR = 2
EXIT_CRITIQUE_AGENT_ERROR = 3
EXIT_FINAL_REPORT_AGENT_ERROR = 4
EXIT_GENERAL_ERROR = 5
# Configuration validation utility
def validate_config() -> bool:
"""Validate essential configuration."""
return bool(OPENAI_API_KEY)