mistralai 1.0.1__tar.gz → 1.0.3__tar.gz

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 (240) hide show
  1. {mistralai-1.0.1 → mistralai-1.0.3}/PKG-INFO +6 -3
  2. {mistralai-1.0.1 → mistralai-1.0.3}/README.md +4 -1
  3. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/models/__init__.py +3 -3
  4. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/models/chatcompletionchoice.py +3 -4
  5. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/models/deltamessage.py +3 -3
  6. mistralai-1.0.3/packages/mistralai_azure/src/mistralai_azure/models/tool.py +22 -0
  7. {mistralai-1.0.1/src/mistralai → mistralai-1.0.3/packages/mistralai_azure/src/mistralai_azure}/models/toolcall.py +8 -4
  8. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/sdkconfiguration.py +3 -3
  9. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/chat.py +4 -4
  10. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/models/__init__.py +3 -3
  11. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/models/chatcompletionchoice.py +3 -4
  12. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/models/chatcompletionrequest.py +2 -2
  13. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/models/chatcompletionstreamrequest.py +2 -2
  14. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/models/deltamessage.py +3 -3
  15. mistralai-1.0.3/packages/mistralai_gcp/src/mistralai_gcp/models/tool.py +22 -0
  16. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/models/toolcall.py +8 -4
  17. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/sdk.py +17 -12
  18. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/sdkconfiguration.py +3 -3
  19. {mistralai-1.0.1 → mistralai-1.0.3}/pyproject.toml +2 -2
  20. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/agents.py +31 -31
  21. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/chat.py +4 -4
  22. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/jobs.py +8 -8
  23. mistralai-1.0.3/src/mistralai/models/__init__.py +82 -0
  24. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/agentscompletionstreamrequest.py +33 -31
  25. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/archiveftmodelout.py +4 -2
  26. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/chatcompletionchoice.py +3 -4
  27. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/chatcompletionrequest.py +2 -2
  28. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/chatcompletionstreamrequest.py +2 -2
  29. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/deltamessage.py +3 -3
  30. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/detailedjobout.py +19 -5
  31. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/files_api_routes_upload_fileop.py +7 -4
  32. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/fileschema.py +8 -3
  33. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/ftmodelout.py +4 -2
  34. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/githubrepositoryin.py +4 -2
  35. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/githubrepositoryout.py +4 -2
  36. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/jobin.py +16 -4
  37. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/jobout.py +20 -5
  38. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/jobsout.py +4 -2
  39. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/legacyjobmetadataout.py +4 -2
  40. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/retrievefileout.py +8 -3
  41. mistralai-1.0.3/src/mistralai/models/tool.py +22 -0
  42. {mistralai-1.0.1/packages/mistralai_azure/src/mistralai_azure → mistralai-1.0.3/src/mistralai}/models/toolcall.py +8 -4
  43. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/trainingparameters.py +6 -2
  44. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/trainingparametersin.py +10 -2
  45. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/unarchiveftmodelout.py +4 -2
  46. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/uploadfileout.py +8 -3
  47. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/wandbintegration.py +4 -2
  48. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/wandbintegrationout.py +4 -2
  49. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/sdk.py +2 -2
  50. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/sdkconfiguration.py +3 -3
  51. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/utils/__init__.py +2 -2
  52. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/utils/forms.py +10 -9
  53. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/utils/headers.py +8 -8
  54. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/utils/logger.py +8 -0
  55. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/utils/queryparams.py +16 -14
  56. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/utils/serializers.py +17 -8
  57. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/utils/url.py +13 -8
  58. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/utils/values.py +6 -0
  59. mistralai-1.0.3/src/mistralai/version.py +7 -0
  60. mistralai-1.0.1/packages/mistralai_azure/src/mistralai_azure/models/tool.py +0 -18
  61. mistralai-1.0.1/packages/mistralai_gcp/src/mistralai_gcp/models/tool.py +0 -18
  62. mistralai-1.0.1/src/mistralai/models/__init__.py +0 -82
  63. mistralai-1.0.1/src/mistralai/models/tool.py +0 -18
  64. {mistralai-1.0.1 → mistralai-1.0.3}/LICENSE +0 -0
  65. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/__init__.py +0 -0
  66. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/_hooks/__init__.py +0 -0
  67. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/_hooks/custom_user_agent.py +0 -0
  68. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/_hooks/registration.py +0 -0
  69. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/_hooks/sdkhooks.py +0 -0
  70. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/_hooks/types.py +0 -0
  71. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/basesdk.py +0 -0
  72. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/chat.py +0 -0
  73. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/httpclient.py +0 -0
  74. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/models/assistantmessage.py +0 -0
  75. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/models/chatcompletionrequest.py +0 -0
  76. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/models/chatcompletionresponse.py +0 -0
  77. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/models/chatcompletionstreamrequest.py +0 -0
  78. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/models/completionchunk.py +0 -0
  79. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/models/completionevent.py +0 -0
  80. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/models/completionresponsestreamchoice.py +0 -0
  81. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/models/contentchunk.py +0 -0
  82. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/models/function.py +0 -0
  83. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/models/functioncall.py +0 -0
  84. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/models/httpvalidationerror.py +0 -0
  85. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/models/responseformat.py +0 -0
  86. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/models/sdkerror.py +0 -0
  87. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/models/security.py +0 -0
  88. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/models/systemmessage.py +0 -0
  89. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/models/textchunk.py +0 -0
  90. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/models/toolmessage.py +0 -0
  91. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/models/usageinfo.py +0 -0
  92. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/models/usermessage.py +0 -0
  93. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/models/validationerror.py +0 -0
  94. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/py.typed +0 -0
  95. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/sdk.py +0 -0
  96. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/types/__init__.py +0 -0
  97. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/types/basemodel.py +0 -0
  98. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/utils/__init__.py +0 -0
  99. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/utils/annotations.py +0 -0
  100. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/utils/enums.py +0 -0
  101. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/utils/eventstreaming.py +0 -0
  102. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/utils/forms.py +0 -0
  103. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/utils/headers.py +0 -0
  104. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/utils/logger.py +0 -0
  105. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/utils/metadata.py +0 -0
  106. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/utils/queryparams.py +0 -0
  107. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/utils/requestbodies.py +0 -0
  108. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/utils/retries.py +0 -0
  109. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/utils/security.py +0 -0
  110. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/utils/serializers.py +0 -0
  111. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/utils/url.py +0 -0
  112. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_azure/src/mistralai_azure/utils/values.py +0 -0
  113. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/__init__.py +0 -0
  114. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/_hooks/__init__.py +0 -0
  115. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/_hooks/custom_user_agent.py +0 -0
  116. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/_hooks/registration.py +0 -0
  117. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/_hooks/sdkhooks.py +0 -0
  118. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/_hooks/types.py +0 -0
  119. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/basesdk.py +0 -0
  120. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/fim.py +0 -0
  121. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/httpclient.py +0 -0
  122. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/models/assistantmessage.py +0 -0
  123. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/models/chatcompletionresponse.py +0 -0
  124. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/models/completionchunk.py +0 -0
  125. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/models/completionevent.py +0 -0
  126. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/models/completionresponsestreamchoice.py +0 -0
  127. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/models/contentchunk.py +0 -0
  128. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/models/fimcompletionrequest.py +0 -0
  129. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/models/fimcompletionresponse.py +0 -0
  130. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/models/fimcompletionstreamrequest.py +0 -0
  131. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/models/function.py +0 -0
  132. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/models/functioncall.py +0 -0
  133. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/models/httpvalidationerror.py +0 -0
  134. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/models/responseformat.py +0 -0
  135. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/models/sdkerror.py +0 -0
  136. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/models/security.py +0 -0
  137. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/models/systemmessage.py +0 -0
  138. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/models/textchunk.py +0 -0
  139. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/models/toolmessage.py +0 -0
  140. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/models/usageinfo.py +0 -0
  141. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/models/usermessage.py +0 -0
  142. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/models/validationerror.py +0 -0
  143. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/py.typed +0 -0
  144. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/types/__init__.py +0 -0
  145. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/types/basemodel.py +0 -0
  146. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/utils/__init__.py +0 -0
  147. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/utils/annotations.py +0 -0
  148. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/utils/enums.py +0 -0
  149. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/utils/eventstreaming.py +0 -0
  150. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/utils/forms.py +0 -0
  151. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/utils/headers.py +0 -0
  152. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/utils/logger.py +0 -0
  153. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/utils/metadata.py +0 -0
  154. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/utils/queryparams.py +0 -0
  155. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/utils/requestbodies.py +0 -0
  156. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/utils/retries.py +0 -0
  157. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/utils/security.py +0 -0
  158. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/utils/serializers.py +0 -0
  159. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/utils/url.py +0 -0
  160. {mistralai-1.0.1 → mistralai-1.0.3}/packages/mistralai_gcp/src/mistralai_gcp/utils/values.py +0 -0
  161. {mistralai-1.0.1 → mistralai-1.0.3}/py.typed +0 -0
  162. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/__init__.py +0 -0
  163. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/_hooks/__init__.py +0 -0
  164. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/_hooks/custom_user_agent.py +0 -0
  165. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/_hooks/deprecation_warning.py +0 -0
  166. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/_hooks/registration.py +0 -0
  167. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/_hooks/sdkhooks.py +0 -0
  168. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/_hooks/types.py +0 -0
  169. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/async_client.py +0 -0
  170. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/basesdk.py +0 -0
  171. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/client.py +0 -0
  172. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/embeddings.py +0 -0
  173. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/files.py +0 -0
  174. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/fim.py +0 -0
  175. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/fine_tuning.py +0 -0
  176. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/httpclient.py +0 -0
  177. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/agentscompletionrequest.py +0 -0
  178. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/assistantmessage.py +0 -0
  179. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/chatcompletionresponse.py +0 -0
  180. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/checkpointout.py +0 -0
  181. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/completionchunk.py +0 -0
  182. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/completionevent.py +0 -0
  183. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/completionresponsestreamchoice.py +0 -0
  184. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/contentchunk.py +0 -0
  185. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/delete_model_v1_models_model_id_deleteop.py +0 -0
  186. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/deletefileout.py +0 -0
  187. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/deletemodelout.py +0 -0
  188. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/embeddingrequest.py +0 -0
  189. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/embeddingresponse.py +0 -0
  190. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/embeddingresponsedata.py +0 -0
  191. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/eventout.py +0 -0
  192. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/files_api_routes_delete_fileop.py +0 -0
  193. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/files_api_routes_retrieve_fileop.py +0 -0
  194. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/fimcompletionrequest.py +0 -0
  195. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/fimcompletionresponse.py +0 -0
  196. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/fimcompletionstreamrequest.py +0 -0
  197. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/finetuneablemodel.py +0 -0
  198. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/ftmodelcapabilitiesout.py +0 -0
  199. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/function.py +0 -0
  200. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/functioncall.py +0 -0
  201. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/httpvalidationerror.py +0 -0
  202. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/jobmetadataout.py +0 -0
  203. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/jobs_api_routes_fine_tuning_archive_fine_tuned_modelop.py +0 -0
  204. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/jobs_api_routes_fine_tuning_cancel_fine_tuning_jobop.py +0 -0
  205. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/jobs_api_routes_fine_tuning_create_fine_tuning_jobop.py +0 -0
  206. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/jobs_api_routes_fine_tuning_get_fine_tuning_jobop.py +0 -0
  207. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/jobs_api_routes_fine_tuning_get_fine_tuning_jobsop.py +0 -0
  208. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/jobs_api_routes_fine_tuning_start_fine_tuning_jobop.py +0 -0
  209. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/jobs_api_routes_fine_tuning_unarchive_fine_tuned_modelop.py +0 -0
  210. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/jobs_api_routes_fine_tuning_update_fine_tuned_modelop.py +0 -0
  211. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/listfilesout.py +0 -0
  212. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/metricout.py +0 -0
  213. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/modelcapabilities.py +0 -0
  214. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/modelcard.py +0 -0
  215. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/modellist.py +0 -0
  216. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/responseformat.py +0 -0
  217. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/retrieve_model_v1_models_model_id_getop.py +0 -0
  218. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/sampletype.py +0 -0
  219. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/sdkerror.py +0 -0
  220. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/security.py +0 -0
  221. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/source.py +0 -0
  222. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/systemmessage.py +0 -0
  223. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/textchunk.py +0 -0
  224. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/toolmessage.py +0 -0
  225. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/trainingfile.py +0 -0
  226. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/updateftmodelin.py +0 -0
  227. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/usageinfo.py +0 -0
  228. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/usermessage.py +0 -0
  229. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models/validationerror.py +0 -0
  230. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/models_.py +0 -0
  231. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/py.typed +0 -0
  232. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/types/__init__.py +0 -0
  233. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/types/basemodel.py +0 -0
  234. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/utils/annotations.py +0 -0
  235. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/utils/enums.py +0 -0
  236. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/utils/eventstreaming.py +0 -0
  237. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/utils/metadata.py +0 -0
  238. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/utils/requestbodies.py +0 -0
  239. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/utils/retries.py +0 -0
  240. {mistralai-1.0.1 → mistralai-1.0.3}/src/mistralai/utils/security.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mistralai
3
- Version: 1.0.1
3
+ Version: 1.0.3
4
4
  Summary: Python Client SDK for the Mistral AI API.
5
5
  Author: Mistral
6
6
  Requires-Python: >=3.8,<4.0
@@ -11,7 +11,7 @@ Classifier: Programming Language :: Python :: 3.10
11
11
  Classifier: Programming Language :: Python :: 3.11
12
12
  Classifier: Programming Language :: Python :: 3.12
13
13
  Provides-Extra: gcp
14
- Requires-Dist: google-auth (>=2.31.0,<3.0.0) ; extra == "gcp"
14
+ Requires-Dist: google-auth (==2.27.0) ; extra == "gcp"
15
15
  Requires-Dist: httpx (>=0.27.0,<0.28.0)
16
16
  Requires-Dist: jsonpath-python (>=1.0.6,<2.0.0)
17
17
  Requires-Dist: pydantic (>=2.8.2,<2.9.0)
@@ -673,8 +673,9 @@ if res is not None:
673
673
  <!-- Start Debugging [debug] -->
674
674
  ## Debugging
675
675
 
676
- To emit debug logs for SDK requests and responses you can pass a logger object directly into your SDK object.
676
+ You can setup your SDK to emit debug logs for SDK requests and responses.
677
677
 
678
+ You can pass your own logger class directly into your SDK.
678
679
  ```python
679
680
  from mistralai import Mistral
680
681
  import logging
@@ -682,6 +683,8 @@ import logging
682
683
  logging.basicConfig(level=logging.DEBUG)
683
684
  s = Mistral(debug_logger=logging.getLogger("mistralai"))
684
685
  ```
686
+
687
+ You can also enable a default debug logger by setting an environment variable `MISTRAL_DEBUG` to true.
685
688
  <!-- End Debugging [debug] -->
686
689
 
687
690
  <!-- Start IDE Support [idesupport] -->
@@ -651,8 +651,9 @@ if res is not None:
651
651
  <!-- Start Debugging [debug] -->
652
652
  ## Debugging
653
653
 
654
- To emit debug logs for SDK requests and responses you can pass a logger object directly into your SDK object.
654
+ You can setup your SDK to emit debug logs for SDK requests and responses.
655
655
 
656
+ You can pass your own logger class directly into your SDK.
656
657
  ```python
657
658
  from mistralai import Mistral
658
659
  import logging
@@ -660,6 +661,8 @@ import logging
660
661
  logging.basicConfig(level=logging.DEBUG)
661
662
  s = Mistral(debug_logger=logging.getLogger("mistralai"))
662
663
  ```
664
+
665
+ You can also enable a default debug logger by setting an environment variable `MISTRAL_DEBUG` to true.
663
666
  <!-- End Debugging [debug] -->
664
667
 
665
668
  <!-- Start IDE Support [idesupport] -->
@@ -18,11 +18,11 @@ from .sdkerror import SDKError
18
18
  from .security import Security, SecurityTypedDict
19
19
  from .systemmessage import Content, ContentTypedDict, Role, SystemMessage, SystemMessageTypedDict
20
20
  from .textchunk import TextChunk, TextChunkTypedDict
21
- from .tool import Tool, ToolTypedDict
22
- from .toolcall import ToolCall, ToolCallTypedDict
21
+ from .tool import Tool, ToolToolTypes, ToolTypedDict
22
+ from .toolcall import ToolCall, ToolCallTypedDict, ToolTypes
23
23
  from .toolmessage import ToolMessage, ToolMessageRole, ToolMessageTypedDict
24
24
  from .usageinfo import UsageInfo, UsageInfoTypedDict
25
25
  from .usermessage import UserMessage, UserMessageContent, UserMessageContentTypedDict, UserMessageRole, UserMessageTypedDict
26
26
  from .validationerror import Loc, LocTypedDict, ValidationError, ValidationErrorTypedDict
27
27
 
28
- __all__ = ["Arguments", "ArgumentsTypedDict", "AssistantMessage", "AssistantMessageRole", "AssistantMessageTypedDict", "ChatCompletionChoice", "ChatCompletionChoiceFinishReason", "ChatCompletionChoiceTypedDict", "ChatCompletionRequest", "ChatCompletionRequestMessages", "ChatCompletionRequestMessagesTypedDict", "ChatCompletionRequestStop", "ChatCompletionRequestStopTypedDict", "ChatCompletionRequestToolChoice", "ChatCompletionRequestTypedDict", "ChatCompletionResponse", "ChatCompletionResponseTypedDict", "ChatCompletionStreamRequest", "ChatCompletionStreamRequestTypedDict", "CompletionChunk", "CompletionChunkTypedDict", "CompletionEvent", "CompletionEventTypedDict", "CompletionResponseStreamChoice", "CompletionResponseStreamChoiceTypedDict", "Content", "ContentChunk", "ContentChunkTypedDict", "ContentTypedDict", "DeltaMessage", "DeltaMessageTypedDict", "FinishReason", "Function", "FunctionCall", "FunctionCallTypedDict", "FunctionTypedDict", "HTTPValidationError", "HTTPValidationErrorData", "Loc", "LocTypedDict", "Messages", "MessagesTypedDict", "ResponseFormat", "ResponseFormatTypedDict", "ResponseFormats", "Role", "SDKError", "Security", "SecurityTypedDict", "Stop", "StopTypedDict", "SystemMessage", "SystemMessageTypedDict", "TextChunk", "TextChunkTypedDict", "Tool", "ToolCall", "ToolCallTypedDict", "ToolChoice", "ToolMessage", "ToolMessageRole", "ToolMessageTypedDict", "ToolTypedDict", "UsageInfo", "UsageInfoTypedDict", "UserMessage", "UserMessageContent", "UserMessageContentTypedDict", "UserMessageRole", "UserMessageTypedDict", "ValidationError", "ValidationErrorTypedDict"]
28
+ __all__ = ["Arguments", "ArgumentsTypedDict", "AssistantMessage", "AssistantMessageRole", "AssistantMessageTypedDict", "ChatCompletionChoice", "ChatCompletionChoiceFinishReason", "ChatCompletionChoiceTypedDict", "ChatCompletionRequest", "ChatCompletionRequestMessages", "ChatCompletionRequestMessagesTypedDict", "ChatCompletionRequestStop", "ChatCompletionRequestStopTypedDict", "ChatCompletionRequestToolChoice", "ChatCompletionRequestTypedDict", "ChatCompletionResponse", "ChatCompletionResponseTypedDict", "ChatCompletionStreamRequest", "ChatCompletionStreamRequestTypedDict", "CompletionChunk", "CompletionChunkTypedDict", "CompletionEvent", "CompletionEventTypedDict", "CompletionResponseStreamChoice", "CompletionResponseStreamChoiceTypedDict", "Content", "ContentChunk", "ContentChunkTypedDict", "ContentTypedDict", "DeltaMessage", "DeltaMessageTypedDict", "FinishReason", "Function", "FunctionCall", "FunctionCallTypedDict", "FunctionTypedDict", "HTTPValidationError", "HTTPValidationErrorData", "Loc", "LocTypedDict", "Messages", "MessagesTypedDict", "ResponseFormat", "ResponseFormatTypedDict", "ResponseFormats", "Role", "SDKError", "Security", "SecurityTypedDict", "Stop", "StopTypedDict", "SystemMessage", "SystemMessageTypedDict", "TextChunk", "TextChunkTypedDict", "Tool", "ToolCall", "ToolCallTypedDict", "ToolChoice", "ToolMessage", "ToolMessageRole", "ToolMessageTypedDict", "ToolToolTypes", "ToolTypedDict", "ToolTypes", "UsageInfo", "UsageInfoTypedDict", "UserMessage", "UserMessageContent", "UserMessageContentTypedDict", "UserMessageRole", "UserMessageTypedDict", "ValidationError", "ValidationErrorTypedDict"]
@@ -3,20 +3,19 @@
3
3
  from __future__ import annotations
4
4
  from .assistantmessage import AssistantMessage, AssistantMessageTypedDict
5
5
  from mistralai_azure.types import BaseModel
6
- from typing import Literal, Optional, TypedDict
7
- from typing_extensions import NotRequired
6
+ from typing import Literal, TypedDict
8
7
 
9
8
 
10
9
  ChatCompletionChoiceFinishReason = Literal["stop", "length", "model_length", "error", "tool_calls"]
11
10
 
12
11
  class ChatCompletionChoiceTypedDict(TypedDict):
13
12
  index: int
13
+ message: AssistantMessageTypedDict
14
14
  finish_reason: ChatCompletionChoiceFinishReason
15
- message: NotRequired[AssistantMessageTypedDict]
16
15
 
17
16
 
18
17
  class ChatCompletionChoice(BaseModel):
19
18
  index: int
19
+ message: AssistantMessage
20
20
  finish_reason: ChatCompletionChoiceFinishReason
21
- message: Optional[AssistantMessage] = None
22
21
 
@@ -10,19 +10,19 @@ from typing_extensions import NotRequired
10
10
 
11
11
  class DeltaMessageTypedDict(TypedDict):
12
12
  role: NotRequired[str]
13
- content: NotRequired[str]
13
+ content: NotRequired[Nullable[str]]
14
14
  tool_calls: NotRequired[Nullable[List[ToolCallTypedDict]]]
15
15
 
16
16
 
17
17
  class DeltaMessage(BaseModel):
18
18
  role: Optional[str] = None
19
- content: Optional[str] = None
19
+ content: OptionalNullable[str] = UNSET
20
20
  tool_calls: OptionalNullable[List[ToolCall]] = UNSET
21
21
 
22
22
  @model_serializer(mode="wrap")
23
23
  def serialize_model(self, handler):
24
24
  optional_fields = ["role", "content", "tool_calls"]
25
- nullable_fields = ["tool_calls"]
25
+ nullable_fields = ["content", "tool_calls"]
26
26
  null_default_fields = []
27
27
 
28
28
  serialized = handler(self)
@@ -0,0 +1,22 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .function import Function, FunctionTypedDict
5
+ from mistralai_azure.types import BaseModel, UnrecognizedStr
6
+ from mistralai_azure.utils import validate_open_enum
7
+ from pydantic.functional_validators import PlainValidator
8
+ from typing import Literal, Optional, TypedDict, Union
9
+ from typing_extensions import Annotated, NotRequired
10
+
11
+
12
+ ToolToolTypes = Union[Literal["function"], UnrecognizedStr]
13
+
14
+ class ToolTypedDict(TypedDict):
15
+ function: FunctionTypedDict
16
+ type: NotRequired[ToolToolTypes]
17
+
18
+
19
+ class Tool(BaseModel):
20
+ function: Function
21
+ type: Annotated[Optional[ToolToolTypes], PlainValidator(validate_open_enum(False))] = "function"
22
+
@@ -2,19 +2,23 @@
2
2
 
3
3
  from __future__ import annotations
4
4
  from .functioncall import FunctionCall, FunctionCallTypedDict
5
- from mistralai.types import BaseModel
6
- import pydantic
7
- from typing import Final, Optional, TypedDict
5
+ from mistralai_azure.types import BaseModel, UnrecognizedStr
6
+ from mistralai_azure.utils import validate_open_enum
7
+ from pydantic.functional_validators import PlainValidator
8
+ from typing import Literal, Optional, TypedDict, Union
8
9
  from typing_extensions import Annotated, NotRequired
9
10
 
10
11
 
12
+ ToolTypes = Union[Literal["function"], UnrecognizedStr]
13
+
11
14
  class ToolCallTypedDict(TypedDict):
12
15
  function: FunctionCallTypedDict
13
16
  id: NotRequired[str]
17
+ type: NotRequired[ToolTypes]
14
18
 
15
19
 
16
20
  class ToolCall(BaseModel):
17
21
  function: FunctionCall
18
22
  id: Optional[str] = "null"
19
- TYPE: Annotated[Final[Optional[str]], pydantic.Field(alias="type")] = "function" # type: ignore
23
+ type: Annotated[Optional[ToolTypes], PlainValidator(validate_open_enum(False))] = "function"
20
24
 
@@ -29,9 +29,9 @@ class SDKConfiguration:
29
29
  server: Optional[str] = ""
30
30
  language: str = "python"
31
31
  openapi_doc_version: str = "0.0.2"
32
- sdk_version: str = "1.0.0-rc.4"
33
- gen_version: str = "2.390.6"
34
- user_agent: str = "speakeasy-sdk/python 1.0.0-rc.4 2.390.6 0.0.2 mistralai_azure"
32
+ sdk_version: str = "1.0.1"
33
+ gen_version: str = "2.399.0"
34
+ user_agent: str = "speakeasy-sdk/python 1.0.1 2.399.0 0.0.2 mistralai_azure"
35
35
  retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET)
36
36
  timeout_ms: Optional[int] = None
37
37
 
@@ -33,7 +33,7 @@ class Chat(BaseSDK):
33
33
 
34
34
  Mistral AI provides the ability to stream responses back to a client in order to allow partial results for certain requests. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON.
35
35
 
36
- :param model: ID of the model to use. You can use the [List Available Models](/api#operation/listModels) API to see all of your available models, or see our [Model overview](/models) for model descriptions.
36
+ :param model: ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions.
37
37
  :param messages: The prompt(s) to generate completions for, encoded as a list of dict with role and content.
38
38
  :param temperature: What sampling temperature to use, between 0.0 and 1.0. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both.
39
39
  :param top_p: Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.
@@ -146,7 +146,7 @@ class Chat(BaseSDK):
146
146
 
147
147
  Mistral AI provides the ability to stream responses back to a client in order to allow partial results for certain requests. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON.
148
148
 
149
- :param model: ID of the model to use. You can use the [List Available Models](/api#operation/listModels) API to see all of your available models, or see our [Model overview](/models) for model descriptions.
149
+ :param model: ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions.
150
150
  :param messages: The prompt(s) to generate completions for, encoded as a list of dict with role and content.
151
151
  :param temperature: What sampling temperature to use, between 0.0 and 1.0. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both.
152
152
  :param top_p: Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.
@@ -257,7 +257,7 @@ class Chat(BaseSDK):
257
257
  ) -> Optional[models.ChatCompletionResponse]:
258
258
  r"""Chat Completion
259
259
 
260
- :param model: ID of the model to use. You can use the [List Available Models](/api#operation/listModels) API to see all of your available models, or see our [Model overview](/models) for model descriptions.
260
+ :param model: ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions.
261
261
  :param messages: The prompt(s) to generate completions for, encoded as a list of dict with role and content.
262
262
  :param temperature: What sampling temperature to use, between 0.0 and 1.0. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both.
263
263
  :param top_p: Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.
@@ -367,7 +367,7 @@ class Chat(BaseSDK):
367
367
  ) -> Optional[models.ChatCompletionResponse]:
368
368
  r"""Chat Completion
369
369
 
370
- :param model: ID of the model to use. You can use the [List Available Models](/api#operation/listModels) API to see all of your available models, or see our [Model overview](/models) for model descriptions.
370
+ :param model: ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions.
371
371
  :param messages: The prompt(s) to generate completions for, encoded as a list of dict with role and content.
372
372
  :param temperature: What sampling temperature to use, between 0.0 and 1.0. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both.
373
373
  :param top_p: Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.
@@ -21,11 +21,11 @@ from .sdkerror import SDKError
21
21
  from .security import Security, SecurityTypedDict
22
22
  from .systemmessage import Content, ContentTypedDict, Role, SystemMessage, SystemMessageTypedDict
23
23
  from .textchunk import TextChunk, TextChunkTypedDict
24
- from .tool import Tool, ToolTypedDict
25
- from .toolcall import ToolCall, ToolCallTypedDict
24
+ from .tool import Tool, ToolToolTypes, ToolTypedDict
25
+ from .toolcall import ToolCall, ToolCallTypedDict, ToolTypes
26
26
  from .toolmessage import ToolMessage, ToolMessageRole, ToolMessageTypedDict
27
27
  from .usageinfo import UsageInfo, UsageInfoTypedDict
28
28
  from .usermessage import UserMessage, UserMessageContent, UserMessageContentTypedDict, UserMessageRole, UserMessageTypedDict
29
29
  from .validationerror import Loc, LocTypedDict, ValidationError, ValidationErrorTypedDict
30
30
 
31
- __all__ = ["Arguments", "ArgumentsTypedDict", "AssistantMessage", "AssistantMessageRole", "AssistantMessageTypedDict", "ChatCompletionChoice", "ChatCompletionChoiceFinishReason", "ChatCompletionChoiceTypedDict", "ChatCompletionRequest", "ChatCompletionRequestMessages", "ChatCompletionRequestMessagesTypedDict", "ChatCompletionRequestStop", "ChatCompletionRequestStopTypedDict", "ChatCompletionRequestToolChoice", "ChatCompletionRequestTypedDict", "ChatCompletionResponse", "ChatCompletionResponseTypedDict", "ChatCompletionStreamRequest", "ChatCompletionStreamRequestTypedDict", "CompletionChunk", "CompletionChunkTypedDict", "CompletionEvent", "CompletionEventTypedDict", "CompletionResponseStreamChoice", "CompletionResponseStreamChoiceTypedDict", "Content", "ContentChunk", "ContentChunkTypedDict", "ContentTypedDict", "DeltaMessage", "DeltaMessageTypedDict", "FIMCompletionRequest", "FIMCompletionRequestStop", "FIMCompletionRequestStopTypedDict", "FIMCompletionRequestTypedDict", "FIMCompletionResponse", "FIMCompletionResponseTypedDict", "FIMCompletionStreamRequest", "FIMCompletionStreamRequestStop", "FIMCompletionStreamRequestStopTypedDict", "FIMCompletionStreamRequestTypedDict", "FinishReason", "Function", "FunctionCall", "FunctionCallTypedDict", "FunctionTypedDict", "HTTPValidationError", "HTTPValidationErrorData", "Loc", "LocTypedDict", "Messages", "MessagesTypedDict", "ResponseFormat", "ResponseFormatTypedDict", "ResponseFormats", "Role", "SDKError", "Security", "SecurityTypedDict", "Stop", "StopTypedDict", "SystemMessage", "SystemMessageTypedDict", "TextChunk", "TextChunkTypedDict", "Tool", "ToolCall", "ToolCallTypedDict", "ToolChoice", "ToolMessage", "ToolMessageRole", "ToolMessageTypedDict", "ToolTypedDict", "UsageInfo", "UsageInfoTypedDict", "UserMessage", "UserMessageContent", "UserMessageContentTypedDict", "UserMessageRole", "UserMessageTypedDict", "ValidationError", "ValidationErrorTypedDict"]
31
+ __all__ = ["Arguments", "ArgumentsTypedDict", "AssistantMessage", "AssistantMessageRole", "AssistantMessageTypedDict", "ChatCompletionChoice", "ChatCompletionChoiceFinishReason", "ChatCompletionChoiceTypedDict", "ChatCompletionRequest", "ChatCompletionRequestMessages", "ChatCompletionRequestMessagesTypedDict", "ChatCompletionRequestStop", "ChatCompletionRequestStopTypedDict", "ChatCompletionRequestToolChoice", "ChatCompletionRequestTypedDict", "ChatCompletionResponse", "ChatCompletionResponseTypedDict", "ChatCompletionStreamRequest", "ChatCompletionStreamRequestTypedDict", "CompletionChunk", "CompletionChunkTypedDict", "CompletionEvent", "CompletionEventTypedDict", "CompletionResponseStreamChoice", "CompletionResponseStreamChoiceTypedDict", "Content", "ContentChunk", "ContentChunkTypedDict", "ContentTypedDict", "DeltaMessage", "DeltaMessageTypedDict", "FIMCompletionRequest", "FIMCompletionRequestStop", "FIMCompletionRequestStopTypedDict", "FIMCompletionRequestTypedDict", "FIMCompletionResponse", "FIMCompletionResponseTypedDict", "FIMCompletionStreamRequest", "FIMCompletionStreamRequestStop", "FIMCompletionStreamRequestStopTypedDict", "FIMCompletionStreamRequestTypedDict", "FinishReason", "Function", "FunctionCall", "FunctionCallTypedDict", "FunctionTypedDict", "HTTPValidationError", "HTTPValidationErrorData", "Loc", "LocTypedDict", "Messages", "MessagesTypedDict", "ResponseFormat", "ResponseFormatTypedDict", "ResponseFormats", "Role", "SDKError", "Security", "SecurityTypedDict", "Stop", "StopTypedDict", "SystemMessage", "SystemMessageTypedDict", "TextChunk", "TextChunkTypedDict", "Tool", "ToolCall", "ToolCallTypedDict", "ToolChoice", "ToolMessage", "ToolMessageRole", "ToolMessageTypedDict", "ToolToolTypes", "ToolTypedDict", "ToolTypes", "UsageInfo", "UsageInfoTypedDict", "UserMessage", "UserMessageContent", "UserMessageContentTypedDict", "UserMessageRole", "UserMessageTypedDict", "ValidationError", "ValidationErrorTypedDict"]
@@ -3,20 +3,19 @@
3
3
  from __future__ import annotations
4
4
  from .assistantmessage import AssistantMessage, AssistantMessageTypedDict
5
5
  from mistralai_gcp.types import BaseModel
6
- from typing import Literal, Optional, TypedDict
7
- from typing_extensions import NotRequired
6
+ from typing import Literal, TypedDict
8
7
 
9
8
 
10
9
  ChatCompletionChoiceFinishReason = Literal["stop", "length", "model_length", "error", "tool_calls"]
11
10
 
12
11
  class ChatCompletionChoiceTypedDict(TypedDict):
13
12
  index: int
13
+ message: AssistantMessageTypedDict
14
14
  finish_reason: ChatCompletionChoiceFinishReason
15
- message: NotRequired[AssistantMessageTypedDict]
16
15
 
17
16
 
18
17
  class ChatCompletionChoice(BaseModel):
19
18
  index: int
19
+ message: AssistantMessage
20
20
  finish_reason: ChatCompletionChoiceFinishReason
21
- message: Optional[AssistantMessage] = None
22
21
 
@@ -32,7 +32,7 @@ ChatCompletionRequestToolChoice = Literal["auto", "none", "any"]
32
32
 
33
33
  class ChatCompletionRequestTypedDict(TypedDict):
34
34
  model: Nullable[str]
35
- r"""ID of the model to use. You can use the [List Available Models](/api#operation/listModels) API to see all of your available models, or see our [Model overview](/models) for model descriptions."""
35
+ r"""ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions."""
36
36
  messages: List[ChatCompletionRequestMessagesTypedDict]
37
37
  r"""The prompt(s) to generate completions for, encoded as a list of dict with role and content."""
38
38
  temperature: NotRequired[float]
@@ -56,7 +56,7 @@ class ChatCompletionRequestTypedDict(TypedDict):
56
56
 
57
57
  class ChatCompletionRequest(BaseModel):
58
58
  model: Nullable[str]
59
- r"""ID of the model to use. You can use the [List Available Models](/api#operation/listModels) API to see all of your available models, or see our [Model overview](/models) for model descriptions."""
59
+ r"""ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions."""
60
60
  messages: List[ChatCompletionRequestMessages]
61
61
  r"""The prompt(s) to generate completions for, encoded as a list of dict with role and content."""
62
62
  temperature: Optional[float] = 0.7
@@ -32,7 +32,7 @@ ToolChoice = Literal["auto", "none", "any"]
32
32
 
33
33
  class ChatCompletionStreamRequestTypedDict(TypedDict):
34
34
  model: Nullable[str]
35
- r"""ID of the model to use. You can use the [List Available Models](/api#operation/listModels) API to see all of your available models, or see our [Model overview](/models) for model descriptions."""
35
+ r"""ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions."""
36
36
  messages: List[MessagesTypedDict]
37
37
  r"""The prompt(s) to generate completions for, encoded as a list of dict with role and content."""
38
38
  temperature: NotRequired[float]
@@ -55,7 +55,7 @@ class ChatCompletionStreamRequestTypedDict(TypedDict):
55
55
 
56
56
  class ChatCompletionStreamRequest(BaseModel):
57
57
  model: Nullable[str]
58
- r"""ID of the model to use. You can use the [List Available Models](/api#operation/listModels) API to see all of your available models, or see our [Model overview](/models) for model descriptions."""
58
+ r"""ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions."""
59
59
  messages: List[Messages]
60
60
  r"""The prompt(s) to generate completions for, encoded as a list of dict with role and content."""
61
61
  temperature: Optional[float] = 0.7
@@ -10,19 +10,19 @@ from typing_extensions import NotRequired
10
10
 
11
11
  class DeltaMessageTypedDict(TypedDict):
12
12
  role: NotRequired[str]
13
- content: NotRequired[str]
13
+ content: NotRequired[Nullable[str]]
14
14
  tool_calls: NotRequired[Nullable[List[ToolCallTypedDict]]]
15
15
 
16
16
 
17
17
  class DeltaMessage(BaseModel):
18
18
  role: Optional[str] = None
19
- content: Optional[str] = None
19
+ content: OptionalNullable[str] = UNSET
20
20
  tool_calls: OptionalNullable[List[ToolCall]] = UNSET
21
21
 
22
22
  @model_serializer(mode="wrap")
23
23
  def serialize_model(self, handler):
24
24
  optional_fields = ["role", "content", "tool_calls"]
25
- nullable_fields = ["tool_calls"]
25
+ nullable_fields = ["content", "tool_calls"]
26
26
  null_default_fields = []
27
27
 
28
28
  serialized = handler(self)
@@ -0,0 +1,22 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .function import Function, FunctionTypedDict
5
+ from mistralai_gcp.types import BaseModel, UnrecognizedStr
6
+ from mistralai_gcp.utils import validate_open_enum
7
+ from pydantic.functional_validators import PlainValidator
8
+ from typing import Literal, Optional, TypedDict, Union
9
+ from typing_extensions import Annotated, NotRequired
10
+
11
+
12
+ ToolToolTypes = Union[Literal["function"], UnrecognizedStr]
13
+
14
+ class ToolTypedDict(TypedDict):
15
+ function: FunctionTypedDict
16
+ type: NotRequired[ToolToolTypes]
17
+
18
+
19
+ class Tool(BaseModel):
20
+ function: Function
21
+ type: Annotated[Optional[ToolToolTypes], PlainValidator(validate_open_enum(False))] = "function"
22
+
@@ -2,19 +2,23 @@
2
2
 
3
3
  from __future__ import annotations
4
4
  from .functioncall import FunctionCall, FunctionCallTypedDict
5
- from mistralai_gcp.types import BaseModel
6
- import pydantic
7
- from typing import Final, Optional, TypedDict
5
+ from mistralai_gcp.types import BaseModel, UnrecognizedStr
6
+ from mistralai_gcp.utils import validate_open_enum
7
+ from pydantic.functional_validators import PlainValidator
8
+ from typing import Literal, Optional, TypedDict, Union
8
9
  from typing_extensions import Annotated, NotRequired
9
10
 
10
11
 
12
+ ToolTypes = Union[Literal["function"], UnrecognizedStr]
13
+
11
14
  class ToolCallTypedDict(TypedDict):
12
15
  function: FunctionCallTypedDict
13
16
  id: NotRequired[str]
17
+ type: NotRequired[ToolTypes]
14
18
 
15
19
 
16
20
  class ToolCall(BaseModel):
17
21
  function: FunctionCall
18
22
  id: Optional[str] = "null"
19
- TYPE: Annotated[Final[Optional[str]], pydantic.Field(alias="type")] = "function" # type: ignore
23
+ type: Annotated[Optional[ToolTypes], PlainValidator(validate_open_enum(False))] = "function"
20
24
 
@@ -32,6 +32,7 @@ class MistralGoogleCloud(BaseSDK):
32
32
  self,
33
33
  region: str = "europe-west4",
34
34
  project_id: Optional[str] = None,
35
+ access_token: Optional[str] = None,
35
36
  client: Optional[HttpClient] = None,
36
37
  async_client: Optional[AsyncHttpClient] = None,
37
38
  retry_config: Optional[Nullable[RetryConfig]] = None,
@@ -46,26 +47,30 @@ class MistralGoogleCloud(BaseSDK):
46
47
  :param retry_config: The retry configuration to use for all supported methods
47
48
  """
48
49
 
49
- credentials, loaded_project_id = google.auth.default(
50
- scopes=["https://www.googleapis.com/auth/cloud-platform"],
51
- )
52
-
53
- if not isinstance(credentials, google.auth.credentials.Credentials):
54
- raise models.SDKError(
55
- "credentials must be an instance of google.auth.credentials.Credentials"
50
+ if not access_token:
51
+ credentials, loaded_project_id = google.auth.default(
52
+ scopes=["https://www.googleapis.com/auth/cloud-platform"],
56
53
  )
54
+ credentials.refresh(google.auth.transport.requests.Request())
55
+
56
+ if not isinstance(credentials, google.auth.credentials.Credentials):
57
+ raise models.SDKError(
58
+ "credentials must be an instance of google.auth.credentials.Credentials"
59
+ )
57
60
 
58
61
  project_id = project_id or loaded_project_id
59
62
  if project_id is None:
60
63
  raise models.SDKError("project_id must be provided")
61
64
 
62
65
  def auth_token() -> str:
63
- if credentials.expired:
66
+ if access_token:
67
+ return access_token
68
+ else:
64
69
  credentials.refresh(google.auth.transport.requests.Request())
65
- token = credentials.token
66
- if not token:
67
- raise models.SDKError("Failed to get token from credentials")
68
- return token
70
+ token = credentials.token
71
+ if not token:
72
+ raise models.SDKError("Failed to get token from credentials")
73
+ return token
69
74
 
70
75
  if client is None:
71
76
  client = httpx.Client()
@@ -29,9 +29,9 @@ class SDKConfiguration:
29
29
  server: Optional[str] = ""
30
30
  language: str = "python"
31
31
  openapi_doc_version: str = "0.0.2"
32
- sdk_version: str = "1.0.0-rc.4"
33
- gen_version: str = "2.390.6"
34
- user_agent: str = "speakeasy-sdk/python 1.0.0-rc.4 2.390.6 0.0.2 mistralai-gcp"
32
+ sdk_version: str = "1.0.1"
33
+ gen_version: str = "2.399.0"
34
+ user_agent: str = "speakeasy-sdk/python 1.0.1 2.399.0 0.0.2 mistralai-gcp"
35
35
  retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET)
36
36
  timeout_ms: Optional[int] = None
37
37
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "mistralai"
3
- version = "1.0.1"
3
+ version = "1.0.3"
4
4
  description = "Python Client SDK for the Mistral AI API."
5
5
  authors = ["Mistral"]
6
6
  readme = "README.md"
@@ -21,7 +21,7 @@ jsonpath-python = "^1.0.6"
21
21
  pydantic = "~2.8.2"
22
22
  python-dateutil = "^2.9.0.post0"
23
23
  typing-inspect = "^0.9.0"
24
- google-auth = { version = "^2.31.0", optional = true }
24
+ google-auth = { version = "2.27.0", optional = true }
25
25
  requests = { version = "^2.32.3", optional = true }
26
26
 
27
27
  [tool.poetry.group.dev.dependencies]
@@ -3,7 +3,7 @@
3
3
  from .basesdk import BaseSDK
4
4
  from mistralai import models, utils
5
5
  from mistralai._hooks import HookContext
6
- from mistralai.types import Nullable, OptionalNullable, UNSET
6
+ from mistralai.types import OptionalNullable, UNSET
7
7
  from mistralai.utils import eventstreaming, get_security_from_env
8
8
  from typing import Any, AsyncGenerator, Generator, List, Optional, Union
9
9
 
@@ -221,16 +221,16 @@ class Agents(BaseSDK):
221
221
 
222
222
  def stream(
223
223
  self, *,
224
- model: Nullable[str],
225
- prompt: str,
226
- temperature: Optional[float] = 0.7,
227
- top_p: Optional[float] = 1,
224
+ messages: Union[List[models.AgentsCompletionStreamRequestMessages], List[models.AgentsCompletionStreamRequestMessagesTypedDict]],
225
+ agent_id: str,
228
226
  max_tokens: OptionalNullable[int] = UNSET,
229
227
  min_tokens: OptionalNullable[int] = UNSET,
230
228
  stream: Optional[bool] = True,
231
229
  stop: Optional[Union[models.AgentsCompletionStreamRequestStop, models.AgentsCompletionStreamRequestStopTypedDict]] = None,
232
230
  random_seed: OptionalNullable[int] = UNSET,
233
- suffix: OptionalNullable[str] = UNSET,
231
+ response_format: Optional[Union[models.ResponseFormat, models.ResponseFormatTypedDict]] = None,
232
+ tools: OptionalNullable[Union[List[models.Tool], List[models.ToolTypedDict]]] = UNSET,
233
+ tool_choice: Optional[models.AgentsCompletionStreamRequestToolChoice] = "auto",
234
234
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
235
235
  server_url: Optional[str] = None,
236
236
  timeout_ms: Optional[int] = None,
@@ -239,16 +239,16 @@ class Agents(BaseSDK):
239
239
 
240
240
  Mistral AI provides the ability to stream responses back to a client in order to allow partial results for certain requests. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON.
241
241
 
242
- :param model: ID of the model to use. Only compatible for now with: - `codestral-2405` - `codestral-latest`
243
- :param prompt: The text/code to complete.
244
- :param temperature: What sampling temperature to use, between 0.0 and 1.0. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both.
245
- :param top_p: Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.
242
+ :param messages: The prompt(s) to generate completions for, encoded as a list of dict with role and content.
243
+ :param agent_id: The ID of the agent to use for this completion.
246
244
  :param max_tokens: The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length.
247
245
  :param min_tokens: The minimum number of tokens to generate in the completion.
248
246
  :param stream:
249
247
  :param stop: Stop generation if this token is detected. Or if one of these tokens is detected when providing an array
250
248
  :param random_seed: The seed to use for random sampling. If set, different calls will generate deterministic results.
251
- :param suffix: Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`.
249
+ :param response_format:
250
+ :param tools:
251
+ :param tool_choice:
252
252
  :param retries: Override the default retry configuration for this method
253
253
  :param server_url: Override the default server URL for this method
254
254
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -262,16 +262,16 @@ class Agents(BaseSDK):
262
262
  base_url = server_url
263
263
 
264
264
  request = models.AgentsCompletionStreamRequest(
265
- model=model,
266
- temperature=temperature,
267
- top_p=top_p,
268
265
  max_tokens=max_tokens,
269
266
  min_tokens=min_tokens,
270
267
  stream=stream,
271
268
  stop=stop,
272
269
  random_seed=random_seed,
273
- prompt=prompt,
274
- suffix=suffix,
270
+ messages=utils.get_pydantic_model(messages, List[models.AgentsCompletionStreamRequestMessages]),
271
+ response_format=utils.get_pydantic_model(response_format, Optional[models.ResponseFormat]),
272
+ tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]),
273
+ tool_choice=tool_choice,
274
+ agent_id=agent_id,
275
275
  )
276
276
 
277
277
  req = self.build_request(
@@ -328,16 +328,16 @@ class Agents(BaseSDK):
328
328
 
329
329
  async def stream_async(
330
330
  self, *,
331
- model: Nullable[str],
332
- prompt: str,
333
- temperature: Optional[float] = 0.7,
334
- top_p: Optional[float] = 1,
331
+ messages: Union[List[models.AgentsCompletionStreamRequestMessages], List[models.AgentsCompletionStreamRequestMessagesTypedDict]],
332
+ agent_id: str,
335
333
  max_tokens: OptionalNullable[int] = UNSET,
336
334
  min_tokens: OptionalNullable[int] = UNSET,
337
335
  stream: Optional[bool] = True,
338
336
  stop: Optional[Union[models.AgentsCompletionStreamRequestStop, models.AgentsCompletionStreamRequestStopTypedDict]] = None,
339
337
  random_seed: OptionalNullable[int] = UNSET,
340
- suffix: OptionalNullable[str] = UNSET,
338
+ response_format: Optional[Union[models.ResponseFormat, models.ResponseFormatTypedDict]] = None,
339
+ tools: OptionalNullable[Union[List[models.Tool], List[models.ToolTypedDict]]] = UNSET,
340
+ tool_choice: Optional[models.AgentsCompletionStreamRequestToolChoice] = "auto",
341
341
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
342
342
  server_url: Optional[str] = None,
343
343
  timeout_ms: Optional[int] = None,
@@ -346,16 +346,16 @@ class Agents(BaseSDK):
346
346
 
347
347
  Mistral AI provides the ability to stream responses back to a client in order to allow partial results for certain requests. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON.
348
348
 
349
- :param model: ID of the model to use. Only compatible for now with: - `codestral-2405` - `codestral-latest`
350
- :param prompt: The text/code to complete.
351
- :param temperature: What sampling temperature to use, between 0.0 and 1.0. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both.
352
- :param top_p: Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.
349
+ :param messages: The prompt(s) to generate completions for, encoded as a list of dict with role and content.
350
+ :param agent_id: The ID of the agent to use for this completion.
353
351
  :param max_tokens: The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length.
354
352
  :param min_tokens: The minimum number of tokens to generate in the completion.
355
353
  :param stream:
356
354
  :param stop: Stop generation if this token is detected. Or if one of these tokens is detected when providing an array
357
355
  :param random_seed: The seed to use for random sampling. If set, different calls will generate deterministic results.
358
- :param suffix: Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`.
356
+ :param response_format:
357
+ :param tools:
358
+ :param tool_choice:
359
359
  :param retries: Override the default retry configuration for this method
360
360
  :param server_url: Override the default server URL for this method
361
361
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -369,16 +369,16 @@ class Agents(BaseSDK):
369
369
  base_url = server_url
370
370
 
371
371
  request = models.AgentsCompletionStreamRequest(
372
- model=model,
373
- temperature=temperature,
374
- top_p=top_p,
375
372
  max_tokens=max_tokens,
376
373
  min_tokens=min_tokens,
377
374
  stream=stream,
378
375
  stop=stop,
379
376
  random_seed=random_seed,
380
- prompt=prompt,
381
- suffix=suffix,
377
+ messages=utils.get_pydantic_model(messages, List[models.AgentsCompletionStreamRequestMessages]),
378
+ response_format=utils.get_pydantic_model(response_format, Optional[models.ResponseFormat]),
379
+ tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]),
380
+ tool_choice=tool_choice,
381
+ agent_id=agent_id,
382
382
  )
383
383
 
384
384
  req = self.build_request(