nemo_microservices.resources.embeddings
#
Module Contents#
Classes#
API#
- class nemo_microservices.resources.embeddings.AsyncEmbeddingsResource( )#
Bases:
nemo_microservices._resource.AsyncAPIResource
Initialization
- async create(
- *,
- input: str | nemo_microservices._types.SequenceNotStr[str],
- model: str,
- dimensions: int | nemo_microservices._types.Omit = omit,
- encoding_format: str | nemo_microservices._types.Omit = omit,
- input_type: str | nemo_microservices._types.Omit = omit,
- truncate: str | nemo_microservices._types.Omit = omit,
- user: str | nemo_microservices._types.Omit = omit,
- extra_headers: nemo_microservices._types.Headers | None = None,
- extra_query: nemo_microservices._types.Query | None = None,
- extra_body: nemo_microservices._types.Body | None = None,
- timeout: float | httpx.Timeout | None | nemo_microservices._types.NotGiven = not_given,
Embeddings for the provided input.
Args: input: Input text to embed, encoded as a string or array of tokens.
model: The model to use. Must be one of the available models.
dimensions: The dimensionality of the embedding vector.
encoding_format: The encoding format of the input.
input_type: The type of the input.
truncate: Truncate the input text.
user: Not Supported. A unique identifier representing your end-user.
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
extra_body: Add additional JSON properties to the request
timeout: Override the client-level default timeout for this request, in seconds
- property with_raw_response: nemo_microservices.resources.embeddings.AsyncEmbeddingsResourceWithRawResponse#
This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content.
For more information, see https://docs.nvidia.com/nemo/microservices/latest/pysdk/index.html#accessing-raw-response-data-e-g-headers
- property with_streaming_response: nemo_microservices.resources.embeddings.AsyncEmbeddingsResourceWithStreamingResponse#
An alternative to
.with_raw_response
that doesn’t eagerly read the response body.For more information, see https://docs.nvidia.com/nemo/microservices/latest/pysdk/index.html#with_streaming_response
- class nemo_microservices.resources.embeddings.AsyncEmbeddingsResourceWithRawResponse( )#
Initialization
- class nemo_microservices.resources.embeddings.AsyncEmbeddingsResourceWithStreamingResponse( )#
Initialization
- class nemo_microservices.resources.embeddings.EmbeddingsResource( )#
Bases:
nemo_microservices._resource.SyncAPIResource
Initialization
- create(
- *,
- input: str | nemo_microservices._types.SequenceNotStr[str],
- model: str,
- dimensions: int | nemo_microservices._types.Omit = omit,
- encoding_format: str | nemo_microservices._types.Omit = omit,
- input_type: str | nemo_microservices._types.Omit = omit,
- truncate: str | nemo_microservices._types.Omit = omit,
- user: str | nemo_microservices._types.Omit = omit,
- extra_headers: nemo_microservices._types.Headers | None = None,
- extra_query: nemo_microservices._types.Query | None = None,
- extra_body: nemo_microservices._types.Body | None = None,
- timeout: float | httpx.Timeout | None | nemo_microservices._types.NotGiven = not_given,
Embeddings for the provided input.
Args: input: Input text to embed, encoded as a string or array of tokens.
model: The model to use. Must be one of the available models.
dimensions: The dimensionality of the embedding vector.
encoding_format: The encoding format of the input.
input_type: The type of the input.
truncate: Truncate the input text.
user: Not Supported. A unique identifier representing your end-user.
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
extra_body: Add additional JSON properties to the request
timeout: Override the client-level default timeout for this request, in seconds
- property with_raw_response: nemo_microservices.resources.embeddings.EmbeddingsResourceWithRawResponse#
This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content.
For more information, see https://docs.nvidia.com/nemo/microservices/latest/pysdk/index.html#accessing-raw-response-data-e-g-headers
- property with_streaming_response: nemo_microservices.resources.embeddings.EmbeddingsResourceWithStreamingResponse#
An alternative to
.with_raw_response
that doesn’t eagerly read the response body.For more information, see https://docs.nvidia.com/nemo/microservices/latest/pysdk/index.html#with_streaming_response
- class nemo_microservices.resources.embeddings.EmbeddingsResourceWithRawResponse( )#
Initialization
- class nemo_microservices.resources.embeddings.EmbeddingsResourceWithStreamingResponse( )#
Initialization