Přejít na hlavní obsah
POST
/
v1
/
glossary
// Brand term -- do not translate
await client.glossary.create({
  term: "Lasso AI",
  type: "do_not_translate",
  case_sensitive: true,
  category: "brand",
});

// Term with specific translations
await client.glossary.create({
  term: "data extraction",
  type: "specific_translation",
  translations: {
    de: "Datenextraktion",
    fr: "extraction de données",
    es: "extracción de datos",
  },
});
{
  "id": "term_abc123",
  "term": "data extraction",
  "type": "specific_translation",
  "case_sensitive": false,
  "category": "custom",
  "translations": {
    "de": "Datenextraktion",
    "fr": "extraction de données"
  },
  "created_at": "2025-03-01T10:00:00.000Z"
}
Pojmy ve slovníku řídí, jak se s konkrétními slovy nebo frázemi zachází během AI obohacení a překladu.

Tělo požadavku

term
string
povinné
Původní pojem k přidání.
type
string
povinné
Jak s tímto pojmem zacházet. Jeden z:
  • do_not_translate — Zachovat pojem beze změny ve všech jazycích.
  • specific_translation — Použít poskytnuté překlady.
  • context_dependent — Nechat AI rozhodnout na základě kontextu.
case_sensitive
boolean
výchozí:"false"
Zda má být porovnávání citlivé na velikost písmen.
category
string
výchozí:"custom"
Kategorie pro organizaci pojmů.
translations
object
Mapa kódů jazyků na přeložené pojmy. Vyžadováno, když je type nastaven na specific_translation.

Odpověď

id
string
Jedinečný identifikátor pojmu.
term
string
Původní pojem.
type
string
Typ pojmu.
case_sensitive
boolean
Nastavení citlivosti na velikost písmen.
category
string
Kategorie pojmu.
translations
object
Mapa překladů.
created_at
string
Časové razítko ISO 8601.
// Brand term -- do not translate
await client.glossary.create({
  term: "Lasso AI",
  type: "do_not_translate",
  case_sensitive: true,
  category: "brand",
});

// Term with specific translations
await client.glossary.create({
  term: "data extraction",
  type: "specific_translation",
  translations: {
    de: "Datenextraktion",
    fr: "extraction de données",
    es: "extracción de datos",
  },
});
{
  "id": "term_abc123",
  "term": "data extraction",
  "type": "specific_translation",
  "case_sensitive": false,
  "category": "custom",
  "translations": {
    "de": "Datenextraktion",
    "fr": "extraction de données"
  },
  "created_at": "2025-03-01T10:00:00.000Z"
}