mirror of
https://github.com/hoshikawa2/agent_platform_oci.git
synced 2026-11-06 03:14:12 +00:00
bugfix: rollback of handoff
This commit is contained in:
@@ -604,31 +604,31 @@ class EnterpriseRouter:
|
|||||||
# carries substantive new information. This validation is
|
# carries substantive new information. This validation is
|
||||||
# intentionally generic and runs only after literal
|
# intentionally generic and runs only after literal
|
||||||
# expected_input matching has already failed.
|
# expected_input matching has already failed.
|
||||||
if str(action_cfg.get("action") or "").strip().lower() != "contextual_reentry":
|
# if str(action_cfg.get("action") or "").strip().lower() != "contextual_reentry":
|
||||||
prefer_reentry, reentry_option, precedence_raw = await self._prefer_contextual_reentry_over_semantic_resume(
|
# prefer_reentry, reentry_option, precedence_raw = await self._prefer_contextual_reentry_over_semantic_resume(
|
||||||
text=str(text),
|
# text=str(text),
|
||||||
classified=str(classified),
|
# classified=str(classified),
|
||||||
expected_input=expected_input,
|
# expected_input=expected_input,
|
||||||
pause_prompt=str(pause.get("prompt") or ""),
|
# pause_prompt=str(pause.get("prompt") or ""),
|
||||||
relevant_conversation_context=relevant_context,
|
# relevant_conversation_context=relevant_context,
|
||||||
)
|
# )
|
||||||
if prefer_reentry and reentry_option:
|
# if prefer_reentry and reentry_option:
|
||||||
decision = await self._route_contextual_reentry(
|
# decision = await self._route_contextual_reentry(
|
||||||
state=state,
|
# state=state,
|
||||||
original_input=str(text),
|
# original_input=str(text),
|
||||||
relevant_context=relevant_context,
|
# relevant_context=relevant_context,
|
||||||
classifier_output=str(reentry_option),
|
# classifier_output=str(reentry_option),
|
||||||
raw_classifier=raw_classifier,
|
# raw_classifier=raw_classifier,
|
||||||
allowed_values=list(expected_input.get("allowed_values") or []),
|
# allowed_values=list(expected_input.get("allowed_values") or []),
|
||||||
)
|
# )
|
||||||
decision.metadata = {
|
# decision.metadata = {
|
||||||
**dict(decision.metadata or {}),
|
# **dict(decision.metadata or {}),
|
||||||
"contextual_reentry_preempted_resume": True,
|
# "contextual_reentry_preempted_resume": True,
|
||||||
"initial_classifier_output": str(classified),
|
# "initial_classifier_output": str(classified),
|
||||||
"contextual_reentry_precedence_raw_output": precedence_raw,
|
# "contextual_reentry_precedence_raw_output": precedence_raw,
|
||||||
}
|
# }
|
||||||
await self._emit(decision, state)
|
# await self._emit(decision, state)
|
||||||
return decision
|
# return decision
|
||||||
|
|
||||||
if str(action_cfg.get("action") or "").strip().lower() == "contextual_reentry":
|
if str(action_cfg.get("action") or "").strip().lower() == "contextual_reentry":
|
||||||
decision = await self._route_contextual_reentry(
|
decision = await self._route_contextual_reentry(
|
||||||
|
|||||||
Reference in New Issue
Block a user