You've already forked adk-python
mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
feat(config): add GenerateContentConfig to LlmAgentConfig
PiperOrigin-RevId: 789631181
This commit is contained in:
committed by
Copybara-Service
parent
db975dfe2a
commit
9656ccc407
File diff suppressed because it is too large
Load Diff
@@ -628,6 +628,8 @@ class LlmAgent(BaseAgent):
|
||||
)
|
||||
if config.after_tool_callbacks:
|
||||
agent.after_tool_callback = resolve_callbacks(config.after_tool_callbacks)
|
||||
if config.generate_content_config:
|
||||
agent.generate_content_config = config.generate_content_config
|
||||
return agent
|
||||
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ from typing import List
|
||||
from typing import Literal
|
||||
from typing import Optional
|
||||
|
||||
from google.genai import types
|
||||
from pydantic import ConfigDict
|
||||
|
||||
from ..tools.base_tool import ToolConfig
|
||||
@@ -138,3 +139,6 @@ class LlmAgentConfig(BaseAgentConfig):
|
||||
|
||||
after_tool_callbacks: Optional[List[CodeConfig]] = None
|
||||
"""Optional. LlmAgent.after_tool_callbacks."""
|
||||
|
||||
generate_content_config: Optional[types.GenerateContentConfig] = None
|
||||
"""Optional. LlmAgent.generate_content_config."""
|
||||
|
||||
Reference in New Issue
Block a user