Spaces:
Sleeping
Sleeping
Commit
·
0b23e94
1
Parent(s):
ab39c06
add
Browse files- agentgraph/extraction/graph_processing/knowledge_graph_processor.py +2 -2
- agentgraph/testing/knowledge_graph_tester.py +2 -2
- agentgraph/testing/perturbation_types/counterfactual_bias.py +3 -3
- agentgraph/testing/perturbation_types/jailbreak.py +1 -1
- backend/services/testing_service.py +1 -1
- frontend/src/lib/models.ts +20 -0
agentgraph/extraction/graph_processing/knowledge_graph_processor.py
CHANGED
|
@@ -80,7 +80,7 @@ class SlidingWindowMonitor:
|
|
| 80 |
self,
|
| 81 |
batch_size: int = 5,
|
| 82 |
parallel_processing: bool = True,
|
| 83 |
-
model: str = "gpt-
|
| 84 |
source_trace_id: Optional[str] = None,
|
| 85 |
processing_run_id: Optional[str] = None,
|
| 86 |
method_name: str = "production",
|
|
@@ -725,7 +725,7 @@ if __name__ == "__main__":
|
|
| 725 |
parser.add_argument("--batch-size", type=int, default=5, help="Number of chunks to process in parallel")
|
| 726 |
parser.add_argument("--sequential", action="store_true", help="Process chunks sequentially instead of in parallel")
|
| 727 |
parser.add_argument("--output", type=str, help="Identifier for the output files")
|
| 728 |
-
parser.add_argument("--model", type=str, default="gpt-
|
| 729 |
parser.add_argument("--verbose", action="store_true", help="Show all logs including LiteLLM logs")
|
| 730 |
|
| 731 |
args = parser.parse_args()
|
|
|
|
| 80 |
self,
|
| 81 |
batch_size: int = 5,
|
| 82 |
parallel_processing: bool = True,
|
| 83 |
+
model: str = "gpt-5-mini",
|
| 84 |
source_trace_id: Optional[str] = None,
|
| 85 |
processing_run_id: Optional[str] = None,
|
| 86 |
method_name: str = "production",
|
|
|
|
| 725 |
parser.add_argument("--batch-size", type=int, default=5, help="Number of chunks to process in parallel")
|
| 726 |
parser.add_argument("--sequential", action="store_true", help="Process chunks sequentially instead of in parallel")
|
| 727 |
parser.add_argument("--output", type=str, help="Identifier for the output files")
|
| 728 |
+
parser.add_argument("--model", type=str, default="gpt-5-mini", help="Model to use for LLM operations")
|
| 729 |
parser.add_argument("--verbose", action="store_true", help="Show all logs including LiteLLM logs")
|
| 730 |
|
| 731 |
args = parser.parse_args()
|
agentgraph/testing/knowledge_graph_tester.py
CHANGED
|
@@ -34,7 +34,7 @@ from litellm import completion
|
|
| 34 |
# Only set environment variable if OPENAI_API_KEY is not None
|
| 35 |
if OPENAI_API_KEY:
|
| 36 |
os.environ["OPENAI_API_KEY"] = OPENAI_API_KEY
|
| 37 |
-
DEFAULT_MODEL = "gpt-
|
| 38 |
|
| 39 |
|
| 40 |
from utils.config import LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY, LANGFUSE_AUTH, LANGFUSE_HOST
|
|
@@ -61,7 +61,7 @@ if OPENAI_API_KEY:
|
|
| 61 |
# (future) from .perturbation_types.emotional_manipulation import EmotionalManipulationPerturbationTester
|
| 62 |
|
| 63 |
|
| 64 |
-
def load_litellm_config(model: str = "gpt-
|
| 65 |
"""
|
| 66 |
Load LiteLLM config to route models to the correct provider.
|
| 67 |
This function is now simplified to only use environment variables or a passed key.
|
|
|
|
| 34 |
# Only set environment variable if OPENAI_API_KEY is not None
|
| 35 |
if OPENAI_API_KEY:
|
| 36 |
os.environ["OPENAI_API_KEY"] = OPENAI_API_KEY
|
| 37 |
+
DEFAULT_MODEL = "gpt-5-mini"
|
| 38 |
|
| 39 |
|
| 40 |
from utils.config import LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY, LANGFUSE_AUTH, LANGFUSE_HOST
|
|
|
|
| 61 |
# (future) from .perturbation_types.emotional_manipulation import EmotionalManipulationPerturbationTester
|
| 62 |
|
| 63 |
|
| 64 |
+
def load_litellm_config(model: str = "gpt-5-mini", api_key: str = None):
|
| 65 |
"""
|
| 66 |
Load LiteLLM config to route models to the correct provider.
|
| 67 |
This function is now simplified to only use environment variables or a passed key.
|
agentgraph/testing/perturbation_types/counterfactual_bias.py
CHANGED
|
@@ -123,7 +123,7 @@ def test_relation_counterfactual_bias(
|
|
| 123 |
relation: Dict[str, Any],
|
| 124 |
model: str,
|
| 125 |
model_configs: List[Dict],
|
| 126 |
-
judge_model: str = "gpt-
|
| 127 |
demographics: List[Tuple[str, str]] = None
|
| 128 |
) -> Dict[str, Any]:
|
| 129 |
"""
|
|
@@ -211,9 +211,9 @@ def test_relation_counterfactual_bias(
|
|
| 211 |
|
| 212 |
def run_counterfactual_bias_tests(
|
| 213 |
testing_data: Dict[str, Any],
|
| 214 |
-
model: str = "gpt-
|
| 215 |
max_relations: int = None,
|
| 216 |
-
judge_model: str = "gpt-
|
| 217 |
demographics: List[Tuple[str, str]] = None,
|
| 218 |
openai_api_key: str = None,
|
| 219 |
progress_callback: Optional[Callable[[int, int, str], None]] = None,
|
|
|
|
| 123 |
relation: Dict[str, Any],
|
| 124 |
model: str,
|
| 125 |
model_configs: List[Dict],
|
| 126 |
+
judge_model: str = "gpt-5-mini",
|
| 127 |
demographics: List[Tuple[str, str]] = None
|
| 128 |
) -> Dict[str, Any]:
|
| 129 |
"""
|
|
|
|
| 211 |
|
| 212 |
def run_counterfactual_bias_tests(
|
| 213 |
testing_data: Dict[str, Any],
|
| 214 |
+
model: str = "gpt-5-mini",
|
| 215 |
max_relations: int = None,
|
| 216 |
+
judge_model: str = "gpt-5-mini",
|
| 217 |
demographics: List[Tuple[str, str]] = None,
|
| 218 |
openai_api_key: str = None,
|
| 219 |
progress_callback: Optional[Callable[[int, int, str], None]] = None,
|
agentgraph/testing/perturbation_types/jailbreak.py
CHANGED
|
@@ -163,7 +163,7 @@ def test_relation_jailbreak(
|
|
| 163 |
jailbreak_techniques: List[Dict[str, Any]],
|
| 164 |
model: str,
|
| 165 |
model_configs: List[Dict],
|
| 166 |
-
judge_model: str = "gpt-
|
| 167 |
) -> Dict[str, Any]:
|
| 168 |
"""
|
| 169 |
Test a single relation against jailbreak techniques.
|
|
|
|
| 163 |
jailbreak_techniques: List[Dict[str, Any]],
|
| 164 |
model: str,
|
| 165 |
model_configs: List[Dict],
|
| 166 |
+
judge_model: str = "gpt-5-mini"
|
| 167 |
) -> Dict[str, Any]:
|
| 168 |
"""
|
| 169 |
Test a single relation against jailbreak techniques.
|
backend/services/testing_service.py
CHANGED
|
@@ -146,7 +146,7 @@ class TestingService:
|
|
| 146 |
knowledge_graph_identifier: str,
|
| 147 |
perturbation_types: List[str],
|
| 148 |
max_relations: int = None,
|
| 149 |
-
model: str = "gpt-
|
| 150 |
**test_kwargs
|
| 151 |
) -> Dict[str, Any]:
|
| 152 |
"""
|
|
|
|
| 146 |
knowledge_graph_identifier: str,
|
| 147 |
perturbation_types: List[str],
|
| 148 |
max_relations: int = None,
|
| 149 |
+
model: str = "gpt-5-mini",
|
| 150 |
**test_kwargs
|
| 151 |
) -> Dict[str, Any]:
|
| 152 |
"""
|
frontend/src/lib/models.ts
CHANGED
|
@@ -11,6 +11,26 @@ export interface ModelConfig {
|
|
| 11 |
|
| 12 |
export const AVAILABLE_MODELS = {
|
| 13 |
standard: [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
{
|
| 15 |
id: "gpt-4o-mini",
|
| 16 |
name: "GPT-4o Mini",
|
|
|
|
| 11 |
|
| 12 |
export const AVAILABLE_MODELS = {
|
| 13 |
standard: [
|
| 14 |
+
{
|
| 15 |
+
id: "gpt-5-mini",
|
| 16 |
+
name: "GPT-5 Mini",
|
| 17 |
+
description: "Latest model for most tasks",
|
| 18 |
+
category: "standard" as const,
|
| 19 |
+
recommended: true,
|
| 20 |
+
speed: "fast" as const,
|
| 21 |
+
contextWindow: "128K",
|
| 22 |
+
costLevel: "low" as const,
|
| 23 |
+
},
|
| 24 |
+
{
|
| 25 |
+
id: "gpt-5",
|
| 26 |
+
name: "GPT-5",
|
| 27 |
+
description: "Latest model for most tasks",
|
| 28 |
+
category: "standard" as const,
|
| 29 |
+
recommended: true,
|
| 30 |
+
speed: "fast" as const,
|
| 31 |
+
contextWindow: "128K",
|
| 32 |
+
costLevel: "low" as const,
|
| 33 |
+
},
|
| 34 |
{
|
| 35 |
id: "gpt-4o-mini",
|
| 36 |
name: "GPT-4o Mini",
|