You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The embedding service interface is prompt/embedding, using the Embedding.srv definition. prompt_bridge selects the embedding provider from input.model_family and forwards the request to the matching plugin.
input:
text: "The quick brown fox jumps over the lazy dog."model_family: "openai"options:- key: modelvalue: text-embedding-3-smalltype: str- key: dimensionsvalue: "1536"type: int- key: encoding_formatvalue: floattype: str
Extending
To add a new Online Embedding provider, implement a plugin inheriting from prompt::EmbedBaseClass and register it. Add its configuration to your YAML file and list it in embedding_family_names and embedding_family_plugins.
Notes
The OpenAI embedding plugin returns either float_embedding or base64_embedding for each item depending on encoding_format.
The service can return more than one embedding item if the provider returns multiple entries in the data array.
Use the success and error fields to check for errors.