MCPcopy
hub / github.com/weaviate/weaviate / initVectorizer

Method initVectorizer

modules/text2vec-morph/module.go:102–117  ·  view source on GitHub ↗
(ctx context.Context, timeout time.Duration,
	logger logrus.FieldLogger,
)

Source from the content-addressed store, hash-verified

100}
101
102func (m *MorphModule) initVectorizer(ctx context.Context, timeout time.Duration,
103 logger logrus.FieldLogger,
104) error {
105 morphApiKey := os.Getenv("MORPH_APIKEY")
106
107 client := clients.New(morphApiKey, timeout, logger)
108
109 m.vectorizer = text2vecbase.New(client,
110 batch.NewBatchVectorizer(client, 50*time.Second, batchSettings, logger, m.Name()),
111 batch.ReturnBatchTokenizer(batchSettings.TokenMultiplier, m.Name(), ent.LowerCaseInput),
112 )
113
114 m.metaProvider = client
115
116 return nil
117}
118
119func (m *MorphModule) initAdditionalPropertiesProvider() error {
120 m.additionalPropertiesProvider = additional.NewText2VecProvider()

Callers 1

InitMethod · 0.95

Calls 5

NameMethod · 0.95
NewFunction · 0.92
NewFunction · 0.92
NewBatchVectorizerFunction · 0.92
ReturnBatchTokenizerFunction · 0.92

Tested by

no test coverage detected