MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / ModelState

Method ModelState

module/ai-local/iml.go:88–99  ·  view source on GitHub ↗
(ctx context.Context, model string)

Source from the content-addressed store, hash-verified

86}
87
88func (i *imlLocalModel) ModelState(ctx context.Context, model string) (*ai_local_dto.DeployState, *ai_local_dto.ModelInfo, error) {
89 info, err := i.localModelStateService.Get(ctx, model)
90 if err != nil {
91 return nil, nil, err
92 }
93 state := ai_local_dto.FromDeployState(info.State)
94 return &state, &ai_local_dto.ModelInfo{
95 Current: info.Complete,
96 Total: info.Total,
97 LastMessage: info.Msg,
98 }, nil
99}
100
101func (i *imlLocalModel) Search(ctx context.Context, keyword string) ([]*ai_local_dto.LocalModelItem, error) {
102 list, err := i.localModelService.Search(ctx, keyword, nil, "update_at desc")

Callers

nothing calls this directly

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected