maeser.controllers.chat_api module

Contents

maeser.controllers.chat_api module#

Module for handling chat API requests.

This module contains the controller function for managing chat sessions and processing incoming messages.

maeser.controllers.chat_api.controller(chat_sessions_manager: ChatSessionManager, chat_session: str) dict[source]#

Handles incoming messages for a chat session.

Asks the chatbot a question and retrieves the chatbot’s response (in HTML format converted from markdown).

Parameters:
  • chat_sessions_manager (ChatSessionManager) – The manager for chat sessions.

  • chat_session (str) – Chat session ID.

Returns:

Response containing the HTML representation of the response.

Return type:

dict