Foundation Models Embedding API, gRPC: EmbeddingsService
Written by
Updated at April 11, 2024
Service for obtaining embeddings from input data.
Call | Description |
---|---|
TextEmbedding | A method for obtaining embeddings from text data. |
Calls EmbeddingsService
TextEmbedding
A method for obtaining embeddings from text data.
rpc TextEmbedding (TextEmbeddingRequest) returns (TextEmbeddingResponse)
TextEmbeddingRequest
Field | Description |
---|---|
model_uri | string The ID of the model to be used for obtaining text embeddings. |
text | string The input text for which the embedding is requested. |
TextEmbeddingResponse
Field | Description |
---|---|
embedding[] | double A repeated list of double values representing the embedding. |
num_tokens | int64 The number of tokens in the input text. |
model_version | string The model version changes with each new releases. |