mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-06 20:15:17 +02:00
chore: fixed validators
This commit is contained in:
parent
673bf6f3c1
commit
031dc714eb
2 changed files with 2 additions and 7 deletions
|
|
@ -295,13 +295,8 @@ def validate_messages(messages: Any) -> list[dict]:
|
|||
status_code=400, detail=f"messages[{i}].content cannot be empty"
|
||||
)
|
||||
|
||||
# Trim content and enforce max length (10,000 chars)
|
||||
# Trim content
|
||||
sanitized_content = content.strip()
|
||||
if len(sanitized_content) > 10000: # Reasonable limit
|
||||
raise HTTPException(
|
||||
status_code=400,
|
||||
detail=f"messages[{i}].content is too long (max 10000 characters)",
|
||||
)
|
||||
|
||||
validated_messages.append({"role": role, "content": sanitized_content})
|
||||
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ const MobileNav = ({ navItems, isScrolled }: any) => {
|
|||
>
|
||||
<IconBrandGithub className="h-5 w-5 text-neutral-600 dark:text-neutral-300" />
|
||||
<span className="text-sm font-medium text-neutral-600 dark:text-neutral-300">
|
||||
8.3k
|
||||
9.5k
|
||||
</span>
|
||||
</Link>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue