MCPcopy
hub / github.com/weaviate/weaviate / VectorizeInput

Method VectorizeInput

modules/text2vec-morph/module.go:147–153  ·  view source on GitHub ↗
(ctx context.Context,
	input string, cfg moduletools.ClassConfig,
)

Source from the content-addressed store, hash-verified

145}
146
147func (m *MorphModule) VectorizeInput(ctx context.Context,
148 input string, cfg moduletools.ClassConfig,
149) ([]float32, error) {
150 monitoring.GetMetrics().ModuleExternalRequestSingleCount.WithLabelValues(m.Name(), "vectorizeTexts").Inc()
151 monitoring.GetMetrics().ModuleExternalRequestSize.WithLabelValues(m.Name(), "vectorizeTexts").Observe(float64(len(input)))
152 return m.vectorizer.Texts(ctx, []string{input}, cfg)
153}
154
155func (m *MorphModule) VectorizableProperties(cfg moduletools.ClassConfig) (bool, []string, error) {
156 return true, nil, nil

Callers

nothing calls this directly

Calls 3

NameMethod · 0.95
GetMetricsFunction · 0.92
TextsMethod · 0.65

Tested by

no test coverage detected