Skip to content

Commit c7f2cc0

Browse files
authored
Azure-AI-Evaluator: Pass user simulator kwargs during flow invocation (#37592)
1 parent 57b1576 commit c7f2cc0

File tree

1 file changed

+8
-3
lines changed
  • sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/simulator

1 file changed

+8
-3
lines changed

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/simulator/_simulator.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,9 @@ async def _extend_conversation_with_simulator(
287287

288288
while len(current_simulation) < max_conversation_turns:
289289
user_response_content = user_flow(
290-
task="Continue the conversation", conversation_history=current_simulation.to_list()
290+
task="Continue the conversation",
291+
conversation_history=current_simulation.to_list(),
292+
**user_simulator_prompty_kwargs
291293
)
292294
user_response = self._parse_prompty_response(response=user_response_content)
293295
user_turn = Turn(role=ConversationRole.USER, content=user_response["content"])
@@ -618,9 +620,12 @@ async def _build_user_simulation_response(
618620
prompty_model_config=self._build_prompty_model_config(),
619621
user_simulator_prompty_kwargs=user_simulator_prompty_kwargs,
620622
)
621-
622623
try:
623-
response_content = user_flow(task=task, conversation_history=conversation_history)
624+
response_content = user_flow(
625+
task=task,
626+
conversation_history=conversation_history,
627+
**user_simulator_prompty_kwargs
628+
)
624629
user_response = self._parse_prompty_response(response=response_content)
625630
return user_response["content"]
626631
except Exception as e:

0 commit comments

Comments
 (0)