build: load OPENAI_API_KEY from .env using python-dotenv in batch_o3_prompts.py

Co-authored-by: aider (o3) <aider@aider.chat>
This commit is contained in:
Mark Eaton
2025-09-17 15:20:36 -04:00
co-authored by aider
parent c499380244
commit 4cc23871bb
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -19,6 +19,7 @@ import sys
from pathlib import Path
from typing import Any, Dict
from dotenv import load_dotenv
import openai
MODEL = "o3"
@@ -53,6 +54,7 @@ def call_o3(prompt: str) -> str:
def main(argv: list[str] | None = None) -> None:
argv = argv or sys.argv[1:]
load_dotenv() # read variables from .env if present
if len(argv) != 3:
print(main.__doc__)
sys.exit(1)