Utils

class profile_to_feature_dict(profile, property_ids=None)

Convert a profile to a feature dictionary.

Parameters:
  • profile (Profile) – The profile to convert.

  • property_ids (Sequence[str], optional) – The property IDs to include. Defaults to None, in which case all properties will be included.

Raises:

ValueError: If a profile property’s value is of an unsupported type.

Returns:

The feature dictionary

Return type:

Dict[str, Union[int, float]]

Usage:
>>> import blueconic
>>> from blueconic.utils import profile_to_feature_dict
>>> bc = blueconic.Client()
>>> profile = bc.get_profile('69aa21ec-1693-4c6e-adb9-ca3f1390c4a6')
>>> feature_dict = profile_to_feature_dict(profile)

For more information, visit our BlueConic Knowledge Base https://support.blueconic.com/en/articles/372604-dialogue-models-overview page on how to setup and train a model for usage in dialogues.