Lingua

InferenceClient Class

Definition

Azure Data AI provides semantic reranking operations.

public class InferenceClient
type InferenceClient = class
Public Class InferenceClient
Inheritance
InferenceClient

Constructors

Name Description
InferenceClient()

Initializes a new instance of InferenceClient for mocking.

InferenceClient(InferenceClientSettings)

Initializes a new instance of InferenceClient from a InferenceClientSettings.

InferenceClient(Uri, AzureKeyCredential, InferenceClientOptions)

Initializes a new instance of InferenceClient.

InferenceClient(Uri, AzureKeyCredential)

Initializes a new instance of InferenceClient.

InferenceClient(Uri, TokenCredential, InferenceClientOptions)

Initializes a new instance of InferenceClient.

InferenceClient(Uri, TokenCredential)

Initializes a new instance of InferenceClient.

Properties

Name Description
Pipeline

The HTTP pipeline for sending and receiving REST requests and responses.

Methods

Name Description
GetEmbeddings(IEnumerable<EmbeddingInput>, String, Nullable<EmbeddingVectorKind>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<EmbeddingOutputDataKind>, Nullable<EmbeddingEncodingFormat>, Nullable<EmbeddingDelivery>, CancellationToken)

Embeds text, queries and document images and returns dense or multi-vector embeddings as numbers or base64. Text and queries are sent inline. Images are read from the caller's Azure Blob Storage with a caller-signed user delegation SAS (Microsoft Entra callers only). Results come back in the response or, with delivery: link, as a time-limited read-only link.

GetEmbeddings(IEnumerable<Object>, String, Nullable<EmbeddingVectorKind>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<EmbeddingOutputDataKind>, Nullable<EmbeddingEncodingFormat>, Nullable<EmbeddingDelivery>, CancellationToken)

Embeds text, queries and document images using loosely typed items, for example anonymous objects or dictionaries. Each item is serialized to JSON with JsonSerializer using camelCase property and dictionary key naming and must produce a JSON object with only the wire properties kind (optional, defaults to text), id, content, url and sasToken (all optional, string values). C#-cased names such as Content map to the wire names and EmbeddingContentKind values are written as their string value. JsonElement items must use the exact wire names. Unknown or duplicate properties are rejected. EmbeddingInput instances are used as-is.

GetEmbeddings(RequestContent, RequestContext)

[Protocol Method] Embeds text, queries and document images and returns dense or multi-vector embeddings as numbers or base64. Text and queries are sent inline. Images are read from the caller's Azure Blob Storage with a caller-signed user delegation SAS (Microsoft Entra callers only). Results come back in the response or, with delivery: link, as a time-limited read-only link.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
GetEmbeddingsAsync(IEnumerable<EmbeddingInput>, String, Nullable<EmbeddingVectorKind>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<EmbeddingOutputDataKind>, Nullable<EmbeddingEncodingFormat>, Nullable<EmbeddingDelivery>, CancellationToken)

Embeds text, queries and document images and returns dense or multi-vector embeddings as numbers or base64. Text and queries are sent inline. Images are read from the caller's Azure Blob Storage with a caller-signed user delegation SAS (Microsoft Entra callers only). Results come back in the response or, with delivery: link, as a time-limited read-only link.

GetEmbeddingsAsync(IEnumerable<Object>, String, Nullable<EmbeddingVectorKind>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<EmbeddingOutputDataKind>, Nullable<EmbeddingEncodingFormat>, Nullable<EmbeddingDelivery>, CancellationToken)

Embeds text, queries and document images using loosely typed items, for example anonymous objects or dictionaries. Each item is serialized to JSON with JsonSerializer using camelCase property and dictionary key naming and must produce a JSON object with only the wire properties kind (optional, defaults to text), id, content, url and sasToken (all optional, string values). C#-cased names such as Content map to the wire names and EmbeddingContentKind values are written as their string value. JsonElement items must use the exact wire names. Unknown or duplicate properties are rejected. EmbeddingInput instances are used as-is.

GetEmbeddingsAsync(RequestContent, RequestContext)

[Protocol Method] Embeds text, queries and document images and returns dense or multi-vector embeddings as numbers or base64. Text and queries are sent inline. Images are read from the caller's Azure Blob Storage with a caller-signed user delegation SAS (Microsoft Entra callers only). Results come back in the response or, with delivery: link, as a time-limited read-only link.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
SemanticRerank(RequestContent, RequestContext)

[Protocol Method] Reranks documents by their relevance to a query.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
SemanticRerank(SemanticRerankingContent, CancellationToken)

Reranks documents by their relevance to a query.

SemanticRerankAsync(RequestContent, RequestContext)

[Protocol Method] Reranks documents by their relevance to a query.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
SemanticRerankAsync(SemanticRerankingContent, CancellationToken)

Reranks documents by their relevance to a query.

Applies to