MCPcopy Create free account
hub / github.com/InftyAI/llmaz / ModelSourceWithModelID

Method ModelSourceWithModelID

test/util/wrapper/model.go:50–74  ·  view source on GitHub ↗
(modelID string, filename string, revision string, allowPatterns, ignorePatterns []string)

Source from the content-addressed store, hash-verified

48}
49
50func (w *ModelWrapper) ModelSourceWithModelID(modelID string, filename string, revision string, allowPatterns, ignorePatterns []string) *ModelWrapper {
51 if modelID != "" {
52 if w.Spec.Source.ModelHub == nil {
53 w.Spec.Source.ModelHub = &coreapi.ModelHub{}
54 }
55 w.Spec.Source.ModelHub.ModelID = modelID
56
57 if filename != "" {
58 w.Spec.Source.ModelHub.Filename = &filename
59 }
60
61 if revision != "" {
62 w.Spec.Source.ModelHub.Revision = &revision
63 }
64
65 if allowPatterns != nil {
66 w.Spec.Source.ModelHub.AllowPatterns = allowPatterns
67 }
68
69 if ignorePatterns != nil {
70 w.Spec.Source.ModelHub.IgnorePatterns = ignorePatterns
71 }
72 }
73 return w
74}
75
76func (w *ModelWrapper) ModelSourceWithModelHub(modelHub string) *ModelWrapper {
77 if modelHub != "" {

Callers 5

TestModelSourceProviderFunction · 0.80
playground_test.goFile · 0.80
model_test.goFile · 0.80
playground_test.goFile · 0.80
MockASampleModelFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestModelSourceProviderFunction · 0.64