|
22 | 22 |
|
23 | 23 | import httpx |
24 | 24 |
|
25 | | -from ..types import interaction_get_params, interaction_create_params |
| 25 | +from ..types import ( |
| 26 | + interaction_get_params, |
| 27 | + interaction_create_params, |
| 28 | +) |
26 | 29 | from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given |
27 | 30 | from .._utils import required_args, maybe_transform, async_maybe_transform |
28 | 31 | from .._compat import cached_property |
|
48 | 51 | from ..types.webhook_config_param import WebhookConfigParam |
49 | 52 | from ..types.interaction_sse_event import InteractionSSEEvent |
50 | 53 | from ..types.generation_config_param import GenerationConfigParam |
| 54 | +from ..types.model_armor_config_param import ModelArmorConfigParam |
51 | 55 |
|
52 | 56 | __all__ = ["InteractionsResource", "AsyncInteractionsResource"] |
53 | 57 |
|
@@ -81,6 +85,7 @@ def create( |
81 | 85 | model: ModelParam, |
82 | 86 | background: bool | Omit = omit, |
83 | 87 | generation_config: GenerationConfigParam | Omit = omit, |
| 88 | + model_armor_config: ModelArmorConfigParam | Omit = omit, |
84 | 89 | previous_interaction_id: str | Omit = omit, |
85 | 90 | response_format: interaction_create_params.ResponseFormat | Omit = omit, |
86 | 91 | response_mime_type: str | Omit = omit, |
@@ -110,6 +115,8 @@ def create( |
110 | 115 |
|
111 | 116 | generation_config: Input only. Configuration parameters for the model interaction. |
112 | 117 |
|
| 118 | + model_armor_config: Settings for prompt and response sanitization using the Model Armor service. |
| 119 | +
|
113 | 120 | previous_interaction_id: The ID of the previous interaction, if any. |
114 | 121 |
|
115 | 122 | response_format: Enforces that the generated response is a JSON object that complies with the |
@@ -152,6 +159,7 @@ def create( |
152 | 159 | stream: Literal[True], |
153 | 160 | background: bool | Omit = omit, |
154 | 161 | generation_config: GenerationConfigParam | Omit = omit, |
| 162 | + model_armor_config: ModelArmorConfigParam | Omit = omit, |
155 | 163 | previous_interaction_id: str | Omit = omit, |
156 | 164 | response_format: interaction_create_params.ResponseFormat | Omit = omit, |
157 | 165 | response_mime_type: str | Omit = omit, |
@@ -182,6 +190,8 @@ def create( |
182 | 190 |
|
183 | 191 | generation_config: Input only. Configuration parameters for the model interaction. |
184 | 192 |
|
| 193 | + model_armor_config: Settings for prompt and response sanitization using the Model Armor service. |
| 194 | +
|
185 | 195 | previous_interaction_id: The ID of the previous interaction, if any. |
186 | 196 |
|
187 | 197 | response_format: Enforces that the generated response is a JSON object that complies with the |
@@ -228,6 +238,7 @@ def create( |
228 | 238 | input: interaction_create_params.Input, |
229 | 239 | agent_config: interaction_create_params.AgentConfig | Omit = omit, |
230 | 240 | background: bool | Omit = omit, |
| 241 | + model_armor_config: ModelArmorConfigParam | Omit = omit, |
231 | 242 | previous_interaction_id: str | Omit = omit, |
232 | 243 | response_format: interaction_create_params.ResponseFormat | Omit = omit, |
233 | 244 | response_mime_type: str | Omit = omit, |
@@ -257,6 +268,8 @@ def create( |
257 | 268 |
|
258 | 269 | background: Input only. Whether to run the model interaction in the background. |
259 | 270 |
|
| 271 | + model_armor_config: Settings for prompt and response sanitization using the Model Armor service. |
| 272 | +
|
260 | 273 | previous_interaction_id: The ID of the previous interaction, if any. |
261 | 274 |
|
262 | 275 | response_format: Enforces that the generated response is a JSON object that complies with the |
@@ -306,6 +319,7 @@ def create( |
306 | 319 | stream: Literal[True], |
307 | 320 | agent_config: interaction_create_params.AgentConfig | Omit = omit, |
308 | 321 | background: bool | Omit = omit, |
| 322 | + model_armor_config: ModelArmorConfigParam | Omit = omit, |
309 | 323 | previous_interaction_id: str | Omit = omit, |
310 | 324 | response_format: interaction_create_params.ResponseFormat | Omit = omit, |
311 | 325 | response_mime_type: str | Omit = omit, |
@@ -336,6 +350,8 @@ def create( |
336 | 350 |
|
337 | 351 | background: Input only. Whether to run the model interaction in the background. |
338 | 352 |
|
| 353 | + model_armor_config: Settings for prompt and response sanitization using the Model Armor service. |
| 354 | +
|
339 | 355 | previous_interaction_id: The ID of the previous interaction, if any. |
340 | 356 |
|
341 | 357 | response_format: Enforces that the generated response is a JSON object that complies with the |
@@ -376,6 +392,7 @@ def create( |
376 | 392 | stream: bool, |
377 | 393 | background: bool | Omit = omit, |
378 | 394 | generation_config: GenerationConfigParam | Omit = omit, |
| 395 | + model_armor_config: ModelArmorConfigParam | Omit = omit, |
379 | 396 | previous_interaction_id: str | Omit = omit, |
380 | 397 | response_format: interaction_create_params.ResponseFormat | Omit = omit, |
381 | 398 | response_mime_type: str | Omit = omit, |
@@ -406,6 +423,8 @@ def create( |
406 | 423 |
|
407 | 424 | generation_config: Input only. Configuration parameters for the model interaction. |
408 | 425 |
|
| 426 | + model_armor_config: Settings for prompt and response sanitization using the Model Armor service. |
| 427 | +
|
409 | 428 | previous_interaction_id: The ID of the previous interaction, if any. |
410 | 429 |
|
411 | 430 | response_format: Enforces that the generated response is a JSON object that complies with the |
@@ -445,6 +464,7 @@ def create( |
445 | 464 | model: ModelParam | Omit = omit, |
446 | 465 | background: bool | Omit = omit, |
447 | 466 | generation_config: GenerationConfigParam | Omit = omit, |
| 467 | + model_armor_config: ModelArmorConfigParam | Omit = omit, |
448 | 468 | previous_interaction_id: str | Omit = omit, |
449 | 469 | response_format: interaction_create_params.ResponseFormat | Omit = omit, |
450 | 470 | response_mime_type: str | Omit = omit, |
@@ -499,6 +519,7 @@ def create( |
499 | 519 | "model": model, |
500 | 520 | "background": background, |
501 | 521 | "generation_config": generation_config, |
| 522 | + "model_armor_config": model_armor_config, |
502 | 523 | "previous_interaction_id": previous_interaction_id, |
503 | 524 | "response_format": response_format, |
504 | 525 | "response_mime_type": response_mime_type, |
@@ -799,6 +820,7 @@ async def create( |
799 | 820 | model: ModelParam, |
800 | 821 | background: bool | Omit = omit, |
801 | 822 | generation_config: GenerationConfigParam | Omit = omit, |
| 823 | + model_armor_config: ModelArmorConfigParam | Omit = omit, |
802 | 824 | previous_interaction_id: str | Omit = omit, |
803 | 825 | response_format: interaction_create_params.ResponseFormat | Omit = omit, |
804 | 826 | response_mime_type: str | Omit = omit, |
@@ -828,6 +850,8 @@ async def create( |
828 | 850 |
|
829 | 851 | generation_config: Input only. Configuration parameters for the model interaction. |
830 | 852 |
|
| 853 | + model_armor_config: Settings for prompt and response sanitization using the Model Armor service. |
| 854 | +
|
831 | 855 | previous_interaction_id: The ID of the previous interaction, if any. |
832 | 856 |
|
833 | 857 | response_format: Enforces that the generated response is a JSON object that complies with the |
@@ -870,6 +894,7 @@ async def create( |
870 | 894 | stream: Literal[True], |
871 | 895 | background: bool | Omit = omit, |
872 | 896 | generation_config: GenerationConfigParam | Omit = omit, |
| 897 | + model_armor_config: ModelArmorConfigParam | Omit = omit, |
873 | 898 | previous_interaction_id: str | Omit = omit, |
874 | 899 | response_format: interaction_create_params.ResponseFormat | Omit = omit, |
875 | 900 | response_mime_type: str | Omit = omit, |
@@ -900,6 +925,8 @@ async def create( |
900 | 925 |
|
901 | 926 | generation_config: Input only. Configuration parameters for the model interaction. |
902 | 927 |
|
| 928 | + model_armor_config: Settings for prompt and response sanitization using the Model Armor service. |
| 929 | +
|
903 | 930 | previous_interaction_id: The ID of the previous interaction, if any. |
904 | 931 |
|
905 | 932 | response_format: Enforces that the generated response is a JSON object that complies with the |
@@ -946,6 +973,7 @@ async def create( |
946 | 973 | input: interaction_create_params.Input, |
947 | 974 | agent_config: interaction_create_params.AgentConfig | Omit = omit, |
948 | 975 | background: bool | Omit = omit, |
| 976 | + model_armor_config: ModelArmorConfigParam | Omit = omit, |
949 | 977 | previous_interaction_id: str | Omit = omit, |
950 | 978 | response_format: interaction_create_params.ResponseFormat | Omit = omit, |
951 | 979 | response_mime_type: str | Omit = omit, |
@@ -975,6 +1003,8 @@ async def create( |
975 | 1003 |
|
976 | 1004 | background: Input only. Whether to run the model interaction in the background. |
977 | 1005 |
|
| 1006 | + model_armor_config: Settings for prompt and response sanitization using the Model Armor service. |
| 1007 | +
|
978 | 1008 | previous_interaction_id: The ID of the previous interaction, if any. |
979 | 1009 |
|
980 | 1010 | response_format: Enforces that the generated response is a JSON object that complies with the |
@@ -1024,6 +1054,7 @@ async def create( |
1024 | 1054 | stream: Literal[True], |
1025 | 1055 | agent_config: interaction_create_params.AgentConfig | Omit = omit, |
1026 | 1056 | background: bool | Omit = omit, |
| 1057 | + model_armor_config: ModelArmorConfigParam | Omit = omit, |
1027 | 1058 | previous_interaction_id: str | Omit = omit, |
1028 | 1059 | response_format: interaction_create_params.ResponseFormat | Omit = omit, |
1029 | 1060 | response_mime_type: str | Omit = omit, |
@@ -1054,6 +1085,8 @@ async def create( |
1054 | 1085 |
|
1055 | 1086 | background: Input only. Whether to run the model interaction in the background. |
1056 | 1087 |
|
| 1088 | + model_armor_config: Settings for prompt and response sanitization using the Model Armor service. |
| 1089 | +
|
1057 | 1090 | previous_interaction_id: The ID of the previous interaction, if any. |
1058 | 1091 |
|
1059 | 1092 | response_format: Enforces that the generated response is a JSON object that complies with the |
@@ -1094,6 +1127,7 @@ async def create( |
1094 | 1127 | stream: bool, |
1095 | 1128 | background: bool | Omit = omit, |
1096 | 1129 | generation_config: GenerationConfigParam | Omit = omit, |
| 1130 | + model_armor_config: ModelArmorConfigParam | Omit = omit, |
1097 | 1131 | previous_interaction_id: str | Omit = omit, |
1098 | 1132 | response_format: interaction_create_params.ResponseFormat | Omit = omit, |
1099 | 1133 | response_mime_type: str | Omit = omit, |
@@ -1124,6 +1158,8 @@ async def create( |
1124 | 1158 |
|
1125 | 1159 | generation_config: Input only. Configuration parameters for the model interaction. |
1126 | 1160 |
|
| 1161 | + model_armor_config: Settings for prompt and response sanitization using the Model Armor service. |
| 1162 | +
|
1127 | 1163 | previous_interaction_id: The ID of the previous interaction, if any. |
1128 | 1164 |
|
1129 | 1165 | response_format: Enforces that the generated response is a JSON object that complies with the |
@@ -1163,6 +1199,7 @@ async def create( |
1163 | 1199 | model: ModelParam | Omit = omit, |
1164 | 1200 | background: bool | Omit = omit, |
1165 | 1201 | generation_config: GenerationConfigParam | Omit = omit, |
| 1202 | + model_armor_config: ModelArmorConfigParam | Omit = omit, |
1166 | 1203 | previous_interaction_id: str | Omit = omit, |
1167 | 1204 | response_format: interaction_create_params.ResponseFormat | Omit = omit, |
1168 | 1205 | response_mime_type: str | Omit = omit, |
@@ -1213,6 +1250,7 @@ async def create( |
1213 | 1250 | "model": model, |
1214 | 1251 | "background": background, |
1215 | 1252 | "generation_config": generation_config, |
| 1253 | + "model_armor_config": model_armor_config, |
1216 | 1254 | "previous_interaction_id": previous_interaction_id, |
1217 | 1255 | "response_format": response_format, |
1218 | 1256 | "response_mime_type": response_mime_type, |
|
0 commit comments