mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-25 18:04:28 +01:00
linter fixes
This commit is contained in:
@@ -7,10 +7,10 @@ from typing import Any, Callable
|
||||
import pytest
|
||||
|
||||
from agbenchmark.agent_interface import MOCK_FLAG
|
||||
from agbenchmark.utils.get_data_from_helicone import get_data_from_helicone
|
||||
from agbenchmark.reports.ReportManager import ReportManager
|
||||
from agbenchmark.start_benchmark import CONFIG_PATH, REGRESSION_TESTS_PATH, REPORTS_PATH
|
||||
from agbenchmark.utils.data_types import DIFFICULTY_MAP, DifficultyLevel, SuiteConfig
|
||||
from agbenchmark.utils.get_data_from_helicone import get_data_from_helicone
|
||||
from agbenchmark.utils.utils import (
|
||||
AGENT_NAME,
|
||||
calculate_success_percentage,
|
||||
|
||||
@@ -42,6 +42,8 @@ query ExampleQuery($properties: [PropertyFilter!]){
|
||||
|
||||
operation_name = "ExampleQuery"
|
||||
|
||||
data = None
|
||||
|
||||
# Make the request
|
||||
try:
|
||||
response = requests.post(
|
||||
@@ -59,9 +61,7 @@ query ExampleQuery($properties: [PropertyFilter!]){
|
||||
print(f"HTTP error occurred: {http_err}")
|
||||
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)
|
||||
)
|
||||
|
||||
if not data:
|
||||
raise Exception("No data returned from Helicone")
|
||||
return data.get("data", {}).get("aggregatedHeliconeRequest", {}).get("cost", None)
|
||||
|
||||
Reference in New Issue
Block a user