maeser package#
This is the Maeser package, which provides a set of classes and functions for managing a chat application.
The following modules and subpackages are included with Maeser by default:
- maeser.chat:
This subpackage contains classes and functions related to chat functionality, such as sending and receiving messages.
- maeser.controllers:
This subpackage contains classes and functions for managing Flask controllers, which handle the logic for handling incoming requests.
- maeser.graphs:
This subpackage contains Retrieval-Augmented Generation (RAG) graphs that affect the workflow and behavior of the chatbot.
- maeser.flask_app:
This module integrates Maeser with Flask, setting up the Flask blueprint and associated routes for the Maeser application.
- maeser.config:
This module reads in config.yaml from the working directory and exposes its fields to other modules in the package.
- maeser.generate_response:
This module provides a function named handle_message which handles branch registration and session management behind the scenes, simplifying the interface with Maeser.
- maeser.render:
This module contains classes and functions for rendering the user interface of the chat application.
- maeser.user_manager:
This module contains classes and functions for managing users in the chat application.
The following subpackages are optional and require additional dependencies:
- maeser.admin_portal:
This subpackage provides access to the Admin Portal, a web applet that is useful for automatically vectorizing data and creating courses for use with other Maeser handlers, such as maeser.discord_handler. Requires the
maeser[admin_portal]
dependency group (pip install maeser[admin_portal]).- maeser.discord_handler:
This subpackage integrates Maeser with Discord. Requires the
maeser[discord]
dependency group (pip install maeser[discord]).
Subpackages#
- maeser.admin_portal package
- maeser.chat package
- maeser.controllers package
- Subpackages
- Submodules
- maeser.controllers.chat_api module
- maeser.controllers.chat_interface module
- maeser.controllers.chat_logs_overview module
- maeser.controllers.conversation_history_api module
- maeser.controllers.display_chat_log module
- maeser.controllers.feedback_api module
- maeser.controllers.feedback_form_get module
- maeser.controllers.feedback_form_post module
- maeser.controllers.login_api module
- maeser.controllers.logout module
- maeser.controllers.manage_users_view module
- maeser.controllers.new_session_api module
- maeser.controllers.remaining_requests_api module
- maeser.controllers.training module
- maeser.controllers.training_post module
- maeser.controllers.user_management_api module
- maeser.discord_handler package
- maeser.flask_app package
- maeser.graphs package
Submodules#
- maeser.config module
OPENAI_API_KEY
GITHUB_CLIENT_SECRET
COURSE_ID
GITHUB_CLIENT_ID
GITHUB_AUTH_CALLBACK_URI
GITHUB_TIMEOUT
LDAP3_NAME
LDAP_SERVER_URLS
LDAP_BASE_DN
LDAP_ATTRIBUTE_NAME
LDAP_SEARCH_FILTER
LDAP_OBJECT_CLASS
LDAP_ATTRIBUTES
LDAP_CA_CERT_PATH
LDAP_CONNECTION_TIMEOUT
MAX_REQUESTS
RATE_LIMIT_INTERVAL
LOG_SOURCE_PATH
VEC_STORE_PATH
VEC_STORE_TYPE
LLM_MODEL_NAME
LLM_PROVIDER
LLM_TOKEN_LIMIT
EMBED_MODEL
EMBED_PROVIDER
USERS_DB_PATH
CHAT_HISTORY_PATH
DISCORD_BOT_TOKEN
DISCORD_INTRO
load_config()
- maeser.generate_response module
- maeser.render module
- maeser.user_manager module
BaseAuthenticator
GithubAuthenticator
LDAPAuthenticator
LoginStyle
User
UserManager
UserManager.authenticate()
UserManager.check_user_auth()
UserManager.clean_cache()
UserManager.db_connection
UserManager.decrease_requests()
UserManager.fetch_user()
UserManager.get_requests_remaining()
UserManager.get_user()
UserManager.increase_requests()
UserManager.list_cleanables()
UserManager.list_users()
UserManager.refresh_requests()
UserManager.register_authenticator()
UserManager.remove_user_from_cache()
UserManager.update_admin_status()
UserManager.update_banned_status()