Delen via


Subscription Rai Policy - Get

Krijgt de gespecificeerde contentfilters die aan het abonnement horen.

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/raiPolicy/{raiPolicyName}?api-version=2025-10-01-preview

URI-parameters

Name In Vereist Type Description
raiPolicyName
path True

string

pattern: ^[a-zA-Z0-9][a-zA-Z0-9_.-]*$

De naam van de RaiPolicy die is gekoppeld aan het Cognitive Services-account

subscriptionId
path True

string

minLength: 1

De id van het doelabonnement.

api-version
query True

string

minLength: 1

De API-versie die voor deze bewerking moet worden gebruikt.

Antwoorden

Name Type Description
200 OK

RaiPolicy

Azure-operatie succesvol voltooid.

Other Status Codes

ErrorResponse

Een onverwachte foutreactie.

Beveiliging

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Stroom: implicit
Autorisatie-URL: https://login.microsoftonline.com/common/oauth2/authorize

Bereiken

Name Description
user_impersonation Uw gebruikersaccount imiteren

Voorbeelden

GetRaiPolicy

Voorbeeldaanvraag

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CognitiveServices/raiPolicy/raiPolicyName?api-version=2025-10-01-preview

Voorbeeldrespons

{
  "name": "raiPolicyName",
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName/raiPolicies/raiPolicyName",
  "properties": {
    "basePolicyName": "Microsoft.Default",
    "contentFilters": [
      {
        "name": "Hate",
        "blocking": false,
        "enabled": false,
        "severityThreshold": "High",
        "source": "Prompt"
      },
      {
        "name": "Hate",
        "blocking": true,
        "enabled": true,
        "severityThreshold": "Medium",
        "source": "Completion"
      },
      {
        "name": "Sexual",
        "blocking": true,
        "enabled": true,
        "severityThreshold": "High",
        "source": "Prompt"
      },
      {
        "name": "Sexual",
        "blocking": true,
        "enabled": true,
        "severityThreshold": "Medium",
        "source": "Completion"
      },
      {
        "name": "Selfharm",
        "blocking": true,
        "enabled": true,
        "severityThreshold": "High",
        "source": "Prompt"
      },
      {
        "name": "Selfharm",
        "blocking": true,
        "enabled": true,
        "severityThreshold": "Medium",
        "source": "Completion"
      },
      {
        "name": "Violence",
        "blocking": true,
        "enabled": true,
        "severityThreshold": "Medium",
        "source": "Prompt"
      },
      {
        "name": "Violence",
        "blocking": true,
        "enabled": true,
        "severityThreshold": "Medium",
        "source": "Completion"
      },
      {
        "name": "Jailbreak",
        "blocking": true,
        "enabled": true,
        "source": "Prompt"
      },
      {
        "name": "Protected Material Text",
        "blocking": true,
        "enabled": true,
        "source": "Completion"
      },
      {
        "name": "Protected Material Code",
        "blocking": true,
        "enabled": true,
        "source": "Completion"
      },
      {
        "name": "Profanity",
        "blocking": true,
        "enabled": true,
        "source": "Prompt"
      }
    ],
    "mode": "Asynchronous_filter"
  }
}

Definities

Name Description
ContentLevel

Niveau waarop inhoud wordt gefilterd.

createdByType

Het type identiteit waarmee de resource is gemaakt.

CustomBlocklistConfig

Hiermee haalt u de bron op waarop het filter van toepassing is of stelt u deze in.

ErrorAdditionalInfo

Aanvullende informatie over de resourcebeheerfout.

ErrorDetail

De foutdetails.

ErrorResponse

Foutreactie

RaiActionType

De actietypen die moeten worden toegepast op de inhoudsfilters

RaiPolicy

Cognitieve diensten RaiPolicy.

RaiPolicyContentFilter

Azure OpenAI Content Filter.

RaiPolicyContentSource

Inhoudsbron om de inhoudsfilters toe te passen.

RaiPolicyMode

Rai beleidsmodus. De enum-waardetoewijzing is zoals hieronder: Default = 0, Deferred=1, Blocking=2, Asynchronous_filter =3. Gelieve 'Asynchronous_filter' te gebruiken na 01-06-2025. Het is hetzelfde als 'Deferred' in de vorige versie.

RaiPolicyProperties

Azure OpenAI Content Filters eigenschappen.

RaiPolicyType

Beleidstype Inhoudsfilters.

SafetyProviderConfig

Bepaalt of bepaalt de bron waarop veiligheidsdiensten zich bevinden.

systemData

Metagegevens met betrekking tot het maken en de laatste wijziging van de resource.

ContentLevel

Niveau waarop inhoud wordt gefilterd.

Waarde Description
Low
Medium
High

createdByType

Het type identiteit waarmee de resource is gemaakt.

Waarde Description
User
Application
ManagedIdentity
Key

CustomBlocklistConfig

Hiermee haalt u de bron op waarop het filter van toepassing is of stelt u deze in.

Name Type Description
blocking

boolean

Als er blokkering zou optreden.

blocklistName

string

Naam van ContentFilter.

source

RaiPolicyContentSource

Inhoudsbron om de inhoudsfilters toe te passen.

ErrorAdditionalInfo

Aanvullende informatie over de resourcebeheerfout.

Name Type Description
info

object

De aanvullende informatie.

type

string

Het extra informatietype.

ErrorDetail

De foutdetails.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

De fout bevat aanvullende informatie.

code

string

De foutcode.

details

ErrorDetail[]

De foutdetails.

message

string

Het foutbericht.

target

string

Het foutdoel.

ErrorResponse

Foutreactie

Name Type Description
error

ErrorDetail

Het foutobject.

RaiActionType

De actietypen die moeten worden toegepast op de inhoudsfilters

Waarde Description
None
BLOCKING
ANNOTATING
HITL
RETRY

RaiPolicy

Cognitieve diensten RaiPolicy.

Name Type Description
etag

string

Resource-Etag.

id

string

Volledig gekwalificeerde resource-id voor de resource. Vb.: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

De naam van de resource

properties

RaiPolicyProperties

Eigenschappen van Cognitive Services RaiPolicy.

systemData

systemData

Azure Resource Manager metadata met creationBy en modifiedBy informatie.

tags

object

Resourcetags.

type

string

Het type bron. Bijvoorbeeld: "Microsoft. Compute/virtualMachines" of "Microsoft. Opslag/opslagAccounts"

RaiPolicyContentFilter

Azure OpenAI Content Filter.

Name Type Description
action

RaiActionType

De actietypen die moeten worden toegepast op de inhoudsfilters

blocking

boolean

Als er blokkering zou optreden.

enabled

boolean

Als het ContentFilter is ingeschakeld.

name

string

Naam van ContentFilter.

severityThreshold

ContentLevel

Niveau waarop inhoud wordt gefilterd.

source

RaiPolicyContentSource

Inhoudsbron om de inhoudsfilters toe te passen.

RaiPolicyContentSource

Inhoudsbron om de inhoudsfilters toe te passen.

Waarde Description
Prompt
Completion
PreToolCall
PostToolCall
PreRun
PostRun

RaiPolicyMode

Rai beleidsmodus. De enum-waardetoewijzing is zoals hieronder: Default = 0, Deferred=1, Blocking=2, Asynchronous_filter =3. Gelieve 'Asynchronous_filter' te gebruiken na 01-06-2025. Het is hetzelfde als 'Deferred' in de vorige versie.

Waarde Description
Default
Deferred
Blocking
Asynchronous_filter

RaiPolicyProperties

Azure OpenAI Content Filters eigenschappen.

Name Type Description
basePolicyName

string

Naam van Rai-beleid.

contentFilters

RaiPolicyContentFilter[]

De lijst met inhoudsfilters.

customBlocklists

CustomBlocklistConfig[]

De lijst met aangepaste blokkeringen.

mode

RaiPolicyMode

Rai beleidsmodus. De enum-waardetoewijzing is zoals hieronder: Default = 0, Deferred=1, Blocking=2, Asynchronous_filter =3. Gelieve 'Asynchronous_filter' te gebruiken na 01-06-2025. Het is hetzelfde als 'Deferred' in de vorige versie.

safetyProviders

SafetyProviderConfig[]

De lijst met veiligheidsaanbieders.

type

RaiPolicyType

Beleidstype Inhoudsfilters.

RaiPolicyType

Beleidstype Inhoudsfilters.

Waarde Description
UserManaged
SystemManaged

SafetyProviderConfig

Bepaalt of bepaalt de bron waarop veiligheidsdiensten zich bevinden.

Name Type Description
blocking

boolean

Als er blokkering zou optreden.

safetyProviderName

string

Naam van RAI Safety Provider.

source

RaiPolicyContentSource

Inhoudsbron om de inhoudsfilters toe te passen.

systemData

Metagegevens met betrekking tot het maken en de laatste wijziging van de resource.

Name Type Description
createdAt

string (date-time)

De tijdstempel van het maken van resources (UTC).

createdBy

string

De identiteit waarmee de resource is gemaakt.

createdByType

createdByType

Het type identiteit waarmee de resource is gemaakt.

lastModifiedAt

string (date-time)

De tijdstempel van de laatste wijziging van de resource (UTC)

lastModifiedBy

string

De identiteit die de resource voor het laatst heeft gewijzigd.

lastModifiedByType

createdByType

Het type identiteit dat de resource voor het laatst heeft gewijzigd.