MCPcopy Create free account
hub / github.com/docker/docker-agent / lookupShape

Function lookupShape

pkg/hooks/model_handler.go:84–89  ·  view source on GitHub ↗

lookupShape returns the [ResponseShape] for name, falling back to [defaultShape] for the empty name.

(name string)

Source from the content-addressed store, hash-verified

82// lookupShape returns the [ResponseShape] for name, falling back to
83// [defaultShape] for the empty name.
84func lookupShape(name string) (ResponseShape, bool) {
85 if name == "" {
86 return defaultShape, true
87 }
88 return modelRegistry.shapes.Load(name)
89}
90
91// lookupSchema returns the structured-output schema for name, or nil
92// when the shape is free-form (e.g. the default additional_context).

Callers 3

TestLookupShapeDefaultFunction · 0.85
NewModelFactoryFunction · 0.85

Calls 1

LoadMethod · 0.80

Tested by 2

TestLookupShapeDefaultFunction · 0.68