diff --git a/agbenchmark/utils/get_data_from_helicone.py b/agbenchmark/utils/get_data_from_helicone.py index db823a58..f6e43e56 100644 --- a/agbenchmark/utils/get_data_from_helicone.py +++ b/agbenchmark/utils/get_data_from_helicone.py @@ -60,6 +60,8 @@ query ExampleQuery($properties: [PropertyFilter!]){ except Exception as err: print(f"Other error occurred: {err}") else: + if not data: + raise Exception("No data returned from Helicone") return ( data.get("data", {}).get("aggregatedHeliconeRequest", {}).get("cost", None) )