Add tier-gated RAG and Drive document sources (#42)
Ship allows_rag entitlement (founders/backer/pro/business), enforce it on document APIs and RAG chat, harden ingest/delete/active lifecycle, and add Google/Microsoft Drive connect + sync for personal and company knowledge bases. Closes #43 #44 #45 #46 #47 #48 #49 #50 #51 #52 #53 Parent epic: #42 Related: #11
This commit is contained in:
@@ -40,6 +40,10 @@ class SubscriptionPlan(TimeInfoBase):
|
||||
)
|
||||
allows_text_generation = models.BooleanField(default=True)
|
||||
allows_image_generation = models.BooleanField(default=False)
|
||||
allows_rag = models.BooleanField(
|
||||
default=False,
|
||||
help_text="Drive/RAG document sync (Google Drive, OneDrive, SharePoint).",
|
||||
)
|
||||
allows_all_future_features = models.BooleanField(
|
||||
default=False,
|
||||
help_text="Founders/Backer: unlock new capabilities as they ship.",
|
||||
@@ -74,6 +78,8 @@ class SubscriptionPlan(TimeInfoBase):
|
||||
return self.allows_text_generation
|
||||
if feature in ("image", "image_generation"):
|
||||
return self.allows_image_generation
|
||||
if feature in ("rag", "document_rag"):
|
||||
return self.allows_rag
|
||||
return False
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user