Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Commit

Permalink
Fix cost incorrect
Browse files Browse the repository at this point in the history
  • Loading branch information
waynehamadi committed Jul 31, 2023
1 parent dfda7c3 commit ed91353
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion agbenchmark/utils/get_data_from_helicone.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def get_data_from_helicone(challenge: str) -> Optional[float]:
}
}
"""
print(query)

variables = {
"filters": [
Expand All @@ -40,6 +41,7 @@ def get_data_from_helicone(challenge: str) -> Optional[float]:
{"property": {"value": {"equals": challenge}, "name": "challenge"}},
]
}
print(json.dumps(variables, indent=4))

operation_name = "ExampleQuery"

Expand Down Expand Up @@ -75,7 +77,7 @@ def get_data_from_helicone(challenge: str) -> Optional[float]:
print("this is the data!", data)
try:
return (
data.get("data", {}).get("aggregatedHeliconeRequest", {}).get("cost", None)
data.get("data", {}).get("aggregatedHeliconeRequest", {}).get("costUSD", None)
)
except Exception as err:
print(f"Error occurred: {err}")
Expand Down

0 comments on commit ed91353

Please sign in to comment.