mirror of https://github.com/aliasrobotics/cai.git
fix
This commit is contained in:
parent
4f9b7ffc83
commit
976b375c71
|
|
@ -44,7 +44,7 @@ import litellm
|
|||
import requests
|
||||
|
||||
# Enable debug mode for litellm
|
||||
litellm._turn_on_debug()
|
||||
#litellm._turn_on_debug()
|
||||
|
||||
# Default API bases
|
||||
OPENROUTER_API_BASE = "https://openrouter.ai/api/v1"
|
||||
|
|
@ -65,12 +65,7 @@ class CyberMetricEvaluator:
|
|||
self.api_key = None
|
||||
if self.model_name.startswith("openrouter/"):
|
||||
self.api_key = api_key or os.environ.get("OPENROUTER_API_KEY")
|
||||
# Debug API key (masked)
|
||||
if self.api_key:
|
||||
print(f"API Key is set (masked)")
|
||||
else:
|
||||
print("WARNING: API Key is not set!")
|
||||
|
||||
|
||||
self.start_time = datetime.datetime.now()
|
||||
|
||||
# Create output directory structure
|
||||
|
|
@ -188,8 +183,6 @@ class CyberMetricEvaluator:
|
|||
if not self.api_key:
|
||||
raise ValueError("API key is required for OpenRouter models")
|
||||
|
||||
print(f"Using OpenRouter API base: {self.openrouter_api_base}")
|
||||
print(f"Using API key (masked):")
|
||||
|
||||
for attempt in range(max_retries):
|
||||
try:
|
||||
|
|
@ -202,7 +195,7 @@ class CyberMetricEvaluator:
|
|||
api_base=self.openrouter_api_base,
|
||||
api_key=self.api_key,
|
||||
headers={
|
||||
"HTTP-Referer": "https://gitlab.com",
|
||||
"HTTP-Referer": "https://your-site-url.com",
|
||||
"X-Title": "CyberMetric Evaluator"
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue