diff --git a/agbenchmark/agent_interface.py b/agbenchmark/agent_interface.py index 402120e8f3a..6b2d5bbe745 100644 --- a/agbenchmark/agent_interface.py +++ b/agbenchmark/agent_interface.py @@ -14,6 +14,10 @@ mock_test_str = os.getenv("MOCK_TEST") MOCK_FLAG = mock_test_str.lower() == "true" if mock_test_str else False +helicone_graphql_logs = os.getenv("HELICONE_GRAPHQL_LOGS") +HELICONE_GRAPHQL_LOGS = ( + helicone_graphql_logs.lower() == "true" if helicone_graphql_logs else False +) def run_agent( diff --git a/agbenchmark/utils/get_data_from_helicone.py b/agbenchmark/utils/get_data_from_helicone.py index 0de17cd3f50..51a24065dda 100644 --- a/agbenchmark/utils/get_data_from_helicone.py +++ b/agbenchmark/utils/get_data_from_helicone.py @@ -4,6 +4,7 @@ import requests +from agbenchmark.agent_interface import HELICONE_GRAPHQL_LOGS from agbenchmark.start_benchmark import BENCHMARK_START_TIME @@ -22,7 +23,6 @@ def get_data_from_helicone(challenge: str) -> Optional[float]: } } """ - print(query) variables = { "properties": [ @@ -37,8 +37,9 @@ def get_data_from_helicone(challenge: str) -> Optional[float]: {"value": {"equals": challenge}, "name": "challenge"}, ] } - - print(json.dumps(variables, indent=4)) + if HELICONE_GRAPHQL_LOGS: + print(query) + print(json.dumps(variables, indent=4)) operation_name = "ExampleQuery"