Use Sphinx .. deprecated:: directive for deprecated aggregator params
Aligns deprecation docstrings on LLMUserAggregatorParams and LLMAssistantAggregatorParams with CONTRIBUTING.md conventions: present-tense parameter descriptions plus a `.. deprecated:: 1.2.0` directive noting replacement and 2.0.0 removal. Also adds a runtime DeprecationWarning for `user_turn_completion_config`, which previously had no warning despite being deprecated.
This commit is contained in:
committed by
Aleix Conchillo Flaqué
parent
457a68ce64
commit
c46ede8335
@@ -132,12 +132,21 @@ class LLMUserAggregatorParams:
|
||||
marker at the start of each response: ✓ (complete), ○
|
||||
(incomplete short), or ◐ (incomplete long). Incomplete
|
||||
responses are suppressed and timeouts trigger re-prompting.
|
||||
|
||||
.. deprecated:: 1.2.0
|
||||
Use ``user_turn_strategies=FilterIncompleteUserTurnStrategies()``
|
||||
instead. Will be removed in version 2.0.0.
|
||||
|
||||
user_turn_completion_config: [DEPRECATED] Configuration for turn
|
||||
completion behavior including custom instructions, timeouts, and
|
||||
prompts. Only used when filter_incomplete_user_turns is True
|
||||
(deprecated path) — for the new strategy-based API, pass the config
|
||||
directly to ``FilterIncompleteUserTurnStrategies(config=...)``.
|
||||
|
||||
.. deprecated:: 1.2.0
|
||||
Pass the config directly to
|
||||
``FilterIncompleteUserTurnStrategies(config=...)`` instead.
|
||||
Will be removed in version 2.0.0.
|
||||
"""
|
||||
|
||||
add_tool_change_messages: bool = False
|
||||
@@ -166,6 +175,15 @@ class LLMUserAggregatorParams:
|
||||
stacklevel=2,
|
||||
)
|
||||
|
||||
if self.user_turn_completion_config is not None:
|
||||
warnings.warn(
|
||||
"LLMUserAggregatorParams.user_turn_completion_config is deprecated. "
|
||||
"Pass the config directly to "
|
||||
"FilterIncompleteUserTurnStrategies(config=...) instead.",
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class LLMAssistantAggregatorParams:
|
||||
@@ -201,6 +219,11 @@ class LLMAssistantAggregatorParams:
|
||||
# ---------------------------------------------------------------------------
|
||||
# Deprecated field names — kept for backward compatibility.
|
||||
# Use enable_auto_context_summarization and auto_context_summarization_config instead.
|
||||
#
|
||||
# .. deprecated:: 1.2.0
|
||||
# Use ``enable_auto_context_summarization`` and
|
||||
# ``auto_context_summarization_config`` instead. Will be removed in
|
||||
# version 2.0.0.
|
||||
# ---------------------------------------------------------------------------
|
||||
enable_context_summarization: bool | None = None
|
||||
context_summarization_config: LLMContextSummarizationConfig | None = None
|
||||
|
||||
Reference in New Issue
Block a user