Skip to content

feat: modularize fast_api.py to allow simpler construction of API Server #1998

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
966 changes: 966 additions & 0 deletions src/google/adk/cli/adk_web_server.py

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/google/adk/cli/agent_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@

import graphviz

from ..agents import BaseAgent
from ..agents import LoopAgent
from ..agents import ParallelAgent
from ..agents import SequentialAgent
from ..agents.base_agent import BaseAgent
from ..agents.llm_agent import LlmAgent
from ..agents.loop_agent import LoopAgent
from ..agents.parallel_agent import ParallelAgent
from ..agents.sequential_agent import SequentialAgent
from ..tools.agent_tool import AgentTool
from ..tools.base_tool import BaseTool
from ..tools.function_tool import FunctionTool
Expand Down
4 changes: 2 additions & 2 deletions src/google/adk/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from ..sessions.in_memory_session_service import InMemorySessionService
from ..sessions.session import Session
from .utils import envs
from .utils.agent_loader import AgentLoader
from .utils.file_system_agent_loader import FileSystemAgentLoader


class InputFile(BaseModel):
Expand Down Expand Up @@ -137,7 +137,7 @@ async def run_cli(
session = await session_service.create_session(
app_name=agent_folder_name, user_id=user_id
)
root_agent = AgentLoader(agents_dir=agent_parent_dir).load_agent(
root_agent = FileSystemAgentLoader(agents_dir=agent_parent_dir).load_agent(
agent_folder_name
)
envs.load_dotenv_for_agent(agent_folder_name, agent_parent_dir)
Expand Down
2 changes: 1 addition & 1 deletion src/google/adk/cli/cli_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from typing import Optional
import uuid

from ..agents import Agent
from ..agents.llm_agent import Agent
from ..artifacts.base_artifact_service import BaseArtifactService
from ..evaluation.constants import MISSING_EVAL_DEPENDENCIES_MESSAGE
from ..evaluation.eval_case import EvalCase
Expand Down
Loading
Loading