recorder.recorder_bot¶
Records the dialogue details of the conversation in it’s raw form.
Module Contents¶
Classes¶
Attributes¶
- recorder.recorder_bot.RecordData¶
- class recorder.recorder_bot.RecorderBot(history_folder: str)¶
- get_user_history_path(user_id: str) str¶
Returns full path to the conversation log for user.
- Parameters:
user_id – User ID.
- record_user_data(user_id: str, record_data: RecordData) None¶
Records the current dialogue utterance for the user.
- Parameters:
user_id – Id of the user.
record_data – Dictionary with data to record.
- load_user_data(user_id: str) List[RecordData]¶
Loads the previously saved conversation log.
- Parameters:
user_id – Id of the user.
- Returns:
List of records (i.e., conversation turns).
- initialize_bot_data(bot_id: str, user_id: str, context: RecordData)¶
Initializes the recording parameters for a specific user_id.
- Parameters:
bot_id – bot ID.
user_id – user ID.
context – Context of the conversation.
- Returns:
The dialogue record to be added to context.
- record_bot_data(bot_id: str, user_id: str, record_data: RecordData) None¶
Records the current dialogue utterance.
- Parameters:
bot_id – Bot ID.
user_id – User ID.
record_data – Dictionary with data to record.