mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-01-27 18:04:25 +01:00
internal_info.json dynamic changes (#163)
This commit is contained in:
@@ -3,7 +3,7 @@ import os
|
||||
import sys
|
||||
import time
|
||||
from datetime import datetime
|
||||
from typing import Any, Dict
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
from agbenchmark.utils import get_highest_success_difficulty
|
||||
|
||||
@@ -37,8 +37,18 @@ class ReportManager:
|
||||
with open(self.filename, "w") as f:
|
||||
json.dump(self.tests, f, indent=4)
|
||||
|
||||
def add_test(self, test_name: str, test_details: dict | list) -> None:
|
||||
self.tests[test_name] = test_details
|
||||
def add_test(
|
||||
self,
|
||||
test_name: str,
|
||||
test_details: dict | list,
|
||||
agent_name: Optional[str] = None,
|
||||
) -> None:
|
||||
if agent_name:
|
||||
if agent_name not in self.tests:
|
||||
self.tests[agent_name] = {}
|
||||
self.tests[agent_name][test_name] = test_details
|
||||
else:
|
||||
self.tests[test_name] = test_details
|
||||
|
||||
self.save()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user