📦 deps(thirdparty): update snapshots
This commit is contained in:
+6
-2
@@ -10,7 +10,6 @@ import re
|
||||
import sys
|
||||
import time
|
||||
import traceback
|
||||
import xml.etree.ElementTree as ET
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
@@ -18,6 +17,11 @@ from anthropic import Anthropic
|
||||
|
||||
from connections import create_connection
|
||||
|
||||
try:
|
||||
from defusedxml import ElementTree as SafeET
|
||||
except ImportError:
|
||||
from xml.etree import ElementTree as SafeET
|
||||
|
||||
EVALUATION_PROMPT = """You are an AI assistant with access to tools.
|
||||
|
||||
When given a task, you MUST:
|
||||
@@ -56,7 +60,7 @@ Response Requirements:
|
||||
def parse_evaluation_file(file_path: Path) -> list[dict[str, Any]]:
|
||||
"""Parse XML evaluation file with qa_pair elements."""
|
||||
try:
|
||||
tree = ET.parse(file_path)
|
||||
tree = SafeET.parse(file_path)
|
||||
root = tree.getroot()
|
||||
evaluations = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user