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
|
|
@ -18,11 +18,9 @@ class AIEnabledFeatures(BaseModel):
|
||||||
|
|
||||||
|
|
||||||
class AIConfig(BaseModel):
|
class AIConfig(BaseModel):
|
||||||
enabled : bool = True
|
enabled: bool = True
|
||||||
limits: AILimitsSettings = AILimitsSettings()
|
limits: AILimitsSettings = AILimitsSettings()
|
||||||
embeddings: Literal[
|
embeddings: Literal["text-embedding-ada-002",] = "text-embedding-ada-002"
|
||||||
"text-embedding-ada-002",
|
|
||||||
] = "text-embedding-ada-002"
|
|
||||||
ai_model: Literal["gpt-3.5-turbo", "gpt-4-1106-preview"] = "gpt-3.5-turbo"
|
ai_model: Literal["gpt-3.5-turbo", "gpt-4-1106-preview"] = "gpt-3.5-turbo"
|
||||||
features: AIEnabledFeatures = AIEnabledFeatures()
|
features: AIEnabledFeatures = AIEnabledFeatures()
|
||||||
|
|
||||||
|
|
@ -44,13 +42,15 @@ class GeneralConfig(BaseModel):
|
||||||
color: str = ""
|
color: str = ""
|
||||||
limits: LimitSettings = LimitSettings()
|
limits: LimitSettings = LimitSettings()
|
||||||
users: OrgUserConfig = OrgUserConfig()
|
users: OrgUserConfig = OrgUserConfig()
|
||||||
|
collaboration: bool = False
|
||||||
active: bool = True
|
active: bool = True
|
||||||
|
|
||||||
|
|
||||||
class OrganizationConfigBase(SQLModel):
|
class OrganizationConfigBase(SQLModel):
|
||||||
GeneralConfig: GeneralConfig
|
GeneralConfig: GeneralConfig
|
||||||
AIConfig: AIConfig
|
AIConfig: AIConfig
|
||||||
|
|
||||||
|
|
||||||
class OrganizationConfig(SQLModel, table=True):
|
class OrganizationConfig(SQLModel, table=True):
|
||||||
id: Optional[int] = Field(default=None, primary_key=True)
|
id: Optional[int] = Field(default=None, primary_key=True)
|
||||||
org_id: int = Field(
|
org_id: int = Field(
|
||||||
|
|
@ -60,7 +60,3 @@ class OrganizationConfig(SQLModel, table=True):
|
||||||
config: dict = Field(default={}, sa_column=Column(JSON))
|
config: dict = Field(default={}, sa_column=Column(JSON))
|
||||||
creation_date: Optional[str]
|
creation_date: Optional[str]
|
||||||
update_date: Optional[str]
|
update_date: Optional[str]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -158,6 +158,7 @@ async def create_org(
|
||||||
max_storage=0,
|
max_storage=0,
|
||||||
max_staff=0,
|
max_staff=0,
|
||||||
),
|
),
|
||||||
|
collaboration=False,
|
||||||
users=OrgUserConfig(
|
users=OrgUserConfig(
|
||||||
signup_mechanism="open",
|
signup_mechanism="open",
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue