Skip to content

Commit e0615e7

Browse files
Poggeccicopybara-github
authored andcommitted
feat: modularize fast_api.py to allow simpler construction of API Server
PiperOrigin-RevId: 783818634
1 parent 33ac838 commit e0615e7

12 files changed

+1308
-932
lines changed

src/google/adk/cli/adk_web_server.py

Lines changed: 1000 additions & 0 deletions
Large diffs are not rendered by default.

src/google/adk/cli/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
from ..sessions.in_memory_session_service import InMemorySessionService
3232
from ..sessions.session import Session
3333
from .utils import envs
34-
from .utils.agent_loader import AgentLoader
34+
from .utils.file_system_agent_loader import FileSystemAgentLoader
3535

3636

3737
class InputFile(BaseModel):
@@ -137,7 +137,7 @@ async def run_cli(
137137
session = await session_service.create_session(
138138
app_name=agent_folder_name, user_id=user_id
139139
)
140-
root_agent = AgentLoader(agents_dir=agent_parent_dir).load_agent(
140+
root_agent = FileSystemAgentLoader(agents_dir=agent_parent_dir).load_agent(
141141
agent_folder_name
142142
)
143143
envs.load_dotenv_for_agent(agent_folder_name, agent_parent_dir)

src/google/adk/cli/cli_eval.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from typing import Optional
2525
import uuid
2626

27-
from ..agents import Agent
27+
from ..agents.llm_agent import Agent
2828
from ..artifacts.base_artifact_service import BaseArtifactService
2929
from ..evaluation.constants import MISSING_EVAL_DEPENDENCIES_MESSAGE
3030
from ..evaluation.eval_case import EvalCase

0 commit comments

Comments
 (0)