mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-02 00:28:00 +00:00
feat:chat_history add model_name
This commit is contained in:
parent
f358e1c8e5
commit
8320dc3cef
@ -340,11 +340,11 @@ async def chat_completions(dialogue: ConversationVo = Body()):
|
||||
async def model_types():
|
||||
print(f"/controller/model/types")
|
||||
try:
|
||||
import requests
|
||||
|
||||
response = requests.get(
|
||||
f"{CFG.MODEL_SERVER}/api/controller/models?healthy_only=true"
|
||||
)
|
||||
import httpx
|
||||
async with httpx.AsyncClient() as client:
|
||||
response = await client.get(
|
||||
f"{CFG.MODEL_SERVER}/api/controller/models?healthy_only=true",
|
||||
)
|
||||
types = set()
|
||||
if response.status_code == 200:
|
||||
models = json.loads(response.text)
|
||||
|
Loading…
Reference in New Issue
Block a user