aita_core.config — Configuration

The configuration module defines the CourseConfig dataclass and provides global config management via set_config() / get_config().

class aita_core.config.CourseConfig(course_id: str, course_name: str, course_short_name: str, course_description: str, system_prompt: str, week_topics: dict, topic_num_to_week: dict, hw_num_to_week: dict, lab_num_to_week: dict, study_guide_to_week: dict, example_prompts: dict, base_dir: str, course_materials_dir: str, faiss_db_dir: str, docs_dir: str, backup_dir: str, data_dir: str, admin_password: str, cookie_name: str, cookie_key: str, redirect_uri: str, admin_emails: list = <factory>, google_client_secret_file: str = '', semester_start: str = '', test_mode: bool = False, exam_scope: dict = <factory>, textbook_url: str = '', textbook_chapter_to_week: dict = <factory>, embedding_model: str = 'text-embedding-3-large', embedding_dimensions: int = 3072, llm_model: str = 'gpt-4o-mini', llm_temperature: float = 0, chunk_size: int = 2048, chunk_overlap: int = 256, retrieval_k: int = 5)[source]

Bases: object

Parameters:
  • course_id (str)

  • course_name (str)

  • course_short_name (str)

  • course_description (str)

  • system_prompt (str)

  • week_topics (dict)

  • topic_num_to_week (dict)

  • hw_num_to_week (dict)

  • lab_num_to_week (dict)

  • study_guide_to_week (dict)

  • example_prompts (dict)

  • base_dir (str)

  • course_materials_dir (str)

  • faiss_db_dir (str)

  • docs_dir (str)

  • backup_dir (str)

  • data_dir (str)

  • admin_password (str)

  • cookie_name (str)

  • cookie_key (str)

  • redirect_uri (str)

  • admin_emails (list)

  • google_client_secret_file (str)

  • semester_start (str)

  • test_mode (bool)

  • exam_scope (dict)

  • textbook_url (str)

  • textbook_chapter_to_week (dict)

  • embedding_model (str)

  • embedding_dimensions (int)

  • llm_model (str)

  • llm_temperature (float)

  • chunk_size (int)

  • chunk_overlap (int)

  • retrieval_k (int)

course_id: str
course_name: str
course_short_name: str
course_description: str
system_prompt: str
week_topics: dict
topic_num_to_week: dict
hw_num_to_week: dict
lab_num_to_week: dict
study_guide_to_week: dict
example_prompts: dict
base_dir: str
course_materials_dir: str
faiss_db_dir: str
docs_dir: str
backup_dir: str
data_dir: str
admin_password: str
cookie_name: str
cookie_key: str
redirect_uri: str
admin_emails: list
google_client_secret_file: str = ''
semester_start: str = ''
test_mode: bool = False
exam_scope: dict
textbook_url: str = ''
textbook_chapter_to_week: dict
embedding_model: str = 'text-embedding-3-large'
embedding_dimensions: int = 3072
llm_model: str = 'gpt-4o-mini'
llm_temperature: float = 0
chunk_size: int = 2048
chunk_overlap: int = 256
retrieval_k: int = 5
property google_auth_enabled: bool
property week_to_hw: dict
get_current_week()[source]

Compute current week from today’s date and semester_start.

Returns 1 if semester_start is not set or date is before semester start. Clamps to max week in week_topics.

Return type:

int

get_topics_covered(current_week)[source]
get_topics_not_covered(current_week)[source]
auto_detect_exam_scope()[source]

Auto-detect exam scope from week_topics by finding review/exam weeks.

Return type:

dict

get_exam_topics(exam_name)[source]

Get the list of topics covered by a specific exam.

Parameters:

exam_name (str)

Return type:

list

load_overrides()[source]

Load saved config overrides from JSON file in data_dir.

save_overrides(overrides)[source]

Save config overrides to JSON file and apply them in-memory.

Parameters:

overrides (dict)

aita_core.config.set_config(config)[source]
Parameters:

config (CourseConfig)

aita_core.config.get_config()[source]
Return type:

CourseConfig

Constants

aita_core.config.INT_KEY_DICT_FIELDS: frozenset

Set of field names whose dict keys are integers (need conversion when serializing to/from JSON).

aita_core.config.EDITABLE_FIELDS: list[str]

List of CourseConfig field names that can be edited via the admin panel and saved as JSON overrides.