orq-ai-sdk 4.2.0rc49__py3-none-any.whl → 4.2.15__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 (104) hide show
  1. orq_ai_sdk/_hooks/globalhook.py +0 -1
  2. orq_ai_sdk/_version.py +3 -3
  3. orq_ai_sdk/agents.py +186 -186
  4. orq_ai_sdk/audio.py +30 -0
  5. orq_ai_sdk/chat.py +22 -0
  6. orq_ai_sdk/completions.py +438 -0
  7. orq_ai_sdk/contacts.py +43 -886
  8. orq_ai_sdk/deployments.py +61 -0
  9. orq_ai_sdk/edits.py +364 -0
  10. orq_ai_sdk/embeddings.py +344 -0
  11. orq_ai_sdk/generations.py +370 -0
  12. orq_ai_sdk/images.py +28 -0
  13. orq_ai_sdk/models/__init__.py +3839 -424
  14. orq_ai_sdk/models/conversationresponse.py +1 -1
  15. orq_ai_sdk/models/conversationwithmessagesresponse.py +1 -1
  16. orq_ai_sdk/models/createagentrequestop.py +768 -12
  17. orq_ai_sdk/models/createagentresponse.py +68 -2
  18. orq_ai_sdk/models/createchatcompletionop.py +538 -313
  19. orq_ai_sdk/models/createcompletionop.py +2078 -0
  20. orq_ai_sdk/models/createcontactop.py +5 -10
  21. orq_ai_sdk/models/createconversationop.py +1 -1
  22. orq_ai_sdk/models/createconversationresponseop.py +2 -2
  23. orq_ai_sdk/models/createdatasetitemop.py +4 -4
  24. orq_ai_sdk/models/createdatasetop.py +1 -1
  25. orq_ai_sdk/models/createdatasourceop.py +1 -1
  26. orq_ai_sdk/models/createembeddingop.py +579 -0
  27. orq_ai_sdk/models/createevalop.py +14 -14
  28. orq_ai_sdk/models/createidentityop.py +1 -1
  29. orq_ai_sdk/models/createimageeditop.py +715 -0
  30. orq_ai_sdk/models/createimageop.py +228 -82
  31. orq_ai_sdk/models/createimagevariationop.py +706 -0
  32. orq_ai_sdk/models/creatememoryop.py +4 -2
  33. orq_ai_sdk/models/createmoderationop.py +521 -0
  34. orq_ai_sdk/models/createpromptop.py +375 -6
  35. orq_ai_sdk/models/creatererankop.py +608 -0
  36. orq_ai_sdk/models/createresponseop.py +2567 -0
  37. orq_ai_sdk/models/createspeechop.py +466 -0
  38. orq_ai_sdk/models/createtoolop.py +6 -6
  39. orq_ai_sdk/models/createtranscriptionop.py +732 -0
  40. orq_ai_sdk/models/createtranslationop.py +702 -0
  41. orq_ai_sdk/models/deploymentgetconfigop.py +17 -7
  42. orq_ai_sdk/models/deploymentsop.py +1 -0
  43. orq_ai_sdk/models/deploymentstreamop.py +7 -0
  44. orq_ai_sdk/models/filegetop.py +1 -1
  45. orq_ai_sdk/models/filelistop.py +1 -1
  46. orq_ai_sdk/models/fileuploadop.py +1 -1
  47. orq_ai_sdk/models/generateconversationnameop.py +1 -1
  48. orq_ai_sdk/models/getallmemoriesop.py +4 -2
  49. orq_ai_sdk/models/getallpromptsop.py +188 -3
  50. orq_ai_sdk/models/getalltoolsop.py +6 -6
  51. orq_ai_sdk/models/getevalsop.py +17 -17
  52. orq_ai_sdk/models/getonepromptop.py +188 -3
  53. orq_ai_sdk/models/getpromptversionop.py +188 -3
  54. orq_ai_sdk/models/invokedeploymentrequest.py +11 -4
  55. orq_ai_sdk/models/listagentsop.py +372 -0
  56. orq_ai_sdk/models/listdatasetdatapointsop.py +4 -4
  57. orq_ai_sdk/models/listdatasetsop.py +1 -1
  58. orq_ai_sdk/models/listdatasourcesop.py +1 -1
  59. orq_ai_sdk/models/listidentitiesop.py +1 -1
  60. orq_ai_sdk/models/listmodelsop.py +1 -0
  61. orq_ai_sdk/models/listpromptversionsop.py +188 -3
  62. orq_ai_sdk/models/partdoneevent.py +1 -1
  63. orq_ai_sdk/models/post_v2_router_ocrop.py +408 -0
  64. orq_ai_sdk/models/publiccontact.py +9 -3
  65. orq_ai_sdk/models/publicidentity.py +62 -0
  66. orq_ai_sdk/models/reasoningpart.py +1 -1
  67. orq_ai_sdk/models/responsedoneevent.py +14 -11
  68. orq_ai_sdk/models/retrieveagentrequestop.py +382 -0
  69. orq_ai_sdk/models/retrievedatapointop.py +4 -4
  70. orq_ai_sdk/models/retrievedatasetop.py +1 -1
  71. orq_ai_sdk/models/retrievedatasourceop.py +1 -1
  72. orq_ai_sdk/models/retrieveidentityop.py +1 -1
  73. orq_ai_sdk/models/retrievememoryop.py +4 -2
  74. orq_ai_sdk/models/retrievetoolop.py +6 -6
  75. orq_ai_sdk/models/runagentop.py +379 -9
  76. orq_ai_sdk/models/streamrunagentop.py +385 -9
  77. orq_ai_sdk/models/updateagentop.py +770 -12
  78. orq_ai_sdk/models/updateconversationop.py +1 -1
  79. orq_ai_sdk/models/updatedatapointop.py +4 -4
  80. orq_ai_sdk/models/updatedatasetop.py +1 -1
  81. orq_ai_sdk/models/updatedatasourceop.py +1 -1
  82. orq_ai_sdk/models/updateevalop.py +14 -14
  83. orq_ai_sdk/models/updateidentityop.py +1 -1
  84. orq_ai_sdk/models/updatememoryop.py +4 -2
  85. orq_ai_sdk/models/updatepromptop.py +375 -6
  86. orq_ai_sdk/models/updatetoolop.py +7 -7
  87. orq_ai_sdk/moderations.py +218 -0
  88. orq_ai_sdk/orq_completions.py +666 -0
  89. orq_ai_sdk/orq_responses.py +398 -0
  90. orq_ai_sdk/rerank.py +330 -0
  91. orq_ai_sdk/router.py +89 -641
  92. orq_ai_sdk/speech.py +333 -0
  93. orq_ai_sdk/transcriptions.py +416 -0
  94. orq_ai_sdk/translations.py +384 -0
  95. orq_ai_sdk/variations.py +364 -0
  96. orq_ai_sdk-4.2.15.dist-info/METADATA +888 -0
  97. {orq_ai_sdk-4.2.0rc49.dist-info → orq_ai_sdk-4.2.15.dist-info}/RECORD +99 -76
  98. {orq_ai_sdk-4.2.0rc49.dist-info → orq_ai_sdk-4.2.15.dist-info}/WHEEL +1 -1
  99. orq_ai_sdk/models/deletecontactop.py +0 -44
  100. orq_ai_sdk/models/listcontactsop.py +0 -265
  101. orq_ai_sdk/models/retrievecontactop.py +0 -142
  102. orq_ai_sdk/models/updatecontactop.py +0 -233
  103. orq_ai_sdk-4.2.0rc49.dist-info/METADATA +0 -788
  104. {orq_ai_sdk-4.2.0rc49.dist-info → orq_ai_sdk-4.2.15.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,466 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .publiccontact import PublicContact, PublicContactTypedDict
5
+ from .publicidentity import PublicIdentity, PublicIdentityTypedDict
6
+ from orq_ai_sdk.types import BaseModel, UNSET_SENTINEL
7
+ import pydantic
8
+ from pydantic import model_serializer
9
+ from typing import List, Literal, Optional
10
+ from typing_extensions import Annotated, NotRequired, TypedDict
11
+
12
+
13
+ CreateSpeechResponseFormat = Literal[
14
+ "mp3",
15
+ "opus",
16
+ "aac",
17
+ "flac",
18
+ "wav",
19
+ "pcm",
20
+ ]
21
+ r"""The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`. If a format is provided but not supported by the provider, the response will be in the default format. When the provided format is not supported by the provider, the response will be in the default format."""
22
+
23
+
24
+ class CreateSpeechFallbacksTypedDict(TypedDict):
25
+ model: str
26
+ r"""Fallback model identifier"""
27
+
28
+
29
+ class CreateSpeechFallbacks(BaseModel):
30
+ model: str
31
+ r"""Fallback model identifier"""
32
+
33
+
34
+ class CreateSpeechRetryTypedDict(TypedDict):
35
+ r"""Retry configuration for the request"""
36
+
37
+ count: NotRequired[float]
38
+ r"""Number of retry attempts (1-5)"""
39
+ on_codes: NotRequired[List[float]]
40
+ r"""HTTP status codes that trigger retry logic"""
41
+
42
+
43
+ class CreateSpeechRetry(BaseModel):
44
+ r"""Retry configuration for the request"""
45
+
46
+ count: Optional[float] = 3
47
+ r"""Number of retry attempts (1-5)"""
48
+
49
+ on_codes: Optional[List[float]] = None
50
+ r"""HTTP status codes that trigger retry logic"""
51
+
52
+ @model_serializer(mode="wrap")
53
+ def serialize_model(self, handler):
54
+ optional_fields = set(["count", "on_codes"])
55
+ serialized = handler(self)
56
+ m = {}
57
+
58
+ for n, f in type(self).model_fields.items():
59
+ k = f.alias or n
60
+ val = serialized.get(k)
61
+
62
+ if val != UNSET_SENTINEL:
63
+ if val is not None or k not in optional_fields:
64
+ m[k] = val
65
+
66
+ return m
67
+
68
+
69
+ CreateSpeechLoadBalancerType = Literal["weight_based",]
70
+
71
+
72
+ class CreateSpeechLoadBalancerModelsTypedDict(TypedDict):
73
+ model: str
74
+ r"""Model identifier for load balancing"""
75
+ weight: NotRequired[float]
76
+ r"""Weight assigned to this model for load balancing"""
77
+
78
+
79
+ class CreateSpeechLoadBalancerModels(BaseModel):
80
+ model: str
81
+ r"""Model identifier for load balancing"""
82
+
83
+ weight: Optional[float] = 0.5
84
+ r"""Weight assigned to this model for load balancing"""
85
+
86
+ @model_serializer(mode="wrap")
87
+ def serialize_model(self, handler):
88
+ optional_fields = set(["weight"])
89
+ serialized = handler(self)
90
+ m = {}
91
+
92
+ for n, f in type(self).model_fields.items():
93
+ k = f.alias or n
94
+ val = serialized.get(k)
95
+
96
+ if val != UNSET_SENTINEL:
97
+ if val is not None or k not in optional_fields:
98
+ m[k] = val
99
+
100
+ return m
101
+
102
+
103
+ class CreateSpeechLoadBalancer1TypedDict(TypedDict):
104
+ type: CreateSpeechLoadBalancerType
105
+ models: List[CreateSpeechLoadBalancerModelsTypedDict]
106
+
107
+
108
+ class CreateSpeechLoadBalancer1(BaseModel):
109
+ type: CreateSpeechLoadBalancerType
110
+
111
+ models: List[CreateSpeechLoadBalancerModels]
112
+
113
+
114
+ CreateSpeechLoadBalancerTypedDict = CreateSpeechLoadBalancer1TypedDict
115
+ r"""Load balancer configuration for the request."""
116
+
117
+
118
+ CreateSpeechLoadBalancer = CreateSpeechLoadBalancer1
119
+ r"""Load balancer configuration for the request."""
120
+
121
+
122
+ class CreateSpeechTimeoutTypedDict(TypedDict):
123
+ r"""Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured."""
124
+
125
+ call_timeout: float
126
+ r"""Timeout value in milliseconds"""
127
+
128
+
129
+ class CreateSpeechTimeout(BaseModel):
130
+ r"""Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured."""
131
+
132
+ call_timeout: float
133
+ r"""Timeout value in milliseconds"""
134
+
135
+
136
+ class CreateSpeechRouterAudioSpeechRetryTypedDict(TypedDict):
137
+ r"""Retry configuration for the request"""
138
+
139
+ count: NotRequired[float]
140
+ r"""Number of retry attempts (1-5)"""
141
+ on_codes: NotRequired[List[float]]
142
+ r"""HTTP status codes that trigger retry logic"""
143
+
144
+
145
+ class CreateSpeechRouterAudioSpeechRetry(BaseModel):
146
+ r"""Retry configuration for the request"""
147
+
148
+ count: Optional[float] = 3
149
+ r"""Number of retry attempts (1-5)"""
150
+
151
+ on_codes: Optional[List[float]] = None
152
+ r"""HTTP status codes that trigger retry logic"""
153
+
154
+ @model_serializer(mode="wrap")
155
+ def serialize_model(self, handler):
156
+ optional_fields = set(["count", "on_codes"])
157
+ serialized = handler(self)
158
+ m = {}
159
+
160
+ for n, f in type(self).model_fields.items():
161
+ k = f.alias or n
162
+ val = serialized.get(k)
163
+
164
+ if val != UNSET_SENTINEL:
165
+ if val is not None or k not in optional_fields:
166
+ m[k] = val
167
+
168
+ return m
169
+
170
+
171
+ class CreateSpeechRouterAudioSpeechFallbacksTypedDict(TypedDict):
172
+ model: str
173
+ r"""Fallback model identifier"""
174
+
175
+
176
+ class CreateSpeechRouterAudioSpeechFallbacks(BaseModel):
177
+ model: str
178
+ r"""Fallback model identifier"""
179
+
180
+
181
+ class CreateSpeechThreadTypedDict(TypedDict):
182
+ r"""Thread information to group related requests"""
183
+
184
+ id: str
185
+ r"""Unique thread identifier to group related invocations."""
186
+ tags: NotRequired[List[str]]
187
+ r"""Optional tags to differentiate or categorize threads"""
188
+
189
+
190
+ class CreateSpeechThread(BaseModel):
191
+ r"""Thread information to group related requests"""
192
+
193
+ id: str
194
+ r"""Unique thread identifier to group related invocations."""
195
+
196
+ tags: Optional[List[str]] = None
197
+ r"""Optional tags to differentiate or categorize threads"""
198
+
199
+ @model_serializer(mode="wrap")
200
+ def serialize_model(self, handler):
201
+ optional_fields = set(["tags"])
202
+ serialized = handler(self)
203
+ m = {}
204
+
205
+ for n, f in type(self).model_fields.items():
206
+ k = f.alias or n
207
+ val = serialized.get(k)
208
+
209
+ if val != UNSET_SENTINEL:
210
+ if val is not None or k not in optional_fields:
211
+ m[k] = val
212
+
213
+ return m
214
+
215
+
216
+ CreateSpeechLoadBalancerRouterAudioSpeechType = Literal["weight_based",]
217
+
218
+
219
+ class CreateSpeechLoadBalancerRouterAudioSpeechModelsTypedDict(TypedDict):
220
+ model: str
221
+ r"""Model identifier for load balancing"""
222
+ weight: NotRequired[float]
223
+ r"""Weight assigned to this model for load balancing"""
224
+
225
+
226
+ class CreateSpeechLoadBalancerRouterAudioSpeechModels(BaseModel):
227
+ model: str
228
+ r"""Model identifier for load balancing"""
229
+
230
+ weight: Optional[float] = 0.5
231
+ r"""Weight assigned to this model for load balancing"""
232
+
233
+ @model_serializer(mode="wrap")
234
+ def serialize_model(self, handler):
235
+ optional_fields = set(["weight"])
236
+ serialized = handler(self)
237
+ m = {}
238
+
239
+ for n, f in type(self).model_fields.items():
240
+ k = f.alias or n
241
+ val = serialized.get(k)
242
+
243
+ if val != UNSET_SENTINEL:
244
+ if val is not None or k not in optional_fields:
245
+ m[k] = val
246
+
247
+ return m
248
+
249
+
250
+ class CreateSpeechLoadBalancerRouterAudioSpeech1TypedDict(TypedDict):
251
+ type: CreateSpeechLoadBalancerRouterAudioSpeechType
252
+ models: List[CreateSpeechLoadBalancerRouterAudioSpeechModelsTypedDict]
253
+
254
+
255
+ class CreateSpeechLoadBalancerRouterAudioSpeech1(BaseModel):
256
+ type: CreateSpeechLoadBalancerRouterAudioSpeechType
257
+
258
+ models: List[CreateSpeechLoadBalancerRouterAudioSpeechModels]
259
+
260
+
261
+ CreateSpeechRouterAudioSpeechLoadBalancerTypedDict = (
262
+ CreateSpeechLoadBalancerRouterAudioSpeech1TypedDict
263
+ )
264
+ r"""Array of models with weights for load balancing requests"""
265
+
266
+
267
+ CreateSpeechRouterAudioSpeechLoadBalancer = CreateSpeechLoadBalancerRouterAudioSpeech1
268
+ r"""Array of models with weights for load balancing requests"""
269
+
270
+
271
+ class CreateSpeechRouterAudioSpeechTimeoutTypedDict(TypedDict):
272
+ r"""Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured."""
273
+
274
+ call_timeout: float
275
+ r"""Timeout value in milliseconds"""
276
+
277
+
278
+ class CreateSpeechRouterAudioSpeechTimeout(BaseModel):
279
+ r"""Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured."""
280
+
281
+ call_timeout: float
282
+ r"""Timeout value in milliseconds"""
283
+
284
+
285
+ class CreateSpeechOrqTypedDict(TypedDict):
286
+ retry: NotRequired[CreateSpeechRouterAudioSpeechRetryTypedDict]
287
+ r"""Retry configuration for the request"""
288
+ fallbacks: NotRequired[List[CreateSpeechRouterAudioSpeechFallbacksTypedDict]]
289
+ r"""Array of fallback models to use if primary model fails"""
290
+ name: NotRequired[str]
291
+ r"""The name to display on the trace. If not specified, the default system name will be used."""
292
+ identity: NotRequired[PublicIdentityTypedDict]
293
+ r"""Information about the identity making the request. If the identity does not exist, it will be created automatically."""
294
+ contact: NotRequired[PublicContactTypedDict]
295
+ r"""@deprecated Use identity instead. Information about the contact making the request."""
296
+ thread: NotRequired[CreateSpeechThreadTypedDict]
297
+ r"""Thread information to group related requests"""
298
+ load_balancer: NotRequired[CreateSpeechRouterAudioSpeechLoadBalancerTypedDict]
299
+ r"""Array of models with weights for load balancing requests"""
300
+ timeout: NotRequired[CreateSpeechRouterAudioSpeechTimeoutTypedDict]
301
+ r"""Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured."""
302
+
303
+
304
+ class CreateSpeechOrq(BaseModel):
305
+ retry: Optional[CreateSpeechRouterAudioSpeechRetry] = None
306
+ r"""Retry configuration for the request"""
307
+
308
+ fallbacks: Optional[List[CreateSpeechRouterAudioSpeechFallbacks]] = None
309
+ r"""Array of fallback models to use if primary model fails"""
310
+
311
+ name: Optional[str] = None
312
+ r"""The name to display on the trace. If not specified, the default system name will be used."""
313
+
314
+ identity: Optional[PublicIdentity] = None
315
+ r"""Information about the identity making the request. If the identity does not exist, it will be created automatically."""
316
+
317
+ contact: Annotated[
318
+ Optional[PublicContact],
319
+ pydantic.Field(
320
+ deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
321
+ ),
322
+ ] = None
323
+ r"""@deprecated Use identity instead. Information about the contact making the request."""
324
+
325
+ thread: Optional[CreateSpeechThread] = None
326
+ r"""Thread information to group related requests"""
327
+
328
+ load_balancer: Optional[CreateSpeechRouterAudioSpeechLoadBalancer] = None
329
+ r"""Array of models with weights for load balancing requests"""
330
+
331
+ timeout: Optional[CreateSpeechRouterAudioSpeechTimeout] = None
332
+ r"""Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured."""
333
+
334
+ @model_serializer(mode="wrap")
335
+ def serialize_model(self, handler):
336
+ optional_fields = set(
337
+ [
338
+ "retry",
339
+ "fallbacks",
340
+ "name",
341
+ "identity",
342
+ "contact",
343
+ "thread",
344
+ "load_balancer",
345
+ "timeout",
346
+ ]
347
+ )
348
+ serialized = handler(self)
349
+ m = {}
350
+
351
+ for n, f in type(self).model_fields.items():
352
+ k = f.alias or n
353
+ val = serialized.get(k)
354
+
355
+ if val != UNSET_SENTINEL:
356
+ if val is not None or k not in optional_fields:
357
+ m[k] = val
358
+
359
+ return m
360
+
361
+
362
+ class CreateSpeechRequestBodyTypedDict(TypedDict):
363
+ r"""input"""
364
+
365
+ input: str
366
+ r"""The text to generate audio for. The maximum length is 4096 characters"""
367
+ model: str
368
+ r"""ID of the model to use"""
369
+ voice: str
370
+ r"""The voice to use.
371
+
372
+ Available voices for OpenAI
373
+
374
+ `alloy`, `echo`, `fable`, `onyx`, `nova`, and `shimmer`
375
+
376
+ Available voices for ElevenLabs
377
+
378
+ `aria`, `roger`, `sarah`, `laura`, `charlie`, `george`, `callum`, `river`, `liam`, `charlotte`, `alice`, `matilda`, `will`, `jessica`, `eric`, `chris`, `brian`, `daniel`, `lily`, `bill`
379
+ """
380
+ response_format: NotRequired[CreateSpeechResponseFormat]
381
+ r"""The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`. If a format is provided but not supported by the provider, the response will be in the default format. When the provided format is not supported by the provider, the response will be in the default format."""
382
+ speed: NotRequired[float]
383
+ r"""The speed of the generated audio."""
384
+ name: NotRequired[str]
385
+ r"""The name to display on the trace. If not specified, the default system name will be used."""
386
+ fallbacks: NotRequired[List[CreateSpeechFallbacksTypedDict]]
387
+ r"""Array of fallback models to use if primary model fails"""
388
+ retry: NotRequired[CreateSpeechRetryTypedDict]
389
+ r"""Retry configuration for the request"""
390
+ load_balancer: NotRequired[CreateSpeechLoadBalancerTypedDict]
391
+ r"""Load balancer configuration for the request."""
392
+ timeout: NotRequired[CreateSpeechTimeoutTypedDict]
393
+ r"""Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured."""
394
+ orq: NotRequired[CreateSpeechOrqTypedDict]
395
+
396
+
397
+ class CreateSpeechRequestBody(BaseModel):
398
+ r"""input"""
399
+
400
+ input: str
401
+ r"""The text to generate audio for. The maximum length is 4096 characters"""
402
+
403
+ model: str
404
+ r"""ID of the model to use"""
405
+
406
+ voice: str
407
+ r"""The voice to use.
408
+
409
+ Available voices for OpenAI
410
+
411
+ `alloy`, `echo`, `fable`, `onyx`, `nova`, and `shimmer`
412
+
413
+ Available voices for ElevenLabs
414
+
415
+ `aria`, `roger`, `sarah`, `laura`, `charlie`, `george`, `callum`, `river`, `liam`, `charlotte`, `alice`, `matilda`, `will`, `jessica`, `eric`, `chris`, `brian`, `daniel`, `lily`, `bill`
416
+ """
417
+
418
+ response_format: Optional[CreateSpeechResponseFormat] = "mp3"
419
+ r"""The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`. If a format is provided but not supported by the provider, the response will be in the default format. When the provided format is not supported by the provider, the response will be in the default format."""
420
+
421
+ speed: Optional[float] = 1
422
+ r"""The speed of the generated audio."""
423
+
424
+ name: Optional[str] = None
425
+ r"""The name to display on the trace. If not specified, the default system name will be used."""
426
+
427
+ fallbacks: Optional[List[CreateSpeechFallbacks]] = None
428
+ r"""Array of fallback models to use if primary model fails"""
429
+
430
+ retry: Optional[CreateSpeechRetry] = None
431
+ r"""Retry configuration for the request"""
432
+
433
+ load_balancer: Optional[CreateSpeechLoadBalancer] = None
434
+ r"""Load balancer configuration for the request."""
435
+
436
+ timeout: Optional[CreateSpeechTimeout] = None
437
+ r"""Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured."""
438
+
439
+ orq: Optional[CreateSpeechOrq] = None
440
+
441
+ @model_serializer(mode="wrap")
442
+ def serialize_model(self, handler):
443
+ optional_fields = set(
444
+ [
445
+ "response_format",
446
+ "speed",
447
+ "name",
448
+ "fallbacks",
449
+ "retry",
450
+ "load_balancer",
451
+ "timeout",
452
+ "orq",
453
+ ]
454
+ )
455
+ serialized = handler(self)
456
+ m = {}
457
+
458
+ for n, f in type(self).model_fields.items():
459
+ k = f.alias or n
460
+ val = serialized.get(k)
461
+
462
+ if val != UNSET_SENTINEL:
463
+ if val is not None or k not in optional_fields:
464
+ m[k] = val
465
+
466
+ return m
@@ -1068,7 +1068,7 @@ class ResponseBodyCodeExecutionTool(BaseModel):
1068
1068
  code_tool: ResponseBodyCodeTool
1069
1069
 
1070
1070
  id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
1071
- "tool_01KFDS3BN1DTNXD48NX3R1XKC9"
1071
+ "tool_01KG2GN2260X157SCCG3Q5SSNK"
1072
1072
  )
1073
1073
 
1074
1074
  display_name: Optional[str] = None
@@ -1195,7 +1195,7 @@ class ResponseBodyTools(BaseModel):
1195
1195
 
1196
1196
  schema_: Annotated[CreateToolResponseBodySchema, pydantic.Field(alias="schema")]
1197
1197
 
1198
- id: Optional[str] = "01KFDS3BMTK3E0W2S7ECFPYXA5"
1198
+ id: Optional[str] = "01KG2GN224TM9D94X8QYR0F79S"
1199
1199
 
1200
1200
  description: Optional[str] = None
1201
1201
 
@@ -1326,7 +1326,7 @@ class ResponseBodyMCPTool(BaseModel):
1326
1326
  mcp: ResponseBodyMcp
1327
1327
 
1328
1328
  id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
1329
- "tool_01KFDS3BMK3ABEBGFRPV2FXG27"
1329
+ "tool_01KG2GN222T9Y7ACKAR7NFGRSY"
1330
1330
  )
1331
1331
 
1332
1332
  display_name: Optional[str] = None
@@ -1627,7 +1627,7 @@ class ResponseBodyHTTPTool(BaseModel):
1627
1627
  http: CreateToolResponseBodyHTTP
1628
1628
 
1629
1629
  id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
1630
- "tool_01KFDS3BM50D39Z78C0GJVHDJ3"
1630
+ "tool_01KG2GN21ZQW94X28R4DA3BG09"
1631
1631
  )
1632
1632
 
1633
1633
  display_name: Optional[str] = None
@@ -1822,7 +1822,7 @@ class ResponseBodyJSONSchemaTool(BaseModel):
1822
1822
  json_schema: ResponseBodyJSONSchema
1823
1823
 
1824
1824
  id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
1825
- "tool_01KFDS3BM4NK4DJFF9FKA0QGCB"
1825
+ "tool_01KG2GN21XJX6GM0YD7SKB7W52"
1826
1826
  )
1827
1827
 
1828
1828
  display_name: Optional[str] = None
@@ -2021,7 +2021,7 @@ class ResponseBodyFunctionTool(BaseModel):
2021
2021
  function: CreateToolResponseBodyFunction
2022
2022
 
2023
2023
  id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
2024
- "tool_01KFDS3BM34PNK0WP8F2WQD41T"
2024
+ "tool_01KG2GN21VT5CW714J49THGD67"
2025
2025
  )
2026
2026
 
2027
2027
  display_name: Optional[str] = None