(ctx context.Context, timeout time.Duration, logger logrus.FieldLogger, )
| 100 | } |
| 101 | |
| 102 | func (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 | |
| 119 | func (m *MorphModule) initAdditionalPropertiesProvider() error { |
| 120 | m.additionalPropertiesProvider = additional.NewText2VecProvider() |
no test coverage detected