ภาษา

SearchModelFactory.OpenAICompatibleVectorizerParameters Method

Definition

Connection parameters for a direct OpenAI-compatible embeddings endpoint. Creation requires exactly one of nonempty headers or managedIdentityAudience. Updates can omit headers to preserve credentials for an unchanged connection and embedding profile.

public static Azure.Search.Documents.Indexes.Models.OpenAICompatibleVectorizerParameters OpenAICompatibleVectorizerParameters(Uri uri = default, Azure.Search.Documents.Indexes.Models.AzureOpenAIModelName modelName = default, int? dimensions = default, System.Collections.Generic.IDictionary<string,string> headers = default, string managedIdentityAudience = default, Azure.Search.Documents.Indexes.Models.SearchIndexerDataIdentity authIdentity = default);
static member OpenAICompatibleVectorizerParameters : Uri * Azure.Search.Documents.Indexes.Models.AzureOpenAIModelName * Nullable<int> * System.Collections.Generic.IDictionary<string, string> * string * Azure.Search.Documents.Indexes.Models.SearchIndexerDataIdentity -> Azure.Search.Documents.Indexes.Models.OpenAICompatibleVectorizerParameters
Public Shared Function OpenAICompatibleVectorizerParameters (Optional uri As Uri = Nothing, Optional modelName As AzureOpenAIModelName = Nothing, Optional dimensions As Nullable(Of Integer) = Nothing, Optional headers As IDictionary(Of String, String) = Nothing, Optional managedIdentityAudience As String = Nothing, Optional authIdentity As SearchIndexerDataIdentity = Nothing) As OpenAICompatibleVectorizerParameters

Parameters

uri
Uri

The complete HTTPS embeddings POST URL, including any path and query parameters. Sent unchanged without appending a path or API version. Redirects are not followed.

modelName
AzureOpenAIModelName

The embedding profile, using the same model-name enum as native Azure OpenAI vectorizers. Only text-embedding-ada-002, text-embedding-3-small, and text-embedding-3-large are supported at runtime; chat names in the shared enum are rejected. Controls Search's limits and default dimensions; the outbound body omits model, so the URI or gateway must select the actual model. Arbitrary provider protocols are not supported.

dimensions
Nullable<Int32>

The output dimensions, which must match the target vector field. Defaults to 1536 for text-embedding-ada-002 and text-embedding-3-small, or 3072 for text-embedding-3-large. Ada requires 1536; text-embedding-3-small supports 1 through 1536, and text-embedding-3-large supports 1 through 3072. Preserving omitted headers on update requires the configured dimensions to remain unchanged; omitting dimensions is distinct from specifying the default explicitly.

headers
IDictionary<String,String>

Nonempty stored HTTP headers for endpoint authentication. Both names and values are secret and are never returned in responses. Empty maps are invalid. Mutually exclusive with managedIdentityAudience and authIdentity. On update, omitted headers are preserved only on the same resource and vectorizer binding when the exact endpoint, embedding profile including configured dimensions, and authentication identity are unchanged; otherwise, supply fresh credentials.

managedIdentityAudience
String

The bare canonical application GUID of the customer's third-party Microsoft Entra application for managed identity authentication. Do not include an api:// prefix or /.default suffix. Mutually exclusive with headers.

authIdentity
SearchIndexerDataIdentity

The user-assigned managed identity used to acquire a token for managedIdentityAudience. Omit to use the search service's system-assigned identity. Allowed only with managedIdentityAudience.

Returns

A new OpenAICompatibleVectorizerParameters instance for mocking.

Applies to