xinference.client.handlers.EmbeddingModelHandle.create_embedding#
- EmbeddingModelHandle.create_embedding(input: str | List[str], **kwargs) Embedding#
Create an Embedding from user input via RESTful APIs.
- 參數:
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.
- 回傳:
The resulted Embedding vector that can be easily consumed by machine learning models and algorithms.
- 回傳型別:
Embedding
- 引發:
RuntimeError -- Report the failure of embeddings and provide the error message.