diff --git a/gpt_engineer/steps.py b/gpt_engineer/steps.py index 0e9cd6b..31f0b6e 100644 --- a/gpt_engineer/steps.py +++ b/gpt_engineer/steps.py @@ -3,7 +3,7 @@ import re import subprocess from enum import Enum -from typing import Callable, TypeVar +from typing import Callable, List, TypeVar from gpt_engineer.ai import AI from gpt_engineer.chat_to_files import to_files @@ -16,7 +16,7 @@ def setup_sys_prompt(dbs): ) -Step = TypeVar("Step", bound=Callable[[AI, DBs], list[dict]]) +Step = TypeVar("Step", bound=Callable[[AI, DBs], List[dict]]) def simple_gen(ai: AI, dbs: DBs): diff --git a/scripts/benchmark.py b/scripts/benchmark.py index cde4957..ac130bb 100644 --- a/scripts/benchmark.py +++ b/scripts/benchmark.py @@ -6,13 +6,13 @@ import subprocess from itertools import islice from pathlib import Path -from typing import Iterable +from typing import Iterable, Union from typer import run def main( - n_benchmarks: int | None = None, + n_benchmarks: Union[int, None] = None, ): path = Path("benchmark") diff --git a/scripts/rerun_edited_message_logs.py b/scripts/rerun_edited_message_logs.py index 2bf4409..8d9b258 100644 --- a/scripts/rerun_edited_message_logs.py +++ b/scripts/rerun_edited_message_logs.py @@ -1,6 +1,8 @@ import json import pathlib +from typing import Union + import typer from gpt_engineer.ai import AI @@ -12,7 +14,7 @@ app = typer.Typer() @app.command() def main( messages_path: str, - out_path: str | None = None, + out_path: Union[str, None] = None, model: str = "gpt-4", temperature: float = 0.1, ):