Skip to content

Commit

Permalink
fix:app list
Browse files Browse the repository at this point in the history
  • Loading branch information
Aries-ckt committed Jan 24, 2025
1 parent 776fd85 commit 55cb3be
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 23 deletions.
4 changes: 1 addition & 3 deletions dbgpt/client/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,7 @@ class AppModel(BaseModel):
app_describe: Optional[str] = Field(None, title="app describe")
team_mode: Optional[str] = Field(None, title="team mode")
language: Optional[str] = Field("en", title="language")
team_context: Optional[Union[str, AWELTeamModel]] = Field(
None, title="team context"
)
team_context: Optional[Union[str, dict]] = Field(None, title="team context")
user_code: Optional[str] = Field(None, title="user code")
sys_code: Optional[str] = Field(None, title="sys code")
is_collected: Optional[str] = Field(None, title="is collected")
Expand Down
34 changes: 14 additions & 20 deletions dbgpt/serve/datasource/api/schemas.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
from typing import Optional

from dbgpt._private.pydantic import BaseModel, ConfigDict, Field

from ..config import SERVE_APP_NAME_HUMP
from dbgpt._private.pydantic import BaseModel, Field


class DatasourceServeRequest(BaseModel):
"""name: knowledge space name"""
"""DatasourceServeRequest."""

"""vector_type: vector type"""
id: Optional[int] = Field(None, description="The datasource id")
db_type: str = Field(..., description="Database type, e.g. sqlite, mysql, etc.")
db_name: str = Field(..., description="Database name.")
Expand All @@ -21,19 +18,16 @@ class DatasourceServeRequest(BaseModel):


class DatasourceServeResponse(BaseModel):
"""Flow response model"""

model_config = ConfigDict(title=f"ServeResponse for {SERVE_APP_NAME_HUMP}")

"""name: knowledge space name"""
"""Datasource response model"""

"""vector_type: vector type"""
id: int = Field(None, description="The datasource id")
db_type: str = Field(..., description="Database type, e.g. sqlite, mysql, etc.")
db_name: str = Field(..., description="Database name.")
db_path: str = Field("", description="File path for file-based database.")
db_host: str = Field("", description="Database host.")
db_port: int = Field(0, description="Database port.")
db_user: str = Field("", description="Database user.")
db_pwd: str = Field("", description="Database password.")
comment: str = Field("", description="Comment for the database.")
id: Optional[int] = Field(None, description="The datasource id")
db_type: Optional[str] = Field(
None, description="Database type, e.g. sqlite, mysql, etc."
)
db_name: Optional[str] = Field(None, description="Database name.")
db_path: Optional[str] = Field("", description="File path for file-based database.")
db_host: Optional[str] = Field("", description="Database host.")
db_port: Optional[int] = Field(0, description="Database port.")
db_user: Optional[str] = Field("", description="Database user.")
db_pwd: Optional[str] = Field("", description="Database password.")
comment: Optional[str] = Field("", description="Comment for the database.")

0 comments on commit 55cb3be

Please sign in to comment.