MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / updateHandler

Method updateHandler

service/ai-local/iml.go:120–136  ·  view source on GitHub ↗
(e *ai.LocalModelPackage, c *EditLocalModelPackage)

Source from the content-addressed store, hash-verified

118}
119
120func (i *imlLocalModelPackageService) updateHandler(e *ai.LocalModelPackage, c *EditLocalModelPackage) {
121 if c.Size != nil {
122 e.Size = *c.Size
123 }
124 if c.Hash != nil {
125 e.Hash = *c.Hash
126 }
127 if c.Description != nil {
128 e.Description = *c.Description
129 }
130 if c.Popular != nil {
131 e.IsPopular = *c.Popular
132 }
133 if c.Version != nil {
134 e.Version = *c.Version
135 }
136}
137
138func (i *imlLocalModelPackageService) fromEntity(e *ai.LocalModelPackage) *LocalModelPackage {
139 return &LocalModelPackage{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected