You've already forked adk-python
mirror of
https://github.com/encounter/adk-python.git
synced 2026-03-30 10:57:20 -07:00
feat(config): add disallow_transfer_to_parent and disallow_transfer_to_peers to LlmAgentConfig
PiperOrigin-RevId: 781690247
This commit is contained in:
committed by
Copybara-Service
parent
aef54f8eb7
commit
d83362725d
@@ -37,6 +37,30 @@
|
||||
"instruction": {
|
||||
"title": "Instruction",
|
||||
"type": "string"
|
||||
},
|
||||
"disallow_transfer_to_parent": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null,
|
||||
"title": "Disallow Transfer To Parent"
|
||||
},
|
||||
"disallow_transfer_to_peers": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null,
|
||||
"title": "Disallow Transfer To Peers"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
@@ -532,6 +532,10 @@ class LlmAgent(BaseAgent):
|
||||
agent.model = config.model
|
||||
if config.instruction:
|
||||
agent.instruction = config.instruction
|
||||
if config.disallow_transfer_to_parent:
|
||||
agent.disallow_transfer_to_parent = config.disallow_transfer_to_parent
|
||||
if config.disallow_transfer_to_peers:
|
||||
agent.disallow_transfer_to_peers = config.disallow_transfer_to_peers
|
||||
return agent
|
||||
|
||||
|
||||
@@ -551,3 +555,9 @@ class LlmAgentConfig(BaseAgentConfig):
|
||||
|
||||
instruction: str
|
||||
"""Required. LlmAgent.instruction."""
|
||||
|
||||
disallow_transfer_to_parent: Optional[bool] = None
|
||||
"""Optional. LlmAgent.disallow_transfer_to_parent."""
|
||||
|
||||
disallow_transfer_to_peers: Optional[bool] = None
|
||||
"""Optional. LlmAgent.disallow_transfer_to_peers."""
|
||||
|
||||
Reference in New Issue
Block a user