Skip to content

Commit

Permalink
feat[Datasource]:add summary refresh (eosphoros-ai#1433)
Browse files Browse the repository at this point in the history
Co-authored-by: hzh97 <[email protected]>
  • Loading branch information
Aries-ckt and 2976151305 authored Apr 20, 2024
1 parent 57be1ec commit b49b07f
Show file tree
Hide file tree
Showing 175 changed files with 61,020 additions and 1,494 deletions.
10 changes: 10 additions & 0 deletions dbgpt/app/openapi/api_v1/api_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,19 @@ async def db_connect_edit(db_config: DBConfig = Body()):

@router.post("/v1/chat/db/delete", response_model=Result[bool])
async def db_connect_delete(db_name: str = None):
CFG.local_db_manager.db_summary_client.delete_db_profile(db_name)
return Result.succ(CFG.local_db_manager.delete_db(db_name))


@router.post("/v1/chat/db/refresh", response_model=Result[bool])
async def db_connect_refresh(db_config: DBConfig = Body()):
CFG.local_db_manager.db_summary_client.delete_db_profile(db_config.db_name)
success = await CFG.local_db_manager.async_db_summary_embedding(
db_config.db_name, db_config.db_type
)
return Result.succ(success)


async def async_db_summary_embedding(db_name, db_type):
db_summary_client = DBSummaryClient(system_app=CFG.SYSTEM_APP)
db_summary_client.db_summary_embedding(db_name, db_type)
Expand Down
2 changes: 1 addition & 1 deletion dbgpt/app/static/404.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dbgpt/app/static/404/index.html

Large diffs are not rendered by default.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Loading

0 comments on commit b49b07f

Please sign in to comment.