Parse command line arguments.
()
| 31 | |
| 32 | |
| 33 | def parse_args() -> argparse.Namespace: |
| 34 | """Parse command line arguments.""" |
| 35 | parser = argparse.ArgumentParser( |
| 36 | description="Deep Research Task Generator - Generate expert-level deep research tasks", |
| 37 | formatter_class=argparse.RawDescriptionHelpFormatter, |
| 38 | epilog=""" |
| 39 | Examples: |
| 40 | python main.py --output_file ./tasks.jsonl |
| 41 | python main.py --model_name gpt-4 --max_workers 10 |
| 42 | python main.py --verbose |
| 43 | """, |
| 44 | ) |
| 45 | |
| 46 | # Output configuration |
| 47 | parser.add_argument( |
| 48 | "--output_file", |
| 49 | type=str, |
| 50 | default="./outputs/task_generation/deep_research_tasks.jsonl", |
| 51 | help="Output file path (default: ./outputs/task_generation/deep_research_tasks.jsonl)", |
| 52 | ) |
| 53 | |
| 54 | # Generation parameters |
| 55 | parser.add_argument( |
| 56 | "--num_domains", |
| 57 | type=int, |
| 58 | default=10, |
| 59 | help="Number of domains to generate (default: 10)", |
| 60 | ) |
| 61 | parser.add_argument( |
| 62 | "--tasks_per_expert", |
| 63 | type=int, |
| 64 | default=2, |
| 65 | help="Number of tasks per expert (default: 2)", |
| 66 | ) |
| 67 | |
| 68 | # LLM configuration |
| 69 | parser.add_argument( |
| 70 | "--model_name", |
| 71 | type=str, |
| 72 | default="gpt-5-mini", |
| 73 | help="LLM model to use (default: gpt-5-mini)", |
| 74 | ) |
| 75 | parser.add_argument( |
| 76 | "--api_type", |
| 77 | type=str, |
| 78 | choices=["openai", "openrouter"], |
| 79 | default="openai", |
| 80 | help="API type (default: openai)", |
| 81 | ) |
| 82 | parser.add_argument( |
| 83 | "--max_retries", |
| 84 | type=int, |
| 85 | default=3, |
| 86 | help="API retry count (default: 3)", |
| 87 | ) |
| 88 | |
| 89 | # Parallel configuration |
| 90 | parser.add_argument( |