Skip to content
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

FIX: Prevent LLM enumerator from erroring when spam enabled #1045

Merged
merged 1 commit into from
Dec 26, 2024

Conversation

keegangeorge
Copy link
Member

This PR fixes an issue where LLM enumerator would error out when SiteSetting.ai_spam_detection = true but there was no AiModerationSetting.spam present.

Typically, we add an LlmDependencyValidator for the setting itself, however, since Spam is unique in that it has it's model set in AiModerationSetting instead of a SiteSetting, we'll add a simple check here to prevent erroring out.

This PR also adds a missing test for the LlmEnumerator

This PR fixes an issue where LLM enumerator would error out when `SiteSetting.ai_spam_detection = true` but there was no `AiModerationSetting.spam` present.

Typically, we add an `LlmDependencyValidator` for the setting itself, however, since Spam is unique in that it has it's model set in `AiModerationSetting` instead of a `SiteSetting`, we'll add a simple check here to prevent erroring out.
@SamSaffron SamSaffron merged commit b480f13 into main Dec 26, 2024
6 checks passed
@SamSaffron SamSaffron deleted the fix-error-spam branch December 26, 2024 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants