Skip to content
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
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 @@ -53,7 +53,7 @@
# This is always optional unless explicitly specified.
RESPONSE_EVALUATION_SCORE_KEY = "response_evaluation_score"

EVAL_SESSION_ID_PREFIX = "___eval___session___"
EVAL_SESSION_ID_PREFIX = "eval-session-"
DEFAULT_CRITERIA = {
TOOL_TRAJECTORY_SCORE_KEY: 1.0, # 1-point scale; 1.0 is perfect.
RESPONSE_MATCH_SCORE_KEY: 0.8,
Expand Down
6 changes: 5 additions & 1 deletion src/google/adk/evaluation/local_eval_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,14 @@

logger = logging.getLogger("google_adk." + __name__)

EVAL_SESSION_ID_PREFIX = "___eval___session___"
EVAL_SESSION_ID_PREFIX = "eval-session-"


def _get_session_id() -> str:
# uuid4's default str form is lowercase hex with hyphens, so together
# with the prefix this always matches Vertex AI Agent Engine's session
# id constraint ([a-z0-9-], alnum first/last char) as well as every
# other session service's id format.
return f"{EVAL_SESSION_ID_PREFIX}{str(uuid.uuid4())}"


Expand Down