diff --git a/examples/dogfooding/agent.py b/examples/dogfooding/agent.py index eae6cdcf..aee43544 100644 --- a/examples/dogfooding/agent.py +++ b/examples/dogfooding/agent.py @@ -24,6 +24,7 @@ import os from veadk import Agent +from veadk.utils.pdf_to_images import pdf_to_images_before_model_callback # The schema mirrors the web UI's AgentDraft and the codegen catalog # (frontend/src/create/veadkCatalog.ts). Output values MUST come from the @@ -90,6 +91,7 @@ name="agent_builder", description="VeADK Agent Builder:把自然语言需求转化为智能体配置 JSON(前端据此生成 VeADK 项目)。", instruction=lambda _ctx: INSTRUCTION, + before_model_callback=pdf_to_images_before_model_callback, **({"model_name": _MODEL_A} if _MODEL_A else {}), ) diff --git a/examples/dogfooding_b/agent.py b/examples/dogfooding_b/agent.py index b746fc35..27133726 100644 --- a/examples/dogfooding_b/agent.py +++ b/examples/dogfooding_b/agent.py @@ -24,6 +24,7 @@ import os from veadk import Agent +from veadk.utils.pdf_to_images import pdf_to_images_before_model_callback # The two builder apps share one instruction. ADK puts the agents dir on # sys.path, so the sibling app package is importable; fall back to the @@ -39,6 +40,7 @@ name="agent_builder_b", description="VeADK Agent Builder (B):A/B 对比中的第二个构建器。", instruction=lambda _ctx: INSTRUCTION, + before_model_callback=pdf_to_images_before_model_callback, **({"model_name": _MODEL_B} if _MODEL_B else {}), ) diff --git a/examples/front_with_sso/agent.py b/examples/front_with_sso/agent.py index ef8a132c..9433d0ae 100644 --- a/examples/front_with_sso/agent.py +++ b/examples/front_with_sso/agent.py @@ -20,11 +20,13 @@ """ from veadk import Agent +from veadk.utils.pdf_to_images import pdf_to_images_before_model_callback agent = Agent( name="sso_demo_agent", description="Demo agent served behind an SSO login page.", instruction="You are a helpful assistant. Answer concisely.", + before_model_callback=pdf_to_images_before_model_callback, ) # Required by the Google ADK agent loader. diff --git a/examples/web_demo/agent.py b/examples/web_demo/agent.py index 8491b589..d3774a65 100644 --- a/examples/web_demo/agent.py +++ b/examples/web_demo/agent.py @@ -24,6 +24,7 @@ """ from veadk import Agent +from veadk.utils.pdf_to_images import pdf_to_images_before_model_callback agent = Agent( name="web_demo", @@ -32,6 +33,7 @@ "You are a helpful assistant. Answer clearly and concisely in the " "user's language." ), + before_model_callback=pdf_to_images_before_model_callback, ) # Required by the ADK agent loader.