Syncing with updates from prod and formatted

This commit is contained in:
2025-05-18 06:15:07 -05:00
parent d8a912e2c3
commit a85f1222eb
18 changed files with 616 additions and 518 deletions
+7 -2
View File
@@ -53,6 +53,9 @@ class Company(TimeInfoBase):
help_text="A list of LLMs that company can use",
)
def __str__(self):
return self.name
class CustomUser(AbstractUser):
company = models.ForeignKey(
@@ -71,7 +74,7 @@ class CustomUser(AbstractUser):
)
def get_set_password_url(self):
return f"https://www.chat.aimloperations.com/set_password?slug={self.slug}"
return f"https://chat.aimloperations.com/set_password?slug={self.slug}"
FEEDBACK_CHOICE = (
@@ -220,14 +223,16 @@ class PromptMetric(TimeInfoBase):
return difference.seconds
return 0
# Document Models
class DocumentWorkspace(TimeInfoBase):
name = models.CharField(max_length=255)
company = models.ForeignKey(Company, on_delete=models.CASCADE)
class Document(TimeInfoBase):
workspace = models.ForeignKey(DocumentWorkspace, on_delete=models.CASCADE)
file = models.FileField(upload_to='documents/')
file = models.FileField(upload_to="documents/")
uploaded_at = models.DateTimeField(auto_now_add=True)
processed = models.BooleanField(default=False)
active = models.BooleanField(default=False)