fix(gateway_tools,conversations): say refused in user turns, the reply reaches the human itself
This commit is contained in:
@@ -883,6 +883,11 @@ class Conversations:
|
||||
self._ensure_worker(cast("int", conv.id))
|
||||
return item
|
||||
|
||||
def turn_origin(self, conv: Conversation) -> str | None:
|
||||
"""Origin of the running turn (``user``, ``inject``, ...); None when idle."""
|
||||
runner = self._runners.get(cast("int", conv.id))
|
||||
return runner.origin if runner is not None and runner.turn_id else None
|
||||
|
||||
async def say(self, conv: Conversation, text: str) -> dict[str, Any]:
|
||||
runner = self._runners.get(cast("int", conv.id))
|
||||
_log.info("say[%s]: %s", conv.external_id, text[:200])
|
||||
|
||||
Reference in New Issue
Block a user