Files
letta-server/letta/schemas/organization.py
Sarah Wooders ece8dab05d feat: various fixes (#2320)
Co-authored-by: Shubham Naik <shub@memgpt.ai>
Co-authored-by: Matt Zhou <mattzh1314@gmail.com>
Co-authored-by: Shubham Naik <shubham.naik10@gmail.com>
Co-authored-by: Caren Thomas <caren@letta.com>
Co-authored-by: cpacker <packercharles@gmail.com>
2024-12-31 10:53:33 +04:00

22 lines
746 B
Python

from datetime import datetime
from typing import Optional
from pydantic import Field
from letta.schemas.letta_base import LettaBase
from letta.utils import create_random_username, get_utc_time
class OrganizationBase(LettaBase):
__id_prefix__ = "org"
class Organization(OrganizationBase):
id: str = OrganizationBase.generate_id_field()
name: str = Field(create_random_username(), description="The name of the organization.", json_schema_extra={"default": "SincereYogurt"})
created_at: Optional[datetime] = Field(default_factory=get_utc_time, description="The creation date of the organization.")
class OrganizationCreate(OrganizationBase):
name: Optional[str] = Field(None, description="The name of the organization.")