View a markdown version of this page

GPT OSS Safeguard 120B - Amazon Bedrock

Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.

GPT OSS Safeguard 120B

Icona che mostra un motivo circolare con segmenti curvi intrecciati che formano un disegno a girandola. OpenAI — GPT OSS Safeguard 120B

Dettagli del modello

GPT OSS Safeguard 120B è il modello di sicurezza open source da 120 miliardi di parametri di OpenAI per la moderazione dei contenuti e l'applicazione del guardrail nelle applicazioni di intelligenza artificiale. Per ulteriori informazioni sullo sviluppo e sulle prestazioni del modello, consulta la scheda. model/service

Modalità di input Modalità di output
Red circle with white X icon indicating error, cancel, or close action.AudioRed circle with white X icon indicating error, cancel, or close action.Incorporamento
Red circle with white X icon indicating error, cancel, or close action.ImmagineRed circle with white X icon indicating error, cancel, or close action.Immagine
Red circle with white X icon indicating error, cancel, or close action.DiscorsoRed circle with white X icon indicating error, cancel, or close action.Discorso
Green circle with white checkmark icon.TestoGreen circle with white checkmark icon.Testo
Red circle with white X icon indicating error, cancel, or close action.VideoRed circle with white X icon indicating error, cancel, or close action.Video

Endpoint e API supportati

Le tabelle seguenti mostrano quali endpoint e API sono supportati per GPT OSS Safeguard 120B. Per ulteriori informazioni, consulta API supportate da Amazon Bedrock e Endpoint supportati da Amazon Bedrock.

Supporto per endpoint

Endpoint Supportato
bedrock-runtime supported
bedrock-mantle supported

API supportate sull'endpoint bedrock-runtime

Messaggi Risposte Completamenti delle chat Converse Invoke
not-supported not-supported supported supported supported

API supportate sull'endpoint bedrock-mantle

Messaggi Risposte Completamenti delle chat Converse Invoke
not-supported supported supported not-supported not-supported
Nota

Sìbedrock-mantle, entrambe le API utilizzano il percorso di /v1 base, no. /openai/v1 Usa una delle due API con questo modello:

  • Per le risposte, usa/v1/responses.

  • Per i completamenti della chat, usa/v1/chat/completions.

Suggerimento

Quando possibile, consigliamo di utilizzare l'bedrock-runtimeendpoint per nuove applicazioni. Per informazioni dettagliate, vedi Endpoint supportati da Amazon Bedrock.

Funzionalità e caratteristiche

Caratteristiche di Bedrock

Funzionalità supportate tramite endpoint bedrock-mantle

Funzionalità supportate tramite bedrock-runtime endpoint

Prezzi

Per informazioni sui prezzi, consulta la pagina dei prezzi di Amazon Bedrock.

Accesso programmatico

Utilizzate i seguenti ID del modello e URL degli endpoint per accedere a questo modello a livello di codice. Per ulteriori informazioni sulle API e sugli endpoint disponibili, consulta API supportate ed Endpoint supportati. endpoints.html

Endpoint ID del modello In-Region URL dell'endpoint ID di geo-inferenza ID di inferenza globale
bedrock-runtime openai.gpt-oss-safeguard-120b https://bedrock-runtime.{region}.amazonaws.com Non supportata Non supportata
bedrock-mantle openai.gpt-oss-safeguard-120b https://bedrock-mantle.{region}.api.aws/v1 Non supportata Non supportata

Ad esempio, se la regione è us-east-1 (Virginia settentrionale), l'URL dell'endpoint bedrock-runtime sarà "" e per bedrock-mantle sarà "»https://bedrock-runtime.us-east-1.amazonaws.com. https://bedrock-mantle.us-east-1.api.aws/v1

Livelli di servizio

Amazon Bedrock offre diversi livelli di servizio per soddisfare i requisiti del carico di lavoro. Standard fornisce l'accesso pay-per-token senza impegno (imposta o ometti il campo). "service_tier": "default" Priority offre i tempi di risposta più rapidi a un prezzo superiore (impostato). "service_tier": "priority" Flex offre un accesso a basso costo per carichi di lavoro flessibili e non sensibili al fattore tempo (set). "service_tier": "flex" Reserved offre un throughput dedicato con un impegno a termine per carichi di lavoro prevedibili; è impostato a livello di account anziché su richiesta (contatta il team del tuo account AWS per abilitare). Per ulteriori informazioni, consulta i livelli di servizio.

Standard Priorità Flex Riservato
Green circle with white checkmark icon. Green circle with white checkmark icon. Green circle with white checkmark icon. Red circle with white X icon indicating error, cancel, or close action.

Disponibilità regionale

La disponibilità regionale a colpo d'occhio

Amazon Bedrock offre tre opzioni di inferenza: In-Region mantiene le richieste all'interno di una singola regione per garantire una conformità rigorosa, le Cross-Region rotte geografiche tra le regioni all'interno di un'area geografica (come Stati Uniti, UE e APAC) rispettando la residenza dei dati e le Cross-Region rotte globali ovunque nel mondo senza vincoli di residenza. Per maggiori dettagli, consulta la pagina. Disponibilità regionale per modelli

Region In-Region Geo Globale
us-east-1(Virginia del Nord)Green circle with white checkmark icon.Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.
us-east-2(Ohio)Green circle with white checkmark icon.Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.
us-west-2(Oregon)Green circle with white checkmark icon.Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.
eu-south-1(Milano)Green circle with white checkmark icon.Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.
eu-west-1(Irlanda)Green circle with white checkmark icon.Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.
eu-west-2(Londra)Green circle with white checkmark icon.Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.
ap-northeast-1(Tokyo)Green circle with white checkmark icon.Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.
ap-south-1(Mumbai)Green circle with white checkmark icon.Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.
ap-southeast-2(Sydney)Green circle with white checkmark icon.Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.
sa-east-1(San Paolo)Green circle with white checkmark icon.Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.
ap-southeast-3(Giacarta)Green circle with white checkmark icon.Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.
ap-southeast-4(Melbourne)Green circle with white checkmark icon.Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.
eu-central-1(Francoforte)Green circle with white checkmark icon.Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.
eu-north-1(Stoccolma)Green circle with white checkmark icon.Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.

Quote e limiti

Il tuo AWS account ha delle quote predefinite per mantenere le prestazioni del servizio e garantire un uso appropriato di Amazon Bedrock. Le quote predefinite assegnate a un account potrebbero essere aggiornate in base a fattori regionali, alla cronologia dei pagamenti, all'uso fraudolento, all' and/or approvazione di una richiesta di aumento delle quote. quotas-increase.html Per ulteriori informazioni, consulta Quote per Amazon Bedrock la documentazione e consulta i limiti per il modello.

Codice di esempio

Passaggio 1 - AWS Account: se hai già un AWS account, salta questo passaggio. Se non conosci AWS, crea un account https://portal.aws.amazon.com/billing/signup AWS.

Passaggio 2 - Chiave API: accedi alla console Amazon Bedrock e genera una chiave API a lungo termine.

Passaggio 3 - Scarica l'SDK: per utilizzare questa guida introduttiva, devi avere Python già installato. Quindi installa il software pertinente in base alle API che stai utilizzando.

Per le risposte o i completamenti della chat, scegli la scheda OpenAI SDK. Per Invoke o Converse, scegli la scheda Boto3.

OpenAI SDK
pip install boto3 openai
Boto3
pip install boto3

Fase 4 - Impostazione delle variabili di ambiente

Configura il tuo ambiente per utilizzare la chiave API per l'autenticazione.

Scegli la scheda per l'SDK e l'endpoint.

bedrock-mantle
OPENAI_API_KEY="<provide your Bedrock API key>" OPENAI_BASE_URL="https://bedrock-mantle.<your-region>.api.aws/v1"
bedrock-runtime
OPENAI_API_KEY="<provide your Bedrock API key>" OPENAI_BASE_URL="https://bedrock-runtime.<your-region>.amazonaws.com/openai/v1"
Boto3
AWS_BEARER_TOKEN_BEDROCK="<provide your Bedrock API key>"

Passaggio 5: esegui la tua prima richiesta di inferenza

Salva il file con nome bedrock-first-request.py

mantello roccioso

Usa le impostazioni della Fase 4 - Impostazione delle variabili di ambiente. Scegli la scheda bedrock-mantle. La scheda Chat utilizza l'API Chat Completions.

Responses API
from openai import OpenAI client = OpenAI() response = client.responses.create( model="openai.gpt-oss-safeguard-120b", input="Can you explain the features of Amazon Bedrock?" ) print(response)
Chat
from openai import OpenAI client = OpenAI() response = client.chat.completions.create( model="openai.gpt-oss-safeguard-120b", messages=[{"role": "user", "content": "Can you explain the features of Amazon Bedrock?"}] ) print(response)

bedrock-runtime: OpenAI SDK

Usa le impostazioni del passaggio 4 - Imposta le variabili di ambiente. Scegli la scheda bedrock-runtime. Questo esempio utilizza l'API Chat Completions.

Nota

Per chiamare l'API Responses con questo modello, usabedrock-mantle. Non puoi attivarlobedrock-runtime.

from openai import OpenAI client = OpenAI() response = client.chat.completions.create( model="openai.gpt-oss-safeguard-120b", messages=[{"role": "user", "content": "Can you explain the features of Amazon Bedrock?"}] ) print(response)

bedrock-runtime: Boto3

Usa le impostazioni Boto3 della Fase 4 - Impostazione delle variabili di ambiente. Scegli l'API per la tua richiesta.

Invoke API
import json import boto3 client = boto3.client('bedrock-runtime', region_name='us-east-1') response = client.invoke_model( modelId='openai.gpt-oss-safeguard-120b', body=json.dumps({ 'messages': [{ 'role': 'user', 'content': 'Can you explain the features of Amazon Bedrock?'}], 'max_tokens': 1024 }) ) print(json.loads(response['body'].read()))
Converse API
import boto3 client = boto3.client('bedrock-runtime', region_name='us-east-1') response = client.converse( modelId='openai.gpt-oss-safeguard-120b', messages=[ { 'role': 'user', 'content': [{'text': 'Can you explain the features of Amazon Bedrock?'}] } ] ) print(response)