mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-02 08:40:36 +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():
|
async def model_types():
|
||||||
print(f"/controller/model/types")
|
print(f"/controller/model/types")
|
||||||
try:
|
try:
|
||||||
import requests
|
import httpx
|
||||||
|
async with httpx.AsyncClient() as client:
|
||||||
response = requests.get(
|
response = await client.get(
|
||||||
f"{CFG.MODEL_SERVER}/api/controller/models?healthy_only=true"
|
f"{CFG.MODEL_SERVER}/api/controller/models?healthy_only=true",
|
||||||
)
|
)
|
||||||
types = set()
|
types = set()
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
models = json.loads(response.text)
|
models = json.loads(response.text)
|
||||||
|
Loading…
Reference in New Issue
Block a user