feat: 完善模型平台相关功能
This commit is contained in:
@@ -38,6 +38,10 @@ class Settings(BaseSettings):
|
||||
default="dev-only-not-for-production",
|
||||
description="HS256 secret used by backend's jupyter auth_request.",
|
||||
)
|
||||
demo_auth_enabled: bool = Field(
|
||||
default=False,
|
||||
description="Enable the self-hosted UI's short-lived demo session cookie.",
|
||||
)
|
||||
|
||||
# ── service identity ──────────────────────────────────────────
|
||||
service_name: str = Field(
|
||||
@@ -148,4 +152,4 @@ def get_settings() -> Settings:
|
||||
settings: Settings = get_settings()
|
||||
|
||||
|
||||
__all__ = ["Settings", "get_settings", "settings"]
|
||||
__all__ = ["Settings", "get_settings", "settings"]
|
||||
|
||||
@@ -100,6 +100,7 @@ class StorageClient:
|
||||
visibility: str,
|
||||
is_immutable: bool,
|
||||
idempotency_key: str,
|
||||
relative_path: str | None = None,
|
||||
) -> dict[str, Any]:
|
||||
result = await self._request(
|
||||
"POST",
|
||||
@@ -114,6 +115,7 @@ class StorageClient:
|
||||
"visibility": visibility,
|
||||
"is_immutable": is_immutable,
|
||||
"idempotency_key": idempotency_key,
|
||||
"relative_path": relative_path,
|
||||
},
|
||||
)
|
||||
return result["data"]
|
||||
|
||||
@@ -56,6 +56,7 @@ class CompleteUploadRequest(StrictModel):
|
||||
"working_copy",
|
||||
"public_script",
|
||||
]
|
||||
file_name: str = Field(min_length=1, max_length=255)
|
||||
visibility: Literal["private", "workspace", "public"] = "private"
|
||||
is_immutable: bool = False
|
||||
|
||||
@@ -78,6 +79,7 @@ class ServerObjectRequest(StrictModel):
|
||||
visibility: Literal["private", "workspace", "public"] = "private"
|
||||
is_immutable: bool = False
|
||||
idempotency_key: str = Field(min_length=8, max_length=128)
|
||||
relative_path: str | None = Field(default=None, max_length=1024)
|
||||
|
||||
|
||||
class DownloadUrlRequest(StrictModel):
|
||||
|
||||
Reference in New Issue
Block a user