Skip to content

Commit

Permalink
Make aila required in Aila Rag and pass chatId and userId
Browse files Browse the repository at this point in the history
  • Loading branch information
stefl committed Aug 28, 2024
1 parent 7308bd3 commit 206f72b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/aila/src/features/rag/AilaRag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,23 @@ import { LooseLessonPlan } from "../../protocol/schema";
import { minifyLessonPlanForRelevantLessons } from "../../utils/lessonPlan/minifyLessonPlanForRelevantLessons";

export class AilaRag {
private _aila?: AilaServices;
private _aila: AilaServices;
private _rag: RAG;
private _prisma: PrismaClientWithAccelerate;

constructor({
aila,
prisma,
}: {
aila?: AilaServices;
aila: AilaServices;
prisma?: PrismaClientWithAccelerate;
}) {
this._aila = aila;
this._prisma = prisma ?? globalPrisma;
this._rag = new RAG(this._prisma);
this._rag = new RAG(this._prisma, {
userId: aila.userId,
chatId: aila.chatId,
});
}

public async fetchRagContent({
Expand Down

0 comments on commit 206f72b

Please sign in to comment.