class WatsonxEmbeddingsThe async caller should be used by subclasses to make any async calls, which will thus benefit from the concurrency and retry logic.
The maximum number of concurrent calls that can be made.
Defaults to Infinity, which means no limit.
The maximum number of retries that can be made for a single call, with an exponential backoff between each attempt. Defaults to 6.
The id of the model to be used for this request. Please refer to the list of
models.
The project that contains the resource. Either space_id or project_id has to be given.
The return options for text embeddings.
The space that contains the resource. Either space_id or project_id has to be given.
Represents the maximum number of input tokens accepted. This can be used to avoid requests failing due to
input being longer than configured limits. If the text is truncated, then it truncates the end of the input (on
the right), so the start of the input will remain the same. If this value exceeds the maximum sequence length
(refer to the documentation to find this value for the model) then the call will fail if the total number of
tokens exceeds the maximum sequence length.
An abstract method that takes an array of documents as input and returns a promise that resolves to an array of vectors for each document.
An abstract method that takes a single document as input and returns a promise that resolves to a vector for the query document.