-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: do not trust front end message history #570
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Playwright test resultsDetails
Skipped testsNo persona › tests/auth.test.ts › authenticate through Clerk UI |
// NOTE: this lesson plan is used by the chat endpoint | ||
lessonPlan, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we delete line 49 above now? const lessonPlan = useLessonPlanStore((state) => state.lessonPlan);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed we can!
lessonPlan = parsedOutput.lessonPlan as LooseLessonPlan; | ||
} | ||
} catch (error) { | ||
log.error(`Error parsing output for chat ${chatId}`, error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just want to confirm that we don't want to report to sentry here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks - I've added Sentry reporting. For now, no additional error handling for the front end though
); | ||
return { messages, lessonPlan }; | ||
} catch (error) { | ||
log.error(`Error loading chat data for chat ${chatId}`, error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again here, just want to confirm that we don't want to report to sentry
aila = await createAilaInstance({ | ||
config, | ||
options, | ||
chatId, | ||
userId, | ||
messages, | ||
lessonPlan: dbLessonPlan, | ||
llmService, | ||
moderationAiClient, | ||
threatDetectors, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much nicer!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cheers!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking really good. I'll approve after you've seen the comments, but each is minor
|
🎉 This PR is included in version 1.26.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Description
To test: