| 7 | ) |
| 8 | |
| 9 | func (p *plugin) aiLocalApis() []pm3.Api { |
| 10 | return []pm3.Api{ |
| 11 | pm3.CreateApiWidthDoc(http.MethodGet, "/api/v1/model/local/can_deploy", []string{"context", "query:keyword"}, []string{"models"}, p.aiLocalController.ListCanInstall), |
| 12 | pm3.CreateApiWidthDoc(http.MethodGet, "/api/v1/model/local/list", []string{"context", "query:keyword"}, []string{"models"}, p.aiLocalController.Search), |
| 13 | pm3.CreateApiSimple(http.MethodPost, "/api/v1/model/local/deploy", p.aiLocalController.Deploy), |
| 14 | pm3.CreateApiWidthDoc(http.MethodPost, "/api/v1/model/local/deploy/start", []string{"context", "body"}, nil, p.aiLocalController.DeployStart), |
| 15 | pm3.CreateApiWidthDoc(http.MethodPost, "/api/v1/model/local/cancel_deploy", []string{"context", "body"}, nil, p.aiLocalController.CancelDeploy), |
| 16 | pm3.CreateApiWidthDoc(http.MethodDelete, "/api/v1/model/local", []string{"context", "query:model"}, nil, p.aiLocalController.RemoveModel), |
| 17 | pm3.CreateApiWidthDoc(http.MethodPut, "/api/v1/model/local/info", []string{"context", "query:model", "body"}, nil, p.aiLocalController.Update), |
| 18 | pm3.CreateApiWidthDoc(http.MethodGet, "/api/v1/model/local/state", []string{"context", "query:model"}, []string{"state", "info"}, p.aiLocalController.State), |
| 19 | pm3.CreateApiWidthDoc(http.MethodGet, "/api/v1/simple/ai/models/local/configured", []string{"context"}, []string{"models"}, p.aiLocalController.SimpleList), |
| 20 | |
| 21 | pm3.CreateApiWidthDoc(http.MethodGet, "/api/v1/model/local/source/ollama", []string{"context"}, []string{"config"}, p.aiLocalController.OllamaConfig), |
| 22 | pm3.CreateApiWidthDoc(http.MethodPut, "/api/v1/model/local/source/ollama", []string{"context", "body"}, nil, p.aiLocalController.OllamaConfigUpdate), |
| 23 | } |
| 24 | } |