mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
feat(config): support output_key and include_contents in LlmAgentConfig
PiperOrigin-RevId: 782170665
This commit is contained in:
committed by
Copybara-Service
parent
b2ef9a069e
commit
48971d43d0
@@ -76,6 +76,27 @@
|
||||
],
|
||||
"default": null,
|
||||
"title": "Disallow Transfer To Peers"
|
||||
},
|
||||
"output_key": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"default": null,
|
||||
"title": "Output Key"
|
||||
},
|
||||
"include_contents": {
|
||||
"default": "default",
|
||||
"enum": [
|
||||
"default",
|
||||
"none"
|
||||
],
|
||||
"title": "Include Contents",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
@@ -537,6 +537,10 @@ class LlmAgent(BaseAgent):
|
||||
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
|
||||
if config.include_contents != 'default':
|
||||
agent.include_contents = config.include_contents
|
||||
if config.output_key:
|
||||
agent.output_key = config.output_key
|
||||
return agent
|
||||
|
||||
|
||||
@@ -562,3 +566,9 @@ class LlmAgentConfig(BaseAgentConfig):
|
||||
|
||||
disallow_transfer_to_peers: Optional[bool] = None
|
||||
"""Optional. LlmAgent.disallow_transfer_to_peers."""
|
||||
|
||||
output_key: Optional[str] = None
|
||||
"""Optional. LlmAgent.output_key."""
|
||||
|
||||
include_contents: Literal['default', 'none'] = 'default'
|
||||
"""Optional. LlmAgent.include_contents."""
|
||||
|
||||
Reference in New Issue
Block a user