Skip to content

Commit

Permalink
frontend/llm: further debug and explain what is going on with student…
Browse files Browse the repository at this point in the history
… course project specific limitations
  • Loading branch information
haraldschilly committed Mar 15, 2024
1 parent d3150c5 commit 5d3f293
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/packages/frontend/projects/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -768,14 +768,16 @@ export class ProjectsStore extends Store<ProjectsState> {
*/
private limitAIinCourseProject(tag?: string): boolean {
// Regarding the aiEnabledCache:
// We only care about 'explain' or 'help-me-fix' or 'reply' for the tags
// We only care about 'explain' or 'help-me-fix' or 'reply' in the tags
// right now regarding disabling AI integration, hence to make our cache
// better we base the key only on those possibilities.
const allowed = ["explain", "help-me-fix", "reply"];
if (tag && !allowed.includes(tag)) {
return true;
if (!tag) return false; // no tag, all good
const allowed_tags = ["explain", "help-me-fix", "reply"];
for (const allowed of allowed_tags) {
// we match more, e.g. "help-me-fix:[somethinge else]" or "jupyter-explain"
if (tag.includes(allowed)) return false;
}
return false;
return true;
}

hasLanguageModelEnabled(
Expand Down

0 comments on commit 5d3f293

Please sign in to comment.