YandexGPT API, gRPC: EmbeddingsService
Written by
Updated at December 6, 2023
Service for obtaining embeddings for text data.
Call | Description |
---|---|
Embedding | RPC method to obtain embeddings for input text data. |
Calls EmbeddingsService
Embedding
RPC method to obtain embeddings for input text data.
rpc Embedding (EmbeddingRequest) returns (EmbeddingResponse)
EmbeddingRequest
Field | Description |
---|---|
embedding_type | enum EmbeddingType The type of embedding to be generated.
|
model | string The name or identifier of the model to be used for embedding. Possible value for now: general:embedding . The maximum string length in characters is 50. |
text | string The input text for which the embedding is requested. |
EmbeddingResponse
Field | Description |
---|---|
embedding[] | double A repeated list of double values representing the embedding. |
num_tokens | int64 The number of tokens in the input text. |