oci 2.150.0__py3-none-any.whl → 2.150.2__py3-none-any.whl

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.
Files changed (322) hide show
  1. oci/access_governance_cp/access_governance_cp_client.py +8 -8
  2. oci/adm/application_dependency_management_client.py +36 -36
  3. oci/ai_anomaly_detection/anomaly_detection_client.py +36 -36
  4. oci/ai_document/ai_service_document_client.py +26 -26
  5. oci/ai_language/ai_service_language_client.py +44 -44
  6. oci/ai_speech/ai_service_speech_client.py +19 -19
  7. oci/ai_vision/ai_service_vision_client.py +28 -28
  8. oci/analytics/analytics_client.py +24 -24
  9. oci/announcements_service/announcement_client.py +5 -5
  10. oci/announcements_service/announcement_subscription_client.py +9 -9
  11. oci/announcements_service/announcements_preferences_client.py +4 -4
  12. oci/announcements_service/service_client.py +1 -1
  13. oci/apigateway/api_gateway_client.py +21 -21
  14. oci/apigateway/deployment_client.py +6 -6
  15. oci/apigateway/gateway_client.py +6 -6
  16. oci/apigateway/subscribers_client.py +6 -6
  17. oci/apigateway/usage_plans_client.py +6 -6
  18. oci/apigateway/work_requests_client.py +5 -5
  19. oci/apm_config/config_client.py +12 -12
  20. oci/apm_control_plane/apm_domain_client.py +14 -14
  21. oci/apm_synthetics/apm_synthetic_client.py +28 -28
  22. oci/apm_traces/attributes_client.py +8 -8
  23. oci/apm_traces/query_client.py +2 -2
  24. oci/apm_traces/trace_client.py +4 -4
  25. oci/appmgmt_control/appmgmt_control_client.py +8 -8
  26. oci/artifacts/artifacts_client.py +32 -32
  27. oci/audit/audit_client.py +3 -3
  28. oci/autoscaling/auto_scaling_client.py +11 -11
  29. oci/bastion/bastion_client.py +15 -15
  30. oci/bds/bds_client.py +84 -84
  31. oci/blockchain/blockchain_platform_client.py +27 -27
  32. oci/budget/budget_client.py +10 -10
  33. oci/capacity_management/capacity_management_client.py +32 -32
  34. oci/certificates/certificates_client.py +5 -5
  35. oci/certificates_management/certificates_management_client.py +32 -32
  36. oci/cims/incident_client.py +6 -6
  37. oci/cloud_bridge/common_client.py +5 -5
  38. oci/cloud_bridge/discovery_client.py +15 -15
  39. oci/cloud_bridge/inventory_client.py +16 -16
  40. oci/cloud_bridge/ocb_agent_svc_client.py +23 -23
  41. oci/cloud_guard/cloud_guard_client.py +155 -155
  42. oci/cloud_migrations/migration_client.py +43 -43
  43. oci/cluster_placement_groups/cluster_placement_groups_cp_client.py +13 -13
  44. oci/compute_cloud_at_customer/compute_cloud_at_customer_client.py +12 -12
  45. oci/compute_instance_agent/compute_instance_agent_client.py +6 -6
  46. oci/compute_instance_agent/plugin_client.py +2 -2
  47. oci/compute_instance_agent/pluginconfig_client.py +1 -1
  48. oci/container_engine/container_engine_client.py +282 -45
  49. oci/container_engine/container_engine_client_composite_operations.py +90 -0
  50. oci/container_engine/models/__init__.py +10 -0
  51. oci/container_engine/models/cluster_node.py +101 -0
  52. oci/container_engine/models/image.py +132 -0
  53. oci/container_engine/models/node_eviction_node_pool_settings.py +33 -2
  54. oci/container_engine/models/node_eviction_settings.py +103 -0
  55. oci/container_engine/models/node_pool_cycling_details.py +35 -4
  56. oci/container_engine/models/reboot_cluster_node_details.py +66 -0
  57. oci/container_engine/models/replace_boot_volume_cluster_node_details.py +66 -0
  58. oci/container_engine/models/work_request.py +11 -3
  59. oci/container_engine/models/work_request_summary.py +11 -3
  60. oci/container_instances/container_instance_client.py +18 -18
  61. oci/core/blockstorage_client.py +60 -60
  62. oci/core/compute_client.py +117 -117
  63. oci/core/compute_management_client.py +32 -32
  64. oci/core/models/create_volume_details.py +33 -2
  65. oci/core/models/instance_configuration_create_volume_details.py +33 -2
  66. oci/core/models/update_volume_details.py +33 -2
  67. oci/core/models/volume.py +33 -2
  68. oci/core/virtual_network_client.py +258 -258
  69. oci/dashboard_service/dashboard_client.py +6 -6
  70. oci/dashboard_service/dashboard_group_client.py +6 -6
  71. oci/data_catalog/data_catalog_client.py +149 -149
  72. oci/data_flow/data_flow_client.py +45 -45
  73. oci/data_integration/data_integration_client.py +163 -163
  74. oci/data_labeling_service/data_labeling_management_client.py +17 -17
  75. oci/data_labeling_service_dataplane/data_labeling_client.py +15 -15
  76. oci/data_safe/data_safe_client.py +317 -317
  77. oci/data_science/data_science_client.py +145 -145
  78. oci/database/database_client.py +414 -414
  79. oci/database/models/autonomous_container_database.py +31 -0
  80. oci/database/models/autonomous_container_database_summary.py +31 -0
  81. oci/database/models/create_autonomous_container_database_details.py +31 -0
  82. oci/database/models/update_autonomous_container_database_details.py +31 -0
  83. oci/database_management/db_management_client.py +228 -228
  84. oci/database_management/diagnosability_client.py +4 -4
  85. oci/database_management/managed_my_sql_databases_client.py +9 -9
  86. oci/database_management/perfhub_client.py +1 -1
  87. oci/database_management/sql_tuning_client.py +17 -17
  88. oci/database_migration/database_migration_client.py +42 -42
  89. oci/database_tools/database_tools_client.py +23 -23
  90. oci/dblm/db_life_cycle_management_client.py +345 -12
  91. oci/dblm/models/__init__.py +22 -0
  92. oci/dblm/models/additional_patches.py +179 -0
  93. oci/dblm/models/databases_summary.py +670 -0
  94. oci/dblm/models/dblm_patch_management.py +410 -0
  95. oci/dblm/models/fpp_server.py +604 -0
  96. oci/dblm/models/image_details.py +338 -0
  97. oci/dblm/models/images_patch_recommendation_summary.py +132 -0
  98. oci/dblm/models/patch_activity_details.py +394 -0
  99. oci/dblm/models/patch_compliance_details.py +121 -0
  100. oci/dblm/models/patch_databases_collection.py +70 -0
  101. oci/dblm/models/patch_operations_summary.py +194 -0
  102. oci/dblm/models/resource_info.py +33 -2
  103. oci/dblm/models/resources_patch_compliance_summary.py +194 -0
  104. oci/dblm/models/vulnerabilities_summary.py +10 -10
  105. oci/delegate_access_control/delegate_access_control_client.py +26 -26
  106. oci/delegate_access_control/work_request_client.py +4 -4
  107. oci/demand_signal/occ_demand_signal_client.py +7 -7
  108. oci/desktops/desktop_service_client.py +21 -21
  109. oci/devops/devops_client.py +141 -141
  110. oci/disaster_recovery/disaster_recovery_client.py +31 -31
  111. oci/dns/dns_client.py +54 -54
  112. oci/dts/appliance_export_job_client.py +6 -6
  113. oci/dts/shipping_vendors_client.py +1 -1
  114. oci/dts/transfer_appliance_client.py +8 -8
  115. oci/dts/transfer_appliance_entitlement_client.py +3 -3
  116. oci/dts/transfer_device_client.py +5 -5
  117. oci/dts/transfer_job_client.py +6 -6
  118. oci/dts/transfer_package_client.py +7 -7
  119. oci/em_warehouse/em_warehouse_client.py +13 -13
  120. oci/email/email_client.py +31 -31
  121. oci/email_data_plane/email_dp_client.py +1 -1
  122. oci/events/events_client.py +6 -6
  123. oci/file_storage/file_storage_client.py +74 -74
  124. oci/fips.py +58 -36
  125. oci/fleet_apps_management/fleet_apps_management_admin_client.py +25 -25
  126. oci/fleet_apps_management/fleet_apps_management_client.py +35 -35
  127. oci/fleet_apps_management/fleet_apps_management_maintenance_window_client.py +5 -5
  128. oci/fleet_apps_management/fleet_apps_management_operations_client.py +26 -26
  129. oci/fleet_apps_management/fleet_apps_management_runbooks_client.py +12 -12
  130. oci/fleet_software_update/fleet_software_update_client.py +46 -46
  131. oci/functions/functions_invoke_client.py +1 -1
  132. oci/functions/functions_management_client.py +16 -16
  133. oci/fusion_apps/fusion_applications_client.py +41 -41
  134. oci/generative_ai/generative_ai_client.py +22 -22
  135. oci/generative_ai_agent/generative_ai_agent_client.py +38 -38
  136. oci/generative_ai_agent_runtime/generative_ai_agent_runtime_client.py +6 -6
  137. oci/generative_ai_inference/generative_ai_inference_client.py +102 -5
  138. oci/generative_ai_inference/models/__init__.py +26 -0
  139. oci/generative_ai_inference/models/apply_guardrails_details.py +124 -0
  140. oci/generative_ai_inference/models/apply_guardrails_result.py +66 -0
  141. oci/generative_ai_inference/models/assistant_message.py +3 -0
  142. oci/generative_ai_inference/models/category_score.py +101 -0
  143. oci/generative_ai_inference/models/cohere_chat_request.py +53 -2
  144. oci/generative_ai_inference/models/content_moderation_configuration.py +70 -0
  145. oci/generative_ai_inference/models/content_moderation_result.py +70 -0
  146. oci/generative_ai_inference/models/guardrail_configs.py +120 -0
  147. oci/generative_ai_inference/models/guardrails_input.py +99 -0
  148. oci/generative_ai_inference/models/guardrails_results.py +124 -0
  149. oci/generative_ai_inference/models/guardrails_text_input.py +111 -0
  150. oci/generative_ai_inference/models/personally_identifiable_information_configuration.py +70 -0
  151. oci/generative_ai_inference/models/personally_identifiable_information_result.py +194 -0
  152. oci/generative_ai_inference/models/prompt_injection_configuration.py +39 -0
  153. oci/generative_ai_inference/models/prompt_injection_protection_result.py +70 -0
  154. oci/generic_artifacts_content/generic_artifacts_content_client.py +3 -3
  155. oci/globally_distributed_database/sharded_database_service_client.py +30 -30
  156. oci/golden_gate/golden_gate_client.py +89 -89
  157. oci/governance_rules_control_plane/governance_rule_client.py +15 -15
  158. oci/governance_rules_control_plane/work_request_client.py +5 -5
  159. oci/healthchecks/health_checks_client.py +17 -17
  160. oci/identity/identity_client.py +145 -145
  161. oci/identity_data_plane/dataplane_client.py +2 -2
  162. oci/identity_domains/identity_domains_client.py +311 -311
  163. oci/integration/integration_instance_client.py +19 -19
  164. oci/jms/java_management_service_client.py +79 -79
  165. oci/jms_java_downloads/java_download_client.py +25 -25
  166. oci/key_management/ekm_client.py +5 -5
  167. oci/key_management/kms_crypto_client.py +6 -6
  168. oci/key_management/kms_hsm_cluster_client.py +12 -12
  169. oci/key_management/kms_management_client.py +21 -21
  170. oci/key_management/kms_vault_client.py +14 -14
  171. oci/license_manager/license_manager_client.py +18 -18
  172. oci/limits/limits_client.py +4 -4
  173. oci/limits/quotas_client.py +7 -7
  174. oci/load_balancer/load_balancer_client.py +61 -61
  175. oci/lockbox/lockbox_client.py +24 -24
  176. oci/log_analytics/log_analytics_client.py +193 -193
  177. oci/logging/logging_management_client.py +30 -30
  178. oci/loggingingestion/logging_client.py +1 -1
  179. oci/loggingsearch/log_search_client.py +1 -1
  180. oci/lustre_file_storage/lustre_file_storage_client.py +22 -22
  181. oci/management_agent/management_agent_client.py +28 -28
  182. oci/management_dashboard/dashx_apis_client.py +14 -14
  183. oci/marketplace/account_client.py +2 -2
  184. oci/marketplace/marketplace_client.py +30 -30
  185. oci/marketplace_private_offer/attachment_client.py +5 -5
  186. oci/marketplace_private_offer/offer_client.py +6 -6
  187. oci/marketplace_publisher/attachment_client.py +5 -5
  188. oci/marketplace_publisher/marketplace_publisher_client.py +71 -71
  189. oci/marketplace_publisher/offer_client.py +6 -6
  190. oci/media_services/media_services_client.py +60 -60
  191. oci/media_services/media_stream_client.py +2 -2
  192. oci/mngdmac/mac_device_client.py +3 -3
  193. oci/mngdmac/mac_order_client.py +11 -11
  194. oci/monitoring/monitoring_client.py +18 -18
  195. oci/mysql/channels_client.py +7 -7
  196. oci/mysql/db_backups_client.py +7 -7
  197. oci/mysql/db_system_client.py +17 -17
  198. oci/mysql/mysqlaas_client.py +7 -7
  199. oci/mysql/replicas_client.py +5 -5
  200. oci/mysql/work_requests_client.py +4 -4
  201. oci/network_firewall/network_firewall_client.py +86 -86
  202. oci/network_load_balancer/network_load_balancer_client.py +35 -35
  203. oci/nosql/nosql_client.py +24 -24
  204. oci/object_storage/object_storage_client.py +55 -55
  205. oci/oce/oce_instance_client.py +10 -10
  206. oci/oci_control_center/occ_metrics_client.py +3 -3
  207. oci/ocvp/cluster_client.py +5 -5
  208. oci/ocvp/esxi_host_client.py +8 -8
  209. oci/ocvp/sddc_client.py +14 -14
  210. oci/ocvp/work_request_client.py +4 -4
  211. oci/oda/management_client.py +59 -59
  212. oci/oda/oda_client.py +17 -17
  213. oci/oda/odapackage_client.py +7 -7
  214. oci/onesubscription/billing_schedule_client.py +1 -1
  215. oci/onesubscription/commitment_client.py +2 -2
  216. oci/onesubscription/computed_usage_client.py +3 -3
  217. oci/onesubscription/invoice_summary_client.py +2 -2
  218. oci/onesubscription/organization_subscription_client.py +1 -1
  219. oci/onesubscription/ratecard_client.py +1 -1
  220. oci/onesubscription/subscribed_service_client.py +2 -2
  221. oci/onesubscription/subscription_client.py +1 -1
  222. oci/ons/notification_control_plane_client.py +6 -6
  223. oci/ons/notification_data_plane_client.py +10 -10
  224. oci/opa/opa_instance_client.py +13 -13
  225. oci/opensearch/opensearch_cluster_backup_client.py +4 -4
  226. oci/opensearch/opensearch_cluster_client.py +16 -16
  227. oci/opensearch/opensearch_cluster_pipeline_client.py +5 -5
  228. oci/operator_access_control/access_requests_client.py +10 -10
  229. oci/operator_access_control/operator_actions_client.py +2 -2
  230. oci/operator_access_control/operator_control_assignment_client.py +8 -8
  231. oci/operator_access_control/operator_control_client.py +6 -6
  232. oci/opsi/operations_insights_client.py +181 -181
  233. oci/optimizer/optimizer_client.py +26 -26
  234. oci/os_management/event_client.py +8 -8
  235. oci/os_management/os_management_client.py +69 -69
  236. oci/os_management_hub/event_client.py +8 -8
  237. oci/os_management_hub/lifecycle_environment_client.py +13 -13
  238. oci/os_management_hub/managed_instance_client.py +33 -33
  239. oci/os_management_hub/managed_instance_group_client.py +26 -26
  240. oci/os_management_hub/management_station_client.py +10 -10
  241. oci/os_management_hub/onboarding_client.py +13 -13
  242. oci/os_management_hub/reporting_managed_instance_client.py +3 -3
  243. oci/os_management_hub/scheduled_job_client.py +7 -7
  244. oci/os_management_hub/software_source_client.py +33 -33
  245. oci/os_management_hub/work_request_client.py +5 -5
  246. oci/osp_gateway/address_rule_service_client.py +1 -1
  247. oci/osp_gateway/address_service_client.py +2 -2
  248. oci/osp_gateway/invoice_service_client.py +5 -5
  249. oci/osp_gateway/subscription_service_client.py +5 -5
  250. oci/osub_billing_schedule/billing_schedule_client.py +1 -1
  251. oci/osub_organization_subscription/organization_subscription_client.py +1 -1
  252. oci/osub_subscription/commitment_client.py +2 -2
  253. oci/osub_subscription/ratecard_client.py +1 -1
  254. oci/osub_subscription/subscription_client.py +1 -1
  255. oci/osub_usage/computed_usage_client.py +3 -3
  256. oci/psql/postgresql_client.py +34 -34
  257. oci/queue/queue_admin_client.py +11 -11
  258. oci/queue/queue_client.py +8 -8
  259. oci/recovery/database_recovery_client.py +26 -26
  260. oci/redis/redis_cluster_client.py +12 -12
  261. oci/regions_definitions.py +9 -0
  262. oci/resource_manager/resource_manager_client.py +52 -52
  263. oci/resource_scheduler/schedule_client.py +13 -13
  264. oci/resource_search/resource_search_client.py +3 -3
  265. oci/rover/rover_bundle_client.py +8 -8
  266. oci/rover/rover_cluster_client.py +8 -8
  267. oci/rover/rover_entitlement_client.py +6 -6
  268. oci/rover/rover_node_client.py +15 -15
  269. oci/rover/shape_client.py +1 -1
  270. oci/rover/work_requests_client.py +5 -5
  271. oci/sch/connector_plugins_client.py +2 -2
  272. oci/sch/service_connector_client.py +12 -12
  273. oci/secrets/secrets_client.py +3 -3
  274. oci/security_attribute/security_attribute_client.py +18 -18
  275. oci/service_catalog/service_catalog_client.py +26 -26
  276. oci/service_manager_proxy/service_manager_proxy_client.py +2 -2
  277. oci/service_mesh/service_mesh_client.py +48 -48
  278. oci/stack_monitoring/stack_monitoring_client.py +87 -87
  279. oci/streaming/stream_admin_client.py +18 -18
  280. oci/streaming/stream_client.py +8 -8
  281. oci/tenant_manager_control_plane/domain_client.py +5 -5
  282. oci/tenant_manager_control_plane/domain_governance_client.py +5 -5
  283. oci/tenant_manager_control_plane/governance_client.py +2 -2
  284. oci/tenant_manager_control_plane/link_client.py +3 -3
  285. oci/tenant_manager_control_plane/orders_client.py +2 -2
  286. oci/tenant_manager_control_plane/organization_client.py +10 -10
  287. oci/tenant_manager_control_plane/recipient_invitation_client.py +5 -5
  288. oci/tenant_manager_control_plane/sender_invitation_client.py +5 -5
  289. oci/tenant_manager_control_plane/subscription_client.py +11 -11
  290. oci/tenant_manager_control_plane/work_request_client.py +4 -4
  291. oci/threat_intelligence/threatintel_client.py +5 -5
  292. oci/usage/resources_client.py +2 -2
  293. oci/usage/rewards_client.py +6 -6
  294. oci/usage/usagelimits_client.py +1 -1
  295. oci/usage_api/usageapi_client.py +33 -33
  296. oci/vault/vaults_client.py +13 -13
  297. oci/vbs_inst/vbs_instance_client.py +10 -10
  298. oci/version.py +1 -1
  299. oci/visual_builder/models/__init__.py +6 -0
  300. oci/visual_builder/models/network_endpoint_details.py +11 -3
  301. oci/visual_builder/models/private_endpoint_details.py +1 -1
  302. oci/visual_builder/models/public_endpoint_details.py +113 -0
  303. oci/visual_builder/models/update_network_endpoint_details.py +11 -3
  304. oci/visual_builder/models/update_private_endpoint_details.py +1 -1
  305. oci/visual_builder/models/update_public_endpoint_details.py +113 -0
  306. oci/visual_builder/models/virtual_cloud_network.py +103 -0
  307. oci/visual_builder/vb_instance_client.py +14 -14
  308. oci/vn_monitoring/vn_monitoring_client.py +12 -12
  309. oci/vulnerability_scanning/vulnerability_scanning_client.py +58 -58
  310. oci/waa/waa_client.py +13 -13
  311. oci/waa/work_request_client.py +4 -4
  312. oci/waas/redirect_client.py +6 -6
  313. oci/waas/waas_client.py +66 -66
  314. oci/waf/waf_client.py +24 -24
  315. oci/work_requests/work_request_client.py +4 -4
  316. oci/zpr/zpr_client.py +15 -15
  317. {oci-2.150.0.dist-info → oci-2.150.2.dist-info}/METADATA +1 -1
  318. {oci-2.150.0.dist-info → oci-2.150.2.dist-info}/RECORD +322 -290
  319. {oci-2.150.0.dist-info → oci-2.150.2.dist-info}/LICENSE.txt +0 -0
  320. {oci-2.150.0.dist-info → oci-2.150.2.dist-info}/THIRD_PARTY_LICENSES.txt +0 -0
  321. {oci-2.150.0.dist-info → oci-2.150.2.dist-info}/WHEEL +0 -0
  322. {oci-2.150.0.dist-info → oci-2.150.2.dist-info}/top_level.txt +0 -0
@@ -122,6 +122,103 @@ class GenerativeAiInferenceClient(object):
122
122
  self.retry_strategy = kwargs.get('retry_strategy')
123
123
  self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback')
124
124
 
125
+ def apply_guardrails(self, apply_guardrails_details, **kwargs):
126
+ """
127
+ Applies guardrails to the input text, including content moderation, PII detection, and prompt injection protection.
128
+
129
+
130
+ :param oci.generative_ai_inference.models.ApplyGuardrailsDetails apply_guardrails_details: (required)
131
+ Details for applying guardrails to the input text.
132
+
133
+ :param str opc_retry_token: (optional)
134
+ A token that uniquely identifies a request so it can be retried in case of a timeout or
135
+ server error without risk of executing that same action again. Retry tokens expire after 24
136
+ hours, but can be invalidated before that, in case of conflicting operations. For example, if a resource is deleted and purged from the system, then a retry of the original creation request
137
+ is rejected.
138
+
139
+ :param str opc_request_id: (optional)
140
+ The client request ID for tracing.
141
+
142
+ :param obj retry_strategy: (optional)
143
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
144
+
145
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
146
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
147
+
148
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
149
+
150
+ :param bool allow_control_chars: (optional)
151
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
152
+ By default, the response will not allow control characters in strings
153
+
154
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.generative_ai_inference.models.ApplyGuardrailsResult`
155
+ :rtype: :class:`~oci.response.Response`
156
+
157
+ :example:
158
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.150.2/generativeaiinference/apply_guardrails.py.html>`__ to see an example of how to use apply_guardrails API.
159
+ """
160
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
161
+ required_arguments = []
162
+ resource_path = "/actions/applyGuardrails"
163
+ method = "POST"
164
+ operation_name = "apply_guardrails"
165
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/generative-ai-inference/20231130/ApplyGuardrailsResult/ApplyGuardrails"
166
+
167
+ # Don't accept unknown kwargs
168
+ expected_kwargs = [
169
+ "allow_control_chars",
170
+ "retry_strategy",
171
+ "opc_retry_token",
172
+ "opc_request_id"
173
+ ]
174
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
175
+ if extra_kwargs:
176
+ raise ValueError(
177
+ f"apply_guardrails got unknown kwargs: {extra_kwargs!r}")
178
+
179
+ header_params = {
180
+ "accept": "application/json",
181
+ "content-type": "application/json",
182
+ "opc-retry-token": kwargs.get("opc_retry_token", missing),
183
+ "opc-request-id": kwargs.get("opc_request_id", missing)
184
+ }
185
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
186
+
187
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
188
+ operation_retry_strategy=kwargs.get('retry_strategy'),
189
+ client_retry_strategy=self.retry_strategy
190
+ )
191
+ if retry_strategy is None:
192
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
193
+
194
+ if retry_strategy:
195
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
196
+ self.base_client.add_opc_retry_token_if_needed(header_params)
197
+ self.base_client.add_opc_client_retries_header(header_params)
198
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
199
+ return retry_strategy.make_retrying_call(
200
+ self.base_client.call_api,
201
+ resource_path=resource_path,
202
+ method=method,
203
+ header_params=header_params,
204
+ body=apply_guardrails_details,
205
+ response_type="ApplyGuardrailsResult",
206
+ allow_control_chars=kwargs.get('allow_control_chars'),
207
+ operation_name=operation_name,
208
+ api_reference_link=api_reference_link,
209
+ required_arguments=required_arguments)
210
+ else:
211
+ return self.base_client.call_api(
212
+ resource_path=resource_path,
213
+ method=method,
214
+ header_params=header_params,
215
+ body=apply_guardrails_details,
216
+ response_type="ApplyGuardrailsResult",
217
+ allow_control_chars=kwargs.get('allow_control_chars'),
218
+ operation_name=operation_name,
219
+ api_reference_link=api_reference_link,
220
+ required_arguments=required_arguments)
221
+
125
222
  def chat(self, chat_details, **kwargs):
126
223
  """
127
224
  Creates a response for the given conversation.
@@ -155,7 +252,7 @@ class GenerativeAiInferenceClient(object):
155
252
  :rtype: :class:`~oci.response.Response`
156
253
 
157
254
  :example:
158
- Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.150.0/generativeaiinference/chat.py.html>`__ to see an example of how to use chat API.
255
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.150.2/generativeaiinference/chat.py.html>`__ to see an example of how to use chat API.
159
256
  """
160
257
  # Required path and query arguments. These are in camelCase to replace values in service endpoints.
161
258
  required_arguments = []
@@ -254,7 +351,7 @@ class GenerativeAiInferenceClient(object):
254
351
  :rtype: :class:`~oci.response.Response`
255
352
 
256
353
  :example:
257
- Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.150.0/generativeaiinference/embed_text.py.html>`__ to see an example of how to use embed_text API.
354
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.150.2/generativeaiinference/embed_text.py.html>`__ to see an example of how to use embed_text API.
258
355
  """
259
356
  # Required path and query arguments. These are in camelCase to replace values in service endpoints.
260
357
  required_arguments = []
@@ -351,7 +448,7 @@ class GenerativeAiInferenceClient(object):
351
448
  :rtype: :class:`~oci.response.Response`
352
449
 
353
450
  :example:
354
- Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.150.0/generativeaiinference/generate_text.py.html>`__ to see an example of how to use generate_text API.
451
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.150.2/generativeaiinference/generate_text.py.html>`__ to see an example of how to use generate_text API.
355
452
  """
356
453
  # Required path and query arguments. These are in camelCase to replace values in service endpoints.
357
454
  required_arguments = []
@@ -450,7 +547,7 @@ class GenerativeAiInferenceClient(object):
450
547
  :rtype: :class:`~oci.response.Response`
451
548
 
452
549
  :example:
453
- Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.150.0/generativeaiinference/rerank_text.py.html>`__ to see an example of how to use rerank_text API.
550
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.150.2/generativeaiinference/rerank_text.py.html>`__ to see an example of how to use rerank_text API.
454
551
  """
455
552
  # Required path and query arguments. These are in camelCase to replace values in service endpoints.
456
553
  required_arguments = []
@@ -547,7 +644,7 @@ class GenerativeAiInferenceClient(object):
547
644
  :rtype: :class:`~oci.response.Response`
548
645
 
549
646
  :example:
550
- Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.150.0/generativeaiinference/summarize_text.py.html>`__ to see an example of how to use summarize_text API.
647
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.150.2/generativeaiinference/summarize_text.py.html>`__ to see an example of how to use summarize_text API.
551
648
  """
552
649
  # Required path and query arguments. These are in camelCase to replace values in service endpoints.
553
650
  required_arguments = []
@@ -6,9 +6,12 @@
6
6
 
7
7
  from __future__ import absolute_import
8
8
 
9
+ from .apply_guardrails_details import ApplyGuardrailsDetails
10
+ from .apply_guardrails_result import ApplyGuardrailsResult
9
11
  from .assistant_message import AssistantMessage
10
12
  from .base_chat_request import BaseChatRequest
11
13
  from .base_chat_response import BaseChatResponse
14
+ from .category_score import CategoryScore
12
15
  from .chat_choice import ChatChoice
13
16
  from .chat_content import ChatContent
14
17
  from .chat_details import ChatDetails
@@ -31,6 +34,8 @@ from .cohere_tool_call import CohereToolCall
31
34
  from .cohere_tool_message import CohereToolMessage
32
35
  from .cohere_tool_result import CohereToolResult
33
36
  from .cohere_user_message import CohereUserMessage
37
+ from .content_moderation_configuration import ContentModerationConfiguration
38
+ from .content_moderation_result import ContentModerationResult
34
39
  from .dedicated_serving_mode import DedicatedServingMode
35
40
  from .document import Document
36
41
  from .document_rank import DocumentRank
@@ -43,6 +48,10 @@ from .generate_text_result import GenerateTextResult
43
48
  from .generated_text import GeneratedText
44
49
  from .generic_chat_request import GenericChatRequest
45
50
  from .generic_chat_response import GenericChatResponse
51
+ from .guardrail_configs import GuardrailConfigs
52
+ from .guardrails_input import GuardrailsInput
53
+ from .guardrails_results import GuardrailsResults
54
+ from .guardrails_text_input import GuardrailsTextInput
46
55
  from .image_content import ImageContent
47
56
  from .image_url import ImageUrl
48
57
  from .llama_llm_inference_request import LlamaLlmInferenceRequest
@@ -52,6 +61,10 @@ from .llm_inference_response import LlmInferenceResponse
52
61
  from .logprobs import Logprobs
53
62
  from .message import Message
54
63
  from .on_demand_serving_mode import OnDemandServingMode
64
+ from .personally_identifiable_information_configuration import PersonallyIdentifiableInformationConfiguration
65
+ from .personally_identifiable_information_result import PersonallyIdentifiableInformationResult
66
+ from .prompt_injection_configuration import PromptInjectionConfiguration
67
+ from .prompt_injection_protection_result import PromptInjectionProtectionResult
55
68
  from .rerank_text_details import RerankTextDetails
56
69
  from .rerank_text_result import RerankTextResult
57
70
  from .search_query import SearchQuery
@@ -73,9 +86,12 @@ from .user_message import UserMessage
73
86
 
74
87
  # Maps type names to classes for generative_ai_inference services.
75
88
  generative_ai_inference_type_mapping = {
89
+ "ApplyGuardrailsDetails": ApplyGuardrailsDetails,
90
+ "ApplyGuardrailsResult": ApplyGuardrailsResult,
76
91
  "AssistantMessage": AssistantMessage,
77
92
  "BaseChatRequest": BaseChatRequest,
78
93
  "BaseChatResponse": BaseChatResponse,
94
+ "CategoryScore": CategoryScore,
79
95
  "ChatChoice": ChatChoice,
80
96
  "ChatContent": ChatContent,
81
97
  "ChatDetails": ChatDetails,
@@ -98,6 +114,8 @@ generative_ai_inference_type_mapping = {
98
114
  "CohereToolMessage": CohereToolMessage,
99
115
  "CohereToolResult": CohereToolResult,
100
116
  "CohereUserMessage": CohereUserMessage,
117
+ "ContentModerationConfiguration": ContentModerationConfiguration,
118
+ "ContentModerationResult": ContentModerationResult,
101
119
  "DedicatedServingMode": DedicatedServingMode,
102
120
  "Document": Document,
103
121
  "DocumentRank": DocumentRank,
@@ -110,6 +128,10 @@ generative_ai_inference_type_mapping = {
110
128
  "GeneratedText": GeneratedText,
111
129
  "GenericChatRequest": GenericChatRequest,
112
130
  "GenericChatResponse": GenericChatResponse,
131
+ "GuardrailConfigs": GuardrailConfigs,
132
+ "GuardrailsInput": GuardrailsInput,
133
+ "GuardrailsResults": GuardrailsResults,
134
+ "GuardrailsTextInput": GuardrailsTextInput,
113
135
  "ImageContent": ImageContent,
114
136
  "ImageUrl": ImageUrl,
115
137
  "LlamaLlmInferenceRequest": LlamaLlmInferenceRequest,
@@ -119,6 +141,10 @@ generative_ai_inference_type_mapping = {
119
141
  "Logprobs": Logprobs,
120
142
  "Message": Message,
121
143
  "OnDemandServingMode": OnDemandServingMode,
144
+ "PersonallyIdentifiableInformationConfiguration": PersonallyIdentifiableInformationConfiguration,
145
+ "PersonallyIdentifiableInformationResult": PersonallyIdentifiableInformationResult,
146
+ "PromptInjectionConfiguration": PromptInjectionConfiguration,
147
+ "PromptInjectionProtectionResult": PromptInjectionProtectionResult,
122
148
  "RerankTextDetails": RerankTextDetails,
123
149
  "RerankTextResult": RerankTextResult,
124
150
  "SearchQuery": SearchQuery,
@@ -0,0 +1,124 @@
1
+ # coding: utf-8
2
+ # Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
3
+ # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4
+
5
+ # NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20231130
6
+
7
+
8
+ from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
9
+ from oci.decorators import init_model_state_from_kwargs
10
+
11
+
12
+ @init_model_state_from_kwargs
13
+ class ApplyGuardrailsDetails(object):
14
+ """
15
+ Details for applying guardrails to the input text.
16
+ """
17
+
18
+ def __init__(self, **kwargs):
19
+ """
20
+ Initializes a new ApplyGuardrailsDetails object with values from keyword arguments.
21
+ The following keyword arguments are supported (corresponding to the getters/setters of this class):
22
+
23
+ :param input:
24
+ The value to assign to the input property of this ApplyGuardrailsDetails.
25
+ :type input: oci.generative_ai_inference.models.GuardrailsInput
26
+
27
+ :param guardrail_configs:
28
+ The value to assign to the guardrail_configs property of this ApplyGuardrailsDetails.
29
+ :type guardrail_configs: oci.generative_ai_inference.models.GuardrailConfigs
30
+
31
+ :param compartment_id:
32
+ The value to assign to the compartment_id property of this ApplyGuardrailsDetails.
33
+ :type compartment_id: str
34
+
35
+ """
36
+ self.swagger_types = {
37
+ 'input': 'GuardrailsInput',
38
+ 'guardrail_configs': 'GuardrailConfigs',
39
+ 'compartment_id': 'str'
40
+ }
41
+ self.attribute_map = {
42
+ 'input': 'input',
43
+ 'guardrail_configs': 'guardrailConfigs',
44
+ 'compartment_id': 'compartmentId'
45
+ }
46
+ self._input = None
47
+ self._guardrail_configs = None
48
+ self._compartment_id = None
49
+
50
+ @property
51
+ def input(self):
52
+ """
53
+ **[Required]** Gets the input of this ApplyGuardrailsDetails.
54
+
55
+ :return: The input of this ApplyGuardrailsDetails.
56
+ :rtype: oci.generative_ai_inference.models.GuardrailsInput
57
+ """
58
+ return self._input
59
+
60
+ @input.setter
61
+ def input(self, input):
62
+ """
63
+ Sets the input of this ApplyGuardrailsDetails.
64
+
65
+ :param input: The input of this ApplyGuardrailsDetails.
66
+ :type: oci.generative_ai_inference.models.GuardrailsInput
67
+ """
68
+ self._input = input
69
+
70
+ @property
71
+ def guardrail_configs(self):
72
+ """
73
+ **[Required]** Gets the guardrail_configs of this ApplyGuardrailsDetails.
74
+
75
+ :return: The guardrail_configs of this ApplyGuardrailsDetails.
76
+ :rtype: oci.generative_ai_inference.models.GuardrailConfigs
77
+ """
78
+ return self._guardrail_configs
79
+
80
+ @guardrail_configs.setter
81
+ def guardrail_configs(self, guardrail_configs):
82
+ """
83
+ Sets the guardrail_configs of this ApplyGuardrailsDetails.
84
+
85
+ :param guardrail_configs: The guardrail_configs of this ApplyGuardrailsDetails.
86
+ :type: oci.generative_ai_inference.models.GuardrailConfigs
87
+ """
88
+ self._guardrail_configs = guardrail_configs
89
+
90
+ @property
91
+ def compartment_id(self):
92
+ """
93
+ **[Required]** Gets the compartment_id of this ApplyGuardrailsDetails.
94
+ The OCID of the compartment to apply guardrails.
95
+
96
+
97
+ :return: The compartment_id of this ApplyGuardrailsDetails.
98
+ :rtype: str
99
+ """
100
+ return self._compartment_id
101
+
102
+ @compartment_id.setter
103
+ def compartment_id(self, compartment_id):
104
+ """
105
+ Sets the compartment_id of this ApplyGuardrailsDetails.
106
+ The OCID of the compartment to apply guardrails.
107
+
108
+
109
+ :param compartment_id: The compartment_id of this ApplyGuardrailsDetails.
110
+ :type: str
111
+ """
112
+ self._compartment_id = compartment_id
113
+
114
+ def __repr__(self):
115
+ return formatted_flat_dict(self)
116
+
117
+ def __eq__(self, other):
118
+ if other is None:
119
+ return False
120
+
121
+ return self.__dict__ == other.__dict__
122
+
123
+ def __ne__(self, other):
124
+ return not self == other
@@ -0,0 +1,66 @@
1
+ # coding: utf-8
2
+ # Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
3
+ # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4
+
5
+ # NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20231130
6
+
7
+
8
+ from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
9
+ from oci.decorators import init_model_state_from_kwargs
10
+
11
+
12
+ @init_model_state_from_kwargs
13
+ class ApplyGuardrailsResult(object):
14
+ """
15
+ The result of applying guardrails to the input text.
16
+ """
17
+
18
+ def __init__(self, **kwargs):
19
+ """
20
+ Initializes a new ApplyGuardrailsResult object with values from keyword arguments.
21
+ The following keyword arguments are supported (corresponding to the getters/setters of this class):
22
+
23
+ :param results:
24
+ The value to assign to the results property of this ApplyGuardrailsResult.
25
+ :type results: oci.generative_ai_inference.models.GuardrailsResults
26
+
27
+ """
28
+ self.swagger_types = {
29
+ 'results': 'GuardrailsResults'
30
+ }
31
+ self.attribute_map = {
32
+ 'results': 'results'
33
+ }
34
+ self._results = None
35
+
36
+ @property
37
+ def results(self):
38
+ """
39
+ **[Required]** Gets the results of this ApplyGuardrailsResult.
40
+
41
+ :return: The results of this ApplyGuardrailsResult.
42
+ :rtype: oci.generative_ai_inference.models.GuardrailsResults
43
+ """
44
+ return self._results
45
+
46
+ @results.setter
47
+ def results(self, results):
48
+ """
49
+ Sets the results of this ApplyGuardrailsResult.
50
+
51
+ :param results: The results of this ApplyGuardrailsResult.
52
+ :type: oci.generative_ai_inference.models.GuardrailsResults
53
+ """
54
+ self._results = results
55
+
56
+ def __repr__(self):
57
+ return formatted_flat_dict(self)
58
+
59
+ def __eq__(self, other):
60
+ if other is None:
61
+ return False
62
+
63
+ return self.__dict__ == other.__dict__
64
+
65
+ def __ne__(self, other):
66
+ return not self == other
@@ -13,6 +13,9 @@ from oci.decorators import init_model_state_from_kwargs
13
13
  class AssistantMessage(Message):
14
14
  """
15
15
  Represents a single instance of assistant message.
16
+
17
+ Note: When responding to a tool call, set `content` to `null` (not `\"\"`).
18
+ This ensures the model correctly processes tool call messages in multi-step interactions.
16
19
  """
17
20
 
18
21
  def __init__(self, **kwargs):
@@ -0,0 +1,101 @@
1
+ # coding: utf-8
2
+ # Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
3
+ # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4
+
5
+ # NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20231130
6
+
7
+
8
+ from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
9
+ from oci.decorators import init_model_state_from_kwargs
10
+
11
+
12
+ @init_model_state_from_kwargs
13
+ class CategoryScore(object):
14
+ """
15
+ A category with its score.
16
+ """
17
+
18
+ def __init__(self, **kwargs):
19
+ """
20
+ Initializes a new CategoryScore object with values from keyword arguments.
21
+ The following keyword arguments are supported (corresponding to the getters/setters of this class):
22
+
23
+ :param name:
24
+ The value to assign to the name property of this CategoryScore.
25
+ :type name: str
26
+
27
+ :param score:
28
+ The value to assign to the score property of this CategoryScore.
29
+ :type score: float
30
+
31
+ """
32
+ self.swagger_types = {
33
+ 'name': 'str',
34
+ 'score': 'float'
35
+ }
36
+ self.attribute_map = {
37
+ 'name': 'name',
38
+ 'score': 'score'
39
+ }
40
+ self._name = None
41
+ self._score = None
42
+
43
+ @property
44
+ def name(self):
45
+ """
46
+ **[Required]** Gets the name of this CategoryScore.
47
+ The name of the category.
48
+
49
+
50
+ :return: The name of this CategoryScore.
51
+ :rtype: str
52
+ """
53
+ return self._name
54
+
55
+ @name.setter
56
+ def name(self, name):
57
+ """
58
+ Sets the name of this CategoryScore.
59
+ The name of the category.
60
+
61
+
62
+ :param name: The name of this CategoryScore.
63
+ :type: str
64
+ """
65
+ self._name = name
66
+
67
+ @property
68
+ def score(self):
69
+ """
70
+ **[Required]** Gets the score of this CategoryScore.
71
+ The score of the category.
72
+
73
+
74
+ :return: The score of this CategoryScore.
75
+ :rtype: float
76
+ """
77
+ return self._score
78
+
79
+ @score.setter
80
+ def score(self, score):
81
+ """
82
+ Sets the score of this CategoryScore.
83
+ The score of the category.
84
+
85
+
86
+ :param score: The score of this CategoryScore.
87
+ :type: float
88
+ """
89
+ self._score = score
90
+
91
+ def __repr__(self):
92
+ return formatted_flat_dict(self)
93
+
94
+ def __eq__(self, other):
95
+ if other is None:
96
+ return False
97
+
98
+ return self.__dict__ == other.__dict__
99
+
100
+ def __ne__(self, other):
101
+ return not self == other
@@ -31,6 +31,18 @@ class CohereChatRequest(BaseChatRequest):
31
31
  #: This constant has a value of "FAST"
32
32
  CITATION_QUALITY_FAST = "FAST"
33
33
 
34
+ #: A constant which can be used with the safety_mode property of a CohereChatRequest.
35
+ #: This constant has a value of "CONTEXTUAL"
36
+ SAFETY_MODE_CONTEXTUAL = "CONTEXTUAL"
37
+
38
+ #: A constant which can be used with the safety_mode property of a CohereChatRequest.
39
+ #: This constant has a value of "STRICT"
40
+ SAFETY_MODE_STRICT = "STRICT"
41
+
42
+ #: A constant which can be used with the safety_mode property of a CohereChatRequest.
43
+ #: This constant has a value of "OFF"
44
+ SAFETY_MODE_OFF = "OFF"
45
+
34
46
  def __init__(self, **kwargs):
35
47
  """
36
48
  Initializes a new CohereChatRequest object with values from keyword arguments. The default value of the :py:attr:`~oci.generative_ai_inference.models.CohereChatRequest.api_format` attribute
@@ -136,6 +148,11 @@ class CohereChatRequest(BaseChatRequest):
136
148
  Allowed values for this property are: "ACCURATE", "FAST"
137
149
  :type citation_quality: str
138
150
 
151
+ :param safety_mode:
152
+ The value to assign to the safety_mode property of this CohereChatRequest.
153
+ Allowed values for this property are: "CONTEXTUAL", "STRICT", "OFF"
154
+ :type safety_mode: str
155
+
139
156
  """
140
157
  self.swagger_types = {
141
158
  'api_format': 'str',
@@ -161,7 +178,8 @@ class CohereChatRequest(BaseChatRequest):
161
178
  'is_force_single_step': 'bool',
162
179
  'stop_sequences': 'list[str]',
163
180
  'is_raw_prompting': 'bool',
164
- 'citation_quality': 'str'
181
+ 'citation_quality': 'str',
182
+ 'safety_mode': 'str'
165
183
  }
166
184
  self.attribute_map = {
167
185
  'api_format': 'apiFormat',
@@ -187,7 +205,8 @@ class CohereChatRequest(BaseChatRequest):
187
205
  'is_force_single_step': 'isForceSingleStep',
188
206
  'stop_sequences': 'stopSequences',
189
207
  'is_raw_prompting': 'isRawPrompting',
190
- 'citation_quality': 'citationQuality'
208
+ 'citation_quality': 'citationQuality',
209
+ 'safety_mode': 'safetyMode'
191
210
  }
192
211
  self._api_format = None
193
212
  self._message = None
@@ -213,6 +232,7 @@ class CohereChatRequest(BaseChatRequest):
213
232
  self._stop_sequences = None
214
233
  self._is_raw_prompting = None
215
234
  self._citation_quality = None
235
+ self._safety_mode = None
216
236
  self._api_format = 'COHERE'
217
237
 
218
238
  @property
@@ -809,6 +829,37 @@ class CohereChatRequest(BaseChatRequest):
809
829
  )
810
830
  self._citation_quality = citation_quality
811
831
 
832
+ @property
833
+ def safety_mode(self):
834
+ """
835
+ Gets the safety_mode of this CohereChatRequest.
836
+ Used to select the safety instruction inserted into the prompt. When selected CONTEXTUAL mode, It is appropriate for wide-ranging interactions with fewer constraints on output while maintaining core protections by rejecting harmful or illegal suggestions. When selected STRICT mode, it aims to avoid all sensitive topics, such as violent or sexual acts and profanity. When selected OFF, the safety instruction will be omitted. Note: This parameter is only compatible with models Command R 08-2024, Command R+ 08-2024 and newer. Also, command-r7b-12-2024 only supports \"CONTEXTUAL\" and \"STRICT\" modes.
837
+
838
+ Allowed values for this property are: "CONTEXTUAL", "STRICT", "OFF"
839
+
840
+
841
+ :return: The safety_mode of this CohereChatRequest.
842
+ :rtype: str
843
+ """
844
+ return self._safety_mode
845
+
846
+ @safety_mode.setter
847
+ def safety_mode(self, safety_mode):
848
+ """
849
+ Sets the safety_mode of this CohereChatRequest.
850
+ Used to select the safety instruction inserted into the prompt. When selected CONTEXTUAL mode, It is appropriate for wide-ranging interactions with fewer constraints on output while maintaining core protections by rejecting harmful or illegal suggestions. When selected STRICT mode, it aims to avoid all sensitive topics, such as violent or sexual acts and profanity. When selected OFF, the safety instruction will be omitted. Note: This parameter is only compatible with models Command R 08-2024, Command R+ 08-2024 and newer. Also, command-r7b-12-2024 only supports \"CONTEXTUAL\" and \"STRICT\" modes.
851
+
852
+
853
+ :param safety_mode: The safety_mode of this CohereChatRequest.
854
+ :type: str
855
+ """
856
+ allowed_values = ["CONTEXTUAL", "STRICT", "OFF"]
857
+ if not value_allowed_none_or_none_sentinel(safety_mode, allowed_values):
858
+ raise ValueError(
859
+ f"Invalid value for `safety_mode`, must be None or one of {allowed_values}"
860
+ )
861
+ self._safety_mode = safety_mode
862
+
812
863
  def __repr__(self):
813
864
  return formatted_flat_dict(self)
814
865