Audit events for update of self-hosted models
What does this MR do and why?
- Refactors update of SelfHostedModels to a service
- Audits update to self-hosted model configurations
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::UpdateService.new(model, User.find_by_id(1), { name: 'a new model' }).execute
-
Still in the console check the last audit event and see if information is correct
AuditEvent.last
Related to #483295 (closed)
Edited by Eduardo Bonet