-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
core[Component] This issue is related to the core interface and implementation[Component] This issue is related to the core interface and implementationneeds review[Status] The PR/issue is awaiting review from the maintainer[Status] The PR/issue is awaiting review from the maintainer
Description
Summary
src/google/adk/examples/example_util.py:49 has a TODO from the original author:
# TODO(yaojie): Add unit tests for this function.
def convert_examples_to_text(examples: list[Example], model: Optional[str]) -> str:This function handles few-shot example formatting for system instructions and currently has zero test coverage. The related build_example_si and _get_latest_message_from_user helpers are also untested.
Proposed test cases
- Basic text-only examples
- Function call + function response formatting
- Mixed content (text + function call)
- Empty examples list
- Gemini 2 vs non-Gemini 2 format branch (
_FUNCTION_PREFIXvs_FUNCTION_CALL_PREFIX) build_example_siwith list input vsBaseExampleProviderinput_get_latest_message_from_userwith empty session, non-user author, function responses
Happy to submit a PR for this.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
core[Component] This issue is related to the core interface and implementation[Component] This issue is related to the core interface and implementationneeds review[Status] The PR/issue is awaiting review from the maintainer[Status] The PR/issue is awaiting review from the maintainer