Skip to content

Commit 8e0621e

Browse files
slister1001Copilot
andauthored
Update sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_red_team.py
Co-authored-by: Copilot <[email protected]>
1 parent 96a95e2 commit 8e0621e

File tree

1 file changed

+2
-2
lines changed
  • sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team

1 file changed

+2
-2
lines changed

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_red_team.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2365,14 +2365,14 @@ async def _evaluate_conversation(
23652365

23662366
# Try to find context from the original prompt
23672367
# Look for the first user message that matches a stored prompt
2368-
context = ""
2368+
context = None
23692369
for user_msg in user_messages:
23702370
if user_msg in self.prompt_to_context:
23712371
context = self.prompt_to_context[user_msg]
23722372
break
23732373

23742374
# Add context to query_response if found
2375-
if context:
2375+
if context is not None:
23762376
query_response["context"] = context
23772377
try:
23782378
self.logger.debug(

0 commit comments

Comments
 (0)