This commit is contained in:
Junyan Qin
2025-03-20 11:54:55 +08:00
parent 4275459d45
commit 349ce6908e
2 changed files with 36 additions and 17 deletions

View File

@@ -35,7 +35,7 @@ class ModelsService:
**model_data
)
)
await self.ap.model_mgr.load_model(model_data)
await self.ap.model_mgr.load_llm_model(model_data)
async def get_llm_model(self, model_uuid: str) -> dict | None:
result = await self.ap.persistence_mgr.execute_async(
@@ -54,12 +54,12 @@ class ModelsService:
sqlalchemy.update(persistence_model.LLMModel).where(persistence_model.LLMModel.uuid == model_uuid).values(**model_data)
)
await self.ap.model_mgr.remove_model(model_uuid)
await self.ap.model_mgr.load_model(model_data)
await self.ap.model_mgr.remove_llm_model(model_uuid)
await self.ap.model_mgr.load_llm_model(model_data)
async def delete_llm_model(self, model_uuid: str) -> None:
await self.ap.persistence_mgr.execute_async(
sqlalchemy.delete(persistence_model.LLMModel).where(persistence_model.LLMModel.uuid == model_uuid)
)
await self.ap.model_mgr.remove_model(model_uuid)
await self.ap.model_mgr.remove_llm_model(model_uuid)