Skip to main content

learn

//ellmental/com.theagilemonkeys.ellmental.semanticsearch/SemanticSearch/learn

learn

suspend fun learn(input: LearnInput)

"Learns" a list of texts to make them available in future semantic searches. It uses the EmbeddingsModel to calculate text embeddings for each piece of text. Then it uses the VectorStore to persist them.

Parameters

jvm

inputA list of LearnInputItems to be learned. Each LearnInputItem may contain the following:
- text: The text to be learned. - metadata: A map of metadata to be associated with the text.