mistralai 1.8.2__py3-none-any.whl → 1.9.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 (152) hide show
  1. mistralai/_hooks/types.py +7 -0
  2. mistralai/_version.py +3 -3
  3. mistralai/accesses.py +672 -0
  4. mistralai/agents.py +8 -4
  5. mistralai/basesdk.py +12 -20
  6. mistralai/beta.py +4 -0
  7. mistralai/chat.py +8 -4
  8. mistralai/classifiers.py +8 -0
  9. mistralai/conversations.py +34 -14
  10. mistralai/documents.py +2136 -0
  11. mistralai/embeddings.py +2 -0
  12. mistralai/extra/run/context.py +2 -4
  13. mistralai/files.py +14 -2
  14. mistralai/fim.py +4 -0
  15. mistralai/httpclient.py +6 -16
  16. mistralai/jobs.py +10 -0
  17. mistralai/libraries.py +1041 -0
  18. mistralai/mistral_agents.py +10 -0
  19. mistralai/mistral_jobs.py +8 -0
  20. mistralai/models/__init__.py +1578 -721
  21. mistralai/models/agent.py +1 -1
  22. mistralai/models/agentconversation.py +1 -1
  23. mistralai/models/agentcreationrequest.py +1 -1
  24. mistralai/models/agenthandoffentry.py +1 -1
  25. mistralai/models/agents_api_v1_conversations_getop.py +2 -0
  26. mistralai/models/agents_api_v1_conversations_historyop.py +2 -0
  27. mistralai/models/agents_api_v1_conversations_messagesop.py +2 -0
  28. mistralai/models/agents_api_v1_conversations_restart_streamop.py +2 -0
  29. mistralai/models/agents_api_v1_conversations_restartop.py +2 -0
  30. mistralai/models/agentscompletionrequest.py +3 -1
  31. mistralai/models/agentscompletionstreamrequest.py +3 -1
  32. mistralai/models/agentupdaterequest.py +1 -1
  33. mistralai/models/assistantmessage.py +1 -1
  34. mistralai/models/basemodelcard.py +6 -1
  35. mistralai/models/batchjobin.py +1 -1
  36. mistralai/models/batchjobout.py +1 -1
  37. mistralai/models/chatcompletionrequest.py +3 -1
  38. mistralai/models/chatcompletionstreamrequest.py +3 -1
  39. mistralai/models/classifierdetailedjobout.py +1 -1
  40. mistralai/models/classifierftmodelout.py +1 -1
  41. mistralai/models/classifierjobout.py +1 -1
  42. mistralai/models/classifiertargetin.py +1 -1
  43. mistralai/models/classifiertrainingparameters.py +1 -1
  44. mistralai/models/classifiertrainingparametersin.py +1 -1
  45. mistralai/models/completionargs.py +1 -1
  46. mistralai/models/completiondetailedjobout.py +1 -1
  47. mistralai/models/completionftmodelout.py +1 -1
  48. mistralai/models/completionjobout.py +1 -1
  49. mistralai/models/completionresponsestreamchoice.py +1 -1
  50. mistralai/models/completiontrainingparameters.py +1 -1
  51. mistralai/models/completiontrainingparametersin.py +1 -1
  52. mistralai/models/contentchunk.py +3 -0
  53. mistralai/models/conversationevents.py +6 -0
  54. mistralai/models/conversationhistory.py +4 -4
  55. mistralai/models/conversationrequest.py +1 -1
  56. mistralai/models/conversationstreamrequest.py +1 -1
  57. mistralai/models/conversationusageinfo.py +1 -1
  58. mistralai/models/deltamessage.py +1 -1
  59. mistralai/models/documentout.py +105 -0
  60. mistralai/models/documenttextcontent.py +13 -0
  61. mistralai/models/documentupdatein.py +44 -0
  62. mistralai/models/documenturlchunk.py +1 -1
  63. mistralai/models/embeddingrequest.py +1 -1
  64. mistralai/models/entitytype.py +9 -0
  65. mistralai/models/eventout.py +1 -1
  66. mistralai/models/file.py +33 -0
  67. mistralai/models/filechunk.py +23 -0
  68. mistralai/models/files_api_routes_list_filesop.py +1 -1
  69. mistralai/models/files_api_routes_upload_fileop.py +2 -27
  70. mistralai/models/fileschema.py +1 -1
  71. mistralai/models/fimcompletionrequest.py +1 -1
  72. mistralai/models/fimcompletionstreamrequest.py +1 -1
  73. mistralai/models/ftmodelcard.py +6 -1
  74. mistralai/models/functioncallentry.py +1 -1
  75. mistralai/models/functionresultentry.py +1 -1
  76. mistralai/models/githubrepositoryin.py +1 -1
  77. mistralai/models/githubrepositoryout.py +1 -1
  78. mistralai/models/imageurl.py +1 -1
  79. mistralai/models/inputentries.py +21 -2
  80. mistralai/models/jobin.py +1 -1
  81. mistralai/models/jobmetadataout.py +1 -1
  82. mistralai/models/jobs_api_routes_batch_get_batch_jobsop.py +1 -1
  83. mistralai/models/jobs_api_routes_fine_tuning_get_fine_tuning_jobsop.py +1 -1
  84. mistralai/models/jsonschema.py +1 -1
  85. mistralai/models/legacyjobmetadataout.py +1 -1
  86. mistralai/models/libraries_delete_v1op.py +16 -0
  87. mistralai/models/libraries_documents_delete_v1op.py +21 -0
  88. mistralai/models/libraries_documents_get_extracted_text_signed_url_v1op.py +21 -0
  89. mistralai/models/libraries_documents_get_signed_url_v1op.py +21 -0
  90. mistralai/models/libraries_documents_get_status_v1op.py +21 -0
  91. mistralai/models/libraries_documents_get_text_content_v1op.py +21 -0
  92. mistralai/models/libraries_documents_get_v1op.py +21 -0
  93. mistralai/models/libraries_documents_list_v1op.py +78 -0
  94. mistralai/models/libraries_documents_reprocess_v1op.py +21 -0
  95. mistralai/models/libraries_documents_update_v1op.py +28 -0
  96. mistralai/models/libraries_documents_upload_v1op.py +56 -0
  97. mistralai/models/libraries_get_v1op.py +16 -0
  98. mistralai/models/libraries_share_create_v1op.py +22 -0
  99. mistralai/models/libraries_share_delete_v1op.py +23 -0
  100. mistralai/models/libraries_share_list_v1op.py +16 -0
  101. mistralai/models/libraries_update_v1op.py +23 -0
  102. mistralai/models/libraryin.py +50 -0
  103. mistralai/models/libraryinupdate.py +47 -0
  104. mistralai/models/libraryout.py +107 -0
  105. mistralai/models/listdocumentout.py +19 -0
  106. mistralai/models/listlibraryout.py +15 -0
  107. mistralai/models/listsharingout.py +15 -0
  108. mistralai/models/messageinputentry.py +12 -2
  109. mistralai/models/messageoutputentry.py +1 -1
  110. mistralai/models/messageoutputevent.py +1 -1
  111. mistralai/models/metricout.py +1 -1
  112. mistralai/models/modelcapabilities.py +3 -0
  113. mistralai/models/modelconversation.py +1 -1
  114. mistralai/models/ocrimageobject.py +1 -1
  115. mistralai/models/ocrpageobject.py +1 -1
  116. mistralai/models/ocrrequest.py +5 -3
  117. mistralai/models/ocrresponse.py +1 -1
  118. mistralai/models/ocrusageinfo.py +1 -1
  119. mistralai/models/paginationinfo.py +25 -0
  120. mistralai/models/processingstatusout.py +16 -0
  121. mistralai/models/responseformat.py +1 -1
  122. mistralai/models/retrievefileout.py +1 -1
  123. mistralai/models/shareenum.py +8 -0
  124. mistralai/models/sharingdelete.py +26 -0
  125. mistralai/models/sharingin.py +30 -0
  126. mistralai/models/sharingout.py +59 -0
  127. mistralai/models/ssetypes.py +1 -0
  128. mistralai/models/toolexecutiondeltaevent.py +34 -0
  129. mistralai/models/toolexecutionentry.py +4 -1
  130. mistralai/models/toolexecutionstartedevent.py +3 -0
  131. mistralai/models/toolfilechunk.py +1 -1
  132. mistralai/models/toolmessage.py +1 -1
  133. mistralai/models/toolreferencechunk.py +8 -5
  134. mistralai/models/updateftmodelin.py +1 -1
  135. mistralai/models/uploadfileout.py +1 -1
  136. mistralai/models/usermessage.py +1 -1
  137. mistralai/models/wandbintegration.py +1 -1
  138. mistralai/models/wandbintegrationout.py +1 -1
  139. mistralai/models_.py +14 -2
  140. mistralai/ocr.py +2 -0
  141. mistralai/sdk.py +68 -40
  142. mistralai/sdkconfiguration.py +0 -7
  143. mistralai/types/basemodel.py +3 -3
  144. mistralai/utils/__init__.py +131 -45
  145. mistralai/utils/datetimes.py +23 -0
  146. mistralai/utils/enums.py +67 -27
  147. mistralai/utils/forms.py +49 -28
  148. mistralai/utils/serializers.py +32 -3
  149. {mistralai-1.8.2.dist-info → mistralai-1.9.2.dist-info}/METADATA +41 -7
  150. {mistralai-1.8.2.dist-info → mistralai-1.9.2.dist-info}/RECORD +152 -113
  151. {mistralai-1.8.2.dist-info → mistralai-1.9.2.dist-info}/LICENSE +0 -0
  152. {mistralai-1.8.2.dist-info → mistralai-1.9.2.dist-info}/WHEEL +0 -0
mistralai/agents.py CHANGED
@@ -69,7 +69,7 @@ class Agents(BaseSDK):
69
69
  :param n: Number of completions to return for each request, input tokens are only billed once.
70
70
  :param prediction:
71
71
  :param parallel_tool_calls:
72
- :param prompt_mode:
72
+ :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.
73
73
  :param retries: Override the default retry configuration for this method
74
74
  :param server_url: Override the default server URL for this method
75
75
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -140,6 +140,7 @@ class Agents(BaseSDK):
140
140
 
141
141
  http_res = self.do_request(
142
142
  hook_ctx=HookContext(
143
+ config=self.sdk_configuration,
143
144
  base_url=base_url or "",
144
145
  operation_id="agents_completion_v1_agents_completions_post",
145
146
  oauth2_scopes=[],
@@ -238,7 +239,7 @@ class Agents(BaseSDK):
238
239
  :param n: Number of completions to return for each request, input tokens are only billed once.
239
240
  :param prediction:
240
241
  :param parallel_tool_calls:
241
- :param prompt_mode:
242
+ :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.
242
243
  :param retries: Override the default retry configuration for this method
243
244
  :param server_url: Override the default server URL for this method
244
245
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -309,6 +310,7 @@ class Agents(BaseSDK):
309
310
 
310
311
  http_res = await self.do_request_async(
311
312
  hook_ctx=HookContext(
313
+ config=self.sdk_configuration,
312
314
  base_url=base_url or "",
313
315
  operation_id="agents_completion_v1_agents_completions_post",
314
316
  oauth2_scopes=[],
@@ -409,7 +411,7 @@ class Agents(BaseSDK):
409
411
  :param n: Number of completions to return for each request, input tokens are only billed once.
410
412
  :param prediction:
411
413
  :param parallel_tool_calls:
412
- :param prompt_mode:
414
+ :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.
413
415
  :param retries: Override the default retry configuration for this method
414
416
  :param server_url: Override the default server URL for this method
415
417
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -480,6 +482,7 @@ class Agents(BaseSDK):
480
482
 
481
483
  http_res = self.do_request(
482
484
  hook_ctx=HookContext(
485
+ config=self.sdk_configuration,
483
486
  base_url=base_url or "",
484
487
  operation_id="stream_agents",
485
488
  oauth2_scopes=[],
@@ -586,7 +589,7 @@ class Agents(BaseSDK):
586
589
  :param n: Number of completions to return for each request, input tokens are only billed once.
587
590
  :param prediction:
588
591
  :param parallel_tool_calls:
589
- :param prompt_mode:
592
+ :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.
590
593
  :param retries: Override the default retry configuration for this method
591
594
  :param server_url: Override the default server URL for this method
592
595
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -657,6 +660,7 @@ class Agents(BaseSDK):
657
660
 
658
661
  http_res = await self.do_request_async(
659
662
  hook_ctx=HookContext(
663
+ config=self.sdk_configuration,
660
664
  base_url=base_url or "",
661
665
  operation_id="stream_agents",
662
666
  oauth2_scopes=[],
mistralai/basesdk.py CHANGED
@@ -218,12 +218,12 @@ class BaseSDK:
218
218
  client = self.sdk_configuration.client
219
219
  logger = self.sdk_configuration.debug_logger
220
220
 
221
+ hooks = self.sdk_configuration.__dict__["_hooks"]
222
+
221
223
  def do():
222
224
  http_res = None
223
225
  try:
224
- req = self.sdk_configuration.get_hooks().before_request(
225
- BeforeRequestContext(hook_ctx), request
226
- )
226
+ req = hooks.before_request(BeforeRequestContext(hook_ctx), request)
227
227
  logger.debug(
228
228
  "Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s",
229
229
  req.method,
@@ -237,9 +237,7 @@ class BaseSDK:
237
237
 
238
238
  http_res = client.send(req, stream=stream)
239
239
  except Exception as e:
240
- _, e = self.sdk_configuration.get_hooks().after_error(
241
- AfterErrorContext(hook_ctx), None, e
242
- )
240
+ _, e = hooks.after_error(AfterErrorContext(hook_ctx), None, e)
243
241
  if e is not None:
244
242
  logger.debug("Request Exception", exc_info=True)
245
243
  raise e
@@ -257,7 +255,7 @@ class BaseSDK:
257
255
  )
258
256
 
259
257
  if utils.match_status_codes(error_status_codes, http_res.status_code):
260
- result, err = self.sdk_configuration.get_hooks().after_error(
258
+ result, err = hooks.after_error(
261
259
  AfterErrorContext(hook_ctx), http_res, None
262
260
  )
263
261
  if err is not None:
@@ -277,9 +275,7 @@ class BaseSDK:
277
275
  http_res = do()
278
276
 
279
277
  if not utils.match_status_codes(error_status_codes, http_res.status_code):
280
- http_res = self.sdk_configuration.get_hooks().after_success(
281
- AfterSuccessContext(hook_ctx), http_res
282
- )
278
+ http_res = hooks.after_success(AfterSuccessContext(hook_ctx), http_res)
283
279
 
284
280
  return http_res
285
281
 
@@ -294,12 +290,12 @@ class BaseSDK:
294
290
  client = self.sdk_configuration.async_client
295
291
  logger = self.sdk_configuration.debug_logger
296
292
 
293
+ hooks = self.sdk_configuration.__dict__["_hooks"]
294
+
297
295
  async def do():
298
296
  http_res = None
299
297
  try:
300
- req = self.sdk_configuration.get_hooks().before_request(
301
- BeforeRequestContext(hook_ctx), request
302
- )
298
+ req = hooks.before_request(BeforeRequestContext(hook_ctx), request)
303
299
  logger.debug(
304
300
  "Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s",
305
301
  req.method,
@@ -313,9 +309,7 @@ class BaseSDK:
313
309
 
314
310
  http_res = await client.send(req, stream=stream)
315
311
  except Exception as e:
316
- _, e = self.sdk_configuration.get_hooks().after_error(
317
- AfterErrorContext(hook_ctx), None, e
318
- )
312
+ _, e = hooks.after_error(AfterErrorContext(hook_ctx), None, e)
319
313
  if e is not None:
320
314
  logger.debug("Request Exception", exc_info=True)
321
315
  raise e
@@ -333,7 +327,7 @@ class BaseSDK:
333
327
  )
334
328
 
335
329
  if utils.match_status_codes(error_status_codes, http_res.status_code):
336
- result, err = self.sdk_configuration.get_hooks().after_error(
330
+ result, err = hooks.after_error(
337
331
  AfterErrorContext(hook_ctx), http_res, None
338
332
  )
339
333
  if err is not None:
@@ -355,8 +349,6 @@ class BaseSDK:
355
349
  http_res = await do()
356
350
 
357
351
  if not utils.match_status_codes(error_status_codes, http_res.status_code):
358
- http_res = self.sdk_configuration.get_hooks().after_success(
359
- AfterSuccessContext(hook_ctx), http_res
360
- )
352
+ http_res = hooks.after_success(AfterSuccessContext(hook_ctx), http_res)
361
353
 
362
354
  return http_res
mistralai/beta.py CHANGED
@@ -3,6 +3,7 @@
3
3
  from .basesdk import BaseSDK
4
4
  from .sdkconfiguration import SDKConfiguration
5
5
  from mistralai.conversations import Conversations
6
+ from mistralai.libraries import Libraries
6
7
  from mistralai.mistral_agents import MistralAgents
7
8
 
8
9
 
@@ -11,6 +12,8 @@ class Beta(BaseSDK):
11
12
  r"""(beta) Conversations API"""
12
13
  agents: MistralAgents
13
14
  r"""(beta) Agents API"""
15
+ libraries: Libraries
16
+ r"""(beta) Libraries API for indexing documents to enhance agent capabilities."""
14
17
 
15
18
  def __init__(self, sdk_config: SDKConfiguration) -> None:
16
19
  BaseSDK.__init__(self, sdk_config)
@@ -20,3 +23,4 @@ class Beta(BaseSDK):
20
23
  def _init_sdks(self):
21
24
  self.conversations = Conversations(self.sdk_configuration)
22
25
  self.agents = MistralAgents(self.sdk_configuration)
26
+ self.libraries = Libraries(self.sdk_configuration)
mistralai/chat.py CHANGED
@@ -148,7 +148,7 @@ class Chat(BaseSDK):
148
148
  :param n: Number of completions to return for each request, input tokens are only billed once.
149
149
  :param prediction:
150
150
  :param parallel_tool_calls:
151
- :param prompt_mode:
151
+ :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.
152
152
  :param safe_prompt: Whether to inject a safety prompt before all conversations.
153
153
  :param retries: Override the default retry configuration for this method
154
154
  :param server_url: Override the default server URL for this method
@@ -221,6 +221,7 @@ class Chat(BaseSDK):
221
221
 
222
222
  http_res = self.do_request(
223
223
  hook_ctx=HookContext(
224
+ config=self.sdk_configuration,
224
225
  base_url=base_url or "",
225
226
  operation_id="chat_completion_v1_chat_completions_post",
226
227
  oauth2_scopes=[],
@@ -316,7 +317,7 @@ class Chat(BaseSDK):
316
317
  :param n: Number of completions to return for each request, input tokens are only billed once.
317
318
  :param prediction:
318
319
  :param parallel_tool_calls:
319
- :param prompt_mode:
320
+ :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.
320
321
  :param safe_prompt: Whether to inject a safety prompt before all conversations.
321
322
  :param retries: Override the default retry configuration for this method
322
323
  :param server_url: Override the default server URL for this method
@@ -389,6 +390,7 @@ class Chat(BaseSDK):
389
390
 
390
391
  http_res = await self.do_request_async(
391
392
  hook_ctx=HookContext(
393
+ config=self.sdk_configuration,
392
394
  base_url=base_url or "",
393
395
  operation_id="chat_completion_v1_chat_completions_post",
394
396
  oauth2_scopes=[],
@@ -494,7 +496,7 @@ class Chat(BaseSDK):
494
496
  :param n: Number of completions to return for each request, input tokens are only billed once.
495
497
  :param prediction:
496
498
  :param parallel_tool_calls:
497
- :param prompt_mode:
499
+ :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.
498
500
  :param safe_prompt: Whether to inject a safety prompt before all conversations.
499
501
  :param retries: Override the default retry configuration for this method
500
502
  :param server_url: Override the default server URL for this method
@@ -569,6 +571,7 @@ class Chat(BaseSDK):
569
571
 
570
572
  http_res = self.do_request(
571
573
  hook_ctx=HookContext(
574
+ config=self.sdk_configuration,
572
575
  base_url=base_url or "",
573
576
  operation_id="stream_chat",
574
577
  oauth2_scopes=[],
@@ -680,7 +683,7 @@ class Chat(BaseSDK):
680
683
  :param n: Number of completions to return for each request, input tokens are only billed once.
681
684
  :param prediction:
682
685
  :param parallel_tool_calls:
683
- :param prompt_mode:
686
+ :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.
684
687
  :param safe_prompt: Whether to inject a safety prompt before all conversations.
685
688
  :param retries: Override the default retry configuration for this method
686
689
  :param server_url: Override the default server URL for this method
@@ -755,6 +758,7 @@ class Chat(BaseSDK):
755
758
 
756
759
  http_res = await self.do_request_async(
757
760
  hook_ctx=HookContext(
761
+ config=self.sdk_configuration,
758
762
  base_url=base_url or "",
759
763
  operation_id="stream_chat",
760
764
  oauth2_scopes=[],
mistralai/classifiers.py CHANGED
@@ -77,6 +77,7 @@ class Classifiers(BaseSDK):
77
77
 
78
78
  http_res = self.do_request(
79
79
  hook_ctx=HookContext(
80
+ config=self.sdk_configuration,
80
81
  base_url=base_url or "",
81
82
  operation_id="moderations_v1_moderations_post",
82
83
  oauth2_scopes=[],
@@ -183,6 +184,7 @@ class Classifiers(BaseSDK):
183
184
 
184
185
  http_res = await self.do_request_async(
185
186
  hook_ctx=HookContext(
187
+ config=self.sdk_configuration,
186
188
  base_url=base_url or "",
187
189
  operation_id="moderations_v1_moderations_post",
188
190
  oauth2_scopes=[],
@@ -289,6 +291,7 @@ class Classifiers(BaseSDK):
289
291
 
290
292
  http_res = self.do_request(
291
293
  hook_ctx=HookContext(
294
+ config=self.sdk_configuration,
292
295
  base_url=base_url or "",
293
296
  operation_id="chat_moderations_v1_chat_moderations_post",
294
297
  oauth2_scopes=[],
@@ -395,6 +398,7 @@ class Classifiers(BaseSDK):
395
398
 
396
399
  http_res = await self.do_request_async(
397
400
  hook_ctx=HookContext(
401
+ config=self.sdk_configuration,
398
402
  base_url=base_url or "",
399
403
  operation_id="chat_moderations_v1_chat_moderations_post",
400
404
  oauth2_scopes=[],
@@ -501,6 +505,7 @@ class Classifiers(BaseSDK):
501
505
 
502
506
  http_res = self.do_request(
503
507
  hook_ctx=HookContext(
508
+ config=self.sdk_configuration,
504
509
  base_url=base_url or "",
505
510
  operation_id="classifications_v1_classifications_post",
506
511
  oauth2_scopes=[],
@@ -607,6 +612,7 @@ class Classifiers(BaseSDK):
607
612
 
608
613
  http_res = await self.do_request_async(
609
614
  hook_ctx=HookContext(
615
+ config=self.sdk_configuration,
610
616
  base_url=base_url or "",
611
617
  operation_id="classifications_v1_classifications_post",
612
618
  oauth2_scopes=[],
@@ -710,6 +716,7 @@ class Classifiers(BaseSDK):
710
716
 
711
717
  http_res = self.do_request(
712
718
  hook_ctx=HookContext(
719
+ config=self.sdk_configuration,
713
720
  base_url=base_url or "",
714
721
  operation_id="chat_classifications_v1_chat_classifications_post",
715
722
  oauth2_scopes=[],
@@ -813,6 +820,7 @@ class Classifiers(BaseSDK):
813
820
 
814
821
  http_res = await self.do_request_async(
815
822
  hook_ctx=HookContext(
823
+ config=self.sdk_configuration,
816
824
  base_url=base_url or "",
817
825
  operation_id="chat_classifications_v1_chat_classifications_post",
818
826
  oauth2_scopes=[],
@@ -313,6 +313,7 @@ class Conversations(BaseSDK):
313
313
 
314
314
  http_res = self.do_request(
315
315
  hook_ctx=HookContext(
316
+ config=self.sdk_configuration,
316
317
  base_url=base_url or "",
317
318
  operation_id="agents_api_v1_conversations_start",
318
319
  oauth2_scopes=[],
@@ -451,6 +452,7 @@ class Conversations(BaseSDK):
451
452
 
452
453
  http_res = await self.do_request_async(
453
454
  hook_ctx=HookContext(
455
+ config=self.sdk_configuration,
454
456
  base_url=base_url or "",
455
457
  operation_id="agents_api_v1_conversations_start",
456
458
  oauth2_scopes=[],
@@ -553,6 +555,7 @@ class Conversations(BaseSDK):
553
555
 
554
556
  http_res = self.do_request(
555
557
  hook_ctx=HookContext(
558
+ config=self.sdk_configuration,
556
559
  base_url=base_url or "",
557
560
  operation_id="agents_api_v1_conversations_list",
558
561
  oauth2_scopes=[],
@@ -655,6 +658,7 @@ class Conversations(BaseSDK):
655
658
 
656
659
  http_res = await self.do_request_async(
657
660
  hook_ctx=HookContext(
661
+ config=self.sdk_configuration,
658
662
  base_url=base_url or "",
659
663
  operation_id="agents_api_v1_conversations_list",
660
664
  oauth2_scopes=[],
@@ -708,7 +712,7 @@ class Conversations(BaseSDK):
708
712
 
709
713
  Given a conversation_id retrieve a conversation entity with its attributes.
710
714
 
711
- :param conversation_id:
715
+ :param conversation_id: ID of the conversation from which we are fetching metadata.
712
716
  :param retries: Override the default retry configuration for this method
713
717
  :param server_url: Override the default server URL for this method
714
718
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -754,6 +758,7 @@ class Conversations(BaseSDK):
754
758
 
755
759
  http_res = self.do_request(
756
760
  hook_ctx=HookContext(
761
+ config=self.sdk_configuration,
757
762
  base_url=base_url or "",
758
763
  operation_id="agents_api_v1_conversations_get",
759
764
  oauth2_scopes=[],
@@ -810,7 +815,7 @@ class Conversations(BaseSDK):
810
815
 
811
816
  Given a conversation_id retrieve a conversation entity with its attributes.
812
817
 
813
- :param conversation_id:
818
+ :param conversation_id: ID of the conversation from which we are fetching metadata.
814
819
  :param retries: Override the default retry configuration for this method
815
820
  :param server_url: Override the default server URL for this method
816
821
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -856,6 +861,7 @@ class Conversations(BaseSDK):
856
861
 
857
862
  http_res = await self.do_request_async(
858
863
  hook_ctx=HookContext(
864
+ config=self.sdk_configuration,
859
865
  base_url=base_url or "",
860
866
  operation_id="agents_api_v1_conversations_get",
861
867
  oauth2_scopes=[],
@@ -988,6 +994,7 @@ class Conversations(BaseSDK):
988
994
 
989
995
  http_res = self.do_request(
990
996
  hook_ctx=HookContext(
997
+ config=self.sdk_configuration,
991
998
  base_url=base_url or "",
992
999
  operation_id="agents_api_v1_conversations_append",
993
1000
  oauth2_scopes=[],
@@ -1117,6 +1124,7 @@ class Conversations(BaseSDK):
1117
1124
 
1118
1125
  http_res = await self.do_request_async(
1119
1126
  hook_ctx=HookContext(
1127
+ config=self.sdk_configuration,
1120
1128
  base_url=base_url or "",
1121
1129
  operation_id="agents_api_v1_conversations_append",
1122
1130
  oauth2_scopes=[],
@@ -1170,7 +1178,7 @@ class Conversations(BaseSDK):
1170
1178
 
1171
1179
  Given a conversation_id retrieve all the entries belonging to that conversation. The entries are sorted in the order they were appended, those can be messages, connectors or function_call.
1172
1180
 
1173
- :param conversation_id:
1181
+ :param conversation_id: ID of the conversation from which we are fetching entries.
1174
1182
  :param retries: Override the default retry configuration for this method
1175
1183
  :param server_url: Override the default server URL for this method
1176
1184
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -1216,6 +1224,7 @@ class Conversations(BaseSDK):
1216
1224
 
1217
1225
  http_res = self.do_request(
1218
1226
  hook_ctx=HookContext(
1227
+ config=self.sdk_configuration,
1219
1228
  base_url=base_url or "",
1220
1229
  operation_id="agents_api_v1_conversations_history",
1221
1230
  oauth2_scopes=[],
@@ -1269,7 +1278,7 @@ class Conversations(BaseSDK):
1269
1278
 
1270
1279
  Given a conversation_id retrieve all the entries belonging to that conversation. The entries are sorted in the order they were appended, those can be messages, connectors or function_call.
1271
1280
 
1272
- :param conversation_id:
1281
+ :param conversation_id: ID of the conversation from which we are fetching entries.
1273
1282
  :param retries: Override the default retry configuration for this method
1274
1283
  :param server_url: Override the default server URL for this method
1275
1284
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -1315,6 +1324,7 @@ class Conversations(BaseSDK):
1315
1324
 
1316
1325
  http_res = await self.do_request_async(
1317
1326
  hook_ctx=HookContext(
1327
+ config=self.sdk_configuration,
1318
1328
  base_url=base_url or "",
1319
1329
  operation_id="agents_api_v1_conversations_history",
1320
1330
  oauth2_scopes=[],
@@ -1368,7 +1378,7 @@ class Conversations(BaseSDK):
1368
1378
 
1369
1379
  Given a conversation_id retrieve all the messages belonging to that conversation. This is similar to retrieving all entries except we filter the messages only.
1370
1380
 
1371
- :param conversation_id:
1381
+ :param conversation_id: ID of the conversation from which we are fetching messages.
1372
1382
  :param retries: Override the default retry configuration for this method
1373
1383
  :param server_url: Override the default server URL for this method
1374
1384
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -1414,6 +1424,7 @@ class Conversations(BaseSDK):
1414
1424
 
1415
1425
  http_res = self.do_request(
1416
1426
  hook_ctx=HookContext(
1427
+ config=self.sdk_configuration,
1417
1428
  base_url=base_url or "",
1418
1429
  operation_id="agents_api_v1_conversations_messages",
1419
1430
  oauth2_scopes=[],
@@ -1467,7 +1478,7 @@ class Conversations(BaseSDK):
1467
1478
 
1468
1479
  Given a conversation_id retrieve all the messages belonging to that conversation. This is similar to retrieving all entries except we filter the messages only.
1469
1480
 
1470
- :param conversation_id:
1481
+ :param conversation_id: ID of the conversation from which we are fetching messages.
1471
1482
  :param retries: Override the default retry configuration for this method
1472
1483
  :param server_url: Override the default server URL for this method
1473
1484
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -1513,6 +1524,7 @@ class Conversations(BaseSDK):
1513
1524
 
1514
1525
  http_res = await self.do_request_async(
1515
1526
  hook_ctx=HookContext(
1527
+ config=self.sdk_configuration,
1516
1528
  base_url=base_url or "",
1517
1529
  operation_id="agents_api_v1_conversations_messages",
1518
1530
  oauth2_scopes=[],
@@ -1576,7 +1588,7 @@ class Conversations(BaseSDK):
1576
1588
 
1577
1589
  Given a conversation_id and an id, recreate a conversation from this point and run completion. A new conversation is returned with the new entries returned.
1578
1590
 
1579
- :param conversation_id:
1591
+ :param conversation_id: ID of the original conversation which is being restarted.
1580
1592
  :param inputs:
1581
1593
  :param from_entry_id:
1582
1594
  :param stream:
@@ -1605,10 +1617,10 @@ class Conversations(BaseSDK):
1605
1617
  stream=stream,
1606
1618
  store=store,
1607
1619
  handoff_execution=handoff_execution,
1608
- from_entry_id=from_entry_id,
1609
1620
  completion_args=utils.get_pydantic_model(
1610
1621
  completion_args, Optional[models.CompletionArgs]
1611
1622
  ),
1623
+ from_entry_id=from_entry_id,
1612
1624
  ),
1613
1625
  )
1614
1626
 
@@ -1645,6 +1657,7 @@ class Conversations(BaseSDK):
1645
1657
 
1646
1658
  http_res = self.do_request(
1647
1659
  hook_ctx=HookContext(
1660
+ config=self.sdk_configuration,
1648
1661
  base_url=base_url or "",
1649
1662
  operation_id="agents_api_v1_conversations_restart",
1650
1663
  oauth2_scopes=[],
@@ -1708,7 +1721,7 @@ class Conversations(BaseSDK):
1708
1721
 
1709
1722
  Given a conversation_id and an id, recreate a conversation from this point and run completion. A new conversation is returned with the new entries returned.
1710
1723
 
1711
- :param conversation_id:
1724
+ :param conversation_id: ID of the original conversation which is being restarted.
1712
1725
  :param inputs:
1713
1726
  :param from_entry_id:
1714
1727
  :param stream:
@@ -1737,10 +1750,10 @@ class Conversations(BaseSDK):
1737
1750
  stream=stream,
1738
1751
  store=store,
1739
1752
  handoff_execution=handoff_execution,
1740
- from_entry_id=from_entry_id,
1741
1753
  completion_args=utils.get_pydantic_model(
1742
1754
  completion_args, Optional[models.CompletionArgs]
1743
1755
  ),
1756
+ from_entry_id=from_entry_id,
1744
1757
  ),
1745
1758
  )
1746
1759
 
@@ -1777,6 +1790,7 @@ class Conversations(BaseSDK):
1777
1790
 
1778
1791
  http_res = await self.do_request_async(
1779
1792
  hook_ctx=HookContext(
1793
+ config=self.sdk_configuration,
1780
1794
  base_url=base_url or "",
1781
1795
  operation_id="agents_api_v1_conversations_restart",
1782
1796
  oauth2_scopes=[],
@@ -1922,6 +1936,7 @@ class Conversations(BaseSDK):
1922
1936
 
1923
1937
  http_res = self.do_request(
1924
1938
  hook_ctx=HookContext(
1939
+ config=self.sdk_configuration,
1925
1940
  base_url=base_url or "",
1926
1941
  operation_id="agents_api_v1_conversations_start_stream",
1927
1942
  oauth2_scopes=[],
@@ -2072,6 +2087,7 @@ class Conversations(BaseSDK):
2072
2087
 
2073
2088
  http_res = await self.do_request_async(
2074
2089
  hook_ctx=HookContext(
2090
+ config=self.sdk_configuration,
2075
2091
  base_url=base_url or "",
2076
2092
  operation_id="agents_api_v1_conversations_start_stream",
2077
2093
  oauth2_scopes=[],
@@ -2206,6 +2222,7 @@ class Conversations(BaseSDK):
2206
2222
 
2207
2223
  http_res = self.do_request(
2208
2224
  hook_ctx=HookContext(
2225
+ config=self.sdk_configuration,
2209
2226
  base_url=base_url or "",
2210
2227
  operation_id="agents_api_v1_conversations_append_stream",
2211
2228
  oauth2_scopes=[],
@@ -2340,6 +2357,7 @@ class Conversations(BaseSDK):
2340
2357
 
2341
2358
  http_res = await self.do_request_async(
2342
2359
  hook_ctx=HookContext(
2360
+ config=self.sdk_configuration,
2343
2361
  base_url=base_url or "",
2344
2362
  operation_id="agents_api_v1_conversations_append_stream",
2345
2363
  oauth2_scopes=[],
@@ -2408,7 +2426,7 @@ class Conversations(BaseSDK):
2408
2426
 
2409
2427
  Given a conversation_id and an id, recreate a conversation from this point and run completion. A new conversation is returned with the new entries returned.
2410
2428
 
2411
- :param conversation_id:
2429
+ :param conversation_id: ID of the original conversation which is being restarted.
2412
2430
  :param inputs:
2413
2431
  :param from_entry_id:
2414
2432
  :param stream:
@@ -2437,10 +2455,10 @@ class Conversations(BaseSDK):
2437
2455
  stream=stream,
2438
2456
  store=store,
2439
2457
  handoff_execution=handoff_execution,
2440
- from_entry_id=from_entry_id,
2441
2458
  completion_args=utils.get_pydantic_model(
2442
2459
  completion_args, Optional[models.CompletionArgs]
2443
2460
  ),
2461
+ from_entry_id=from_entry_id,
2444
2462
  ),
2445
2463
  )
2446
2464
 
@@ -2477,6 +2495,7 @@ class Conversations(BaseSDK):
2477
2495
 
2478
2496
  http_res = self.do_request(
2479
2497
  hook_ctx=HookContext(
2498
+ config=self.sdk_configuration,
2480
2499
  base_url=base_url or "",
2481
2500
  operation_id="agents_api_v1_conversations_restart_stream",
2482
2501
  oauth2_scopes=[],
@@ -2545,7 +2564,7 @@ class Conversations(BaseSDK):
2545
2564
 
2546
2565
  Given a conversation_id and an id, recreate a conversation from this point and run completion. A new conversation is returned with the new entries returned.
2547
2566
 
2548
- :param conversation_id:
2567
+ :param conversation_id: ID of the original conversation which is being restarted.
2549
2568
  :param inputs:
2550
2569
  :param from_entry_id:
2551
2570
  :param stream:
@@ -2574,10 +2593,10 @@ class Conversations(BaseSDK):
2574
2593
  stream=stream,
2575
2594
  store=store,
2576
2595
  handoff_execution=handoff_execution,
2577
- from_entry_id=from_entry_id,
2578
2596
  completion_args=utils.get_pydantic_model(
2579
2597
  completion_args, Optional[models.CompletionArgs]
2580
2598
  ),
2599
+ from_entry_id=from_entry_id,
2581
2600
  ),
2582
2601
  )
2583
2602
 
@@ -2614,6 +2633,7 @@ class Conversations(BaseSDK):
2614
2633
 
2615
2634
  http_res = await self.do_request_async(
2616
2635
  hook_ctx=HookContext(
2636
+ config=self.sdk_configuration,
2617
2637
  base_url=base_url or "",
2618
2638
  operation_id="agents_api_v1_conversations_restart_stream",
2619
2639
  oauth2_scopes=[],