Spaces:
Running
Running
Commit
·
290f82e
1
Parent(s):
f62e2cd
add
Browse files
agentgraph/testing/knowledge_graph_tester.py
CHANGED
|
@@ -49,9 +49,9 @@ if LANGFUSE_SECRET_KEY:
|
|
| 49 |
if LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY:
|
| 50 |
os.environ["OTEL_EXPORTER_OTLP_ENDPOINT"] = f"{LANGFUSE_HOST}/api/public/otel"
|
| 51 |
os.environ["OTEL_EXPORTER_OTLP_HEADERS"] = f"Authorization=Basic {LANGFUSE_AUTH}"
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
openlit.init()
|
| 55 |
|
| 56 |
# Only set environment variable if OPENAI_API_KEY is not None
|
| 57 |
if OPENAI_API_KEY:
|
|
|
|
| 49 |
if LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY:
|
| 50 |
os.environ["OTEL_EXPORTER_OTLP_ENDPOINT"] = f"{LANGFUSE_HOST}/api/public/otel"
|
| 51 |
os.environ["OTEL_EXPORTER_OTLP_HEADERS"] = f"Authorization=Basic {LANGFUSE_AUTH}"
|
| 52 |
+
# Commented out to reduce verbose telemetry output
|
| 53 |
+
# import openlit
|
| 54 |
+
# openlit.init()
|
| 55 |
|
| 56 |
# Only set environment variable if OPENAI_API_KEY is not None
|
| 57 |
if OPENAI_API_KEY:
|
agentgraph/testing/perturbation_types/jailbreak.py
CHANGED
|
@@ -43,9 +43,9 @@ def load_jailbreak_techniques() -> List[Dict[str, Any]]:
|
|
| 43 |
techniques = []
|
| 44 |
for _, row in df.iterrows():
|
| 45 |
techniques.append({
|
| 46 |
-
'name': row
|
| 47 |
-
'prompt': row
|
| 48 |
-
'description': row
|
| 49 |
})
|
| 50 |
|
| 51 |
logger.info(f"Successfully loaded {len(techniques)} jailbreak techniques from CSV file")
|
|
|
|
| 43 |
techniques = []
|
| 44 |
for _, row in df.iterrows():
|
| 45 |
techniques.append({
|
| 46 |
+
'name': row['topic'] if 'topic' in row else 'Unknown',
|
| 47 |
+
'prompt': row['prompt'] if 'prompt' in row else '',
|
| 48 |
+
'description': row['source'] if 'source' in row else ''
|
| 49 |
})
|
| 50 |
|
| 51 |
logger.info(f"Successfully loaded {len(techniques)} jailbreak techniques from CSV file")
|