autointent.generation.description_generation.group_utterances_by_label#

autointent.generation.description_generation.group_utterances_by_label(samples)#

Group samples by their labels.

Parameters:

samples (list[autointent.schemas.Sample]) – List of samples with label and utterance attributes.

Returns:

A dictionary where labels map to lists of utterances.

Return type:

dict[int, list[str]]