make docs generation idempotent

This commit is contained in:
Caren Thomas 2024-12-28 14:26:34 -08:00
parent 46d2150ee0
commit a2decd5003
4 changed files with 8 additions and 4 deletions

View File

@ -13,7 +13,7 @@ class OrganizationBase(LettaBase):
class Organization(OrganizationBase):
id: str = OrganizationBase.generate_id_field()
name: str = Field(create_random_username(), description="The name of the organization.")
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.")

View File

@ -16,7 +16,6 @@ from letta.constants import ADMIN_PREFIX, API_PREFIX, OPENAI_API_PREFIX
from letta.errors import LettaAgentNotFoundError, LettaUserNotFoundError
from letta.log import get_logger
from letta.orm.errors import DatabaseTimeoutError, ForeignKeyConstraintViolationError, NoResultFound, UniqueConstraintViolationError
from letta.schemas.letta_response import LettaResponse
from letta.server.constants import REST_DEFAULT_PORT
# NOTE(charles): these are extra routes that are not part of v1 but we still need to mount to pass tests

View File

@ -294,7 +294,6 @@ class AgentManager:
with self.session_maker() as session:
# Retrieve the agent
agent = AgentModel.read(db_session=session, identifier=agent_id, actor=actor)
agent_state = agent.to_pydantic()
agent.hard_delete(session)
# ======================================================================================================================

View File

@ -60,7 +60,13 @@ class ModelSettings(BaseSettings):
openllm_api_key: Optional[str] = None
cors_origins = ["http://letta.localhost", "http://localhost:8283", "http://localhost:8083", "http://localhost:3000", "http://localhost:4200"]
cors_origins = [
"http://letta.localhost",
"http://localhost:8283",
"http://localhost:8083",
"http://localhost:3000",
"http://localhost:4200",
]
class Settings(BaseSettings):