xinference.client.handlers.EmbeddingModelHandle.create_embedding#
- EmbeddingModelHandle.create_embedding(input: str | List[str], **kwargs) Embedding#
Create an Embedding from user input via RESTful APIs.
- Parâmetros:
input (Union[str, List[str]]) – Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays.
- Retorna:
The resulted Embedding vector that can be easily consumed by machine learning models and algorithms.
- Tipo de retorno:
Embedding
- Levanta:
RuntimeError – Report the failure of embeddings and provide the error message.