MCPcopy Create free account
hub / github.com/astercloud/aster / TestMultiProviderFactory_Create_Ollama

Function TestMultiProviderFactory_Create_Ollama

pkg/provider/factory_test.go:111–128  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

109}
110
111func TestMultiProviderFactory_Create_Ollama(t *testing.T) {
112 factory := NewMultiProviderFactory()
113
114 config := &types.ModelConfig{
115 Provider: "ollama",
116 Model: "llama2",
117 BaseURL: "http://localhost:11434",
118 }
119
120 provider, err := factory.Create(config)
121 if err != nil {
122 t.Fatalf("Create failed: %v", err)
123 }
124
125 if provider == nil {
126 t.Error("expected provider, got nil")
127 }
128}
129
130func TestMultiProviderFactory_Create_DefaultProvider(t *testing.T) {
131 factory := NewMultiProviderFactory()

Callers

nothing calls this directly

Calls 3

CreateMethod · 0.95
NewMultiProviderFactoryFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected