diff --git a/pyproject.toml b/pyproject.toml index d3d0c7c..573a3c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ packages=["spice"] [project] name = "spiceai" -version = "0.3.19" +version = "0.3.20" license = {text = "Apache-2.0"} description = "A Python library for building AI-powered applications." readme = "README.md" diff --git a/scripts/timing.py b/scripts/timing.py index 827bf93..9743fe4 100644 --- a/scripts/timing.py +++ b/scripts/timing.py @@ -4,6 +4,8 @@ from timeit import default_timer as timer from typing import List +from spice.models import SONNET_3_5, GPT_4o_2024_08_06 + # Modify sys.path to ensure the script can run even when it's not part of the installed library. sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) @@ -18,11 +20,11 @@ async def speed_compare(): {"role": "user", "content": "list 100 random words"}, ] - models = ["gpt-4o-mini", "gpt-4o"] - runs = 5 + models = [GPT_4o_2024_08_06, SONNET_3_5] + runs = 3 for model in models: - print(f"Timing {model}:") + print(f"Timing {model.name}:") for i in range(runs): start = timer() response = await client.get_response(messages=messages, model=model)