mistralai 1.0.0rc2__tar.gz → 1.0.2__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 (241) hide show
  1. {mistralai-1.0.0rc2 → mistralai-1.0.2}/PKG-INFO +40 -18
  2. {mistralai-1.0.0rc2 → mistralai-1.0.2}/README.md +39 -17
  3. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/models/__init__.py +4 -4
  4. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/models/chatcompletionchoice.py +3 -4
  5. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/models/deltamessage.py +6 -6
  6. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/models/functioncall.py +9 -3
  7. mistralai-1.0.2/packages/mistralai_azure/src/mistralai_azure/models/tool.py +22 -0
  8. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/models/toolcall.py +8 -4
  9. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/sdkconfiguration.py +3 -3
  10. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/chat.py +4 -4
  11. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/models/__init__.py +4 -4
  12. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/models/chatcompletionchoice.py +3 -4
  13. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/models/chatcompletionrequest.py +16 -16
  14. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/models/chatcompletionstreamrequest.py +16 -16
  15. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/models/deltamessage.py +6 -6
  16. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/models/functioncall.py +9 -3
  17. mistralai-1.0.2/packages/mistralai_gcp/src/mistralai_gcp/models/tool.py +22 -0
  18. {mistralai-1.0.0rc2/src/mistralai → mistralai-1.0.2/packages/mistralai_gcp/src/mistralai_gcp}/models/toolcall.py +8 -4
  19. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/sdkconfiguration.py +3 -3
  20. {mistralai-1.0.0rc2 → mistralai-1.0.2}/pyproject.toml +1 -1
  21. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/agents.py +33 -33
  22. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/chat.py +4 -4
  23. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/client.py +1 -1
  24. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/jobs.py +24 -34
  25. mistralai-1.0.2/src/mistralai/models/__init__.py +82 -0
  26. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/agentscompletionstreamrequest.py +41 -39
  27. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/archiveftmodelout.py +4 -2
  28. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/chatcompletionchoice.py +3 -4
  29. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/chatcompletionrequest.py +16 -16
  30. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/chatcompletionstreamrequest.py +16 -16
  31. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/delete_model_v1_models_model_id_deleteop.py +2 -0
  32. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/deltamessage.py +6 -6
  33. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/detailedjobout.py +19 -5
  34. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/files_api_routes_upload_fileop.py +7 -4
  35. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/fileschema.py +8 -3
  36. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/ftmodelout.py +4 -2
  37. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/functioncall.py +9 -3
  38. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/githubrepositoryin.py +4 -2
  39. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/githubrepositoryout.py +4 -2
  40. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/jobin.py +16 -4
  41. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/jobout.py +20 -5
  42. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/jobs_api_routes_fine_tuning_archive_fine_tuned_modelop.py +2 -0
  43. mistralai-1.0.2/src/mistralai/models/jobs_api_routes_fine_tuning_create_fine_tuning_jobop.py +15 -0
  44. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/jobs_api_routes_fine_tuning_unarchive_fine_tuned_modelop.py +2 -0
  45. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/jobs_api_routes_fine_tuning_update_fine_tuned_modelop.py +2 -0
  46. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/jobsout.py +4 -2
  47. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/legacyjobmetadataout.py +4 -2
  48. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/retrieve_model_v1_models_model_id_getop.py +2 -0
  49. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/retrievefileout.py +8 -3
  50. mistralai-1.0.2/src/mistralai/models/tool.py +22 -0
  51. {mistralai-1.0.0rc2/packages/mistralai_gcp/src/mistralai_gcp → mistralai-1.0.2/src/mistralai}/models/toolcall.py +8 -4
  52. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/trainingparameters.py +6 -2
  53. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/trainingparametersin.py +10 -2
  54. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/unarchiveftmodelout.py +4 -2
  55. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/uploadfileout.py +8 -3
  56. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/wandbintegration.py +4 -2
  57. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/wandbintegrationout.py +4 -2
  58. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models_.py +10 -10
  59. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/sdk.py +2 -2
  60. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/sdkconfiguration.py +3 -3
  61. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/utils/__init__.py +2 -2
  62. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/utils/forms.py +10 -9
  63. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/utils/headers.py +8 -8
  64. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/utils/logger.py +8 -0
  65. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/utils/queryparams.py +16 -14
  66. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/utils/serializers.py +17 -8
  67. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/utils/url.py +13 -8
  68. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/utils/values.py +6 -0
  69. mistralai-1.0.2/src/mistralai/version.py +7 -0
  70. mistralai-1.0.0rc2/packages/mistralai_azure/src/mistralai_azure/models/tool.py +0 -18
  71. mistralai-1.0.0rc2/packages/mistralai_gcp/src/mistralai_gcp/models/tool.py +0 -18
  72. mistralai-1.0.0rc2/src/mistralai/models/__init__.py +0 -82
  73. mistralai-1.0.0rc2/src/mistralai/models/jobs_api_routes_fine_tuning_create_fine_tuning_jobop.py +0 -68
  74. mistralai-1.0.0rc2/src/mistralai/models/tool.py +0 -18
  75. {mistralai-1.0.0rc2 → mistralai-1.0.2}/LICENSE +0 -0
  76. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/__init__.py +0 -0
  77. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/_hooks/__init__.py +0 -0
  78. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/_hooks/custom_user_agent.py +0 -0
  79. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/_hooks/registration.py +0 -0
  80. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/_hooks/sdkhooks.py +0 -0
  81. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/_hooks/types.py +0 -0
  82. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/basesdk.py +0 -0
  83. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/chat.py +0 -0
  84. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/httpclient.py +0 -0
  85. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/models/assistantmessage.py +0 -0
  86. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/models/chatcompletionrequest.py +14 -14
  87. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/models/chatcompletionresponse.py +0 -0
  88. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/models/chatcompletionstreamrequest.py +14 -14
  89. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/models/completionchunk.py +0 -0
  90. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/models/completionevent.py +0 -0
  91. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/models/completionresponsestreamchoice.py +0 -0
  92. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/models/contentchunk.py +0 -0
  93. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/models/function.py +0 -0
  94. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/models/httpvalidationerror.py +0 -0
  95. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/models/responseformat.py +0 -0
  96. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/models/sdkerror.py +0 -0
  97. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/models/security.py +0 -0
  98. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/models/systemmessage.py +6 -6
  99. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/models/textchunk.py +0 -0
  100. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/models/toolmessage.py +0 -0
  101. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/models/usageinfo.py +0 -0
  102. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/models/usermessage.py +6 -6
  103. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/models/validationerror.py +6 -6
  104. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/py.typed +0 -0
  105. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/sdk.py +0 -0
  106. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/types/__init__.py +0 -0
  107. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/types/basemodel.py +0 -0
  108. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/utils/__init__.py +0 -0
  109. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/utils/annotations.py +0 -0
  110. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/utils/enums.py +0 -0
  111. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/utils/eventstreaming.py +0 -0
  112. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/utils/forms.py +0 -0
  113. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/utils/headers.py +0 -0
  114. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/utils/logger.py +0 -0
  115. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/utils/metadata.py +0 -0
  116. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/utils/queryparams.py +0 -0
  117. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/utils/requestbodies.py +0 -0
  118. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/utils/retries.py +0 -0
  119. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/utils/security.py +0 -0
  120. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/utils/serializers.py +0 -0
  121. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/utils/url.py +0 -0
  122. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_azure/src/mistralai_azure/utils/values.py +0 -0
  123. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/__init__.py +0 -0
  124. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/_hooks/__init__.py +0 -0
  125. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/_hooks/custom_user_agent.py +0 -0
  126. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/_hooks/registration.py +0 -0
  127. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/_hooks/sdkhooks.py +0 -0
  128. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/_hooks/types.py +0 -0
  129. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/basesdk.py +0 -0
  130. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/fim.py +0 -0
  131. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/httpclient.py +0 -0
  132. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/models/assistantmessage.py +0 -0
  133. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/models/chatcompletionresponse.py +0 -0
  134. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/models/completionchunk.py +0 -0
  135. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/models/completionevent.py +0 -0
  136. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/models/completionresponsestreamchoice.py +0 -0
  137. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/models/contentchunk.py +0 -0
  138. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/models/fimcompletionrequest.py +8 -8
  139. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/models/fimcompletionresponse.py +0 -0
  140. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/models/fimcompletionstreamrequest.py +8 -8
  141. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/models/function.py +0 -0
  142. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/models/httpvalidationerror.py +0 -0
  143. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/models/responseformat.py +0 -0
  144. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/models/sdkerror.py +0 -0
  145. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/models/security.py +0 -0
  146. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/models/systemmessage.py +6 -6
  147. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/models/textchunk.py +0 -0
  148. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/models/toolmessage.py +0 -0
  149. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/models/usageinfo.py +0 -0
  150. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/models/usermessage.py +6 -6
  151. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/models/validationerror.py +6 -6
  152. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/py.typed +0 -0
  153. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/sdk.py +0 -0
  154. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/types/__init__.py +0 -0
  155. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/types/basemodel.py +0 -0
  156. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/utils/__init__.py +0 -0
  157. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/utils/annotations.py +0 -0
  158. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/utils/enums.py +0 -0
  159. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/utils/eventstreaming.py +0 -0
  160. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/utils/forms.py +0 -0
  161. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/utils/headers.py +0 -0
  162. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/utils/logger.py +0 -0
  163. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/utils/metadata.py +0 -0
  164. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/utils/queryparams.py +0 -0
  165. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/utils/requestbodies.py +0 -0
  166. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/utils/retries.py +0 -0
  167. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/utils/security.py +0 -0
  168. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/utils/serializers.py +0 -0
  169. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/utils/url.py +0 -0
  170. {mistralai-1.0.0rc2 → mistralai-1.0.2}/packages/mistralai_gcp/src/mistralai_gcp/utils/values.py +0 -0
  171. {mistralai-1.0.0rc2 → mistralai-1.0.2}/py.typed +0 -0
  172. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/__init__.py +0 -0
  173. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/_hooks/__init__.py +0 -0
  174. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/_hooks/custom_user_agent.py +0 -0
  175. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/_hooks/deprecation_warning.py +0 -0
  176. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/_hooks/registration.py +0 -0
  177. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/_hooks/sdkhooks.py +0 -0
  178. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/_hooks/types.py +0 -0
  179. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/async_client.py +0 -0
  180. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/basesdk.py +0 -0
  181. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/embeddings.py +0 -0
  182. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/files.py +0 -0
  183. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/fim.py +0 -0
  184. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/fine_tuning.py +0 -0
  185. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/httpclient.py +0 -0
  186. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/agentscompletionrequest.py +14 -14
  187. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/assistantmessage.py +0 -0
  188. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/chatcompletionresponse.py +0 -0
  189. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/checkpointout.py +0 -0
  190. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/completionchunk.py +0 -0
  191. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/completionevent.py +0 -0
  192. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/completionresponsestreamchoice.py +0 -0
  193. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/contentchunk.py +0 -0
  194. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/deletefileout.py +0 -0
  195. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/deletemodelout.py +0 -0
  196. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/embeddingrequest.py +8 -8
  197. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/embeddingresponse.py +0 -0
  198. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/embeddingresponsedata.py +0 -0
  199. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/eventout.py +0 -0
  200. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/files_api_routes_delete_fileop.py +0 -0
  201. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/files_api_routes_retrieve_fileop.py +0 -0
  202. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/fimcompletionrequest.py +8 -8
  203. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/fimcompletionresponse.py +0 -0
  204. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/fimcompletionstreamrequest.py +8 -8
  205. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/finetuneablemodel.py +0 -0
  206. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/ftmodelcapabilitiesout.py +0 -0
  207. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/function.py +0 -0
  208. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/httpvalidationerror.py +0 -0
  209. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/jobmetadataout.py +0 -0
  210. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/jobs_api_routes_fine_tuning_cancel_fine_tuning_jobop.py +0 -0
  211. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/jobs_api_routes_fine_tuning_get_fine_tuning_jobop.py +0 -0
  212. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/jobs_api_routes_fine_tuning_get_fine_tuning_jobsop.py +0 -0
  213. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/jobs_api_routes_fine_tuning_start_fine_tuning_jobop.py +0 -0
  214. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/listfilesout.py +0 -0
  215. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/metricout.py +0 -0
  216. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/modelcapabilities.py +0 -0
  217. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/modelcard.py +0 -0
  218. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/modellist.py +0 -0
  219. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/responseformat.py +0 -0
  220. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/sampletype.py +0 -0
  221. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/sdkerror.py +0 -0
  222. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/security.py +0 -0
  223. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/source.py +0 -0
  224. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/systemmessage.py +6 -6
  225. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/textchunk.py +0 -0
  226. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/toolmessage.py +0 -0
  227. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/trainingfile.py +0 -0
  228. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/updateftmodelin.py +0 -0
  229. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/usageinfo.py +0 -0
  230. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/usermessage.py +6 -6
  231. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/models/validationerror.py +6 -6
  232. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/py.typed +0 -0
  233. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/types/__init__.py +0 -0
  234. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/types/basemodel.py +0 -0
  235. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/utils/annotations.py +0 -0
  236. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/utils/enums.py +0 -0
  237. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/utils/eventstreaming.py +0 -0
  238. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/utils/metadata.py +0 -0
  239. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/utils/requestbodies.py +0 -0
  240. {mistralai-1.0.0rc2 → mistralai-1.0.2}/src/mistralai/utils/retries.py +0 -0
  241. {mistralai-1.0.0rc2 → mistralai-1.0.2}/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.0rc2
3
+ Version: 1.0.2
4
4
  Summary: Python Client SDK for the Mistral AI API.
5
5
  Author: Mistral
6
6
  Requires-Python: >=3.8,<4.0
@@ -20,15 +20,26 @@ Requires-Dist: requests (>=2.32.3,<3.0.0) ; extra == "gcp"
20
20
  Requires-Dist: typing-inspect (>=0.9.0,<0.10.0)
21
21
  Description-Content-Type: text/markdown
22
22
 
23
- # mistralai
24
-
25
- <div align="left">
26
- <a href="https://speakeasyapi.dev/"><img src="https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge&logoColor=FBE331&logo=speakeasy&labelColor=545454" /></a>
27
- </div>
23
+ # Mistral Python Client
28
24
 
29
25
  ## Migration warning
30
26
 
31
- This documentation is for Mistralai SDK v1. You can find more details on how to migrate from v0 to v1 [here](MIGRATION.md)
27
+ This documentation is for Mistral AI SDK v1. You can find more details on how to migrate from v0 to v1 [here](MIGRATION.md)
28
+
29
+ ## API Key Setup
30
+
31
+ Before you begin, you will need a Mistral AI API key.
32
+
33
+ 1. Get your own Mistral API Key: <https://docs.mistral.ai/#api-access>
34
+ 2. Set your Mistral API Key as an environment variable. You only need to do this once.
35
+
36
+ ```bash
37
+ # set Mistral API Key (using zsh for example)
38
+ $ echo 'export MISTRAL_API_KEY=[your_key_here]' >> ~/.zshenv
39
+
40
+ # reload the environment (or just quit and open a new terminal)
41
+ $ source ~/.zshenv
42
+ ```
32
43
 
33
44
  <!-- Start SDK Installation [installation] -->
34
45
  ## SDK Installation
@@ -200,6 +211,12 @@ asyncio.run(main())
200
211
  ```
201
212
  <!-- End SDK Example Usage [usage] -->
202
213
 
214
+
215
+ ### More examples
216
+
217
+ You can run the examples in the `examples/` directory using `poetry run` or by entering the virtual environment using `poetry shell`.
218
+
219
+
203
220
  ## Providers' SDKs Example Usage
204
221
 
205
222
  ### Azure AI
@@ -329,7 +346,7 @@ The documentation for the GCP SDK is available [here](packages/mistralai_gcp/REA
329
346
 
330
347
  ### [agents](docs/sdks/agents/README.md)
331
348
 
332
- * [complete](docs/sdks/agents/README.md#complete) - Chat Completion
349
+ * [complete](docs/sdks/agents/README.md#complete) - Agents Completion
333
350
  * [stream](docs/sdks/agents/README.md#stream) - Stream Agents completion
334
351
 
335
352
  ### [embeddings](docs/sdks/embeddings/README.md)
@@ -634,7 +651,7 @@ This SDK supports the following security scheme globally:
634
651
  | -------------------- | -------------------- | -------------------- | -------------------- |
635
652
  | `api_key` | http | HTTP Bearer | `MISTRAL_API_KEY` |
636
653
 
637
- To authenticate with the API the `null` parameter must be set when initializing the SDK client instance. For example:
654
+ To authenticate with the API the `api_key` parameter must be set when initializing the SDK client instance. For example:
638
655
  ```python
639
656
  from mistralai import Mistral
640
657
  import os
@@ -656,8 +673,9 @@ if res is not None:
656
673
  <!-- Start Debugging [debug] -->
657
674
  ## Debugging
658
675
 
659
- 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.
660
677
 
678
+ You can pass your own logger class directly into your SDK.
661
679
  ```python
662
680
  from mistralai import Mistral
663
681
  import logging
@@ -665,22 +683,26 @@ import logging
665
683
  logging.basicConfig(level=logging.DEBUG)
666
684
  s = Mistral(debug_logger=logging.getLogger("mistralai"))
667
685
  ```
686
+
687
+ You can also enable a default debug logger by setting an environment variable `MISTRAL_DEBUG` to true.
668
688
  <!-- End Debugging [debug] -->
669
689
 
670
- <!-- Placeholder for Future Speakeasy SDK Sections -->
690
+ <!-- Start IDE Support [idesupport] -->
691
+ ## IDE Support
671
692
 
672
- # Development
693
+ ### PyCharm
673
694
 
674
- ## Maturity
695
+ Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin.
675
696
 
676
- This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
677
- to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
678
- looking for the latest version.
697
+ - [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/)
698
+ <!-- End IDE Support [idesupport] -->
699
+
700
+ <!-- Placeholder for Future Speakeasy SDK Sections -->
701
+
702
+ # Development
679
703
 
680
704
  ## Contributions
681
705
 
682
706
  While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
683
707
  We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
684
708
 
685
- ### SDK Created by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)
686
-
@@ -1,12 +1,23 @@
1
- # mistralai
2
-
3
- <div align="left">
4
- <a href="https://speakeasyapi.dev/"><img src="https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge&logoColor=FBE331&logo=speakeasy&labelColor=545454" /></a>
5
- </div>
1
+ # Mistral Python Client
6
2
 
7
3
  ## Migration warning
8
4
 
9
- This documentation is for Mistralai SDK v1. You can find more details on how to migrate from v0 to v1 [here](MIGRATION.md)
5
+ This documentation is for Mistral AI SDK v1. You can find more details on how to migrate from v0 to v1 [here](MIGRATION.md)
6
+
7
+ ## API Key Setup
8
+
9
+ Before you begin, you will need a Mistral AI API key.
10
+
11
+ 1. Get your own Mistral API Key: <https://docs.mistral.ai/#api-access>
12
+ 2. Set your Mistral API Key as an environment variable. You only need to do this once.
13
+
14
+ ```bash
15
+ # set Mistral API Key (using zsh for example)
16
+ $ echo 'export MISTRAL_API_KEY=[your_key_here]' >> ~/.zshenv
17
+
18
+ # reload the environment (or just quit and open a new terminal)
19
+ $ source ~/.zshenv
20
+ ```
10
21
 
11
22
  <!-- Start SDK Installation [installation] -->
12
23
  ## SDK Installation
@@ -178,6 +189,12 @@ asyncio.run(main())
178
189
  ```
179
190
  <!-- End SDK Example Usage [usage] -->
180
191
 
192
+
193
+ ### More examples
194
+
195
+ You can run the examples in the `examples/` directory using `poetry run` or by entering the virtual environment using `poetry shell`.
196
+
197
+
181
198
  ## Providers' SDKs Example Usage
182
199
 
183
200
  ### Azure AI
@@ -307,7 +324,7 @@ The documentation for the GCP SDK is available [here](packages/mistralai_gcp/REA
307
324
 
308
325
  ### [agents](docs/sdks/agents/README.md)
309
326
 
310
- * [complete](docs/sdks/agents/README.md#complete) - Chat Completion
327
+ * [complete](docs/sdks/agents/README.md#complete) - Agents Completion
311
328
  * [stream](docs/sdks/agents/README.md#stream) - Stream Agents completion
312
329
 
313
330
  ### [embeddings](docs/sdks/embeddings/README.md)
@@ -612,7 +629,7 @@ This SDK supports the following security scheme globally:
612
629
  | -------------------- | -------------------- | -------------------- | -------------------- |
613
630
  | `api_key` | http | HTTP Bearer | `MISTRAL_API_KEY` |
614
631
 
615
- To authenticate with the API the `null` parameter must be set when initializing the SDK client instance. For example:
632
+ To authenticate with the API the `api_key` parameter must be set when initializing the SDK client instance. For example:
616
633
  ```python
617
634
  from mistralai import Mistral
618
635
  import os
@@ -634,8 +651,9 @@ if res is not None:
634
651
  <!-- Start Debugging [debug] -->
635
652
  ## Debugging
636
653
 
637
- 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.
638
655
 
656
+ You can pass your own logger class directly into your SDK.
639
657
  ```python
640
658
  from mistralai import Mistral
641
659
  import logging
@@ -643,21 +661,25 @@ import logging
643
661
  logging.basicConfig(level=logging.DEBUG)
644
662
  s = Mistral(debug_logger=logging.getLogger("mistralai"))
645
663
  ```
664
+
665
+ You can also enable a default debug logger by setting an environment variable `MISTRAL_DEBUG` to true.
646
666
  <!-- End Debugging [debug] -->
647
667
 
648
- <!-- Placeholder for Future Speakeasy SDK Sections -->
668
+ <!-- Start IDE Support [idesupport] -->
669
+ ## IDE Support
649
670
 
650
- # Development
671
+ ### PyCharm
651
672
 
652
- ## Maturity
673
+ Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin.
653
674
 
654
- This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
655
- to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
656
- looking for the latest version.
675
+ - [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/)
676
+ <!-- End IDE Support [idesupport] -->
677
+
678
+ <!-- Placeholder for Future Speakeasy SDK Sections -->
679
+
680
+ # Development
657
681
 
658
682
  ## Contributions
659
683
 
660
684
  While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
661
685
  We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
662
-
663
- ### SDK Created by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)
@@ -11,18 +11,18 @@ from .completionresponsestreamchoice import CompletionResponseStreamChoice, Comp
11
11
  from .contentchunk import ContentChunk, ContentChunkTypedDict
12
12
  from .deltamessage import DeltaMessage, DeltaMessageTypedDict
13
13
  from .function import Function, FunctionTypedDict
14
- from .functioncall import FunctionCall, FunctionCallTypedDict
14
+ from .functioncall import Arguments, ArgumentsTypedDict, FunctionCall, FunctionCallTypedDict
15
15
  from .httpvalidationerror import HTTPValidationError, HTTPValidationErrorData
16
16
  from .responseformat import ResponseFormat, ResponseFormatTypedDict, ResponseFormats
17
17
  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__ = ["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
 
@@ -4,25 +4,25 @@ from __future__ import annotations
4
4
  from .toolcall import ToolCall, ToolCallTypedDict
5
5
  from mistralai_azure.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
6
6
  from pydantic import model_serializer
7
- from typing import Optional, TypedDict
7
+ from typing import List, Optional, TypedDict
8
8
  from typing_extensions import NotRequired
9
9
 
10
10
 
11
11
  class DeltaMessageTypedDict(TypedDict):
12
12
  role: NotRequired[str]
13
- content: NotRequired[str]
14
- tool_calls: NotRequired[Nullable[ToolCallTypedDict]]
13
+ content: NotRequired[Nullable[str]]
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
20
- tool_calls: OptionalNullable[ToolCall] = UNSET
19
+ content: OptionalNullable[str] = UNSET
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)
@@ -2,15 +2,21 @@
2
2
 
3
3
  from __future__ import annotations
4
4
  from mistralai_azure.types import BaseModel
5
- from typing import TypedDict
5
+ from typing import Any, Dict, TypedDict, Union
6
+
7
+
8
+ ArgumentsTypedDict = Union[Dict[str, Any], str]
9
+
10
+
11
+ Arguments = Union[Dict[str, Any], str]
6
12
 
7
13
 
8
14
  class FunctionCallTypedDict(TypedDict):
9
15
  name: str
10
- arguments: str
16
+ arguments: ArgumentsTypedDict
11
17
 
12
18
 
13
19
  class FunctionCall(BaseModel):
14
20
  name: str
15
- arguments: str
21
+ arguments: Arguments
16
22
 
@@ -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_azure.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-alpha.13"
33
- gen_version: str = "2.386.0"
34
- user_agent: str = "speakeasy-sdk/python 1.0.0-alpha.13 2.386.0 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.
@@ -14,18 +14,18 @@ from .fimcompletionrequest import FIMCompletionRequest, FIMCompletionRequestStop
14
14
  from .fimcompletionresponse import FIMCompletionResponse, FIMCompletionResponseTypedDict
15
15
  from .fimcompletionstreamrequest import FIMCompletionStreamRequest, FIMCompletionStreamRequestStop, FIMCompletionStreamRequestStopTypedDict, FIMCompletionStreamRequestTypedDict
16
16
  from .function import Function, FunctionTypedDict
17
- from .functioncall import FunctionCall, FunctionCallTypedDict
17
+ from .functioncall import Arguments, ArgumentsTypedDict, FunctionCall, FunctionCallTypedDict
18
18
  from .httpvalidationerror import HTTPValidationError, HTTPValidationErrorData
19
19
  from .responseformat import ResponseFormat, ResponseFormatTypedDict, ResponseFormats
20
20
  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__ = ["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
 
@@ -14,11 +14,25 @@ from typing import List, Literal, Optional, TypedDict, Union
14
14
  from typing_extensions import Annotated, NotRequired
15
15
 
16
16
 
17
+ ChatCompletionRequestStopTypedDict = Union[str, List[str]]
18
+ r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array"""
19
+
20
+
21
+ ChatCompletionRequestStop = Union[str, List[str]]
22
+ r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array"""
23
+
24
+
25
+ ChatCompletionRequestMessagesTypedDict = Union[SystemMessageTypedDict, UserMessageTypedDict, AssistantMessageTypedDict, ToolMessageTypedDict]
26
+
27
+
28
+ ChatCompletionRequestMessages = Annotated[Union[Annotated[AssistantMessage, Tag("assistant")], Annotated[SystemMessage, Tag("system")], Annotated[ToolMessage, Tag("tool")], Annotated[UserMessage, Tag("user")]], Discriminator(lambda m: get_discriminator(m, "role", "role"))]
29
+
30
+
17
31
  ChatCompletionRequestToolChoice = Literal["auto", "none", "any"]
18
32
 
19
33
  class ChatCompletionRequestTypedDict(TypedDict):
20
34
  model: Nullable[str]
21
- 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."""
22
36
  messages: List[ChatCompletionRequestMessagesTypedDict]
23
37
  r"""The prompt(s) to generate completions for, encoded as a list of dict with role and content."""
24
38
  temperature: NotRequired[float]
@@ -42,7 +56,7 @@ class ChatCompletionRequestTypedDict(TypedDict):
42
56
 
43
57
  class ChatCompletionRequest(BaseModel):
44
58
  model: Nullable[str]
45
- 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."""
46
60
  messages: List[ChatCompletionRequestMessages]
47
61
  r"""The prompt(s) to generate completions for, encoded as a list of dict with role and content."""
48
62
  temperature: Optional[float] = 0.7
@@ -89,17 +103,3 @@ class ChatCompletionRequest(BaseModel):
89
103
 
90
104
  return m
91
105
 
92
-
93
- ChatCompletionRequestStopTypedDict = Union[str, List[str]]
94
- r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array"""
95
-
96
-
97
- ChatCompletionRequestStop = Union[str, List[str]]
98
- r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array"""
99
-
100
-
101
- ChatCompletionRequestMessagesTypedDict = Union[SystemMessageTypedDict, UserMessageTypedDict, AssistantMessageTypedDict, ToolMessageTypedDict]
102
-
103
-
104
- ChatCompletionRequestMessages = Annotated[Union[Annotated[AssistantMessage, Tag("assistant")], Annotated[SystemMessage, Tag("system")], Annotated[ToolMessage, Tag("tool")], Annotated[UserMessage, Tag("user")]], Discriminator(lambda m: get_discriminator(m, "role", "role"))]
105
-
@@ -14,11 +14,25 @@ from typing import List, Literal, Optional, TypedDict, Union
14
14
  from typing_extensions import Annotated, NotRequired
15
15
 
16
16
 
17
+ StopTypedDict = Union[str, List[str]]
18
+ r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array"""
19
+
20
+
21
+ Stop = Union[str, List[str]]
22
+ r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array"""
23
+
24
+
25
+ MessagesTypedDict = Union[SystemMessageTypedDict, UserMessageTypedDict, AssistantMessageTypedDict, ToolMessageTypedDict]
26
+
27
+
28
+ Messages = Annotated[Union[Annotated[AssistantMessage, Tag("assistant")], Annotated[SystemMessage, Tag("system")], Annotated[ToolMessage, Tag("tool")], Annotated[UserMessage, Tag("user")]], Discriminator(lambda m: get_discriminator(m, "role", "role"))]
29
+
30
+
17
31
  ToolChoice = Literal["auto", "none", "any"]
18
32
 
19
33
  class ChatCompletionStreamRequestTypedDict(TypedDict):
20
34
  model: Nullable[str]
21
- 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."""
22
36
  messages: List[MessagesTypedDict]
23
37
  r"""The prompt(s) to generate completions for, encoded as a list of dict with role and content."""
24
38
  temperature: NotRequired[float]
@@ -41,7 +55,7 @@ class ChatCompletionStreamRequestTypedDict(TypedDict):
41
55
 
42
56
  class ChatCompletionStreamRequest(BaseModel):
43
57
  model: Nullable[str]
44
- 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."""
45
59
  messages: List[Messages]
46
60
  r"""The prompt(s) to generate completions for, encoded as a list of dict with role and content."""
47
61
  temperature: Optional[float] = 0.7
@@ -87,17 +101,3 @@ class ChatCompletionStreamRequest(BaseModel):
87
101
 
88
102
  return m
89
103
 
90
-
91
- StopTypedDict = Union[str, List[str]]
92
- r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array"""
93
-
94
-
95
- Stop = Union[str, List[str]]
96
- r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array"""
97
-
98
-
99
- MessagesTypedDict = Union[SystemMessageTypedDict, UserMessageTypedDict, AssistantMessageTypedDict, ToolMessageTypedDict]
100
-
101
-
102
- Messages = Annotated[Union[Annotated[AssistantMessage, Tag("assistant")], Annotated[SystemMessage, Tag("system")], Annotated[ToolMessage, Tag("tool")], Annotated[UserMessage, Tag("user")]], Discriminator(lambda m: get_discriminator(m, "role", "role"))]
103
-
@@ -4,25 +4,25 @@ from __future__ import annotations
4
4
  from .toolcall import ToolCall, ToolCallTypedDict
5
5
  from mistralai_gcp.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
6
6
  from pydantic import model_serializer
7
- from typing import Optional, TypedDict
7
+ from typing import List, Optional, TypedDict
8
8
  from typing_extensions import NotRequired
9
9
 
10
10
 
11
11
  class DeltaMessageTypedDict(TypedDict):
12
12
  role: NotRequired[str]
13
- content: NotRequired[str]
14
- tool_calls: NotRequired[Nullable[ToolCallTypedDict]]
13
+ content: NotRequired[Nullable[str]]
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
20
- tool_calls: OptionalNullable[ToolCall] = UNSET
19
+ content: OptionalNullable[str] = UNSET
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)