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

Method initVectorizer

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

Source from the content-addressed store, hash-verified

99}
100
101func (m *DatabricksModule) initVectorizer(ctx context.Context, timeout time.Duration,
102 logger logrus.FieldLogger,
103) error {
104 databricksToken := os.Getenv("DATABRICKS_TOKEN")
105
106 client := clients.New(databricksToken, timeout, logger)
107
108 m.vectorizer = text2vecbase.New(client,
109 batch.NewBatchVectorizer(client, 50*time.Second, batchSettings,
110 logger, m.Name()),
111 batch.ReturnBatchTokenizer(batchSettings.TokenMultiplier, m.Name(), ent.LowerCaseInput),
112 )
113 m.metaProvider = client
114
115 return nil
116}
117
118func (m *DatabricksModule) initAdditionalPropertiesProvider() error {
119 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