@takeshape/schema 11.49.0 → 11.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -318,7 +318,7 @@ export type StopSequences1 = string[];
318
318
  * The seed (integer) to use for random sampling. If set and supported by the model, calls will generate deterministic results.
319
319
  */
320
320
  export type Seed1 = number;
321
- export type AgentGuardList = AgentGuard[];
321
+ export type GuardID = string;
322
322
  /**
323
323
  * The human-readable name of the Guard.
324
324
  */
@@ -327,6 +327,14 @@ export type Name = string;
327
327
  * A description of the Guard.
328
328
  */
329
329
  export type Description = string;
330
+ /**
331
+ * The remote id of the Guardrail.
332
+ */
333
+ export type GuardrailIdentifier = string;
334
+ /**
335
+ * The remote version of the Guardrail.
336
+ */
337
+ export type GuardrailVersion = string;
330
338
  /**
331
339
  * A message to return when the input message is blocked by the Guard.
332
340
  */
@@ -335,17 +343,84 @@ export type BlockedInputMessaging = string;
335
343
  * A message to return when the output message is blocked by the Guard.
336
344
  */
337
345
  export type BlockedOutputsMessaging = string;
338
- export type GuardrailFilterStrength = 'NONE' | 'HIGH' | 'LOW' | 'MEDIUM';
346
+ export type Example = string;
347
+ /**
348
+ * A topic to block.
349
+ */
350
+ export type Topic = {
351
+ name: string;
352
+ definition: string;
353
+ /**
354
+ * Examples of the topic that can hint the LLM.
355
+ */
356
+ examples?: Example[];
357
+ type: 'DENY';
358
+ }[];
359
+ export type InputStrength = 'NONE' | 'LOW' | 'MEDIUM' | 'HIGH';
360
+ export type OutputStrength = 'NONE' | 'LOW' | 'MEDIUM' | 'HIGH';
339
361
  export type GuardrailModality = 'TEXT' | 'IMAGE';
362
+ /**
363
+ * Whether to filter images or text
364
+ */
365
+ export type InputModalities = GuardrailModality[];
366
+ /**
367
+ * Whether to filter images or text
368
+ */
369
+ export type OutputModalities = GuardrailModality[];
370
+ /**
371
+ * Types of content to filter.
372
+ */
373
+ export type Filter = {
374
+ type: 'HATE' | 'INSULTS' | 'MICONDUCT' | 'PROMPT_ATTACK' | 'SEXUAL' | 'VIOLENCE';
375
+ inputStrength: InputStrength;
376
+ outputStrength: OutputStrength;
377
+ inputModalities?: InputModalities;
378
+ outputModalities?: OutputModalities;
379
+ }[];
380
+ /**
381
+ * Specific words to block.
382
+ */
383
+ export type WordList = {
384
+ text: string;
385
+ }[];
386
+ /**
387
+ * This is solely used for blocking profanity.
388
+ */
389
+ export type ManagedWordList = {
390
+ type: 'PROFANITY';
391
+ }[];
340
392
  export type GuardrailSensitiveInformationAction = 'ANONYMIZE' | 'BLOCK';
393
+ /**
394
+ * PII entity to infer from the text.
395
+ */
396
+ export type PIIEntity = {
397
+ type: 'ADDRESS' | 'AGE' | 'AWS_ACCESS_KEY' | 'AWS_SECRET_KEY' | 'CA_HEALTH_NUMBER' | 'CA_SOCIAL_INSURANCE_NUMBER' | 'CREDIT_DEBIT_CARD_CVV' | 'CREDIT_DEBIT_CARD_EXPIRY' | 'CREDIT_DEBIT_CARD_NUMBER' | 'DRIVER_ID' | 'EMAIL' | 'INTERNATIONAL_BANK_ACCOUNT_NUMBER' | 'IP_ADDRESS' | 'LICENSE_PLATE' | 'MAC_ADDRESS' | 'NAME' | 'PASSWORD' | 'PHONE' | 'PIN' | 'SWIFT_CODE' | 'UK_NATIONAL_HEALTH_SERVICE_NUMBER' | 'UK_NATIONAL_INSURANCE_NUMBER' | 'UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER' | 'URL' | 'USERNAME' | 'US_BANK_ACCOUNT_NUMBER' | 'US_BANK_ROUTING_NUMBER' | 'US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER' | 'US_PASSPORT_NUMBER' | 'US_SOCIAL_SECURITY_NUMBER' | 'VEHICLE_IDENTIFICATION_NUMBER';
398
+ action: GuardrailSensitiveInformationAction;
399
+ }[];
400
+ /**
401
+ * A regular expression to match sensitive information.
402
+ */
403
+ export type RegularExpression = {
404
+ name: string;
405
+ description?: string;
406
+ pattern: string;
407
+ action: GuardrailSensitiveInformationAction;
408
+ }[];
341
409
  /**
342
410
  * The type of filter.
343
411
  */
344
412
  export type Type = 'GROUNDING' | 'RELEVANCE';
345
413
  /**
346
- * The threshold for the filter as a floating point value between 0.0 - 1.0.
414
+ * The threshold for the filter as a floating point value greater than 0.0 and less than 1.0.
347
415
  */
348
416
  export type Threshold = number;
417
+ /**
418
+ * Filter to evaluate grounding text.
419
+ */
420
+ export type Filter1 = {
421
+ type: Type;
422
+ threshold: Threshold;
423
+ }[];
349
424
  /**
350
425
  * Human-readable id for use in the UI
351
426
  */
@@ -1552,7 +1627,7 @@ export interface AgentJSON {
1552
1627
  api: AgentAPI;
1553
1628
  start: AgentStart;
1554
1629
  states: AgentStates;
1555
- guards?: AgentGuardList;
1630
+ guards?: AgentGuard[];
1556
1631
  }
1557
1632
  export interface AgentAPIChat {
1558
1633
  type: 'chat';
@@ -1735,7 +1810,7 @@ export interface AgentExecutionChat {
1735
1810
  options?: AgentGenerateOptions;
1736
1811
  }
1737
1812
  export interface AgentGuard {
1738
- guardId: string;
1813
+ guardId: GuardID;
1739
1814
  }
1740
1815
  export interface GuardMap {
1741
1816
  [k: string]: GuardJSON;
@@ -1749,6 +1824,8 @@ export interface GuardMap {
1749
1824
  export interface GuardJSON {
1750
1825
  name: Name;
1751
1826
  description?: Description;
1827
+ guardrailIdentifier?: GuardrailIdentifier;
1828
+ guardrailVersion?: GuardrailVersion;
1752
1829
  blockedInputMessaging?: BlockedInputMessaging;
1753
1830
  blockedOutputsMessaging?: BlockedOutputsMessaging;
1754
1831
  topicPolicyConfig?: TopicPolicy;
@@ -1761,87 +1838,33 @@ export interface GuardJSON {
1761
1838
  * Topics to identify and block.
1762
1839
  */
1763
1840
  export interface TopicPolicy {
1764
- topicsConfig?: Topic[];
1765
- }
1766
- /**
1767
- * A topic to block.
1768
- */
1769
- export interface Topic {
1770
- name?: string;
1771
- definition?: string;
1772
- examples?: string[];
1773
- type?: 'DENY';
1841
+ topicsConfig: Topic;
1774
1842
  }
1775
1843
  /**
1776
1844
  * Types of content to filter and strength configuration.
1777
1845
  */
1778
1846
  export interface ContentPolicy {
1779
- filtersConfig?: Filter[];
1780
- }
1781
- /**
1782
- * Types of content to filter.
1783
- */
1784
- export interface Filter {
1785
- type?: 'HATE' | 'INSULTS' | 'MICONDUCT' | 'PROMPT_ATTACK' | 'SEXUAL' | 'VIOLENCE';
1786
- inputStrength?: GuardrailFilterStrength;
1787
- outputStrength?: GuardrailFilterStrength;
1788
- inputModalities?: GuardrailModality[];
1789
- outputModalities?: GuardrailModality[];
1847
+ filtersConfig: Filter;
1790
1848
  }
1791
1849
  /**
1792
- * Specific words to identify and block. The managedWordListsConfig is solely used for blocking profanity.
1850
+ * Specific words to identify and block.
1793
1851
  */
1794
1852
  export interface WordPolicy {
1795
- wordsConfig?: WordList[];
1796
- managedWordListsConfig?: ManagedWords[];
1797
- }
1798
- /**
1799
- * Specific words to block.
1800
- */
1801
- export interface WordList {
1802
- text?: string;
1803
- }
1804
- /**
1805
- * Managed word list to block. This is solely used for blocking profanity.
1806
- */
1807
- export interface ManagedWords {
1808
- type?: 'PROFANITY';
1853
+ wordsConfig?: WordList;
1854
+ managedWordListsConfig?: ManagedWordList;
1809
1855
  }
1810
1856
  /**
1811
1857
  * Filter out and block or obscure sensitive information. Matching text will be handled per the policy.
1812
1858
  */
1813
1859
  export interface SensitiveInformationPolicy {
1814
- piiEntitiesConfig?: PIIEntity[];
1815
- regexesConfig?: RegularExpression[];
1816
- }
1817
- /**
1818
- * PII entity to infer from the text.
1819
- */
1820
- export interface PIIEntity {
1821
- type?: 'ADDRESS' | 'AGE' | 'AWS_ACCESS_KEY' | 'AWS_SECRET_KEY' | 'CA_HEALTH_NUMBER' | 'CA_SOCIAL_INSURANCE_NUMBER' | 'CREDIT_DEBIT_CARD_CVV' | 'CREDIT_DEBIT_CARD_EXPIRY' | 'CREDIT_DEBIT_CARD_NUMBER' | 'DRIVER_ID' | 'EMAIL' | 'INTERNATIONAL_BANK_ACCOUNT_NUMBER' | 'IP_ADDRESS' | 'LICENSE_PLATE' | 'MAC_ADDRESS' | 'NAME' | 'PASSWORD' | 'PHONE' | 'PIN' | 'SWIFT_CODE' | 'UK_NATIONAL_HEALTH_SERVICE_NUMBER' | 'UK_NATIONAL_INSURANCE_NUMBER' | 'UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER' | 'URL' | 'USERNAME' | 'US_BANK_ACCOUNT_NUMBER' | 'US_BANK_ROUTING_NUMBER' | 'US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER' | 'US_PASSPORT_NUMBER' | 'US_SOCIAL_SECURITY_NUMBER' | 'VEHICLE_IDENTIFICATION_NUMBER';
1822
- action?: GuardrailSensitiveInformationAction;
1823
- }
1824
- /**
1825
- * A regular expression to match sensitive information.
1826
- */
1827
- export interface RegularExpression {
1828
- name?: string;
1829
- description?: string;
1830
- pattern?: string;
1831
- action?: GuardrailSensitiveInformationAction;
1860
+ piiEntitiesConfig?: PIIEntity;
1861
+ regexesConfig?: RegularExpression;
1832
1862
  }
1833
1863
  /**
1834
1864
  * Provides evaluations based on grounding text supplied by your in-context agent variables. Off-topic conversations can then be blocked.
1835
1865
  */
1836
1866
  export interface ContextualGroundingPolicy {
1837
- filtersConfig?: Filter1[];
1838
- }
1839
- /**
1840
- * Filter to evaluate grounding text.
1841
- */
1842
- export interface Filter1 {
1843
- type?: Type;
1844
- threshold?: Threshold;
1867
+ filtersConfig: Filter1;
1845
1868
  }
1846
1869
  /**
1847
1870
  * This interface was referenced by `ProjectSchemaJSON`'s JSON-Schema
@@ -306,7 +306,7 @@ export type StopSequencesV3_48_01 = string[];
306
306
  * The seed (integer) to use for random sampling. If set and supported by the model, calls will generate deterministic results.
307
307
  */
308
308
  export type SeedV3_48_01 = number;
309
- export type AgentGuardListV3_48_0 = AgentGuardV3_48_0[];
309
+ export type GuardIDV3_48_0 = string;
310
310
  /**
311
311
  * The human-readable name of the Guard.
312
312
  */
@@ -315,6 +315,14 @@ export type NameV3_48_0 = string;
315
315
  * A description of the Guard.
316
316
  */
317
317
  export type DescriptionV3_48_0 = string;
318
+ /**
319
+ * The remote id of the Guardrail.
320
+ */
321
+ export type GuardrailIdentifierV3_48_0 = string;
322
+ /**
323
+ * The remote version of the Guardrail.
324
+ */
325
+ export type GuardrailVersionV3_48_0 = string;
318
326
  /**
319
327
  * A message to return when the input message is blocked by the Guard.
320
328
  */
@@ -323,17 +331,84 @@ export type BlockedInputMessagingV3_48_0 = string;
323
331
  * A message to return when the output message is blocked by the Guard.
324
332
  */
325
333
  export type BlockedOutputsMessagingV3_48_0 = string;
326
- export type GuardrailFilterStrengthV3_48_0 = 'NONE' | 'HIGH' | 'LOW' | 'MEDIUM';
334
+ export type ExampleV3_48_0 = string;
335
+ /**
336
+ * A topic to block.
337
+ */
338
+ export type TopicV3_48_0 = {
339
+ name: string;
340
+ definition: string;
341
+ /**
342
+ * Examples of the topic that can hint the LLM.
343
+ */
344
+ examples?: ExampleV3_48_0[];
345
+ type: 'DENY';
346
+ }[];
347
+ export type InputStrengthV3_48_0 = 'NONE' | 'LOW' | 'MEDIUM' | 'HIGH';
348
+ export type OutputStrengthV3_48_0 = 'NONE' | 'LOW' | 'MEDIUM' | 'HIGH';
327
349
  export type GuardrailModalityV3_48_0 = 'TEXT' | 'IMAGE';
350
+ /**
351
+ * Whether to filter images or text
352
+ */
353
+ export type InputModalitiesV3_48_0 = GuardrailModalityV3_48_0[];
354
+ /**
355
+ * Whether to filter images or text
356
+ */
357
+ export type OutputModalitiesV3_48_0 = GuardrailModalityV3_48_0[];
358
+ /**
359
+ * Types of content to filter.
360
+ */
361
+ export type FilterV3_48_0 = {
362
+ type: 'HATE' | 'INSULTS' | 'MICONDUCT' | 'PROMPT_ATTACK' | 'SEXUAL' | 'VIOLENCE';
363
+ inputStrength: InputStrengthV3_48_0;
364
+ outputStrength: OutputStrengthV3_48_0;
365
+ inputModalities?: InputModalitiesV3_48_0;
366
+ outputModalities?: OutputModalitiesV3_48_0;
367
+ }[];
368
+ /**
369
+ * Specific words to block.
370
+ */
371
+ export type WordListV3_48_0 = {
372
+ text: string;
373
+ }[];
374
+ /**
375
+ * This is solely used for blocking profanity.
376
+ */
377
+ export type ManagedWordListV3_48_0 = {
378
+ type: 'PROFANITY';
379
+ }[];
328
380
  export type GuardrailSensitiveInformationActionV3_48_0 = 'ANONYMIZE' | 'BLOCK';
381
+ /**
382
+ * PII entity to infer from the text.
383
+ */
384
+ export type PIIEntityV3_48_0 = {
385
+ type: 'ADDRESS' | 'AGE' | 'AWS_ACCESS_KEY' | 'AWS_SECRET_KEY' | 'CA_HEALTH_NUMBER' | 'CA_SOCIAL_INSURANCE_NUMBER' | 'CREDIT_DEBIT_CARD_CVV' | 'CREDIT_DEBIT_CARD_EXPIRY' | 'CREDIT_DEBIT_CARD_NUMBER' | 'DRIVER_ID' | 'EMAIL' | 'INTERNATIONAL_BANK_ACCOUNT_NUMBER' | 'IP_ADDRESS' | 'LICENSE_PLATE' | 'MAC_ADDRESS' | 'NAME' | 'PASSWORD' | 'PHONE' | 'PIN' | 'SWIFT_CODE' | 'UK_NATIONAL_HEALTH_SERVICE_NUMBER' | 'UK_NATIONAL_INSURANCE_NUMBER' | 'UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER' | 'URL' | 'USERNAME' | 'US_BANK_ACCOUNT_NUMBER' | 'US_BANK_ROUTING_NUMBER' | 'US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER' | 'US_PASSPORT_NUMBER' | 'US_SOCIAL_SECURITY_NUMBER' | 'VEHICLE_IDENTIFICATION_NUMBER';
386
+ action: GuardrailSensitiveInformationActionV3_48_0;
387
+ }[];
388
+ /**
389
+ * A regular expression to match sensitive information.
390
+ */
391
+ export type RegularExpressionV3_48_0 = {
392
+ name: string;
393
+ description?: string;
394
+ pattern: string;
395
+ action: GuardrailSensitiveInformationActionV3_48_0;
396
+ }[];
329
397
  /**
330
398
  * The type of filter.
331
399
  */
332
400
  export type TypeV3_48_0 = 'GROUNDING' | 'RELEVANCE';
333
401
  /**
334
- * The threshold for the filter as a floating point value between 0.0 - 1.0.
402
+ * The threshold for the filter as a floating point value greater than 0.0 and less than 1.0.
335
403
  */
336
404
  export type ThresholdV3_48_0 = number;
405
+ /**
406
+ * Filter to evaluate grounding text.
407
+ */
408
+ export type FilterV3_48_01 = {
409
+ type: TypeV3_48_0;
410
+ threshold: ThresholdV3_48_0;
411
+ }[];
337
412
  /**
338
413
  * Human-readable id for use in the UI
339
414
  */
@@ -1500,7 +1575,7 @@ export interface AgentJSONV3_48_0 {
1500
1575
  api: AgentAPIV3_48_0;
1501
1576
  start: AgentStartV3_48_0;
1502
1577
  states: AgentStatesV3_48_0;
1503
- guards?: AgentGuardListV3_48_0;
1578
+ guards?: AgentGuardV3_48_0[];
1504
1579
  }
1505
1580
  export interface AgentAPIChatV3_48_0 {
1506
1581
  type: 'chat';
@@ -1683,7 +1758,7 @@ export interface AgentExecutionChatV3_48_0 {
1683
1758
  options?: AgentGenerateOptionsV3_48_0;
1684
1759
  }
1685
1760
  export interface AgentGuardV3_48_0 {
1686
- guardId: string;
1761
+ guardId: GuardIDV3_48_0;
1687
1762
  }
1688
1763
  export interface GuardMapV3_48_0 {
1689
1764
  [k: string]: GuardJSONV3_48_0;
@@ -1697,6 +1772,8 @@ export interface GuardMapV3_48_0 {
1697
1772
  export interface GuardJSONV3_48_0 {
1698
1773
  name: NameV3_48_0;
1699
1774
  description?: DescriptionV3_48_0;
1775
+ guardrailIdentifier?: GuardrailIdentifierV3_48_0;
1776
+ guardrailVersion?: GuardrailVersionV3_48_0;
1700
1777
  blockedInputMessaging?: BlockedInputMessagingV3_48_0;
1701
1778
  blockedOutputsMessaging?: BlockedOutputsMessagingV3_48_0;
1702
1779
  topicPolicyConfig?: TopicPolicyV3_48_0;
@@ -1709,87 +1786,33 @@ export interface GuardJSONV3_48_0 {
1709
1786
  * Topics to identify and block.
1710
1787
  */
1711
1788
  export interface TopicPolicyV3_48_0 {
1712
- topicsConfig?: TopicV3_48_0[];
1713
- }
1714
- /**
1715
- * A topic to block.
1716
- */
1717
- export interface TopicV3_48_0 {
1718
- name?: string;
1719
- definition?: string;
1720
- examples?: string[];
1721
- type?: 'DENY';
1789
+ topicsConfig: TopicV3_48_0;
1722
1790
  }
1723
1791
  /**
1724
1792
  * Types of content to filter and strength configuration.
1725
1793
  */
1726
1794
  export interface ContentPolicyV3_48_0 {
1727
- filtersConfig?: FilterV3_48_0[];
1728
- }
1729
- /**
1730
- * Types of content to filter.
1731
- */
1732
- export interface FilterV3_48_0 {
1733
- type?: 'HATE' | 'INSULTS' | 'MICONDUCT' | 'PROMPT_ATTACK' | 'SEXUAL' | 'VIOLENCE';
1734
- inputStrength?: GuardrailFilterStrengthV3_48_0;
1735
- outputStrength?: GuardrailFilterStrengthV3_48_0;
1736
- inputModalities?: GuardrailModalityV3_48_0[];
1737
- outputModalities?: GuardrailModalityV3_48_0[];
1795
+ filtersConfig: FilterV3_48_0;
1738
1796
  }
1739
1797
  /**
1740
- * Specific words to identify and block. The managedWordListsConfig is solely used for blocking profanity.
1798
+ * Specific words to identify and block.
1741
1799
  */
1742
1800
  export interface WordPolicyV3_48_0 {
1743
- wordsConfig?: WordListV3_48_0[];
1744
- managedWordListsConfig?: ManagedWordsV3_48_0[];
1745
- }
1746
- /**
1747
- * Specific words to block.
1748
- */
1749
- export interface WordListV3_48_0 {
1750
- text?: string;
1751
- }
1752
- /**
1753
- * Managed word list to block. This is solely used for blocking profanity.
1754
- */
1755
- export interface ManagedWordsV3_48_0 {
1756
- type?: 'PROFANITY';
1801
+ wordsConfig?: WordListV3_48_0;
1802
+ managedWordListsConfig?: ManagedWordListV3_48_0;
1757
1803
  }
1758
1804
  /**
1759
1805
  * Filter out and block or obscure sensitive information. Matching text will be handled per the policy.
1760
1806
  */
1761
1807
  export interface SensitiveInformationPolicyV3_48_0 {
1762
- piiEntitiesConfig?: PIIEntityV3_48_0[];
1763
- regexesConfig?: RegularExpressionV3_48_0[];
1764
- }
1765
- /**
1766
- * PII entity to infer from the text.
1767
- */
1768
- export interface PIIEntityV3_48_0 {
1769
- type?: 'ADDRESS' | 'AGE' | 'AWS_ACCESS_KEY' | 'AWS_SECRET_KEY' | 'CA_HEALTH_NUMBER' | 'CA_SOCIAL_INSURANCE_NUMBER' | 'CREDIT_DEBIT_CARD_CVV' | 'CREDIT_DEBIT_CARD_EXPIRY' | 'CREDIT_DEBIT_CARD_NUMBER' | 'DRIVER_ID' | 'EMAIL' | 'INTERNATIONAL_BANK_ACCOUNT_NUMBER' | 'IP_ADDRESS' | 'LICENSE_PLATE' | 'MAC_ADDRESS' | 'NAME' | 'PASSWORD' | 'PHONE' | 'PIN' | 'SWIFT_CODE' | 'UK_NATIONAL_HEALTH_SERVICE_NUMBER' | 'UK_NATIONAL_INSURANCE_NUMBER' | 'UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER' | 'URL' | 'USERNAME' | 'US_BANK_ACCOUNT_NUMBER' | 'US_BANK_ROUTING_NUMBER' | 'US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER' | 'US_PASSPORT_NUMBER' | 'US_SOCIAL_SECURITY_NUMBER' | 'VEHICLE_IDENTIFICATION_NUMBER';
1770
- action?: GuardrailSensitiveInformationActionV3_48_0;
1771
- }
1772
- /**
1773
- * A regular expression to match sensitive information.
1774
- */
1775
- export interface RegularExpressionV3_48_0 {
1776
- name?: string;
1777
- description?: string;
1778
- pattern?: string;
1779
- action?: GuardrailSensitiveInformationActionV3_48_0;
1808
+ piiEntitiesConfig?: PIIEntityV3_48_0;
1809
+ regexesConfig?: RegularExpressionV3_48_0;
1780
1810
  }
1781
1811
  /**
1782
1812
  * Provides evaluations based on grounding text supplied by your in-context agent variables. Off-topic conversations can then be blocked.
1783
1813
  */
1784
1814
  export interface ContextualGroundingPolicyV3_48_0 {
1785
- filtersConfig?: FilterV3_48_01[];
1786
- }
1787
- /**
1788
- * Filter to evaluate grounding text.
1789
- */
1790
- export interface FilterV3_48_01 {
1791
- type?: TypeV3_48_0;
1792
- threshold?: ThresholdV3_48_0;
1815
+ filtersConfig: FilterV3_48_01;
1793
1816
  }
1794
1817
  /**
1795
1818
  * This interface was referenced by `ProjectSchemaJSONV3_48_0`'s JSON-Schema
@@ -306,7 +306,7 @@ export type StopSequencesV3_49_01 = string[];
306
306
  * The seed (integer) to use for random sampling. If set and supported by the model, calls will generate deterministic results.
307
307
  */
308
308
  export type SeedV3_49_01 = number;
309
- export type AgentGuardListV3_49_0 = AgentGuardV3_49_0[];
309
+ export type GuardIDV3_49_0 = string;
310
310
  /**
311
311
  * The human-readable name of the Guard.
312
312
  */
@@ -315,6 +315,14 @@ export type NameV3_49_0 = string;
315
315
  * A description of the Guard.
316
316
  */
317
317
  export type DescriptionV3_49_0 = string;
318
+ /**
319
+ * The remote id of the Guardrail.
320
+ */
321
+ export type GuardrailIdentifierV3_49_0 = string;
322
+ /**
323
+ * The remote version of the Guardrail.
324
+ */
325
+ export type GuardrailVersionV3_49_0 = string;
318
326
  /**
319
327
  * A message to return when the input message is blocked by the Guard.
320
328
  */
@@ -323,17 +331,84 @@ export type BlockedInputMessagingV3_49_0 = string;
323
331
  * A message to return when the output message is blocked by the Guard.
324
332
  */
325
333
  export type BlockedOutputsMessagingV3_49_0 = string;
326
- export type GuardrailFilterStrengthV3_49_0 = 'NONE' | 'HIGH' | 'LOW' | 'MEDIUM';
334
+ export type ExampleV3_49_0 = string;
335
+ /**
336
+ * A topic to block.
337
+ */
338
+ export type TopicV3_49_0 = {
339
+ name: string;
340
+ definition: string;
341
+ /**
342
+ * Examples of the topic that can hint the LLM.
343
+ */
344
+ examples?: ExampleV3_49_0[];
345
+ type: 'DENY';
346
+ }[];
347
+ export type InputStrengthV3_49_0 = 'NONE' | 'LOW' | 'MEDIUM' | 'HIGH';
348
+ export type OutputStrengthV3_49_0 = 'NONE' | 'LOW' | 'MEDIUM' | 'HIGH';
327
349
  export type GuardrailModalityV3_49_0 = 'TEXT' | 'IMAGE';
350
+ /**
351
+ * Whether to filter images or text
352
+ */
353
+ export type InputModalitiesV3_49_0 = GuardrailModalityV3_49_0[];
354
+ /**
355
+ * Whether to filter images or text
356
+ */
357
+ export type OutputModalitiesV3_49_0 = GuardrailModalityV3_49_0[];
358
+ /**
359
+ * Types of content to filter.
360
+ */
361
+ export type FilterV3_49_0 = {
362
+ type: 'HATE' | 'INSULTS' | 'MICONDUCT' | 'PROMPT_ATTACK' | 'SEXUAL' | 'VIOLENCE';
363
+ inputStrength: InputStrengthV3_49_0;
364
+ outputStrength: OutputStrengthV3_49_0;
365
+ inputModalities?: InputModalitiesV3_49_0;
366
+ outputModalities?: OutputModalitiesV3_49_0;
367
+ }[];
368
+ /**
369
+ * Specific words to block.
370
+ */
371
+ export type WordListV3_49_0 = {
372
+ text: string;
373
+ }[];
374
+ /**
375
+ * This is solely used for blocking profanity.
376
+ */
377
+ export type ManagedWordListV3_49_0 = {
378
+ type: 'PROFANITY';
379
+ }[];
328
380
  export type GuardrailSensitiveInformationActionV3_49_0 = 'ANONYMIZE' | 'BLOCK';
381
+ /**
382
+ * PII entity to infer from the text.
383
+ */
384
+ export type PIIEntityV3_49_0 = {
385
+ type: 'ADDRESS' | 'AGE' | 'AWS_ACCESS_KEY' | 'AWS_SECRET_KEY' | 'CA_HEALTH_NUMBER' | 'CA_SOCIAL_INSURANCE_NUMBER' | 'CREDIT_DEBIT_CARD_CVV' | 'CREDIT_DEBIT_CARD_EXPIRY' | 'CREDIT_DEBIT_CARD_NUMBER' | 'DRIVER_ID' | 'EMAIL' | 'INTERNATIONAL_BANK_ACCOUNT_NUMBER' | 'IP_ADDRESS' | 'LICENSE_PLATE' | 'MAC_ADDRESS' | 'NAME' | 'PASSWORD' | 'PHONE' | 'PIN' | 'SWIFT_CODE' | 'UK_NATIONAL_HEALTH_SERVICE_NUMBER' | 'UK_NATIONAL_INSURANCE_NUMBER' | 'UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER' | 'URL' | 'USERNAME' | 'US_BANK_ACCOUNT_NUMBER' | 'US_BANK_ROUTING_NUMBER' | 'US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER' | 'US_PASSPORT_NUMBER' | 'US_SOCIAL_SECURITY_NUMBER' | 'VEHICLE_IDENTIFICATION_NUMBER';
386
+ action: GuardrailSensitiveInformationActionV3_49_0;
387
+ }[];
388
+ /**
389
+ * A regular expression to match sensitive information.
390
+ */
391
+ export type RegularExpressionV3_49_0 = {
392
+ name: string;
393
+ description?: string;
394
+ pattern: string;
395
+ action: GuardrailSensitiveInformationActionV3_49_0;
396
+ }[];
329
397
  /**
330
398
  * The type of filter.
331
399
  */
332
400
  export type TypeV3_49_0 = 'GROUNDING' | 'RELEVANCE';
333
401
  /**
334
- * The threshold for the filter as a floating point value between 0.0 - 1.0.
402
+ * The threshold for the filter as a floating point value greater than 0.0 and less than 1.0.
335
403
  */
336
404
  export type ThresholdV3_49_0 = number;
405
+ /**
406
+ * Filter to evaluate grounding text.
407
+ */
408
+ export type FilterV3_49_01 = {
409
+ type: TypeV3_49_0;
410
+ threshold: ThresholdV3_49_0;
411
+ }[];
337
412
  /**
338
413
  * Human-readable id for use in the UI
339
414
  */
@@ -1500,7 +1575,7 @@ export interface AgentJSONV3_49_0 {
1500
1575
  api: AgentAPIV3_49_0;
1501
1576
  start: AgentStartV3_49_0;
1502
1577
  states: AgentStatesV3_49_0;
1503
- guards?: AgentGuardListV3_49_0;
1578
+ guards?: AgentGuardV3_49_0[];
1504
1579
  }
1505
1580
  export interface AgentAPIChatV3_49_0 {
1506
1581
  type: 'chat';
@@ -1683,7 +1758,7 @@ export interface AgentExecutionChatV3_49_0 {
1683
1758
  options?: AgentGenerateOptionsV3_49_0;
1684
1759
  }
1685
1760
  export interface AgentGuardV3_49_0 {
1686
- guardId: string;
1761
+ guardId: GuardIDV3_49_0;
1687
1762
  }
1688
1763
  export interface GuardMapV3_49_0 {
1689
1764
  [k: string]: GuardJSONV3_49_0;
@@ -1697,6 +1772,8 @@ export interface GuardMapV3_49_0 {
1697
1772
  export interface GuardJSONV3_49_0 {
1698
1773
  name: NameV3_49_0;
1699
1774
  description?: DescriptionV3_49_0;
1775
+ guardrailIdentifier?: GuardrailIdentifierV3_49_0;
1776
+ guardrailVersion?: GuardrailVersionV3_49_0;
1700
1777
  blockedInputMessaging?: BlockedInputMessagingV3_49_0;
1701
1778
  blockedOutputsMessaging?: BlockedOutputsMessagingV3_49_0;
1702
1779
  topicPolicyConfig?: TopicPolicyV3_49_0;
@@ -1709,87 +1786,33 @@ export interface GuardJSONV3_49_0 {
1709
1786
  * Topics to identify and block.
1710
1787
  */
1711
1788
  export interface TopicPolicyV3_49_0 {
1712
- topicsConfig?: TopicV3_49_0[];
1713
- }
1714
- /**
1715
- * A topic to block.
1716
- */
1717
- export interface TopicV3_49_0 {
1718
- name?: string;
1719
- definition?: string;
1720
- examples?: string[];
1721
- type?: 'DENY';
1789
+ topicsConfig: TopicV3_49_0;
1722
1790
  }
1723
1791
  /**
1724
1792
  * Types of content to filter and strength configuration.
1725
1793
  */
1726
1794
  export interface ContentPolicyV3_49_0 {
1727
- filtersConfig?: FilterV3_49_0[];
1728
- }
1729
- /**
1730
- * Types of content to filter.
1731
- */
1732
- export interface FilterV3_49_0 {
1733
- type?: 'HATE' | 'INSULTS' | 'MICONDUCT' | 'PROMPT_ATTACK' | 'SEXUAL' | 'VIOLENCE';
1734
- inputStrength?: GuardrailFilterStrengthV3_49_0;
1735
- outputStrength?: GuardrailFilterStrengthV3_49_0;
1736
- inputModalities?: GuardrailModalityV3_49_0[];
1737
- outputModalities?: GuardrailModalityV3_49_0[];
1795
+ filtersConfig: FilterV3_49_0;
1738
1796
  }
1739
1797
  /**
1740
- * Specific words to identify and block. The managedWordListsConfig is solely used for blocking profanity.
1798
+ * Specific words to identify and block.
1741
1799
  */
1742
1800
  export interface WordPolicyV3_49_0 {
1743
- wordsConfig?: WordListV3_49_0[];
1744
- managedWordListsConfig?: ManagedWordsV3_49_0[];
1745
- }
1746
- /**
1747
- * Specific words to block.
1748
- */
1749
- export interface WordListV3_49_0 {
1750
- text?: string;
1751
- }
1752
- /**
1753
- * Managed word list to block. This is solely used for blocking profanity.
1754
- */
1755
- export interface ManagedWordsV3_49_0 {
1756
- type?: 'PROFANITY';
1801
+ wordsConfig?: WordListV3_49_0;
1802
+ managedWordListsConfig?: ManagedWordListV3_49_0;
1757
1803
  }
1758
1804
  /**
1759
1805
  * Filter out and block or obscure sensitive information. Matching text will be handled per the policy.
1760
1806
  */
1761
1807
  export interface SensitiveInformationPolicyV3_49_0 {
1762
- piiEntitiesConfig?: PIIEntityV3_49_0[];
1763
- regexesConfig?: RegularExpressionV3_49_0[];
1764
- }
1765
- /**
1766
- * PII entity to infer from the text.
1767
- */
1768
- export interface PIIEntityV3_49_0 {
1769
- type?: 'ADDRESS' | 'AGE' | 'AWS_ACCESS_KEY' | 'AWS_SECRET_KEY' | 'CA_HEALTH_NUMBER' | 'CA_SOCIAL_INSURANCE_NUMBER' | 'CREDIT_DEBIT_CARD_CVV' | 'CREDIT_DEBIT_CARD_EXPIRY' | 'CREDIT_DEBIT_CARD_NUMBER' | 'DRIVER_ID' | 'EMAIL' | 'INTERNATIONAL_BANK_ACCOUNT_NUMBER' | 'IP_ADDRESS' | 'LICENSE_PLATE' | 'MAC_ADDRESS' | 'NAME' | 'PASSWORD' | 'PHONE' | 'PIN' | 'SWIFT_CODE' | 'UK_NATIONAL_HEALTH_SERVICE_NUMBER' | 'UK_NATIONAL_INSURANCE_NUMBER' | 'UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER' | 'URL' | 'USERNAME' | 'US_BANK_ACCOUNT_NUMBER' | 'US_BANK_ROUTING_NUMBER' | 'US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER' | 'US_PASSPORT_NUMBER' | 'US_SOCIAL_SECURITY_NUMBER' | 'VEHICLE_IDENTIFICATION_NUMBER';
1770
- action?: GuardrailSensitiveInformationActionV3_49_0;
1771
- }
1772
- /**
1773
- * A regular expression to match sensitive information.
1774
- */
1775
- export interface RegularExpressionV3_49_0 {
1776
- name?: string;
1777
- description?: string;
1778
- pattern?: string;
1779
- action?: GuardrailSensitiveInformationActionV3_49_0;
1808
+ piiEntitiesConfig?: PIIEntityV3_49_0;
1809
+ regexesConfig?: RegularExpressionV3_49_0;
1780
1810
  }
1781
1811
  /**
1782
1812
  * Provides evaluations based on grounding text supplied by your in-context agent variables. Off-topic conversations can then be blocked.
1783
1813
  */
1784
1814
  export interface ContextualGroundingPolicyV3_49_0 {
1785
- filtersConfig?: FilterV3_49_01[];
1786
- }
1787
- /**
1788
- * Filter to evaluate grounding text.
1789
- */
1790
- export interface FilterV3_49_01 {
1791
- type?: TypeV3_49_0;
1792
- threshold?: ThresholdV3_49_0;
1815
+ filtersConfig: FilterV3_49_01;
1793
1816
  }
1794
1817
  /**
1795
1818
  * This interface was referenced by `ProjectSchemaJSONV3_49_0`'s JSON-Schema