ScorerBase#
- class council.scorers.ScorerBase[source]#
Bases:
Monitorable
,ABC
Base class for implementing a Scorer
- abstract _score(context: ScorerContext, message: ChatMessage) float [source]#
To be implemented with in derived classes with actual scoring logic
- 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
- score(context: ScorerContext, message: ChatMessage) float [source]#
Score the given message
- Parameters:
context (ScorerContext) – the context for scoring
message (ChatMessage) – the message to be scored
- Returns:
similarity score. The greater the value to higher the similarity
- Raises:
ScorerException – an unexpected error occurs