from typing import Type, Optional from pathlib import Path from agents import Agent, ModelSettings root_path = Path(__file__).parent prompt_path = root_path / "prompts" def build_agent(name: str, system_prompt_file: str, output_type: Optional[Type | str]) -> Agent: with open(prompt_path / system_prompt_file, 'r', encoding='utf-8') as f: instructions = f.read() if output_type is None: output_type = str return Agent( name=name, instructions=instructions, output_type=output_type, model="o3-mini-2025-01-31", # "o4-mini-2025-04-16", # "gpt-4.1-2025-04-14", # model_settings=ModelSettings( # temperature=0.0, # ) # 'temperature' is not supported with o4-mini )