feat: fix and improve model list ui and features
This commit is contained in:
1 parent
9caf057a68
commit
7058cf0771
6 files changed
+230
-33
No files matched your search
+2
-2
@@ -318,12 +318,12 @@ class App(ChatMixin):
|
||||
print(f"Deleted model: {model_id}")
|
||||
return None
|
||||
else:
|
||||
model = await db.Model.update_or_create(
|
||||
id=model_id,
|
||||
await db.Model.filter(id=model_id).update(
|
||||
name=name,
|
||||
kind=kind,
|
||||
value=value,
|
||||
)
|
||||
model = await db.Model.get(id=model_id)
|
||||
print(f"Saved model: {model.id} - {name}")
|
||||
return model
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ async def start_server(app):
|
||||
|
||||
elif action == "get-models":
|
||||
await send({
|
||||
'models': [{"id": model.id, "name": model.name, "value": model.value} for model in await app.get_models()],
|
||||
'models': [{"id": model.id, "name": model.name, "value": model.value, "kind": model.kind} for model in await app.get_models()],
|
||||
'nonce': nonce
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user