mirror of
https://github.com/EvolutionAPI/adk-python.git
synced 2025-07-13 15:14:50 -06:00

--21736067f9
by Alankrit Verma <alankrit386@gmail.com>: feat(llm_flows): support async before/after tool callbacks Previously, callbacks were treated as purely synchronous, so passing an async coroutine caused “was never awaited” errors and Pydantic serialization failures. Now we detect awaitable return values from before_tool_callback and after_tool_callback, and `await` them if necessary. Fixes: #380 --08ac9a117e
by Alankrit Verma <alankrit386@gmail.com>: Refactor function callback handling and update type signatures - Simplify variable names in `functions.py`: always use `function_response` and `altered_function_response` - Update LlmAgent callback type aliases to support async: - Import `Awaitable` - Change `BeforeToolCallback` and `AfterToolCallback` signatures to return `Awaitable[Optional[dict]]` - Ensure `after_tool_callback` uses `await` when necessary --fcbf57466e
by Alankrit Verma <alankrit386@gmail.com>: refactor: update callback type signatures to support sync and async responses COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/434 from AlankritVerma01:support-async-tool-callbacks926b0ef1a6
PiperOrigin-RevId: 753005846
151 lines
5.0 KiB
TOML
151 lines
5.0 KiB
TOML
[project]
|
|
# Project metadata. Available keys are documented at:
|
|
# https://packaging.python.org/en/latest/specifications/declaring-project-metadata
|
|
|
|
name = "google-adk"
|
|
description = "Agent Development Kit"
|
|
readme = "README.md"
|
|
requires-python = ">=3.9"
|
|
license = { file = "LICENSE" }
|
|
authors = [{ name = "Google LLC", email = "googleapis-packages@google.com" }]
|
|
classifiers = [ # List of https://pypi.org/classifiers/
|
|
"Typing :: Typed",
|
|
"Intended Audience :: Developers",
|
|
"Intended Audience :: Science/Research",
|
|
"Programming Language :: Python",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.9",
|
|
"Programming Language :: Python :: 3.13",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Operating System :: OS Independent",
|
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
"License :: OSI Approved :: Apache Software License",
|
|
]
|
|
dependencies = [
|
|
# go/keep-sorted start
|
|
"authlib>=1.5.1", # For RestAPI Tool
|
|
"click>=8.1.8", # For CLI tools
|
|
"fastapi>=0.115.0", # FastAPI framework
|
|
"google-api-python-client>=2.157.0", # Google API client discovery
|
|
"google-cloud-aiplatform>=1.87.0", # For VertexAI integrations, e.g. example store.
|
|
"google-cloud-secret-manager>=2.22.0", # Fetching secrets in RestAPI Tool
|
|
"google-cloud-speech>=2.30.0", # For Audo Transcription
|
|
"google-cloud-storage>=2.18.0, <3.0.0", # For GCS Artifact service
|
|
"google-genai>=1.11.0", # Google GenAI SDK
|
|
"graphviz>=0.20.2", # Graphviz for graph rendering
|
|
"mcp>=1.5.0;python_version>='3.10'", # For MCP Toolset
|
|
"opentelemetry-api>=1.31.0", # OpenTelemetry
|
|
"opentelemetry-exporter-gcp-trace>=1.9.0",
|
|
"opentelemetry-sdk>=1.31.0",
|
|
"pydantic>=2.0, <3.0.0", # For data validation/models
|
|
"python-dotenv>=1.0.0", # To manage environment variables
|
|
"PyYAML>=6.0.2", # For APIHubToolset.
|
|
"sqlalchemy>=2.0", # SQL database ORM
|
|
"tzlocal>=5.3", # Time zone utilities
|
|
"uvicorn>=0.34.0", # ASGI server for FastAPI
|
|
# go/keep-sorted end
|
|
]
|
|
dynamic = ["version"]
|
|
|
|
[project.urls]
|
|
homepage = "https://google.github.io/adk-docs/"
|
|
repository = "https://github.com/google/adk-python"
|
|
changelog = "https://github.com/google/adk-python/blob/main/CHANGELOG.md"
|
|
documentation = "https://google.github.io/adk-docs/"
|
|
|
|
[project.scripts]
|
|
adk = "google.adk.cli:main"
|
|
|
|
[project.optional-dependencies]
|
|
|
|
dev = [
|
|
# go/keep-sorted start
|
|
"flit>=3.10.0",
|
|
"isort>=6.0.0",
|
|
"pyink>=24.10.0",
|
|
"pylint>=2.6.0",
|
|
# go/keep-sorted end
|
|
]
|
|
|
|
eval = [
|
|
# go/keep-sorted start
|
|
"google-cloud-aiplatform[evaluation]>=1.87.0",
|
|
"pandas>=2.2.3",
|
|
"tabulate>=0.9.0",
|
|
# go/keep-sorted end
|
|
]
|
|
|
|
test = [
|
|
# go/keep-sorted start
|
|
"anthropic>=0.43.0", # For anthropic model tests
|
|
"langchain-community>=0.3.17",
|
|
"langgraph>=0.2.60", # For LangGraphAgent
|
|
"litellm>=1.63.11", # For LiteLLM tests
|
|
"llama-index-readers-file>=0.4.0", # for retrieval tests
|
|
"pytest-asyncio>=0.25.0",
|
|
"pytest-mock>=3.14.0",
|
|
"pytest-xdist>=3.6.1",
|
|
"pytest>=8.3.4",
|
|
# go/keep-sorted end
|
|
]
|
|
|
|
docs = [
|
|
"autodoc_pydantic",
|
|
"furo",
|
|
"myst-parser",
|
|
"sphinx",
|
|
"sphinx-autodoc-typehints",
|
|
"sphinx-rtd-theme",
|
|
]
|
|
|
|
# Optional extensions
|
|
extensions = [
|
|
"anthropic>=0.43.0", # For anthropic model support
|
|
"beautifulsoup4>=3.2.2", # For load_web_page tool.
|
|
"crewai[tools];python_version>='3.10'", # For CrewaiTool
|
|
"docker>=7.0.0", # For ContainerCodeExecutor
|
|
"langgraph>=0.2.60", # For LangGraphAgent
|
|
"litellm>=1.63.11", # For LiteLLM support
|
|
"llama-index-readers-file>=0.4.0", # for retrieval usings LlamaIndex.
|
|
"lxml>=5.3.0", # For load_web_page tool.
|
|
]
|
|
|
|
|
|
[tool.pyink]
|
|
# Format py files following Google style-guide
|
|
line-length = 80
|
|
unstable = true
|
|
pyink-indentation = 2
|
|
pyink-use-majority-quotes = true
|
|
|
|
|
|
[build-system]
|
|
# Build system specify which backend is used to build/install the project (flit,
|
|
# poetry, setuptools,...). All backends are supported by `pip install`
|
|
requires = ["flit_core >=3.8,<4"]
|
|
build-backend = "flit_core.buildapi"
|
|
|
|
[tool.flit.sdist]
|
|
include = ['src/**/*', 'README.md', 'pyproject.toml', 'LICENSE']
|
|
exclude = ['src/**/*.sh']
|
|
|
|
[tool.flit.module]
|
|
name = "google.adk"
|
|
|
|
[tool.isort]
|
|
# Organize imports following Google style-guide
|
|
force_single_line = true
|
|
force_sort_within_sections = true
|
|
honor_case_in_force_sorted_sections = true
|
|
order_by_type = false
|
|
sort_relative_in_force_sorted_sections = true
|
|
multi_line_output = 3
|
|
line_length = 200
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
asyncio_default_fixture_loop_scope = "function"
|
|
asyncio_mode = "auto"
|