BasicFilter#
classDiagram
FilterBase <|-- BasicFilter
Monitorable <|-- FilterBase
- class council.filters.BasicFilter(score_threshold: float | None = None, top_k: int | None = None)[source]#
Bases:
FilterBase
a basic filter that filters messages based on a score threshold.
- __init__(score_threshold: float | None = None, top_k: int | None = None) None [source]#
- Parameters:
score_threshold – minimum score value for a message to be kept
top_k – maximum number of messages to be kept
- execute(context: AgentContext) List[ScoredChatMessage] #
Selects responses from the agent’s context.
- Parameters:
context (AgentContext) – The context for selecting responses.
- Returns:
A list of scored agent messages representing the selected responses.
- Return type:
List[ScoredChatMessage]
- Raises:
None –
- render_as_dict(include_children: bool = True) Dict[str, Any] #
returns the graph of operation as a dictionary
- render_as_json() str #
returns the graph of operation as a JSON string