Skip to content

Commit

Permalink
docs: comment on lesson snapshots model
Browse files Browse the repository at this point in the history
  • Loading branch information
mantagen committed Nov 6, 2024
1 parent 094e3ad commit 68c6990
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/core/src/models/lessonSnapshots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ import type {
} from "@oakai/db";
import crypto from "crypto";

import type {
LooseLessonPlan} from "../../../aila/src/protocol/schema";
import {
LessonPlanJsonSchema
} from "../../../aila/src/protocol/schema";
import type { LooseLessonPlan } from "../../../aila/src/protocol/schema";
import { LessonPlanJsonSchema } from "../../../aila/src/protocol/schema";
// #TODO this import is reaching out of the package because it would otherwise be a circular dependency
import type { DeepNullable } from "../utils/DeepNullable";
import type { DeepPartial } from "../utils/DeepPartial";
Expand All @@ -31,6 +28,12 @@ function getSnapshotHash(snapshot: Snapshot) {
return hash;
}

/**
* Lesson snapshots are stored after each assistant message.
* They act as a snapshot of the lesson plan at that point in the chat.
* These snapshots are passed to the Moderation service and the Exports service
* for moderation and export downloads respectively.
*/
export class LessonSnapshots {
constructor(private readonly prisma: PrismaClientWithAccelerate) {}

Expand Down

0 comments on commit 68c6990

Please sign in to comment.