Package org.machanism.machai.ai.provider
Interface EmbeddingProvider
- All Known Implementing Classes:
CodeMieProvider,OpenAIProvider
public interface EmbeddingProvider
EmbeddingProvider defines the contract for AI embedding providers.
Implementations of this interface are responsible for initializing with application configuration and generating embedding vectors for input text. Embeddings are typically used for tasks such as semantic search, similarity comparison, and natural language processing.
Example usage:
EmbeddingProvider provider = ...;
provider.init(configurator);
List<Double> vector = provider.embedding("example text", 384);
- Since:
- 1.1.14
- Author:
- Viktor Tovstyi
-
Method Summary
-
Method Details
-
init
Initializes the provider with application configuration.- Parameters:
model- model identifier to useconf- configuration source
-
embedding
Computes an embedding vector for the provided text.- Parameters:
text- the input textdimensions- desired embedding dimensionality (provider-specific)- Returns:
- the embedding vector
-