mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-13 11:22:14 +02:00
Feat/dybamic transfer (#521)
* feat: enable dynamic transfer destination resolution * fix: remove approved routes, policy and fallback * fix: review comments
This commit is contained in:
parent
aa04a41ff3
commit
2801c3156e
12 changed files with 1534 additions and 86 deletions
|
|
@ -33,6 +33,20 @@ def tool_to_function_schema(tool: Any) -> Dict[str, Any]:
|
|||
definition = tool.definition or {}
|
||||
config = definition.get("config", {})
|
||||
parameters = config.get("parameters", []) or []
|
||||
if (
|
||||
definition.get("type") == "transfer_call"
|
||||
and config.get("destination_source", "static") != "dynamic"
|
||||
):
|
||||
parameters = []
|
||||
elif (
|
||||
definition.get("type") == "transfer_call"
|
||||
and config.get("destination_source", "static") == "dynamic"
|
||||
):
|
||||
resolver = config.get("resolver")
|
||||
if isinstance(resolver, dict):
|
||||
parameters = resolver.get("parameters", []) or []
|
||||
else:
|
||||
parameters = []
|
||||
|
||||
# Build properties and required list from parameters
|
||||
properties = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue