Maho_Ai_Model_Platform_EmbedProviderInterface
in
Table of Contents
Methods
- embed() : array<string|int, array<string|int, float>>
- Generate embeddings for one or more input strings.
- getEmbedPlatformCode() : string
- Get the platform code (e.g. 'openai', 'google')
- getLastEmbedModel() : string
- Get the model used in the last embed() call
- getLastEmbedTokenUsage() : array{input: int}
- Get token usage from the last embed() call.
Methods
embed()
Generate embeddings for one or more input strings.
public
embed(string|array<string|int, string> $input[, array<string, mixed> $options = [] ]) : array<string|int, array<string|int, float>>
Parameters
- $input : string|array<string|int, string>
-
Single string or array of strings
- $options : array<string, mixed> = []
-
Supports: dimensions (int), model (string)
Return values
array<string|int, array<string|int, float>> —One float array per input string
getEmbedPlatformCode()
Get the platform code (e.g. 'openai', 'google')
public
getEmbedPlatformCode() : string
Return values
stringgetLastEmbedModel()
Get the model used in the last embed() call
public
getLastEmbedModel() : string
Return values
stringgetLastEmbedTokenUsage()
Get token usage from the last embed() call.
public
getLastEmbedTokenUsage() : array{input: int}