mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: add collaboration option in org config
This commit is contained in:
parent
b9e6fc5d23
commit
83760064e7
2 changed files with 6 additions and 9 deletions
|
|
@ -20,9 +20,7 @@ class AIEnabledFeatures(BaseModel):
|
|||
class AIConfig(BaseModel):
|
||||
enabled: bool = True
|
||||
limits: AILimitsSettings = AILimitsSettings()
|
||||
embeddings: Literal[
|
||||
"text-embedding-ada-002",
|
||||
] = "text-embedding-ada-002"
|
||||
embeddings: Literal["text-embedding-ada-002",] = "text-embedding-ada-002"
|
||||
ai_model: Literal["gpt-3.5-turbo", "gpt-4-1106-preview"] = "gpt-3.5-turbo"
|
||||
features: AIEnabledFeatures = AIEnabledFeatures()
|
||||
|
||||
|
|
@ -44,6 +42,7 @@ class GeneralConfig(BaseModel):
|
|||
color: str = ""
|
||||
limits: LimitSettings = LimitSettings()
|
||||
users: OrgUserConfig = OrgUserConfig()
|
||||
collaboration: bool = False
|
||||
active: bool = True
|
||||
|
||||
|
||||
|
|
@ -51,6 +50,7 @@ class OrganizationConfigBase(SQLModel):
|
|||
GeneralConfig: GeneralConfig
|
||||
AIConfig: AIConfig
|
||||
|
||||
|
||||
class OrganizationConfig(SQLModel, table=True):
|
||||
id: Optional[int] = Field(default=None, primary_key=True)
|
||||
org_id: int = Field(
|
||||
|
|
@ -60,7 +60,3 @@ class OrganizationConfig(SQLModel, table=True):
|
|||
config: dict = Field(default={}, sa_column=Column(JSON))
|
||||
creation_date: Optional[str]
|
||||
update_date: Optional[str]
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -158,6 +158,7 @@ async def create_org(
|
|||
max_storage=0,
|
||||
max_staff=0,
|
||||
),
|
||||
collaboration=False,
|
||||
users=OrgUserConfig(
|
||||
signup_mechanism="open",
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue