refactor: extract post-ops helpers from pydantic agent
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any
|
||||
from core.post_ops import negotiation_strategy_reply
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from core.pydantic_ai_agent import AgentDeps, ConversationState, CustomerMessage, CustomerServiceAgent
|
||||
@@ -69,7 +70,7 @@ async def execute_ai_turn(
|
||||
agent.message_histories[message.from_id] = result.all_messages()[-30:]
|
||||
reply_text = agent._colloquialize_reply(agent._normalize_reply_text(result.output))
|
||||
|
||||
strategy_reply = agent._negotiation_strategy_reply(message.msg, state)
|
||||
strategy_reply = negotiation_strategy_reply(message.msg, state)
|
||||
if strategy_reply:
|
||||
reply_text = strategy_reply
|
||||
|
||||
|
||||
Reference in New Issue
Block a user