maeser.generate_response module#
- maeser.generate_response.get_valid_course_ids()[source]#
Retrieves a list of valid course IDs from the bot_data directory.
- maeser.generate_response.handle_message(user_id: str, course_id: str, message_text: str) str [source]#
Handles a message from any interface, routing it to the correct Maeser session. Manages bot registration and session creation for Maeser.
- Parameters:
user_id (str) – The unique string identifier for the user.
course_id (str) – The string identifier corresponding to a configured course in vec_store_path (defined in config.yaml).
message_text (str) – The user’s question or input message.
- Returns:
A string representing the chatbot’s final response message.
- Return type:
str
- maeser.generate_response.parse_data_from_bot_txt(path)[source]#
Parses a bot config file to extract rules and datasets.
- maeser.generate_response.register_branch(branch_name: str, course_id: str, bot_config_path: str)[source]#
Registers a branch to the session handler.
- Parameters:
branch_name (str) – The name to give the branch.
course_id (str) – The ID for the course to be registered. This should match the name of the course’s vector store directory
bot_config_path (str) – The path to bot.txt for the course’s chatbot.