Skip to content

Commit 10a8eb2

Browse files
committed
(fix) update load test result
1 parent b075e9f commit 10a8eb2

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

.github/workflows/update_release.py

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import os
2+
import requests
3+
from datetime import datetime
4+
5+
# GitHub API endpoints
6+
GITHUB_API_URL = "https://api.github.com"
7+
REPO_OWNER = "BerriAI"
8+
REPO_NAME = "litellm"
9+
10+
# GitHub personal access token (required for uploading release assets)
11+
GITHUB_ACCESS_TOKEN = os.environ.get("GITHUB_ACCESS_TOKEN")
12+
13+
# Headers for GitHub API requests
14+
headers = {
15+
"Accept": "application/vnd.github+json",
16+
"Authorization": f"Bearer {GITHUB_ACCESS_TOKEN}",
17+
"X-GitHub-Api-Version": "2022-11-28",
18+
}
19+
20+
# Get the latest release
21+
releases_url = f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/releases/latest"
22+
response = requests.get(releases_url, headers=headers)
23+
latest_release = response.json()
24+
print("Latest release:", latest_release)
25+
26+
# Upload an asset to the latest release
27+
upload_url = latest_release["upload_url"].split("{?")[0]
28+
asset_name = "results_stats.csv"
29+
asset_path = os.path.join(os.getcwd(), asset_name)
30+
print("upload_url:", upload_url)
31+
32+
with open(asset_path, "rb") as asset_file:
33+
asset_data = asset_file.read()
34+
35+
upload_payload = {
36+
"name": asset_name,
37+
"label": "Load test results",
38+
"created_at": datetime.utcnow().isoformat() + "Z",
39+
}
40+
41+
upload_headers = headers.copy()
42+
upload_headers["Content-Type"] = "application/octet-stream"
43+
44+
upload_response = requests.post(
45+
upload_url,
46+
headers=upload_headers,
47+
data=asset_data,
48+
params=upload_payload,
49+
)
50+
51+
if upload_response.status_code == 201:
52+
print(f"Asset '{asset_name}' uploaded successfully to the latest release.")
53+
else:
54+
print(f"Failed to upload asset. Response: {upload_response.text}")

litellm/model_prices_and_context_window_backup.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,14 @@
655655
"litellm_provider": "anthropic",
656656
"mode": "chat"
657657
},
658+
"claude-3-haiku-20240307": {
659+
"max_tokens": 200000,
660+
"max_output_tokens": 4096,
661+
"input_cost_per_token": 0.00000025,
662+
"output_cost_per_token": 0.00000125,
663+
"litellm_provider": "anthropic",
664+
"mode": "chat"
665+
},
658666
"claude-3-opus-20240229": {
659667
"max_tokens": 200000,
660668
"max_output_tokens": 4096,

0 commit comments

Comments
 (0)