mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-25 12:01:04 +02:00
fix: fix transition logic for realtime providers
This commit is contained in:
parent
348cd8427b
commit
960d183c82
7 changed files with 415 additions and 33 deletions
|
|
@ -344,7 +344,11 @@ class PipecatEngine:
|
|||
)
|
||||
|
||||
# Register function with LLM
|
||||
self.llm.register_function(name, transition_func)
|
||||
self.llm.register_function(
|
||||
name,
|
||||
transition_func,
|
||||
is_node_transition=True,
|
||||
)
|
||||
|
||||
async def _register_knowledge_base_function(
|
||||
self, document_uuids: list[str]
|
||||
|
|
|
|||
|
|
@ -288,10 +288,19 @@ class CustomToolManager:
|
|||
|
||||
# Create and register the handler
|
||||
handler, timeout_secs = self._create_handler(tool, function_name)
|
||||
# End-call and transfer-call tools are workflow-control
|
||||
# boundaries even though they do not necessarily select another
|
||||
# graph node. Give them the same ordering guarantees as an
|
||||
# explicit node-transition function.
|
||||
is_node_transition = tool.category in {
|
||||
ToolCategory.END_CALL.value,
|
||||
ToolCategory.TRANSFER_CALL.value,
|
||||
}
|
||||
self._engine.llm.register_function(
|
||||
function_name,
|
||||
handler,
|
||||
timeout_secs=timeout_secs,
|
||||
is_node_transition=is_node_transition,
|
||||
)
|
||||
|
||||
logger.debug(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue