mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: Simplify Python Poe tasks and unify package selectors (#4722)
* updated automation tasks and commands, with alias for the time being * Restore aggregate test exclusions Preserve the legacy all-tests scope for test --all by excluding lab and devui from the default aggregate sweep, while still allowing explicit package selection. Also ignore hidden/generated test directories such as .mypy_cache during aggregate discovery. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * updated versions in pre-commit --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
d3d0100822
commit
f48c4512d3
@@ -27,15 +27,9 @@ class KeepLastUserTurnStrategy:
|
||||
group_annotation = message.additional_properties.get(GROUP_ANNOTATION_KEY)
|
||||
group_id = group_annotation.get("id") if isinstance(group_annotation, dict) else None
|
||||
kind = group_annotation.get("kind") if isinstance(group_annotation, dict) else None
|
||||
if (
|
||||
isinstance(group_id, str)
|
||||
and isinstance(kind, str)
|
||||
and group_id not in group_kinds
|
||||
):
|
||||
if isinstance(group_id, str) and isinstance(kind, str) and group_id not in group_kinds:
|
||||
group_kinds[group_id] = kind
|
||||
user_group_ids = [
|
||||
group_id for group_id in group_ids if group_kinds.get(group_id) == "user"
|
||||
]
|
||||
user_group_ids = [group_id for group_id in group_ids if group_kinds.get(group_id) == "user"]
|
||||
if not user_group_ids:
|
||||
return False
|
||||
keep_user_group_id = user_group_ids[-1]
|
||||
|
||||
@@ -33,9 +33,7 @@ Key components:
|
||||
class TiktokenTokenizer(TokenizerProtocol):
|
||||
"""TokenizerProtocol implementation backed by tiktoken's o200k_base (gpt-4.1 and up default) encoding."""
|
||||
|
||||
def __init__(
|
||||
self, *, encoding_name: str = "o200k_base", model_name: str | None = None
|
||||
) -> None:
|
||||
def __init__(self, *, encoding_name: str = "o200k_base", model_name: str | None = None) -> None:
|
||||
if model_name is not None:
|
||||
self._encoding = tiktoken.encoding_for_model(model_name)
|
||||
else:
|
||||
@@ -62,10 +60,7 @@ def _build_messages() -> list[Message]:
|
||||
),
|
||||
Message(
|
||||
role="user",
|
||||
text=(
|
||||
"Now provide a detailed checklist with owners, rollback "
|
||||
"gates, and validation criteria."
|
||||
),
|
||||
text=("Now provide a detailed checklist with owners, rollback gates, and validation criteria."),
|
||||
),
|
||||
Message(
|
||||
role="assistant",
|
||||
|
||||
Reference in New Issue
Block a user