|
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 |
|
41 | 44 | from ..types.webhook_config_param import WebhookConfigParam |
42 | 45 | from ..types.interaction_sse_event import InteractionSSEEvent |
43 | 46 | from ..types.generation_config_param import GenerationConfigParam |
| 47 | +from ..types.model_armor_config_param import ModelArmorConfigParam |
44 | 48 |
|
45 | 49 | __all__ = ["InteractionsResource", "AsyncInteractionsResource"] |
46 | 50 |
|
@@ -74,6 +78,7 @@ def create( |
74 | 78 | model: ModelParam, |
75 | 79 | background: bool | Omit = omit, |
76 | 80 | generation_config: GenerationConfigParam | Omit = omit, |
| 81 | + model_armor_config: ModelArmorConfigParam | Omit = omit, |
77 | 82 | previous_interaction_id: str | Omit = omit, |
78 | 83 | response_format: interaction_create_params.ResponseFormat | Omit = omit, |
79 | 84 | response_mime_type: str | Omit = omit, |
@@ -103,6 +108,8 @@ def create( |
103 | 108 |
|
104 | 109 | generation_config: Input only. Configuration parameters for the model interaction. |
105 | 110 |
|
| 111 | + model_armor_config: Settings for prompt and response sanitization using the Model Armor service. |
| 112 | +
|
106 | 113 | previous_interaction_id: The ID of the previous interaction, if any. |
107 | 114 |
|
108 | 115 | response_format: Enforces that the generated response is a JSON object that complies with the |
@@ -145,6 +152,7 @@ def create( |
145 | 152 | stream: Literal[True], |
146 | 153 | background: bool | Omit = omit, |
147 | 154 | generation_config: GenerationConfigParam | Omit = omit, |
| 155 | + model_armor_config: ModelArmorConfigParam | Omit = omit, |
148 | 156 | previous_interaction_id: str | Omit = omit, |
149 | 157 | response_format: interaction_create_params.ResponseFormat | Omit = omit, |
150 | 158 | response_mime_type: str | Omit = omit, |
@@ -175,6 +183,8 @@ def create( |
175 | 183 |
|
176 | 184 | generation_config: Input only. Configuration parameters for the model interaction. |
177 | 185 |
|
| 186 | + model_armor_config: Settings for prompt and response sanitization using the Model Armor service. |
| 187 | +
|
178 | 188 | previous_interaction_id: The ID of the previous interaction, if any. |
179 | 189 |
|
180 | 190 | response_format: Enforces that the generated response is a JSON object that complies with the |
@@ -221,6 +231,7 @@ def create( |
221 | 231 | input: interaction_create_params.Input, |
222 | 232 | agent_config: interaction_create_params.AgentConfig | Omit = omit, |
223 | 233 | background: bool | Omit = omit, |
| 234 | + model_armor_config: ModelArmorConfigParam | Omit = omit, |
224 | 235 | previous_interaction_id: str | Omit = omit, |
225 | 236 | response_format: interaction_create_params.ResponseFormat | Omit = omit, |
226 | 237 | response_mime_type: str | Omit = omit, |
@@ -250,6 +261,8 @@ def create( |
250 | 261 |
|
251 | 262 | background: Input only. Whether to run the model interaction in the background. |
252 | 263 |
|
| 264 | + model_armor_config: Settings for prompt and response sanitization using the Model Armor service. |
| 265 | +
|
253 | 266 | previous_interaction_id: The ID of the previous interaction, if any. |
254 | 267 |
|
255 | 268 | response_format: Enforces that the generated response is a JSON object that complies with the |
@@ -299,6 +312,7 @@ def create( |
299 | 312 | stream: Literal[True], |
300 | 313 | agent_config: interaction_create_params.AgentConfig | Omit = omit, |
301 | 314 | background: bool | Omit = omit, |
| 315 | + model_armor_config: ModelArmorConfigParam | Omit = omit, |
302 | 316 | previous_interaction_id: str | Omit = omit, |
303 | 317 | response_format: interaction_create_params.ResponseFormat | Omit = omit, |
304 | 318 | response_mime_type: str | Omit = omit, |
@@ -329,6 +343,8 @@ def create( |
329 | 343 |
|
330 | 344 | background: Input only. Whether to run the model interaction in the background. |
331 | 345 |
|
| 346 | + model_armor_config: Settings for prompt and response sanitization using the Model Armor service. |
| 347 | +
|
332 | 348 | previous_interaction_id: The ID of the previous interaction, if any. |
333 | 349 |
|
334 | 350 | response_format: Enforces that the generated response is a JSON object that complies with the |
@@ -369,6 +385,7 @@ def create( |
369 | 385 | stream: bool, |
370 | 386 | background: bool | Omit = omit, |
371 | 387 | generation_config: GenerationConfigParam | Omit = omit, |
| 388 | + model_armor_config: ModelArmorConfigParam | Omit = omit, |
372 | 389 | previous_interaction_id: str | Omit = omit, |
373 | 390 | response_format: interaction_create_params.ResponseFormat | Omit = omit, |
374 | 391 | response_mime_type: str | Omit = omit, |
@@ -399,6 +416,8 @@ def create( |
399 | 416 |
|
400 | 417 | generation_config: Input only. Configuration parameters for the model interaction. |
401 | 418 |
|
| 419 | + model_armor_config: Settings for prompt and response sanitization using the Model Armor service. |
| 420 | +
|
402 | 421 | previous_interaction_id: The ID of the previous interaction, if any. |
403 | 422 |
|
404 | 423 | response_format: Enforces that the generated response is a JSON object that complies with the |
@@ -438,6 +457,7 @@ def create( |
438 | 457 | model: ModelParam | Omit = omit, |
439 | 458 | background: bool | Omit = omit, |
440 | 459 | generation_config: GenerationConfigParam | Omit = omit, |
| 460 | + model_armor_config: ModelArmorConfigParam | Omit = omit, |
441 | 461 | previous_interaction_id: str | Omit = omit, |
442 | 462 | response_format: interaction_create_params.ResponseFormat | Omit = omit, |
443 | 463 | response_mime_type: str | Omit = omit, |
@@ -481,6 +501,7 @@ def create( |
481 | 501 | "model": model, |
482 | 502 | "background": background, |
483 | 503 | "generation_config": generation_config, |
| 504 | + "model_armor_config": model_armor_config, |
484 | 505 | "previous_interaction_id": previous_interaction_id, |
485 | 506 | "response_format": response_format, |
486 | 507 | "response_mime_type": response_mime_type, |
@@ -770,6 +791,7 @@ async def create( |
770 | 791 | model: ModelParam, |
771 | 792 | background: bool | Omit = omit, |
772 | 793 | generation_config: GenerationConfigParam | Omit = omit, |
| 794 | + model_armor_config: ModelArmorConfigParam | Omit = omit, |
773 | 795 | previous_interaction_id: str | Omit = omit, |
774 | 796 | response_format: interaction_create_params.ResponseFormat | Omit = omit, |
775 | 797 | response_mime_type: str | Omit = omit, |
@@ -799,6 +821,8 @@ async def create( |
799 | 821 |
|
800 | 822 | generation_config: Input only. Configuration parameters for the model interaction. |
801 | 823 |
|
| 824 | + model_armor_config: Settings for prompt and response sanitization using the Model Armor service. |
| 825 | +
|
802 | 826 | previous_interaction_id: The ID of the previous interaction, if any. |
803 | 827 |
|
804 | 828 | response_format: Enforces that the generated response is a JSON object that complies with the |
@@ -841,6 +865,7 @@ async def create( |
841 | 865 | stream: Literal[True], |
842 | 866 | background: bool | Omit = omit, |
843 | 867 | generation_config: GenerationConfigParam | Omit = omit, |
| 868 | + model_armor_config: ModelArmorConfigParam | Omit = omit, |
844 | 869 | previous_interaction_id: str | Omit = omit, |
845 | 870 | response_format: interaction_create_params.ResponseFormat | Omit = omit, |
846 | 871 | response_mime_type: str | Omit = omit, |
@@ -871,6 +896,8 @@ async def create( |
871 | 896 |
|
872 | 897 | generation_config: Input only. Configuration parameters for the model interaction. |
873 | 898 |
|
| 899 | + model_armor_config: Settings for prompt and response sanitization using the Model Armor service. |
| 900 | +
|
874 | 901 | previous_interaction_id: The ID of the previous interaction, if any. |
875 | 902 |
|
876 | 903 | response_format: Enforces that the generated response is a JSON object that complies with the |
@@ -917,6 +944,7 @@ async def create( |
917 | 944 | input: interaction_create_params.Input, |
918 | 945 | agent_config: interaction_create_params.AgentConfig | Omit = omit, |
919 | 946 | background: bool | Omit = omit, |
| 947 | + model_armor_config: ModelArmorConfigParam | Omit = omit, |
920 | 948 | previous_interaction_id: str | Omit = omit, |
921 | 949 | response_format: interaction_create_params.ResponseFormat | Omit = omit, |
922 | 950 | response_mime_type: str | Omit = omit, |
@@ -946,6 +974,8 @@ async def create( |
946 | 974 |
|
947 | 975 | background: Input only. Whether to run the model interaction in the background. |
948 | 976 |
|
| 977 | + model_armor_config: Settings for prompt and response sanitization using the Model Armor service. |
| 978 | +
|
949 | 979 | previous_interaction_id: The ID of the previous interaction, if any. |
950 | 980 |
|
951 | 981 | response_format: Enforces that the generated response is a JSON object that complies with the |
@@ -995,6 +1025,7 @@ async def create( |
995 | 1025 | stream: Literal[True], |
996 | 1026 | agent_config: interaction_create_params.AgentConfig | Omit = omit, |
997 | 1027 | background: bool | Omit = omit, |
| 1028 | + model_armor_config: ModelArmorConfigParam | Omit = omit, |
998 | 1029 | previous_interaction_id: str | Omit = omit, |
999 | 1030 | response_format: interaction_create_params.ResponseFormat | Omit = omit, |
1000 | 1031 | response_mime_type: str | Omit = omit, |
@@ -1025,6 +1056,8 @@ async def create( |
1025 | 1056 |
|
1026 | 1057 | background: Input only. Whether to run the model interaction in the background. |
1027 | 1058 |
|
| 1059 | + model_armor_config: Settings for prompt and response sanitization using the Model Armor service. |
| 1060 | +
|
1028 | 1061 | previous_interaction_id: The ID of the previous interaction, if any. |
1029 | 1062 |
|
1030 | 1063 | response_format: Enforces that the generated response is a JSON object that complies with the |
@@ -1065,6 +1098,7 @@ async def create( |
1065 | 1098 | stream: bool, |
1066 | 1099 | background: bool | Omit = omit, |
1067 | 1100 | generation_config: GenerationConfigParam | Omit = omit, |
| 1101 | + model_armor_config: ModelArmorConfigParam | Omit = omit, |
1068 | 1102 | previous_interaction_id: str | Omit = omit, |
1069 | 1103 | response_format: interaction_create_params.ResponseFormat | Omit = omit, |
1070 | 1104 | response_mime_type: str | Omit = omit, |
@@ -1095,6 +1129,8 @@ async def create( |
1095 | 1129 |
|
1096 | 1130 | generation_config: Input only. Configuration parameters for the model interaction. |
1097 | 1131 |
|
| 1132 | + model_armor_config: Settings for prompt and response sanitization using the Model Armor service. |
| 1133 | +
|
1098 | 1134 | previous_interaction_id: The ID of the previous interaction, if any. |
1099 | 1135 |
|
1100 | 1136 | response_format: Enforces that the generated response is a JSON object that complies with the |
@@ -1134,6 +1170,7 @@ async def create( |
1134 | 1170 | model: ModelParam | Omit = omit, |
1135 | 1171 | background: bool | Omit = omit, |
1136 | 1172 | generation_config: GenerationConfigParam | Omit = omit, |
| 1173 | + model_armor_config: ModelArmorConfigParam | Omit = omit, |
1137 | 1174 | previous_interaction_id: str | Omit = omit, |
1138 | 1175 | response_format: interaction_create_params.ResponseFormat | Omit = omit, |
1139 | 1176 | response_mime_type: str | Omit = omit, |
@@ -1177,6 +1214,7 @@ async def create( |
1177 | 1214 | "model": model, |
1178 | 1215 | "background": background, |
1179 | 1216 | "generation_config": generation_config, |
| 1217 | + "model_armor_config": model_armor_config, |
1180 | 1218 | "previous_interaction_id": previous_interaction_id, |
1181 | 1219 | "response_format": response_format, |
1182 | 1220 | "response_mime_type": response_mime_type, |
|
0 commit comments