nat.experimental.test_time_compute.selection.llm_based_plan_selector#
Attributes#
Classes#
Functions#
|
Register the LLMBasedPlanSelector with the provided configuration. |
Module Contents#
- logger#
- class LLMBasedPlanSelector( )#
Bases:
nat.experimental.test_time_compute.models.strategy_base.StrategyBase- llm_bound = None#
- async build_components(builder: nat.builder.builder.Builder) None#
Build the components required for the selector.
- supported_pipeline_types() [nat.experimental.test_time_compute.models.stage_enums.PipelineTypeEnum]#
- async ainvoke(items: list[nat.experimental.test_time_compute.models.ttc_item.TTCItem], original_prompt: str | None = None, agent_context: str | None = None, \*\*kwargs) [nat.experimental.test_time_compute.models.ttc_item.TTCItem]#
Select the planning items based on the selection strategy.
- Args:
original_prompt (str): The prompt the user provided the agent. agent_context (str): The context of the agent, if applicable. items (list[TTCItem]): The list of planning items to select from.
- Returns:
TTCItem: The selected planning item.
- async register_llm_based_plan_selection(
- config: nat.experimental.test_time_compute.models.selection_config.LLMBasedPlanSelectionConfig,
- builder: nat.builder.builder.Builder,
Register the LLMBasedPlanSelector with the provided configuration.