GeneratesEmbeddings
trait GeneratesEmbeddings
Methods
embeddings(array $inputs, int|null $dimensions = null, string|null $model = null, int $timeout = 30, array $providerOptions = [])
Get embedding vectors representing the given inputs.
bool
supportsNativeEmbeddingDimensions()
Determine if the provider may omit dimensions and use a model's native embedding dimensions.
void
validateEmbeddingInputs(array $inputs, string $model)
Validate embeddings inputs against the provider's supported media types.
Details
at line 29
EmbeddingsResponse
embeddings(array $inputs, int|null $dimensions = null, string|null $model = null, int $timeout = 30, array $providerOptions = [])
Get embedding vectors representing the given inputs.
at line 87
protected bool
supportsNativeEmbeddingDimensions()
Determine if the provider may omit dimensions and use a model's native embedding dimensions.
at line 97
protected void
validateEmbeddingInputs(array $inputs, string $model)
Validate embeddings inputs against the provider's supported media types.