You've already forked adk-python
mirror of
https://github.com/encounter/adk-python.git
synced 2026-03-30 10:57:20 -07:00
chore: Update plugins in hello_world_app
Corrected `CountInvocationPlugin` to be a class reference and added `ContextFilterPlugin` to limit the number of tool invocations kept in the context to 3. PiperOrigin-RevId: 808591608
This commit is contained in:
committed by
Copybara-Service
parent
cee365a13d
commit
4cb07ba05e
@@ -20,6 +20,7 @@ from google.adk.agents.callback_context import CallbackContext
|
||||
from google.adk.apps import App
|
||||
from google.adk.models.llm_request import LlmRequest
|
||||
from google.adk.plugins.base_plugin import BasePlugin
|
||||
from google.adk.plugins.context_filter_plugin import ContextFilterPlugin
|
||||
from google.adk.tools.tool_context import ToolContext
|
||||
from google.genai import types
|
||||
|
||||
@@ -141,5 +142,8 @@ class CountInvocationPlugin(BasePlugin):
|
||||
app = App(
|
||||
name='hello_world_app',
|
||||
root_agent=root_agent,
|
||||
plugins=[CountInvocationPlugin()],
|
||||
plugins=[
|
||||
CountInvocationPlugin(),
|
||||
ContextFilterPlugin(num_invocations_to_keep=3),
|
||||
],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user