Skip to content

Commit 001f06a

Browse files
slister1001Copilot
andauthored
Update sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_common/_base_eval.py
Co-authored-by: Copilot <[email protected]>
1 parent 94e78e2 commit 001f06a

File tree

1 file changed

+3
-0
lines changed
  • sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_common

1 file changed

+3
-0
lines changed

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_common/_base_eval.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,9 @@ def converter(conversation: Dict) -> List[DerivedEvalInput]:
203203

204204
for each_turn in messages:
205205
if "role" in each_turn and "content" in each_turn:
206+
content = each_turn["content"]
207+
if not isinstance(content, str) or not content.strip():
208+
continue # Skip invalid content
206209
if each_turn["role"] == "user":
207210
queries.append(each_turn)
208211
elif each_turn["role"] == "assistant":

0 commit comments

Comments
 (0)