Audit deletion of self-hosted models
Logs self-hosted model creation as audit events. Refactoring creation to a service helps centralising the logic. Also refactors to use a service
How to set up and validate locally
-
on
gdk rails c
, execute the service:model = Ai::SelfHostedModel.create(name: "my model 3", model: "codestral", endpoint: "http://localhost.com") Ai::SelfHostedModels::DeleteService.new(model, User.find_by_id(1)).execute
-
Still in the console check the last audit event and see if information is correct
AuditEvent.last
Related to #477999 (closed)
Edited by Eduardo Bonet