feat: Add dbgpt client and add api v2

This commit is contained in:
Fangyin Cheng
2024-03-18 18:24:08 +08:00
parent 4970c9f813
commit 0ed30aa44a
39 changed files with 2663 additions and 143 deletions

18
dbgpt/client/app.py Normal file
View File

@@ -0,0 +1,18 @@
from dbgpt.client.client import Client
async def get_app(client: Client, app_id: str):
"""Get an app.
Args:
client (Client): The dbgpt client.
app_id (str): The app id.
"""
return await client.get("/apps/" + app_id)
async def list_app(client: Client):
"""List apps.
Args:
client (Client): The dbgpt client.
"""
return await client.get("/apps")