Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timing fix, bump version to incldue new 4o #101

Merged
merged 1 commit into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 5 additions & 3 deletions scripts/timing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__), "..")))

Expand All @@ -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)
Expand Down
Loading