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

Function TestLoadCaps_VisionModel

pkg/modelinfo/modelinfo_test.go:459–482  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

457}
458
459func TestLoadCaps_VisionModel(t *testing.T) {
460 t.Parallel()
461
462 store := modelsdev.NewDatabaseStore(&modelsdev.Database{Providers: map[string]modelsdev.Provider{
463 "anthropic": {
464 Models: map[string]modelsdev.Model{
465 "claude-3-5-sonnet": {
466 Name: "Claude 3.5 Sonnet",
467 Modalities: modelsdev.Modalities{
468 Input: []string{"text", "image", "pdf"},
469 Output: []string{"text"},
470 },
471 },
472 },
473 },
474 }})
475
476 mc := LoadCaps(t.Context(), store, modelsdev.NewID("anthropic", "claude-3-5-sonnet"))
477
478 assert.True(t, mc.Supports("image/jpeg"))
479 assert.True(t, mc.Supports("image/png"))
480 assert.True(t, mc.Supports("application/pdf"))
481 assert.True(t, mc.Supports("text/plain"))
482}
483
484func TestLoadCaps_TextOnlyModel(t *testing.T) {
485 t.Parallel()

Callers

nothing calls this directly

Calls 5

NewDatabaseStoreFunction · 0.92
NewIDFunction · 0.92
LoadCapsFunction · 0.85
ContextMethod · 0.80
SupportsMethod · 0.80

Tested by

no test coverage detected