File tree 3 files changed +7
-5
lines changed
3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 1
- # This workflow updates the file in /data /model_prices_and_context_window.json
1
+ # This workflow updates the file in /model_cost_data /model_prices_and_context_window.json
2
2
name : Update model prices and context window JSON file
3
3
4
4
on :
@@ -18,12 +18,12 @@ jobs:
18
18
19
19
- name : Get the latest file
20
20
run : |
21
- curl -Ss 'https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json' > data /model_prices_and_context_window.json
21
+ curl -Ss 'https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json' > model_cost_data /model_prices_and_context_window.json
22
22
23
23
- name : Check if file changed
24
24
id : check-model-prices
25
25
run : |
26
- if ! git diff --quiet data /model_prices_and_context_window.json ; then
26
+ if ! git diff --quiet model_cost_data /model_prices_and_context_window.json ; then
27
27
echo "changed=true" >> "$GITHUB_OUTPUT"
28
28
else
29
29
echo "changed=false" >> "$GITHUB_OUTPUT"
44
44
run : |
45
45
git checkout -b update-model-prices-$GITHUB_SHA
46
46
47
- git add data /model_prices_and_context_window.json
47
+ git add model_cost_data /model_prices_and_context_window.json
48
48
git commit -m "Update model_prices_and_context_window.json to version generated on ${{ env.CURRENT_DATETIME }}"
49
49
50
50
echo "Pushing branch so we can create a PR..."
File renamed without changes.
Original file line number Diff line number Diff line change @@ -19,7 +19,9 @@ class TokenUsageParser:
19
19
def __init__ (self ):
20
20
current_dir = Path (__file__ ).parent
21
21
filemodel_path = (
22
- current_dir .parent .parent .parent / "data" / "model_prices_and_context_window.json"
22
+ current_dir .parent .parent .parent
23
+ / "model_cost_data"
24
+ / "model_prices_and_context_window.json"
23
25
)
24
26
with open (filemodel_path ) as file :
25
27
self .model_cost_mapping : Dict [str , Dict ] = json .load (file )
You can’t perform that action at this time.
0 commit comments