diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index a4379e0c..c4cc177d 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: - docChecksum: e314d743e0ef59ffee183e3d8dc2dc3c + docChecksum: c7a9979573e9190ea730a5e5b9d3727b docVersion: 1.0.0 speakeasyVersion: 1.807.0 generationVersion: 2.956.1 - releaseVersion: 3.10.0 - configChecksum: 070426f4ef5e4713fa54b61cd3447e9e + releaseVersion: 3.11.0 + configChecksum: 4b4679e7ef0c9eb0cf1863c1b85eb088 repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: a4337d30-4611-4901-983e-09f6ce22455c - pristine_commit_hash: ade9d98bd4563aaea9d0a519894987e2dc90b3c6 - pristine_tree_hash: d669e068cc8f9f09310f4324b62c688ff37666db + generation_id: fb6335ec-f3b8-478b-9602-fc295ca58b75 + pristine_commit_hash: 0eb1a2c721cf26acd106adfab7b73421f37c0212 + pristine_tree_hash: 74bc07209514bf14dd83bab1c40cf2b5aeca2dc9 features: python: acceptHeaders: 3.0.0 @@ -326,8 +326,8 @@ trackedFiles: pristine_git_object: 064a594b1a381c4336cf3b9dc69f48eda84069c2 docs/models/andmatch.md: id: 836ee95557bf - last_write_checksum: sha1:289e87b83032fde7c3fafd92ae1e925e4e0b9055 - pristine_git_object: 23f45709694e7e5880472a12b4b28ab9a394689d + last_write_checksum: sha1:97275cd5b555113e8a74ee95d4aa01262924ae15 + pristine_git_object: 2cb0aaf8dbf7a77743d2d5f0cc9db390a6b0845c docs/models/annotation.md: id: faab6b24438b last_write_checksum: sha1:bc13cfc795ffa8c6837583fd6271b0629938fa0b @@ -484,14 +484,18 @@ trackedFiles: id: 7a5063a4f825 last_write_checksum: sha1:1111b55d1b2b3fccfb0d90288903be9408fd39af pristine_git_object: f4a62d4b99bc66af2c36ce3831633e8ef71f587c + docs/models/audiosessionsttupdate.md: + id: fe81efa0a364 + last_write_checksum: sha1:aa84a402535c4c2b5ea758d32cd4ebd0e4633d19 + pristine_git_object: 252d942dc6624d664fd7aefc9ed2007de14fd665 docs/models/audiosessionturnupdate.md: id: f6c2d9f43f6b last_write_checksum: sha1:2f7f2a86b015a9f82061b1126f8c41b0b903d2bf pristine_git_object: a51ae7013dbcef0636aac87f0645e1d5c438867c docs/models/audiosessionupdaterequest.md: id: 621fe5a5d39c - last_write_checksum: sha1:32f4efad07498a65c96bebd6938528589c6df42b - pristine_git_object: 068e40ab58d27f48fcfb284f1d1cc8219479b5dc + last_write_checksum: sha1:8383d86f656c449dae08f153f4d31b37bafcdfa0 + pristine_git_object: 7b8fee775d745d6ed19b7c741b4331b68d2a4aa6 docs/models/audiosessionupdaterequesttool.md: id: 696bbbb21515 last_write_checksum: sha1:1f497028f1bbe984280ec50d93b830d701bb324b @@ -694,8 +698,8 @@ trackedFiles: pristine_git_object: c289272622b137541843bb4ba9654d0e1405ffec docs/models/chatcompletionrequest.md: id: adffe90369d0 - last_write_checksum: sha1:d3f7919396b19a59a86d4a93ee0a45ea64f9411f - pristine_git_object: 1d475c253a2ed2cc04c1007f6ad4a0e3687fe599 + last_write_checksum: sha1:41a0a4cef79c06e3d2f7981948c890bd616d280f + pristine_git_object: d178be4d505849f386545f2b6924153682d4c007 docs/models/chatcompletionrequestmessage.md: id: 3f5e170d418c last_write_checksum: sha1:7921c5a508a9f88adc01caab34e26182b8035607 @@ -730,8 +734,8 @@ trackedFiles: pristine_git_object: 7c7b26cd6c469a82bc16aa4b7a794cf3e506efc7 docs/models/chatcompletionstreamrequest.md: id: cf8f29558a68 - last_write_checksum: sha1:7b5a8aa97f2528c8eff240f4a8063817a007bc98 - pristine_git_object: 43c17015d42a9e9519ed78d94d7ebc0a98337c23 + last_write_checksum: sha1:d41d68dd93952c78580252dc0b2f906781a98a78 + pristine_git_object: 29c2f7ade9f4d302c978b35a2a3c81b9fe421877 docs/models/chatcompletionstreamrequestmessage.md: id: 053a98476cd2 last_write_checksum: sha1:8270692463fab1243d9de4bbef7162daa64e52c5 @@ -828,6 +832,98 @@ trackedFiles: id: f009740c6e54 last_write_checksum: sha1:a2114d61a98a48b4365a77c0c75c06ca834367ad pristine_git_object: 6302fc627d7c49442b6c9aec19c70fdceaf7c519 + docs/models/comparabilitycheck.md: + id: a9bff7a94109 + last_write_checksum: sha1:a8e7dcda9aa5800f6adc42b26117c04ce3139655 + pristine_git_object: ed3eff55814fcb23697cf0dde92874a065c88c06 + docs/models/comparabilitycheckcode.md: + id: dafe9ecb580f + last_write_checksum: sha1:590464b7e3f1fea8ed7bb29c255a13ec76ddaf51 + pristine_git_object: bbf2f16cb486b6b78c21e2bfe0bb408f799521cd + docs/models/comparedcandidate.md: + id: 3174f2426152 + last_write_checksum: sha1:450fbf93b5d88d202f9e29c9fa774cb94ca4ed37 + pristine_git_object: 5b8c97fc270bd07abe1f142a0592a8a06d3ae11c + docs/models/comparedrun.md: + id: bbbf7344b1b0 + last_write_checksum: sha1:3751f052f82dc7f02e816ef4dde6085e7070f73b + pristine_git_object: 126962c317f3aebfef4a0695c0d902d19e5b3c5d + docs/models/compareevaluationrunsrequest.md: + id: 4fa160e02136 + last_write_checksum: sha1:0c6f212e006f660ec4956a9b7260abaa9e16a2a4 + pristine_git_object: ba471a9d87b3a5a08b551585c4f208f6003ea7fb + docs/models/compareevaluationrunsv2v1observabilityevaluationsv2evaluationslugrunscomparepostrequest.md: + id: 60d065f8e2db + last_write_checksum: sha1:6950e2049979dc0d95eec2a9c8ac7f48b449caf0 + pristine_git_object: 151fd9ba27b1357b961105d95056c0397b92ce9c + docs/models/comparisonevidence.md: + id: 14519d55e8a5 + last_write_checksum: sha1:fc559f6a3b2c29b8d9da45264bfe29244ed426af + pristine_git_object: a1c85ef16978e0c718758e326eae7701ac98515f + docs/models/comparisonevidencemethod.md: + id: 7852b146f8ae + last_write_checksum: sha1:5f9211f78e84861acdb2f71bc6a0045de4f145fa + pristine_git_object: 96e46a511494c38389bb40cd06c20e8ab386c528 + docs/models/comparisonexclusions.md: + id: 25ba6d8832e1 + last_write_checksum: sha1:d6e10e604a1b41a0fc8f79ef25be7d872a7fd307 + pristine_git_object: 995a2ca7fbd23fdb15f32bfda5900012ab480329 + docs/models/comparisonflips.md: + id: 923047fd1152 + last_write_checksum: sha1:1189fe17ca8b25c20fa5a749dff105f73cbbf2ed + pristine_git_object: 1e3ea00f47af829ec297d1ea04f1978e14243fbe + docs/models/comparisongate.md: + id: 499865fb8656 + last_write_checksum: sha1:5e89b0819e199297dda5f4eb9b9579a07923e5ef + pristine_git_object: 59d654b3fbf9d4bcedf35f70c2e28712a2d58055 + docs/models/comparisongatedecision.md: + id: 5196887ca81c + last_write_checksum: sha1:247315b65ee70580823d1abe5d135aa05c430195 + pristine_git_object: 8bef2234299877ffdc0496534e261c5792b1a14a + docs/models/comparisongatereason.md: + id: 26b803cddcd5 + last_write_checksum: sha1:939bf52d19c39da38963c78932db4dff3114bfc8 + pristine_git_object: 9d9185d9490bdc01992831d461d07429616deb00 + docs/models/comparisongatereasoncode.md: + id: a6a447f5a65e + last_write_checksum: sha1:02dee9e57cad1a193e6e1a332ea7bdcb1f22be08 + pristine_git_object: 5f9b6be7aad3138aa3dc6ebc77d6faaa6eefae52 + docs/models/comparisongoal.md: + id: dd9d5f336f2a + last_write_checksum: sha1:3dc95569006899d6b7e881594459e32d4bed8e8c + pristine_git_object: cd10ca331211977580014c206e7debbbdb3bbcf8 + docs/models/comparisongoaloperator.md: + id: 6ecfb715fdc2 + last_write_checksum: sha1:29072627b2c7f976726f7dfa5dda90171f1b04d6 + pristine_git_object: cce766dd6e6824de5a0b9ec894f9736ee70ae1ca + docs/models/comparisongoalrule.md: + id: fbac21055d77 + last_write_checksum: sha1:71ce5b270ac4b8c15d68df6e62daa91b08f30d9b + pristine_git_object: 566f6f02001bda58fd05e9c269c9533a7392debd + docs/models/comparisongoalside.md: + id: b18855524cad + last_write_checksum: sha1:5926a9b03ad99f5a5591eaa111717da19ddf9bb3 + pristine_git_object: 2a5169f4d63478af55ccab56888ab7c4dc3ec787 + docs/models/comparisonmetric.md: + id: aeaf138dc9b2 + last_write_checksum: sha1:d20d0a16e0a8d2ba71f337f6aeaafc63f595af50 + pristine_git_object: 14313b89949c4dfef81487574aa141a1edb6c048 + docs/models/comparisonmetricdirection.md: + id: 2f1b986f534e + last_write_checksum: sha1:d04334de78e7d016052fff567f11c59333b466f0 + pristine_git_object: 12ae5d285fdb4664d124f48cdec3a7b72254594b + docs/models/comparisonmetricid.md: + id: 880163ebe400 + last_write_checksum: sha1:f59df327e9e735209c4a8e65a188feb3c60fce33 + pristine_git_object: 27454a832c8a1c11fe1553afcf97bbcae0114888 + docs/models/comparisonrecordcounts.md: + id: 56d28af3eaae + last_write_checksum: sha1:47657ef9da5c116e40391e248110d62e994d657a + pristine_git_object: 03b8a8901df1b276443f81462a603da6b65965f5 + docs/models/comparisonverdict.md: + id: 6bc4629950fe + last_write_checksum: sha1:f2b92ed7600a0fec5eb918f8f2cccb8608258a50 + pristine_git_object: f62da994d63f1af3c7a526d72520148cce50cfb4 docs/models/completionargs.md: id: 3b54534f9830 last_write_checksum: sha1:3629a70a095750b82bc60a80c0a2b3e3496bafba @@ -946,8 +1042,8 @@ trackedFiles: pristine_git_object: e50c7296f28bbf48daf724af3c848a50e8424ad7 docs/models/connectorerrorcode.md: id: aee48c9e6fd0 - last_write_checksum: sha1:4d51aa490f0bc4b087e441532595b8f1d2110f0d - pristine_git_object: cc9d2153712f4606f856da251f0f0a62525c7d96 + last_write_checksum: sha1:04a8b9105b60c1b09f697b63517e52e5a834c6a3 + pristine_git_object: a8fe2ae8c89c0e0f71eef2e42cd2ebb5e2cb4341 docs/models/connectorgetauthenticationmethodsv1request.md: id: 50edde04fff0 last_write_checksum: sha1:78305fe0052b6b90036ca72302a42dcf9093e3d3 @@ -1064,6 +1160,14 @@ trackedFiles: id: d7e5c7974261 last_write_checksum: sha1:4012cffe5553431d50539a9e4663a935b5cb00cb pristine_git_object: 9ac4df3f4993e81c99ddfcb91c0b32b04730da7f + docs/models/contains.md: + id: fdfb2e7d37f2 + last_write_checksum: sha1:73fe4b9543227e5e9d92d51f10dbc076f77cac20 + pristine_git_object: c51b7a2a65c0ea382124e0d43b967738ce1071f4 + docs/models/containsvalue.md: + id: 0d683e8828c4 + last_write_checksum: sha1:44ab7566086138ef2df155071abb0aabd5029b39 + pristine_git_object: 9588d6be2458c4083ddbf4775813fe0db074b49b docs/models/contentchunk.md: id: d2d3a32080cd last_write_checksum: sha1:78fe232de5228e0695f399640a37a6aaf264a38a @@ -1790,12 +1894,12 @@ trackedFiles: pristine_git_object: e9a3ffddc1f42ea4a720940cc2dcfd2eb643820c docs/models/deploymentworkerspecinput.md: id: 1cd06cd8089d - last_write_checksum: sha1:8fcb49d2ec7e1af237b5dd93d3d5b445a2e5d160 - pristine_git_object: 357f70bfeedf4ba7e95dd3502bdae943c4f636e0 + last_write_checksum: sha1:f32af624d246ee251e475d6eb6fbc52d652781f9 + pristine_git_object: d0c1bd9b2156e2b2ffe0c93c7ab24caffec251cf docs/models/deploymentworkerspecresponse.md: id: cad5b4a16cab - last_write_checksum: sha1:34ef45486c8d2362c8681f40d84aee05b6a60a9d - pristine_git_object: 3444ef039c34ce2d31636ddd66b5237f82c83a82 + last_write_checksum: sha1:829dad294667938711058a861a58b9648e4f1dad + pristine_git_object: 6d6a27b1a15f865abc1bcc499aae9476c9f3f2ca docs/models/destination.md: id: 687894272b1a last_write_checksum: sha1:4d201936acfdd6e3424b57d8f71e306564314b8d @@ -1804,10 +1908,22 @@ trackedFiles: id: f256851e81cc last_write_checksum: sha1:d542ad39f409111eba94f497361028367ec7e736 pristine_git_object: 503e7a0b37ff6de69623ea4e39cbdd43207744ff + docs/models/detectionfilerequest.md: + id: c5b17f47b787 + last_write_checksum: sha1:9d709ebecce4028f08981fbd3ca3abd954c290d6 + pristine_git_object: a63e8d9d7e38995766d5f66eac6753eb8e9f2b19 docs/models/detectionpattern.md: id: 62aa5918033d last_write_checksum: sha1:17cf41f78367b69594c6a38f5d345a9c4264f1a8 pristine_git_object: 8b532d6b4b735b29a629e095fab28422ea593063 + docs/models/detectionresponse.md: + id: fb12927c4a35 + last_write_checksum: sha1:35d262a67c3bdf789bb2263ea432f5ca3d1cef89 + pristine_git_object: 86ac1062e04a2eabceb0e485730cee6b4e946591 + docs/models/detectiontextrequest.md: + id: 962bc3115708 + last_write_checksum: sha1:dddd8ba2f025ed8e67738568c92d52c67e9312d0 + pristine_git_object: b2b6d716e9fe09738203f899ce2537e908e08dc3 docs/models/displayformat.md: id: 8238b5aebbe8 last_write_checksum: sha1:93eb7f6b4d50e0ca91a5a2bedd47df8347c1fcce @@ -1968,6 +2084,10 @@ trackedFiles: id: c6794186836d last_write_checksum: sha1:e0875e350c93d21e9164b748dc8d47b8fa69d4f1 pristine_git_object: d4afeaf98b1cddb2ed7d3e2aa844010f037c03e8 + docs/models/evaluationrunscomparison.md: + id: 14130314a22f + last_write_checksum: sha1:39fc20e57e713a0693804a44c874f17310ff2f36 + pristine_git_object: 9feb6307a433064cf1a5ee8068d4e6e00e5f4a66 docs/models/evaluationrunscorev2.md: id: bbb6be858b35 last_write_checksum: sha1:54cf2d7089e525758b4dbe4ea18fcaf408aecda2 @@ -2882,8 +3002,8 @@ trackedFiles: pristine_git_object: 0957f513df88d7d30f584f593adb34f56c349e53 docs/models/keywordretrieverfilter.md: id: 3d0460c874e0 - last_write_checksum: sha1:2880aa294c7db44ab0cc225ab06e82e1e9ea2935 - pristine_git_object: 4bbfe9dcb6809afd6df89ec3ef8100efd4095d2b + last_write_checksum: sha1:78c92a0deb119da21da08503964405baab3b8a98 + pristine_git_object: 9958182a6829ece5ed7ce1f1cb3a252bf4c0182d docs/models/librariesdeletev1request.md: id: c0c3b2e1aabc last_write_checksum: sha1:bef84f8851b06d2d914b605f11109de1850d0294 @@ -3384,6 +3504,10 @@ trackedFiles: id: ca9a0c35c47d last_write_checksum: sha1:587b726fce7622980d05c52b4e302f90c2a5ac39 pristine_git_object: 58ad59b09816792dfa766b6c940e295f9700ef69 + docs/models/metadatavalid.md: + id: 77e964cad127 + last_write_checksum: sha1:1af2860a3598078fa35df45d3c6ffe069d3fe270 + pristine_git_object: b85023dd1619c5180f34ca306b9eb27fe841cafc docs/models/metricaggregation.md: id: 0f926158669d last_write_checksum: sha1:20df8cfe3aa53bce14350d5d0dfa00b8a5a0e930 @@ -3416,6 +3540,10 @@ trackedFiles: id: d17d5db4d3b6 last_write_checksum: sha1:d7804c45f10f2e929276d4a00bf6c2b966a78fb5 pristine_git_object: 9b234e3ea8fc13261897acf18ce4da3b14485f72 + docs/models/mode.md: + id: 568581cb28bc + last_write_checksum: sha1:0fb3f2ad153bb3c8f6adf4bb2cf8f039917b6190 + pristine_git_object: 760479647dd90cbde9b4120e55cdcf7ade57ad53 docs/models/modelcapabilities.md: id: 283fbc5fa32f last_write_checksum: sha1:24c944af3ee769d38be1fdcca65a207abc9359a9 @@ -3506,8 +3634,8 @@ trackedFiles: pristine_git_object: 47c7c8018647ede9417074b16780075a4b3d7e60 docs/models/nearestneighbourretrieverfilter.md: id: 209c95127bea - last_write_checksum: sha1:3d5085ec08c652bb065a011e58d960b5fdd434af - pristine_git_object: 6fc00d79ecb8e4b301404ccc7429c11bc2462552 + last_write_checksum: sha1:4cd66cab34270708023e2b9895bf531b7f378fd7 + pristine_git_object: 65e079b0ace176a221c125cfcd7d7e8ad547b022 docs/models/networkencodedinput.md: id: 44842604e405 last_write_checksum: sha1:50e09dfa5ed838df4a760358c6bf81c04da4910b @@ -3522,8 +3650,8 @@ trackedFiles: pristine_git_object: 1bc722d14dd7ea0b91e7d07514197af03f033c80 docs/models/notmatch.md: id: 331db24a4615 - last_write_checksum: sha1:2e020c7d717f00c23da4dd1bf6412539e872932b - pristine_git_object: 00b50c20f776155ecfb98a9033fbdc2ce57152aa + last_write_checksum: sha1:29a0cc889ac0abcb7ecfc1f85c6ffb6711f7a203 + pristine_git_object: a9f8215c67f06c1d5a8f0092ef8b79e7e9bc802a docs/models/numericscoremetric.md: id: fbe5d4622de4 last_write_checksum: sha1:b35d375632d7d3a768b0c35451b5657f87375043 @@ -3570,8 +3698,8 @@ trackedFiles: pristine_git_object: 22e2804a4424325ad07c264a61463635299fc254 docs/models/observabilityerrorcode.md: id: 61d16ff95b87 - last_write_checksum: sha1:252988f702ca784096871eeee9bba0a7fbd8b593 - pristine_git_object: fb6165b8f74a1a040b5865eafcd52d762aac41f5 + last_write_checksum: sha1:b689e01f8e2b14da88d4eaead07cd5950cb9cc98 + pristine_git_object: f4ecae74db5c4e58f8ee4d081c6888c7bc33c726 docs/models/observabilityerrordetail.md: id: 38061447dfbb last_write_checksum: sha1:1da7bf6e72c2f972b0e22f0201a1cb9b76f53ccd @@ -3726,8 +3854,8 @@ trackedFiles: pristine_git_object: a1bac936ef95fd818b94d4ad14bbf10ea25e3285 docs/models/ormatch.md: id: ae7dc9a4f56b - last_write_checksum: sha1:2a3a2fb048680238f928591b518de7297d1f1989 - pristine_git_object: cdb11118bad4d954b3cf84126635f59680d4d3ee + last_write_checksum: sha1:d851e4ede44bab5f7e814924fe6cccb61e82374d + pristine_git_object: 93a1c42ddad66d585201955362944e09a376c4af docs/models/otelenumfielddefinition.md: id: 290f7628d8f8 last_write_checksum: sha1:f0c403e16efa4effa4929b6692a4af66fdba7781 @@ -4106,8 +4234,8 @@ trackedFiles: pristine_git_object: 48041c5d5d1662dd28f1c450d41dcc86db496dcd docs/models/realtimespeechsession.md: id: 28b2f5a82537 - last_write_checksum: sha1:8eaafefbe5a212046c7c9787590683e63b64d2f4 - pristine_git_object: 138f899eaa3a808029a12841881f3bcfd31db824 + last_write_checksum: sha1:d5fcd511b6eb5c3e12a66fa3569c11ead28db802 + pristine_git_object: 80ed800090bcaa13122260400bcf7268247cb6ab docs/models/realtimespeechsessioncreated.md: id: 6a5abd07b3f5 last_write_checksum: sha1:22de922e7be85645946e42aedab732f3a2a4be5b @@ -4122,8 +4250,8 @@ trackedFiles: pristine_git_object: 6f96b67c2b112ef3b4253d5eb856c19ce1ec59b2 docs/models/realtimespeechsessionupdatepayload.md: id: a9ee3a4cd31a - last_write_checksum: sha1:0eb2ca14fd34d92e3705080117e560664becc9db - pristine_git_object: 237871dab471c8752e052812422d2ded27aa5f86 + last_write_checksum: sha1:44177daa7e5632c1143e652196364fc95aee33bd + pristine_git_object: a59eaf13d151058475ce37a10128ce2306390ed9 docs/models/realtimespeechstreamingmode.md: id: 0fde6b6275cd last_write_checksum: sha1:d376a19ffa871b3375b33a517e17527bc46454d5 @@ -4766,8 +4894,8 @@ trackedFiles: pristine_git_object: 30f1c21b2506249430ed74bbecc4d92bdcf74c34 docs/models/rrfretrieverfilter.md: id: fe9a76e3cd59 - last_write_checksum: sha1:a471f42fb1f8e65db90bc4a80ca4e68f0b8d668b - pristine_git_object: c7fa02af08d934ad22438797c7e62c13a513b165 + last_write_checksum: sha1:2ab6470d85fc87495a8c6158d928d3cd351dd840 + pristine_git_object: 086b39716bac1c34c87119e79c0b944ceac10b73 docs/models/rrfretrieverretriever.md: id: 8cf222c4b810 last_write_checksum: sha1:0e421d7174379b3bd8ec8789eb64999c77b2a960 @@ -5194,8 +5322,8 @@ trackedFiles: pristine_git_object: 9b06e46475dd6160588ce4fe9d275c2f2454a6c0 docs/models/speechrequest.md: id: 1403855cf560 - last_write_checksum: sha1:873c231d252b956b3b2da6ae98a9673ba6b49138 - pristine_git_object: 0548e05b41750fd34d9d7a6c5a0c19e43904bd83 + last_write_checksum: sha1:f17217371ec903d869ca7c3dadeb5ad4015c0ff9 + pristine_git_object: a1346d29f4ee1fa6e4bf9cd6cd11209cc83b53d2 docs/models/speechresponse.md: id: be437798d476 last_write_checksum: sha1:c1c23ed7f45484831d04ca5bc12a28b4e91cd0d0 @@ -6204,6 +6332,10 @@ trackedFiles: id: 7fbbdd315066 last_write_checksum: sha1:468cb44465846b7aa242bb5c41279700ce7a6d96 pristine_git_object: 23b8f1d005fcbb85ea564719cfa42d5d1bb1d83b + docs/models/watermarked.md: + id: f8d28f2d4201 + last_write_checksum: sha1:3950f92990c7cf4a024d4d250c2e26bda002d889 + pristine_git_object: 7aa48ee585ae4ec982bec7d2819d03550150f4ac docs/models/webhook.md: id: 20220f003054 last_write_checksum: sha1:bc3f635520473b2dc962037b5505ad27a3e7bd54 @@ -6454,8 +6586,8 @@ trackedFiles: pristine_git_object: af919c68028854c00c2b611bd79235dc24d52fda docs/models/workflowsworkerspecupdate.md: id: a7af8bf36e09 - last_write_checksum: sha1:fc2b762b0b6c55b80d3feadd95870878e3b74ab0 - pristine_git_object: 6004846ad53331bae28afe2caa8d6b44a08a6d5a + last_write_checksum: sha1:6b945addb903b4a7f30bf2da1f12d75f5e83112f + pristine_git_object: 2df72f48198616c09d7646dcef69d6ebf0a3a7bf docs/models/workflowtagsaddrequest.md: id: 90d3e59be6af last_write_checksum: sha1:4a4f5c1b6ce6fda985f5698e0adebd47f776c825 @@ -6510,8 +6642,8 @@ trackedFiles: pristine_git_object: 4bcf7a797cd06ba194b12e22f0c32141033b2793 docs/sdks/audiosessions/README.md: id: 15f4b946eb88 - last_write_checksum: sha1:5de595bd1e69e3d6af7da5c8ff7da9efc119f910 - pristine_git_object: b8c812a58db963b4fc39f1b5cbd59540c0bac2d7 + last_write_checksum: sha1:3e011da6bea79e45eac95d18665b6388e50be785 + pristine_git_object: f761a08fbcfb296a9803c9b70ff381faf469f3b9 docs/sdks/betaagents/README.md: id: 5df79b1612d8 last_write_checksum: sha1:288cde2bf4da8751d9259d1fa8a649e01c286a44 @@ -6526,8 +6658,8 @@ trackedFiles: pristine_git_object: fd6111b2691a99f7461a9b028da3d37691be1322 docs/sdks/chat/README.md: id: 393193527c2c - last_write_checksum: sha1:740cb0bf8222418d0eefde43a54328207fc215b1 - pristine_git_object: 68b36116ce2b50e576c91bc3fd3154ecb62d2b90 + last_write_checksum: sha1:4910b673452dcab0b0a9fadb78c1b60ce316062d + pristine_git_object: 0dce1cc744b18fe247cb02c0aa8e70655ee2d2c3 docs/sdks/classifiers/README.md: id: 74eb09b8d620 last_write_checksum: sha1:9d6cca59cf3da35d16d648fd6d5e9b8c40a0cbce @@ -6574,8 +6706,8 @@ trackedFiles: pristine_git_object: 298d7e36e48a188d5520e7b19fadb67e155736a6 docs/sdks/evaluationsruns/README.md: id: 963f31accc15 - last_write_checksum: sha1:065aba9e1b2f3ea90b197f6b7829a4c387019f1b - pristine_git_object: e479a0e2bc99b719e6856ba62481223cb65c840f + last_write_checksum: sha1:d064b01a47cc1d0c1ba0af9a7d4732b16cf6211d + pristine_git_object: 7ab2d9399d4bba5e92e180a14e37c620e2ebb7a2 docs/sdks/events/README.md: id: cf45a4390b9b last_write_checksum: sha1:2ca626c3f0ef9f36facd985b4dc0186a6119ab3c @@ -6658,8 +6790,8 @@ trackedFiles: pristine_git_object: 043ae68329914686c180c2e4f6ab7d3cfe88bf62 docs/sdks/speech/README.md: id: d5924688d48c - last_write_checksum: sha1:a8e3dee1318d2dc5ed3f393f42c894d5497687e8 - pristine_git_object: 44d4ad4f966a31bf650e30834f4629f7d2eb8aed + last_write_checksum: sha1:1b30b7f52e21e180e33c6e4f10bf926ba9be3781 + pristine_git_object: 74b40263a5c4fe1d6c0b20b86e5ec67629feb5ff docs/sdks/traces/README.md: id: f3d9b8dc85fd last_write_checksum: sha1:adfa04f816f38eccc5a2b11bfc4084e074dc04b9 @@ -6680,6 +6812,10 @@ trackedFiles: id: 4f1a657c8f68 last_write_checksum: sha1:19075b66a2e97b8fc53b7b9ee7f67a41c5edc1e6 pristine_git_object: 7f0f7bba300c431693f86baa8ae7d053f8f45c4a + docs/sdks/watermarking/README.md: + id: 9931601e0704 + last_write_checksum: sha1:451188844d5f67d7070370ad132b3afdbd6faad7 + pristine_git_object: 2704eeb3e47b3801a8bdb29c4fe4efc4c41c6683 docs/sdks/webhooks/README.md: id: e21b32d786a4 last_write_checksum: sha1:626a5135e967b8f541b2fda419fcfbdef7963f7e @@ -6722,8 +6858,8 @@ trackedFiles: pristine_git_object: 5052bb072d14c65419bf49bdc1a47500cb03ae56 src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:1906207cb37ab98ccc616c94aac0dc6b96f88b6b - pristine_git_object: 31567b3e2db9ca4abfd12136eee536ad07363306 + last_write_checksum: sha1:a2104561dbb4fc374903ad7ef09483f14a10e37c + pristine_git_object: fed9de6f17a6b7b4f4486b1ab880f26008e284d5 src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:414c7375fcd63266d196840fa8d1274d60aae2dc @@ -6742,8 +6878,8 @@ trackedFiles: pristine_git_object: 16a3da1ca274072e0e3f982f9c41a95a2b5535c7 src/mistralai/client/audio_sessions.py: id: bf6a566f1a89 - last_write_checksum: sha1:e8b35bf2458c3748be795bc48bac14afb84e441c - pristine_git_object: 09deb979e0d7ad2743e0e2c19a00f67d64c8a1ba + last_write_checksum: sha1:044058905dda832f90be3f3ebb800627bebb46f4 + pristine_git_object: 630188fbe46500e1996cae44856363cc4b9e01aa src/mistralai/client/basesdk.py: id: 7518c67b81ea last_write_checksum: sha1:988e7aff5278afa1e67a474baa858522de733227 @@ -6774,8 +6910,8 @@ trackedFiles: pristine_git_object: 5458f3de6f59d1d1e70ec00fce9f2bb3551526c8 src/mistralai/client/chat.py: id: 7eba0f088d47 - last_write_checksum: sha1:65069158f48c79304a40f75a2960eb0731040413 - pristine_git_object: 9e2e04c1c38df1a970b5b3c9a89db3d2c137a99d + last_write_checksum: sha1:896492645e6438e430ecb4ac67c6427f40ba302e + pristine_git_object: 086087c903f89534d85b4807983c701b7f2142f5 src/mistralai/client/classifiers.py: id: 26e773725732 last_write_checksum: sha1:f3a44b88edcd3c31e6426dbe5a744281059cd6dd @@ -6854,8 +6990,8 @@ trackedFiles: pristine_git_object: 4386edd7f09f38bcecf556b101c75e534cccd345 src/mistralai/client/evaluations_runs.py: id: effa198cccb9 - last_write_checksum: sha1:c693bbd7b3930f3186f355fea7f5cd077ebb6886 - pristine_git_object: 697a462ce2bca82b9097c5252f67b185c32edbd6 + last_write_checksum: sha1:e9fc5b677ddd244435c0d236a3e427501ec4467b + pristine_git_object: 90cf373808d4ea483995eca6ddb8ee6d4f919833 src/mistralai/client/events.py: id: ac9b961cc70d last_write_checksum: sha1:4e5dd8bfa3cda63db7f4e9ecb0c5c27d818460e9 @@ -6898,8 +7034,8 @@ trackedFiles: pristine_git_object: 41d7f799e8a2afa860b4193f7752e094f1c624b2 src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:63e7396af1b82c348ddd0c10113f9e649e05e749 - pristine_git_object: d37000240ce4b931fcd1754cedd3f2eabfc79661 + last_write_checksum: sha1:9cb552fc9e1d992136e87a6391f8b3caa59488dd + pristine_git_object: bab26e2b414d22794c40648c8bc4ba4a4db71665 src/mistralai/client/models/accepteddocumentresponse.py: id: f529b784daff last_write_checksum: sha1:2eb3c7dc0d7165987aefda841b1ceada6698c15d @@ -7094,8 +7230,8 @@ trackedFiles: pristine_git_object: 47059ebf6f7b2c88c8edba2f844706583dfaa1b8 src/mistralai/client/models/and_.py: id: 124ee0e13b27 - last_write_checksum: sha1:ca15ac0aea3cb332d372924fd90ab15ef0238e02 - pristine_git_object: 316b837267195af0779ae54d250cf89225a1b34e + last_write_checksum: sha1:2a8741a03a0c8396130bf3cb2528ecf6210f2e81 + pristine_git_object: f153ecd967ef76943eafa43d574f9c511dab6233 src/mistralai/client/models/annotations.py: id: 3ae9e07de11d last_write_checksum: sha1:f0fef88fc72c094584d17938a3ccd246e05f445d @@ -7220,14 +7356,18 @@ trackedFiles: id: 2510192115bb last_write_checksum: sha1:453cd13916dd5567926dceaed0aac8d98b196e35 pristine_git_object: aaf196869bf71866a2fa7477ecedd2ec538640a9 + src/mistralai/client/models/audiosessionsttupdate.py: + id: 1f3a433e4209 + last_write_checksum: sha1:0b0cfb5a308682110883ba1e48018430d1c709b2 + pristine_git_object: 66ea9a9b4ca66b1a28481203be881a2c11366000 src/mistralai/client/models/audiosessionturnupdate.py: id: 2ad75e07c8df last_write_checksum: sha1:c2af73ba79f904dbe54cada405f24bbff6dc5f76 pristine_git_object: 7a046574b920e3b1804d1bbe37cfc18e6f6a60d3 src/mistralai/client/models/audiosessionupdaterequest.py: id: 8021f278ee1c - last_write_checksum: sha1:04feeb992c36b544fe3a0aced3b7b64c4fab4750 - pristine_git_object: 476d6f0087964d91467445884e8fd00a2b68a5ff + last_write_checksum: sha1:a973ef3b4daa675d05f50bd8336114c1fc9441d1 + pristine_git_object: 63d40af7a8debe91f6f596067b74cc8d75f1d7fd src/mistralai/client/models/audiosessionupdateresponse.py: id: 102b1a6ebf50 last_write_checksum: sha1:5e61a90772c6e9c07a08dc5f1112df9993e75245 @@ -7390,8 +7530,8 @@ trackedFiles: pristine_git_object: d7156bedb40f6a933d6018952fbb5562f3ce9f4c src/mistralai/client/models/chatcompletionrequest.py: id: 9979805d8c38 - last_write_checksum: sha1:1337f8a7cdc13d679300c4bb0a2079a9646c23ca - pristine_git_object: 295807c6985dbe01cbd5bf6400cf7f858970f27f + last_write_checksum: sha1:23ca489d8b7df6cb0dc45f01443255471573049c + pristine_git_object: 8768bb73d1fe46c8ef629ee2d0073cb1345cc070 src/mistralai/client/models/chatcompletionresponse.py: id: 669d996b8e82 last_write_checksum: sha1:af8071e660b09437a32482cdb25fd07096edc080 @@ -7410,8 +7550,8 @@ trackedFiles: pristine_git_object: bd13a80f35538e6f5022aea567a76414d104c75b src/mistralai/client/models/chatcompletionstreamrequest.py: id: 18cb2b2415d4 - last_write_checksum: sha1:824b4c34d55e40f5ead50a816d1e46304bf57327 - pristine_git_object: fe119847084d948e4d23b1333ff88eda51da3964 + last_write_checksum: sha1:9265d04b740decb13e7e89690ab329364fac8321 + pristine_git_object: 13aea80e22308423b18c66c4af245f865c412b42 src/mistralai/client/models/chatmoderationrequest.py: id: 057aecb07275 last_write_checksum: sha1:9c71b0b44ffc5c40aa40d382e91b5a52d05b3b31 @@ -7464,6 +7604,94 @@ trackedFiles: id: 950cd8f4ad49 last_write_checksum: sha1:510b730b281ce9c1f3a9ce5540f87641303d5ced pristine_git_object: 6fef8522494f545e4ee182e9536deb1256f1eff5 + src/mistralai/client/models/comparabilitycheck.py: + id: c3d8e5c74120 + last_write_checksum: sha1:6a07a3d7f9feefdd7ccd5f519c0185f37fbaa3aa + pristine_git_object: 6d6ef26bd508f65dae6a14813b7fe791edc0ad06 + src/mistralai/client/models/comparabilitycheckcode.py: + id: 4349579009f0 + last_write_checksum: sha1:6810571ff64d70c0c0195c8aefee7f6683f3c581 + pristine_git_object: 7b034853a9facb659259671c9f9a5b47016776d0 + src/mistralai/client/models/compare_evaluation_runs_v2_v1_observability_evaluations_v2_evaluation_slug_runs_compare_postop.py: + id: bf45513b3484 + last_write_checksum: sha1:dad8c899f70d355665bffe22c06af8304b7e9ff0 + pristine_git_object: 0f12f52d9af70f81a35e2ec39b90df97927488e7 + src/mistralai/client/models/comparedcandidate.py: + id: 6c000cb7977e + last_write_checksum: sha1:f39cab9c39eb1a25eb9a4c7687640bf5d59aff0b + pristine_git_object: cdbf5047d8c2cfa4e52217f1d0ecf0c842cda8d8 + src/mistralai/client/models/comparedrun.py: + id: 653b98e05372 + last_write_checksum: sha1:32d8b58acf0602e8728f257c952a111e498edc5a + pristine_git_object: 8a6eab9623bce947eb21348a419050214f59c2d7 + src/mistralai/client/models/compareevaluationrunsrequest.py: + id: a03e6456b5a5 + last_write_checksum: sha1:b698b7fd0143b580e849c45cead8f53c5c57d292 + pristine_git_object: 2d4db9402f116c89a59db1f1d0ddc4034eacbefe + src/mistralai/client/models/comparisonevidence.py: + id: a107e337b340 + last_write_checksum: sha1:f171b25ca769b76bf466e8939b7863df602280cd + pristine_git_object: a57ecaf149fd4adcf695c5f2dd6d79e20357b323 + src/mistralai/client/models/comparisonevidencemethod.py: + id: fe1020342f8b + last_write_checksum: sha1:5c0250423bee171aae4a2a25c3020cc5a27f85f9 + pristine_git_object: 51063f9a4e1c3fd4df60bdfb5cbb0dfee9173262 + src/mistralai/client/models/comparisonexclusions.py: + id: 4bf33424f5a9 + last_write_checksum: sha1:743c656e1d749399b020465e2d844e7791371edb + pristine_git_object: a74396047bdc30907631e06b5d84651cae56a195 + src/mistralai/client/models/comparisonflips.py: + id: 1abc198c35aa + last_write_checksum: sha1:f07b917b45d81d6c02cba81155349ed2e8313dfa + pristine_git_object: bc4bca9ee94a0dfeddccbb36c2044c7e610fbb8b + src/mistralai/client/models/comparisongate.py: + id: fe4689815fe7 + last_write_checksum: sha1:3c3f34991d586fc78ee35dd609d721e8835f7f11 + pristine_git_object: be812810bace355be1e87755792b7248274ba7d3 + src/mistralai/client/models/comparisongatedecision.py: + id: 057779c836b0 + last_write_checksum: sha1:0a0f5fb124049306ec299e6296c4f08aa8be2d72 + pristine_git_object: 597920b04c79193e0ae8fc0b25d22007a69a215f + src/mistralai/client/models/comparisongatereason.py: + id: b0dc416abac8 + last_write_checksum: sha1:dd9aa521e685e08d57caecb41eec0534c1276036 + pristine_git_object: 230e78cae357ba4bebee5fb4a5b581058251dae9 + src/mistralai/client/models/comparisongatereasoncode.py: + id: b6ef3810f3fd + last_write_checksum: sha1:44bce72954fc9c68cda5c83aefa17654ef38a1aa + pristine_git_object: 46d6edc9d4e64b1a86209b8af5e95a0a7e9314ba + src/mistralai/client/models/comparisongoal.py: + id: 70f358137105 + last_write_checksum: sha1:ef0179884f404c8a24eef6c6616ffd35f2bbe505 + pristine_git_object: ce2899ec006ce933a54c302c427babe5529ea923 + src/mistralai/client/models/comparisongoaloperator.py: + id: 3d998d52a4e0 + last_write_checksum: sha1:d97e046db13c9138ec82484fcfab1fb8e7ee0abc + pristine_git_object: eb6bb858793b2bd1e8481f0e2b1193058750e90a + src/mistralai/client/models/comparisongoalrule.py: + id: fea571090675 + last_write_checksum: sha1:4e5d746253cf162b94c0dd4747b18c0692f73620 + pristine_git_object: 8628a0b3e6d981d659830dacef0774e82eeb71e9 + src/mistralai/client/models/comparisongoalside.py: + id: 7b862ac15015 + last_write_checksum: sha1:2d4a4709c3e42eb0d699e94352d7f38c30b22faf + pristine_git_object: 66fe3568181137063eb5151c693bc879f8a5d1bb + src/mistralai/client/models/comparisonmetric.py: + id: 183fe4645773 + last_write_checksum: sha1:25cfd0ea93cff6c8c7dfb8985a96452bc8de3650 + pristine_git_object: 7b80976a9c02ecef1ea8e38581b56bda56adf4ca + src/mistralai/client/models/comparisonmetricid.py: + id: 2d55d7a03610 + last_write_checksum: sha1:28bf2118f2d1230f326ff716269ed55f7d033b8e + pristine_git_object: 76512ca3cd47da76672c061bf3b1a89d24afd908 + src/mistralai/client/models/comparisonrecordcounts.py: + id: 3e41befe0ffb + last_write_checksum: sha1:b61895a20ce0d9ee426e4e327634e9c0215149eb + pristine_git_object: 904da563ac164b2aab8a5018eae6ee9810c149fd + src/mistralai/client/models/comparisonverdict.py: + id: 680dfd1320df + last_write_checksum: sha1:3fb26de8d65a87e367babd092ab8e7b80442e3e9 + pristine_git_object: 3c322823e7939e78746aa4d7841fa966b320f03f src/mistralai/client/models/completionargs.py: id: 3db008bcddca last_write_checksum: sha1:b40ef4957e2a1d4d4aa321d00b18aeec06885704 @@ -7610,8 +7838,8 @@ trackedFiles: pristine_git_object: 0a8d6353eef6c8a88224e45d67f986f093fb082c src/mistralai/client/models/connectorerrorcode.py: id: d2c18b18bdbb - last_write_checksum: sha1:95c5759d6f1abcf2920534db9ad99ff90b068316 - pristine_git_object: b9c9a7a87203d3da1f6ff5095731fdf377560c38 + last_write_checksum: sha1:4e8ac9e422e033cb34abbfb6076911d4e7d20dc8 + pristine_git_object: 2f47ce3b965bd0d4cada6adecaae4e89b6de4f3f src/mistralai/client/models/connectorlocale.py: id: f987f5207d2e last_write_checksum: sha1:0faf0e888cd12eb5d3f8d2032143a3c02aa6f7c0 @@ -7652,6 +7880,10 @@ trackedFiles: id: d18230da2fdd last_write_checksum: sha1:ff39347639a7a115c2eaca3f6454fee898d66d2f pristine_git_object: b48c3c87f8ec9584ff62d9efbab1dbbd3a231ada + src/mistralai/client/models/contains.py: + id: 87dbf8978ef9 + last_write_checksum: sha1:2157b5f6bf9f55589bf3cf6a2c235d5076569134 + pristine_git_object: 9b21892bdecd088ef19eb2c7767c48375dd7002e src/mistralai/client/models/contentchunk.py: id: c007f5ee0325 last_write_checksum: sha1:986697df39b63d0b4d30136e561ce811ddaa8d54 @@ -8134,12 +8366,12 @@ trackedFiles: pristine_git_object: 4e358c003561486ee42af820d913ef57dea9b59c src/mistralai/client/models/deploymentworkerspecinput.py: id: 635133e69342 - last_write_checksum: sha1:7ea7236a1f87ea0622ed177307c9f7b1c8ea0f91 - pristine_git_object: 38d6fe6bf2d8a48c97aad6c3cdbe088e5714c3c1 + last_write_checksum: sha1:162383f786c6ac448cfbc0b506b5fb582784bfc1 + pristine_git_object: bea04caa041a878334201712ba8db0812060577f src/mistralai/client/models/deploymentworkerspecresponse.py: id: e56d154527fd - last_write_checksum: sha1:87fc688665ccc2647bb012c5a139f8f06c0aa187 - pristine_git_object: 2ada9b7db36bd0f4322236096b896179624e964a + last_write_checksum: sha1:7ea823e4a6a93ec6844ab3f6aebfadc6f05c8492 + pristine_git_object: d733dc1310c7a437fac219a7b8160dce0761d263 src/mistralai/client/models/detectiondefinitionv1.py: id: a37492166ac9 last_write_checksum: sha1:8b3faadaf93fe76468bfc55ed9326f28ed0ce9a8 @@ -8148,6 +8380,18 @@ trackedFiles: id: 6668b80e0502 last_write_checksum: sha1:e55300753eef9cea672199383c6f09d04a4ee9f6 pristine_git_object: 58016d5ffd19a4385226e8cc81d67644dc40deec + src/mistralai/client/models/detectionresponse.py: + id: 83f3529c03c4 + last_write_checksum: sha1:a45133fb98b5b9679b970f5723f75cd8743c8fdf + pristine_git_object: fe1f7f6d69ba5439edfd65de471c0a9d79910242 + src/mistralai/client/models/detections_v1_watermarking_detect_post_multipartop.py: + id: 4c08142ca81e + last_write_checksum: sha1:432fe1dddab84abdb0dee6003e3f6081ff1ddd5f + pristine_git_object: 0ef5539a518f1abb891386e2f14c282c0cd85516 + src/mistralai/client/models/detections_v1_watermarking_detect_postop.py: + id: cd7cbfe0ebd8 + last_write_checksum: sha1:8a71148fd3d5e9434fa07e80de1e75357facc122 + pristine_git_object: a8f04c0d769b306fa8b54bacaedd20b09c375fb0 src/mistralai/client/models/displayformat.py: id: 4d135d74fdf4 last_write_checksum: sha1:9d153a9277b7551a7be1368265a7cbf15f61e0a8 @@ -8280,6 +8524,10 @@ trackedFiles: id: a3061a613af9 last_write_checksum: sha1:fbf847bdf49a2ae06d09d3bec8f6dc9f37382763 pristine_git_object: 2828a59c9ffb6105ef328a355f748e8aea3dc58e + src/mistralai/client/models/evaluationrunscomparison.py: + id: 9b51eb9028a0 + last_write_checksum: sha1:4a72719fd7cdfef9dafa7d56d45122025e501ce8 + pristine_git_object: 3e02d214816c48e77639a9ebae029a34ead3a353 src/mistralai/client/models/evaluationrunscorev2.py: id: f7ab75e6cd88 last_write_checksum: sha1:63ec968b8f7a287c29a0517d3670d28a658e5e37 @@ -9062,8 +9310,8 @@ trackedFiles: pristine_git_object: 49730c3f24cad70c1134aafb4edcacd13bc0d581 src/mistralai/client/models/keywordretriever.py: id: 2512f4df7d0f - last_write_checksum: sha1:705cedf965364c7c4b51c3d8e7da68a53f16e65e - pristine_git_object: 16bf4217e9100a3ba8b3a9ab2ae8d09ae5fcf4dd + last_write_checksum: sha1:dfa0c68e71b9783cb24f9164c7a6f547fd482903 + pristine_git_object: 3b7681b4cb1fed4f990980d939b3624868d8fb1e src/mistralai/client/models/libraries_delete_v1op.py: id: b2e8bbd19baa last_write_checksum: sha1:566db1febc40c73476af31a27201a208b64bc32a @@ -9562,8 +9810,8 @@ trackedFiles: pristine_git_object: 79e20a55ffe118b8879f6cab27d64e9aa47d30a2 src/mistralai/client/models/nearestneighbourretriever.py: id: 030fa248215c - last_write_checksum: sha1:6ae9ee60d2a8d05308128d40326b0d5141f79bda - pristine_git_object: 2294d0f1c1e72632257e9ff324d3f4d2bba4ab16 + last_write_checksum: sha1:b33b2b39070e37bb5fda676551a301a51ecd2cf7 + pristine_git_object: 4041caf0f43678b49004632cc2a8e6b8dc0baf14 src/mistralai/client/models/networkencodedinput.py: id: 6dc5321dbe77 last_write_checksum: sha1:b61f8312b3ad4b7061417e7de5b7effd01a5694b @@ -9574,8 +9822,8 @@ trackedFiles: pristine_git_object: 9787ba4ce5805480f0b89997b946569a025915d0 src/mistralai/client/models/not_.py: id: c9e6d1e068c5 - last_write_checksum: sha1:af48594b10e3dab1fe9914d4f7a857b1dd422424 - pristine_git_object: 3b02ecbdd141e42b2b5827a7deedbed57a0e8adc + last_write_checksum: sha1:3dd1ac37bb13176c1c969fac6daac6326841369f + pristine_git_object: b50326190ab9f329e2bdc4712b4866feeb7a3eb8 src/mistralai/client/models/numericscoremetric.py: id: 9c6bc3b1f8a7 last_write_checksum: sha1:f64dfb5636256541b72ad1c493b432c850827e8c @@ -9622,8 +9870,8 @@ trackedFiles: pristine_git_object: 91c2360d5d2c02e4391590a61ea4f6b0af5e24ec src/mistralai/client/models/observabilityerrorcode.py: id: ae572b470a30 - last_write_checksum: sha1:373c2d3091bcbd72fa7249e0248a1b6737c704e0 - pristine_git_object: d24fcfa71f54b8b66091d410da5825c21c96898f + last_write_checksum: sha1:7cedd862a5e878a1fa4fa9b4db6824f1aad3006a + pristine_git_object: 162a9dc587dbe559394d0a06b46c1dc2033a68cd src/mistralai/client/models/observabilityerrordetail.py: id: cb6e8a484a38 last_write_checksum: sha1:19e8be8332f264eed6df5ca3125e3c396cce305d @@ -9754,8 +10002,8 @@ trackedFiles: pristine_git_object: 394644fc4221a5ea892936ff1833166887d3a97d src/mistralai/client/models/or_.py: id: decc65f6bf3b - last_write_checksum: sha1:e4f09c27612be1dbd3a3ee88cfe1fb04eb21d4e3 - pristine_git_object: 98854a1316e9531209ee2c5dcdce829f7de18382 + last_write_checksum: sha1:781786c4e12bcc379d2ace930009fbd978f643d2 + pristine_git_object: bae27bce0c43d375450ae68297da281d39c924db src/mistralai/client/models/orderbyclause.py: id: c7a6d0430f04 last_write_checksum: sha1:e9442888629e3b851152f1d16a5f41a991a7d70d @@ -10070,8 +10318,8 @@ trackedFiles: pristine_git_object: 5b0cf545ca115545d5f7eb0767a7f5d8138c027b src/mistralai/client/models/realtimespeechsession.py: id: 0b8c41568fce - last_write_checksum: sha1:2d8dd68820c3b007660bd5feed0ad02a89fc2e2d - pristine_git_object: b91e05b2998ec43833509f33e372e791b6f08265 + last_write_checksum: sha1:9d5c4acd10cf55d80770a07d8f7e69fb6660358d + pristine_git_object: a3df88c4d882a94f960cd1b9fa5f42a4ee7b5afc src/mistralai/client/models/realtimespeechsessioncreated.py: id: 46cd4ef13e0e last_write_checksum: sha1:8d71e2a9f908011b04d6cbdd2adbe73e5861128e @@ -10086,8 +10334,8 @@ trackedFiles: pristine_git_object: a0f5a76075d0af926451cdc025fb7c704064ed13 src/mistralai/client/models/realtimespeechsessionupdatepayload.py: id: 3f0e12441b91 - last_write_checksum: sha1:4017b7496f8f0d695ab4a5c0f75a5c29a41cef33 - pristine_git_object: 755f1c56b43798c2acbd702fc417e568dd041bf8 + last_write_checksum: sha1:f4bd1a47911a5aa933c4f0f93fefd2d29fb636fa + pristine_git_object: dfb7a87588a5d9c2653a66efd8967e97ff358c56 src/mistralai/client/models/realtimespeechstreamingmode.py: id: ee52fdab8618 last_write_checksum: sha1:3702c8d3b3706fd1cac8eceaf7d6750b4fd443b3 @@ -10438,8 +10686,8 @@ trackedFiles: pristine_git_object: 4b5d4b17345989f896174149fab5b3129bc8dc90 src/mistralai/client/models/rrfretriever.py: id: 78dc5d3684c2 - last_write_checksum: sha1:75b2e2dc9868595e44d5e759aa143b66a48a1164 - pristine_git_object: ad576f247e0aacc7d78b5ecf53ce218f03417e33 + last_write_checksum: sha1:7cb018108f5d75b0bb15cf40472ce5382208aaf0 + pristine_git_object: 8439cf77632aff44e7f376b1ce10b1d35e62999a src/mistralai/client/models/runevaluationsummary.py: id: f2d259016214 last_write_checksum: sha1:096df567638af82b689f9083f16f4720f24f2747 @@ -10802,8 +11050,8 @@ trackedFiles: pristine_git_object: 1a252290a5757247129200e84454579169133c1c src/mistralai/client/models/speechrequest.py: id: cf3bc148e629 - last_write_checksum: sha1:c0617a1cefda2fc43398adfa25736d45da75acab - pristine_git_object: 207f5c06e91937c8a3ea2b17dfbdaf271d34ce5d + last_write_checksum: sha1:e05294a6a19c9ffb59f8768df89362df1e41f186 + pristine_git_object: 4041a6e7d50e3d1672b78e1c2e3479c6e49625c0 src/mistralai/client/models/speechstreamaudiodelta.py: id: ac66815396b1 last_write_checksum: sha1:16e1f34aac6092153552534f949c77ffb8efb198 @@ -11778,8 +12026,8 @@ trackedFiles: pristine_git_object: bb2125ebd596b95ba6059fbfe11f44ab6816f38d src/mistralai/client/models/workflowsworkerspecupdate.py: id: 97b61c6693ee - last_write_checksum: sha1:8e7920586a6e2362a4281107765f96e6c149b962 - pristine_git_object: fe1b1b9ceb6757b2131ae468dfd1dfa5ded61a49 + last_write_checksum: sha1:175b0fff8fae29af785557a50256400b48ee5873 + pristine_git_object: b58e249794f16822f484387f8b9d42a89922cfd9 src/mistralai/client/models/workflowtagsaddrequest.py: id: bd6f98cfbcd1 last_write_checksum: sha1:917d2596aa1bbbc767851389e6b1e2b3168b7a2a @@ -11866,8 +12114,8 @@ trackedFiles: pristine_git_object: 898d2847eaf8b651a3ff7a53a0d24316fcecca82 src/mistralai/client/sdk.py: id: 48edbcb38d7e - last_write_checksum: sha1:ebc08a75cd9d43fe71949f97cb6e963b00a694a1 - pristine_git_object: 92b83fa683514eac53868f200009dd5f82e7a2aa + last_write_checksum: sha1:d3bb626c4576c219a7d030e0720e4ae99dc0a352 + pristine_git_object: 3403172fec7d14bb16c7eeeda12e926bd3d37e21 src/mistralai/client/sdkconfiguration.py: id: b7dd68a0235e last_write_checksum: sha1:48e972ef8320f040615c204729cecbbabb28e1b0 @@ -11890,8 +12138,8 @@ trackedFiles: pristine_git_object: 4e1b0a63b4f50a5d2597ac0e01d35fde6447b64b src/mistralai/client/speech.py: id: 5c1f1109aa5e - last_write_checksum: sha1:843270d493ef8e036ac0985af0ce4772a426d929 - pristine_git_object: 7d57be47ee3a87c2d5fefb0a36f1676d0e1ebdef + last_write_checksum: sha1:1c8bf994d9838fa7fc0fc455aefa176b6ed38f8c + pristine_git_object: e1c981490cef16676d47dd749643b8ddca7acb20 src/mistralai/client/traces.py: id: 8af61cbcf718 last_write_checksum: sha1:849093484da8f1852f8c50eac4ed714ed282b3f1 @@ -12004,6 +12252,10 @@ trackedFiles: id: ab76b1377d79 last_write_checksum: sha1:69644334f938d247cedfb2f785e37584f0767d42 pristine_git_object: 7ff3371427b02fa529c032b96efbbe6267281f60 + src/mistralai/client/watermarking.py: + id: f77f398b3e8d + last_write_checksum: sha1:d3b22f0f57aeee41ed4a49d1390d66182b7c89c7 + pristine_git_object: 6d6a35c20a3e8a4a424bb42be948d83014aa3fbb src/mistralai/client/webhooks.py: id: dce4e52bb6d9 last_write_checksum: sha1:9cefaed3e0fdf74d5aa38dfc31e2f32c9297fcec @@ -16687,9 +16939,34 @@ examples: application/json: {"archive_id": "c91c026a-20ca-4e2c-8121-cee84ab01c16", "upload_url": "https://improbable-aircraft.info", "upload_headers": {"key": "", "key1": ""}} "422": application/json: {} + compare_evaluation_runs_v2_v1_observability_evaluations_v2__evaluation_slug__runs_compare_post: + speakeasy-default-compare-evaluation-runs-v2-v1-observability-evaluations-v2-evaluation-slug-runs-compare-post: + parameters: + path: + evaluation_slug: "" + requestBody: + application/json: {"baseline_run_id": "7dbf9eb7-3034-444f-a0b7-b4d23e80ce7b", "candidate_run_ids": ["6205acb8-4201-4e9d-94c9-e44fa4e9f903", "0d6dd513-59cb-4716-8286-d87339cd5fba"]} + responses: + "200": + application/json: {"baseline": {"id": "b160b95a-4415-4c2e-b7ca-a3543dcc75af", "name": "", "status": "", "tags": ["", ""], "created_at": "2026-12-12T22:52:16.497Z", "record_count": 306522, "failed_record_count": 791082, "num_generations": 326863}, "candidates": [{"run": {"id": "844022c3-80af-4eaf-b657-66fcd8aceae5", "name": "", "status": "", "tags": ["", ""], "created_at": "2026-11-11T21:10:53.922Z", "record_count": 640675, "failed_record_count": 115780, "num_generations": 147498}, "summary": "", "gate": {"decision": "fail", "reasons": [{"code": "run_in_progress", "message": ""}]}, "comparability": [{"code": "evaluator_missing", "message": ""}], "records": {"matched": 279274, "content_changed": 492177, "content_unknown": 0, "ambiguous": 497829, "only_in_baseline": 372186, "only_in_candidate": 942379}, "metrics": []}]} + "400": + application/json: {"detail": {"message": "", "error_code": "EVALUATION_RUN_INPUT_RECORD_CONFLICT"}} + detections_v1_watermarking_detect_post: + speakeasy-default-detections-v1-watermarking-detect-post: + requestBody: + application/json: {"text": ""} + responses: + "200": + application/json: {} + speakeasy-default-detections-v1-watermarking-detect-post-multipart: + requestBody: + multipart/form-data: {"file": "x-file: example.file"} + responses: + "200": + application/json: {} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Python SDK Changes:\n* `mistral.beta.observability.datasets.create()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.fetch()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.delete()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.update()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.list_records()`: \n * `request` **Changed**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.create_record()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.create_records()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.import_from_file()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.import_from_spans()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.import_from_dataset_records()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.export_to_jsonl()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.fetch_task()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.list_tasks()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.records.fetch()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.records.delete()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.records.bulk_delete()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.records.update_payload()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.records.update_properties()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.create_pipeline()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.list_pipelines()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.get_pipeline()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.update_pipeline()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.delete_pipeline()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.get()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.projects.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.projects.get()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.runs.search()`: \n * `response.runs.results[]` **Changed**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.runs.search_all()`: \n * `response.runs.results[]` **Changed**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.runs.get()`: \n * `response` **Changed**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.runs.get_statistics()`: \n * `response` **Changed**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.runs.compute_statistics()`: \n * `response` **Changed**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.records.get()`: \n * `response.output_record.generations[]` **Changed**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.records.search()`: \n * `response.records.results[].output_record.generations[]` **Changed**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.optimizations.list()`: \n * `response.optimizations.results[].config` **Added**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.optimizations.get()`: \n * `response.config` **Added**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.optimizations.list_trials()`: \n * `response.trials.results[].observations[].run` **Changed**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.scorers.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.scorers.create()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.scorers.get()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.scorers.update()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.logs.search()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.logs.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.logs.fetch_options()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.traces.search()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.traces.aggregate()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.traces.get_trace_fields()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.traces.get_trace_by_id()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.traces.get_trace_spans()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.traces.fetch_options()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.traces.get_span_by_id()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.search_spans()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.aggregate()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.aggregate_span_evaluations()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.search_span_evaluations()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.search_latest_span_evaluations()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.search_pipeline_results()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.list_pipeline_result_fields()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.list_span_fields()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.list_span_eval_fields()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.fetch_span_field_options()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.fetch_span_eval_field_options()`: `error.detail.error_code` **Changed**\n* `mistral.beta.connectors.create()`: `error.code` **Changed**\n* `mistral.beta.connectors.create_credentials()`: `error.code` **Changed**\n* `mistral.beta.connectors.update_credentials()`: `error.code` **Changed**\n* `mistral.beta.connectors.update()`: `error.code` **Changed**\n* `mistral.beta.triggers.create()`: `response.event_source.provider.enum(rootly)` **Added**\n* `mistral.beta.triggers.list()`: `response.[].event_source.provider.enum(rootly)` **Added**\n* `mistral.beta.triggers.get()`: `response.event_source.provider.enum(rootly)` **Added**\n* `mistral.beta.triggers.list_events()`: `response.data[].status.enum(skipped)` **Added**\n* `mistral.beta.webhooks.list()`: `response.[].provider.enum(rootly)` **Added**\n* `mistral.beta.webhooks.create()`: \n * `request.provider.enum(rootly)` **Added**\n * `response.provider.enum(rootly)` **Added**\n* `mistral.beta.webhooks.get()`: `response.provider.enum(rootly)` **Added**\n* `mistral.audio.sessions.create()`: `request.worker_name` **Added**\n* `mistral.models.list()`: `response.data[].union(base).capabilities.embedding` **Added**\n* `mistral.models.retrieve()`: `response.union(fine-tuned).capabilities.embedding` **Added**\n* `mistral.chat.complete()`: `request.service_tier` **Changed**\n* `mistral.chat.stream()`: `request.service_tier` **Changed**\n* `mistral.agents.complete()`: `request.service_tier` **Changed**\n* `mistral.agents.stream()`: `request.service_tier` **Changed**\n" +releaseNotes: "## Python SDK Changes:\n* `mistral.beta.observability.evaluations.runs.compare()`: **Added**\n* `mistral.watermarking.detect()`: **Added**\n* `mistral.watermarking.detect_multipart()`: **Added**\n* `mistral.beta.observability.datasets.create()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.fetch()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.delete()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.update()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.list_records()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.create_record()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.create_records()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.import_from_file()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.import_from_spans()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.import_from_dataset_records()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.export_to_jsonl()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.fetch_task()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.list_tasks()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.records.fetch()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.records.delete()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.records.bulk_delete()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.records.update_payload()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.records.update_properties()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.create_pipeline()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.list_pipelines()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.get_pipeline()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.update_pipeline()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.delete_pipeline()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.get()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.projects.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.projects.get()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.runs.search()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.runs.search_all()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.runs.get()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.runs.get_statistics()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.runs.compute_statistics()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.records.get()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.records.search()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.optimizations.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.optimizations.get()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.optimizations.list_trials()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.scorers.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.scorers.create()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.scorers.get()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.scorers.update()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.logs.search()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.logs.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.logs.fetch_options()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.traces.search()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.traces.aggregate()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.traces.get_trace_fields()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.traces.get_trace_by_id()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.traces.get_trace_spans()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.traces.fetch_options()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.traces.get_span_by_id()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.search_spans()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.aggregate()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.aggregate_span_evaluations()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.search_span_evaluations()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.search_latest_span_evaluations()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.search_pipeline_results()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.list_pipeline_result_fields()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.list_span_fields()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.list_span_eval_fields()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.fetch_span_field_options()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.fetch_span_eval_field_options()`: `error.detail.error_code` **Changed**\n* `mistral.beta.connectors.create()`: `error.code` **Changed**\n* `mistral.beta.connectors.create_credentials()`: `error.code` **Changed**\n* `mistral.beta.connectors.update_credentials()`: `error.code` **Changed**\n* `mistral.beta.connectors.update()`: `error.code` **Changed**\n* `mistral.beta.context.search_indexes.search()`: `request.retriever` **Changed**\n* `mistral.audio.speech.complete()`: `request.watermarking` **Added**\n* `mistral.audio.sessions.update()`: `request.stt` **Added**\n* `mistral.chat.complete()`: `request.watermarking` **Added**\n* `mistral.chat.stream()`: `request.watermarking` **Added**\n* `mistral.workflows.deployments.list_deployments()`: `response.deployments[].managed.spec.github_url` **Deprecated**\n* `mistral.workflows.deployments.create_deployment()`: \n * `request.spec.github_url` **Deprecated**\n * `response.spec.github_url` **Deprecated**\n* `mistral.workflows.deployments.update_deployment()`: \n * `request.spec.github_url` **Deprecated**\n * `response.spec.github_url` **Deprecated**\n* `mistral.workflows.deployments.delete_deployment()`: `response.spec.github_url` **Deprecated**\n* `mistral.workflows.deployments.get_deployment()`: `response.managed.spec.github_url` **Deprecated**\n* `mistral.workflows.deployments.stop_deployment()`: `response.spec.github_url` **Deprecated**\n* `mistral.workflows.deployments.start_deployment()`: `response.spec.github_url` **Deprecated**\n* `mistral.workflows.deployments.restart_deployment()`: `response.spec.github_url` **Deprecated**\n" generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 29eff819..c6b33073 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -33,7 +33,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 3.10.0 + version: 3.11.0 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 1810be30..dabe7468 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,8 +16,8 @@ sources: - 1.0.0 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:03f02d58fb727be38f91d279a1b8cdf44899ac4c87d3299689b5efbf66a1cd35 - sourceBlobDigest: sha256:0a1d25888d666ce0ca729ee3a12d20ab638748fb775f87ccb43ac8d36a94691b + sourceRevisionDigest: sha256:7db804c38a750297d553e764de6998e8ffb80e96a8f04bc97b94e11c21528dac + sourceBlobDigest: sha256:c9ed98c9433161c3e867c481af698dd95e6151f5c6656e914abb405cf8db5b6d tags: - latest - 1.0.0 @@ -39,10 +39,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:03f02d58fb727be38f91d279a1b8cdf44899ac4c87d3299689b5efbf66a1cd35 - sourceBlobDigest: sha256:0a1d25888d666ce0ca729ee3a12d20ab638748fb775f87ccb43ac8d36a94691b + sourceRevisionDigest: sha256:7db804c38a750297d553e764de6998e8ffb80e96a8f04bc97b94e11c21528dac + sourceBlobDigest: sha256:c9ed98c9433161c3e867c481af698dd95e6151f5c6656e914abb405cf8db5b6d codeSamplesNamespace: mistral-openapi-python-code-samples - codeSamplesRevisionDigest: sha256:348e5a232b567564532245764fcf50faa7da7e5c4d1579ba1facde365326f3d2 + codeSamplesRevisionDigest: sha256:7275c51bbeba4bd3c86e584d40820ba4188fb48f914dcb00d05505066dfe6732 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.807.0 diff --git a/README-PYPI.md b/README-PYPI.md index 46d15f34..6bed0301 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -692,6 +692,7 @@ print(res.choices[0].message.content) #### [Beta.Observability.Evaluations.Runs](https://github.com/mistralai/client-python/blob/main/docs/sdks/evaluationsruns/README.md) * [search](https://github.com/mistralai/client-python/blob/main/docs/sdks/evaluationsruns/README.md#search) - Search evaluation runs with filters +* [compare](https://github.com/mistralai/client-python/blob/main/docs/sdks/evaluationsruns/README.md#compare) - Compare candidate runs against a baseline run of the same evaluation * [search_all](https://github.com/mistralai/client-python/blob/main/docs/sdks/evaluationsruns/README.md#search_all) - Search evaluation runs across all evaluations * [get](https://github.com/mistralai/client-python/blob/main/docs/sdks/evaluationsruns/README.md#get) - Get a specific evaluation run by ID * [get_statistics](https://github.com/mistralai/client-python/blob/main/docs/sdks/evaluationsruns/README.md#get_statistics) - Get statistics for a specific evaluation run @@ -855,6 +856,11 @@ print(res.choices[0].message.content) * [create](https://github.com/mistralai/client-python/blob/main/docs/sdks/responses/README.md#create) - Create Response * [count_input_tokens](https://github.com/mistralai/client-python/blob/main/docs/sdks/responses/README.md#count_input_tokens) - Count Input Tokens +### [Watermarking](https://github.com/mistralai/client-python/blob/main/docs/sdks/watermarking/README.md) + +* [detect](https://github.com/mistralai/client-python/blob/main/docs/sdks/watermarking/README.md#detect) - Detections +* [detect_multipart](https://github.com/mistralai/client-python/blob/main/docs/sdks/watermarking/README.md#detect_multipart) - Detections + ### [Workflows](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflows/README.md) * [get_workflows](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflows/README.md#get_workflows) - Get Workflows @@ -1182,9 +1188,9 @@ with Mistral( **Inherit from [`MistralError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 189 of 300 methods.* -* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 63 of 300 methods.* -* [`ConnectorErrorResponse`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/connectorerrorresponse.py): Applicable to 4 of 300 methods.* +* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 189 of 303 methods.* +* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 64 of 303 methods.* +* [`ConnectorErrorResponse`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/connectorerrorresponse.py): Applicable to 4 of 303 methods.* * [`ResponseValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute. diff --git a/README.md b/README.md index 38873d9d..54009d87 100644 --- a/README.md +++ b/README.md @@ -692,6 +692,7 @@ print(res.choices[0].message.content) #### [Beta.Observability.Evaluations.Runs](docs/sdks/evaluationsruns/README.md) * [search](docs/sdks/evaluationsruns/README.md#search) - Search evaluation runs with filters +* [compare](docs/sdks/evaluationsruns/README.md#compare) - Compare candidate runs against a baseline run of the same evaluation * [search_all](docs/sdks/evaluationsruns/README.md#search_all) - Search evaluation runs across all evaluations * [get](docs/sdks/evaluationsruns/README.md#get) - Get a specific evaluation run by ID * [get_statistics](docs/sdks/evaluationsruns/README.md#get_statistics) - Get statistics for a specific evaluation run @@ -855,6 +856,11 @@ print(res.choices[0].message.content) * [create](docs/sdks/responses/README.md#create) - Create Response * [count_input_tokens](docs/sdks/responses/README.md#count_input_tokens) - Count Input Tokens +### [Watermarking](docs/sdks/watermarking/README.md) + +* [detect](docs/sdks/watermarking/README.md#detect) - Detections +* [detect_multipart](docs/sdks/watermarking/README.md#detect_multipart) - Detections + ### [Workflows](docs/sdks/workflows/README.md) * [get_workflows](docs/sdks/workflows/README.md#get_workflows) - Get Workflows @@ -1182,9 +1188,9 @@ with Mistral( **Inherit from [`MistralError`](./src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 189 of 300 methods.* -* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 63 of 300 methods.* -* [`ConnectorErrorResponse`](./src/mistralai/client/errors/connectorerrorresponse.py): Applicable to 4 of 300 methods.* +* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 189 of 303 methods.* +* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 64 of 303 methods.* +* [`ConnectorErrorResponse`](./src/mistralai/client/errors/connectorerrorresponse.py): Applicable to 4 of 303 methods.* * [`ResponseValidationError`](./src/mistralai/client/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute. diff --git a/RELEASES.md b/RELEASES.md index a910d54d..7f08385d 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -2110,3 +2110,49 @@ Based on: - [python v3.10.0] . ### Releases - [PyPI v3.10.0] https://pypi.org/project/mistralai/3.10.0 - . + +## 2026-12-01 21:19:13 +### Generated SDK baseline differences +The published SDK or generator baseline differs from the baseline used by the OpenAPI changelog. + +
+Generated surface details + +#### Stable compatibility changes +Now required on an existing stable model (1): +- `Mistral.watermarking` +#### Stable type changes +Changed types or signatures on the stable surface (3): +- `DeploymentWorkerSpecInput.github_url: OptionalNullable[str] -> Annotated[OptionalNullable[str], pydantic.Field(deprecated='warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible.')]` +- `DeploymentWorkerSpecResponse.github_url: str -> Annotated[str, pydantic.Field(deprecated='warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible.')]` +- `WorkflowsWorkerSpecUpdate.github_url: OptionalNullable[str] -> Annotated[OptionalNullable[str], pydantic.Field(deprecated='warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible.')]` +
+ +### API changes +#### Added operations + +Stable: + +- `sdk.watermarking.detect()` +- `sdk.watermarking.detect_multipart()` + +Beta: + +- `sdk.beta.observability.evaluations.runs.compare()` + +#### Schema changes + +- Added enum values `comparison_work_limit_exceeded` and `evaluation_run_not_in_evaluation` across beta observability datasets, beta observability datasets records, beta observability evaluations, beta observability evaluations projects, beta observability evaluations runs, beta observability evaluations records, beta observability evaluations optimizations, beta observability evaluations scorers, beta observability logs, beta observability traces, beta observability spans (63 operations). +- Added enum values `oauth_client_registration_failed` and `shared_connector_urls_locked` in `sdk.beta.connectors.create()`, `sdk.beta.connectors.create_credentials()`, `sdk.beta.connectors.update_credentials()`, and `sdk.beta.connectors.update()`. +- Added request variant `contains` in `sdk.beta.context.search_indexes.search()`. +- Added request field `watermarking` in `sdk.audio.speech.complete()`, `sdk.chat.complete()`, and `sdk.chat.stream()`. +- Added request field `stt` in `sdk.audio.sessions.update()`. + +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.807.0 (2.956.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v3.11.0] . +### Releases +- [PyPI v3.11.0] https://pypi.org/project/mistralai/3.11.0 - . diff --git a/docs/models/andmatch.md b/docs/models/andmatch.md index 23f45709..2cb0aaf8 100644 --- a/docs/models/andmatch.md +++ b/docs/models/andmatch.md @@ -9,6 +9,12 @@ value: models.And = /* values here */ ``` +### `models.Contains` + +```python +value: models.Contains = /* values here */ +``` + ### `models.Equal` ```python diff --git a/docs/models/audiosessionsttupdate.md b/docs/models/audiosessionsttupdate.md new file mode 100644 index 00000000..252d942d --- /dev/null +++ b/docs/models/audiosessionsttupdate.md @@ -0,0 +1,8 @@ +# AudioSessionSTTUpdate + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `turn_detection` | [OptionalNullable[models.AudioTurnDetectionConfig]](../models/audioturndetectionconfig.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/audiosessionupdaterequest.md b/docs/models/audiosessionupdaterequest.md index 068e40ab..7b8fee77 100644 --- a/docs/models/audiosessionupdaterequest.md +++ b/docs/models/audiosessionupdaterequest.md @@ -7,4 +7,5 @@ | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `tools` | List[[models.AudioSessionUpdateRequestTool](../models/audiosessionupdaterequesttool.md)] | :heavy_minus_sign: | N/A | -| `turn` | [OptionalNullable[models.AudioSessionTurnUpdate]](../models/audiosessionturnupdate.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `turn` | [OptionalNullable[models.AudioSessionTurnUpdate]](../models/audiosessionturnupdate.md) | :heavy_minus_sign: | N/A | +| `stt` | [OptionalNullable[models.AudioSessionSTTUpdate]](../models/audiosessionsttupdate.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/chatcompletionrequest.md b/docs/models/chatcompletionrequest.md index 1d475c25..d178be4d 100644 --- a/docs/models/chatcompletionrequest.md +++ b/docs/models/chatcompletionrequest.md @@ -34,4 +34,5 @@ | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | | `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `service_tier` | [OptionalNullable[models.RequestedServiceTier]](../models/requestedservicetier.md) | :heavy_minus_sign: | Use auto to request priority capacity with standard fallback. Use priority or fast to require priority capacity. No entitlement returns 403, exhausted priority limits return 429, and unavailable priority service returns 503. Priority requires an enabled model and an available allocation. Use standard_only to request standard capacity. An omitted field selects standard capacity, unless the customer is configured to default to auto. | | +| `watermarking` | *OptionalNullable[bool]* | :heavy_minus_sign: | Set to true to watermark the generated text. | | | `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | \ No newline at end of file diff --git a/docs/models/chatcompletionstreamrequest.md b/docs/models/chatcompletionstreamrequest.md index 43c17015..29c2f7ad 100644 --- a/docs/models/chatcompletionstreamrequest.md +++ b/docs/models/chatcompletionstreamrequest.md @@ -34,4 +34,5 @@ | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | | `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `service_tier` | [OptionalNullable[models.RequestedServiceTier]](../models/requestedservicetier.md) | :heavy_minus_sign: | Use auto to request priority capacity with standard fallback. Use priority or fast to require priority capacity. No entitlement returns 403, exhausted priority limits return 429, and unavailable priority service returns 503. Priority requires an enabled model and an available allocation. Use standard_only to request standard capacity. An omitted field selects standard capacity, unless the customer is configured to default to auto. | | +| `watermarking` | *OptionalNullable[bool]* | :heavy_minus_sign: | Set to true to watermark the generated text. | | | `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | \ No newline at end of file diff --git a/docs/models/comparabilitycheck.md b/docs/models/comparabilitycheck.md new file mode 100644 index 00000000..ed3eff55 --- /dev/null +++ b/docs/models/comparabilitycheck.md @@ -0,0 +1,9 @@ +# ComparabilityCheck + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `code` | [models.ComparabilityCheckCode](../models/comparabilitycheckcode.md) | :heavy_check_mark: | N/A | +| `message` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/comparabilitycheckcode.md b/docs/models/comparabilitycheckcode.md new file mode 100644 index 00000000..bbf2f16c --- /dev/null +++ b/docs/models/comparabilitycheckcode.md @@ -0,0 +1,28 @@ +# ComparabilityCheckCode + +## Example Usage + +```python +from mistralai.client.models import ComparabilityCheckCode + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ComparabilityCheckCode = "dataset_differs" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"dataset_differs"` +- `"no_common_records"` +- `"content_changed"` +- `"num_generations_changed"` +- `"evaluator_missing"` +- `"evaluator_spec_changed"` +- `"goal_changed"` +- `"direction_changed"` +- `"judge_changed"` +- `"run_in_progress"` +- `"run_not_completed"` +- `"error_rate_high"` diff --git a/docs/models/comparedcandidate.md b/docs/models/comparedcandidate.md new file mode 100644 index 00000000..5b8c97fc --- /dev/null +++ b/docs/models/comparedcandidate.md @@ -0,0 +1,13 @@ +# ComparedCandidate + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `run` | [models.ComparedRun](../models/comparedrun.md) | :heavy_check_mark: | N/A | +| `summary` | *str* | :heavy_check_mark: | N/A | +| `gate` | [models.ComparisonGate](../models/comparisongate.md) | :heavy_check_mark: | N/A | +| `comparability` | List[[models.ComparabilityCheck](../models/comparabilitycheck.md)] | :heavy_check_mark: | N/A | +| `records` | [models.ComparisonRecordCounts](../models/comparisonrecordcounts.md) | :heavy_check_mark: | N/A | +| `metrics` | List[[models.ComparisonMetric](../models/comparisonmetric.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/comparedrun.md b/docs/models/comparedrun.md new file mode 100644 index 00000000..126962c3 --- /dev/null +++ b/docs/models/comparedrun.md @@ -0,0 +1,15 @@ +# ComparedRun + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `status` | *str* | :heavy_check_mark: | N/A | +| `tags` | List[*str*] | :heavy_check_mark: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `record_count` | *Nullable[int]* | :heavy_check_mark: | N/A | +| `failed_record_count` | *Nullable[int]* | :heavy_check_mark: | N/A | +| `num_generations` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/compareevaluationrunsrequest.md b/docs/models/compareevaluationrunsrequest.md new file mode 100644 index 00000000..ba471a9d --- /dev/null +++ b/docs/models/compareevaluationrunsrequest.md @@ -0,0 +1,9 @@ +# CompareEvaluationRunsRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `baseline_run_id` | *str* | :heavy_check_mark: | N/A | +| `candidate_run_ids` | List[*str*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/compareevaluationrunsv2v1observabilityevaluationsv2evaluationslugrunscomparepostrequest.md b/docs/models/compareevaluationrunsv2v1observabilityevaluationsv2evaluationslugrunscomparepostrequest.md new file mode 100644 index 00000000..151fd9ba --- /dev/null +++ b/docs/models/compareevaluationrunsv2v1observabilityevaluationsv2evaluationslugrunscomparepostrequest.md @@ -0,0 +1,9 @@ +# CompareEvaluationRunsV2V1ObservabilityEvaluationsV2EvaluationSlugRunsComparePostRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `evaluation_slug` | *str* | :heavy_check_mark: | N/A | +| `compare_evaluation_runs_request` | [models.CompareEvaluationRunsRequest](../models/compareevaluationrunsrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/comparisonevidence.md b/docs/models/comparisonevidence.md new file mode 100644 index 00000000..a1c85ef1 --- /dev/null +++ b/docs/models/comparisonevidence.md @@ -0,0 +1,13 @@ +# ComparisonEvidence + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `method` | [OptionalNullable[models.ComparisonEvidenceMethod]](../models/comparisonevidencemethod.md) | :heavy_minus_sign: | N/A | +| `pairs` | *int* | :heavy_check_mark: | N/A | +| `interval` | List[*Nullable[float]*] | :heavy_minus_sign: | N/A | +| `p_value` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `adjusted_p_value` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `reason` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/comparisonevidencemethod.md b/docs/models/comparisonevidencemethod.md new file mode 100644 index 00000000..96e46a51 --- /dev/null +++ b/docs/models/comparisonevidencemethod.md @@ -0,0 +1,18 @@ +# ComparisonEvidenceMethod + +## Example Usage + +```python +from mistralai.client.models import ComparisonEvidenceMethod + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ComparisonEvidenceMethod = "paired_t" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"paired_t"` +- `"mcnemar_exact"` diff --git a/docs/models/comparisonexclusions.md b/docs/models/comparisonexclusions.md new file mode 100644 index 00000000..995a2ca7 --- /dev/null +++ b/docs/models/comparisonexclusions.md @@ -0,0 +1,12 @@ +# ComparisonExclusions + +Common records left out of this metric: ``evidence.pairs + errors + unscored`` is ``records.matched``. + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `errors` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `new_errors` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `unscored` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/comparisonflips.md b/docs/models/comparisonflips.md new file mode 100644 index 00000000..1e3ea00f --- /dev/null +++ b/docs/models/comparisonflips.md @@ -0,0 +1,9 @@ +# ComparisonFlips + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `pass_to_fail` | *int* | :heavy_check_mark: | N/A | +| `fail_to_pass` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/comparisongate.md b/docs/models/comparisongate.md new file mode 100644 index 00000000..59d654b3 --- /dev/null +++ b/docs/models/comparisongate.md @@ -0,0 +1,9 @@ +# ComparisonGate + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `decision` | [models.ComparisonGateDecision](../models/comparisongatedecision.md) | :heavy_check_mark: | N/A | +| `reasons` | List[[models.ComparisonGateReason](../models/comparisongatereason.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/comparisongatedecision.md b/docs/models/comparisongatedecision.md new file mode 100644 index 00000000..8bef2234 --- /dev/null +++ b/docs/models/comparisongatedecision.md @@ -0,0 +1,19 @@ +# ComparisonGateDecision + +## Example Usage + +```python +from mistralai.client.models import ComparisonGateDecision + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ComparisonGateDecision = "pass" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"pass"` +- `"fail"` +- `"inconclusive"` diff --git a/docs/models/comparisongatereason.md b/docs/models/comparisongatereason.md new file mode 100644 index 00000000..9d9185d9 --- /dev/null +++ b/docs/models/comparisongatereason.md @@ -0,0 +1,10 @@ +# ComparisonGateReason + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `code` | [models.ComparisonGateReasonCode](../models/comparisongatereasoncode.md) | :heavy_check_mark: | N/A | +| `metric_id` | [OptionalNullable[models.ComparisonMetricID]](../models/comparisonmetricid.md) | :heavy_minus_sign: | N/A | +| `message` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/comparisongatereasoncode.md b/docs/models/comparisongatereasoncode.md new file mode 100644 index 00000000..5f9b6be7 --- /dev/null +++ b/docs/models/comparisongatereasoncode.md @@ -0,0 +1,26 @@ +# ComparisonGateReasonCode + +## Example Usage + +```python +from mistralai.client.models import ComparisonGateReasonCode + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ComparisonGateReasonCode = "run_in_progress" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"run_in_progress"` +- `"run_not_completed"` +- `"error_rate_high"` +- `"dataset_differs"` +- `"no_common_records"` +- `"metric_worse"` +- `"metric_not_comparable"` +- `"no_metric_in_gate"` +- `"nothing_tested"` +- `"no_proven_regression"` diff --git a/docs/models/comparisongoal.md b/docs/models/comparisongoal.md new file mode 100644 index 00000000..cd10ca33 --- /dev/null +++ b/docs/models/comparisongoal.md @@ -0,0 +1,10 @@ +# ComparisonGoal + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `scope` | *Optional[Literal["whole_run"]]* | :heavy_minus_sign: | N/A | +| `baseline` | [Nullable[models.ComparisonGoalSide]](../models/comparisongoalside.md) | :heavy_check_mark: | N/A | +| `candidate` | [Nullable[models.ComparisonGoalSide]](../models/comparisongoalside.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/comparisongoaloperator.md b/docs/models/comparisongoaloperator.md new file mode 100644 index 00000000..cce766dd --- /dev/null +++ b/docs/models/comparisongoaloperator.md @@ -0,0 +1,19 @@ +# ComparisonGoalOperator + +## Example Usage + +```python +from mistralai.client.models import ComparisonGoalOperator + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ComparisonGoalOperator = "gte" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"gte"` +- `"lte"` +- `"between"` diff --git a/docs/models/comparisongoalrule.md b/docs/models/comparisongoalrule.md new file mode 100644 index 00000000..566f6f02 --- /dev/null +++ b/docs/models/comparisongoalrule.md @@ -0,0 +1,15 @@ +# ComparisonGoalRule + +One condition of an evaluator's goal, as configured: ``statistic`` ``operator`` ``value`` (or min and max). + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `statistic` | *str* | :heavy_check_mark: | N/A | +| `operator` | [models.ComparisonGoalOperator](../models/comparisongoaloperator.md) | :heavy_check_mark: | N/A | +| `value` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `min` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `max` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `min_coverage` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/comparisongoalside.md b/docs/models/comparisongoalside.md new file mode 100644 index 00000000..2a5169f4 --- /dev/null +++ b/docs/models/comparisongoalside.md @@ -0,0 +1,9 @@ +# ComparisonGoalSide + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `met` | *Nullable[bool]* | :heavy_check_mark: | N/A | +| `rules` | List[[models.ComparisonGoalRule](../models/comparisongoalrule.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/comparisonmetric.md b/docs/models/comparisonmetric.md new file mode 100644 index 00000000..14313b89 --- /dev/null +++ b/docs/models/comparisonmetric.md @@ -0,0 +1,19 @@ +# ComparisonMetric + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `id` | [models.ComparisonMetricID](../models/comparisonmetricid.md) | :heavy_check_mark: | N/A | +| `counts_in_gate` | *bool* | :heavy_check_mark: | N/A | +| `direction` | [Nullable[models.ComparisonMetricDirection]](../models/comparisonmetricdirection.md) | :heavy_check_mark: | N/A | +| `baseline` | *Nullable[float]* | :heavy_check_mark: | N/A | +| `candidate` | *Nullable[float]* | :heavy_check_mark: | N/A | +| `delta` | *Nullable[float]* | :heavy_check_mark: | N/A | +| `verdict` | [models.ComparisonVerdict](../models/comparisonverdict.md) | :heavy_check_mark: | N/A | +| `evidence` | [models.ComparisonEvidence](../models/comparisonevidence.md) | :heavy_check_mark: | N/A | +| `flips` | [OptionalNullable[models.ComparisonFlips]](../models/comparisonflips.md) | :heavy_minus_sign: | N/A | +| `excluded` | [models.ComparisonExclusions](../models/comparisonexclusions.md) | :heavy_check_mark: | Common records left out of this metric: ``evidence.pairs + errors + unscored`` is ``records.matched``. | +| `goal` | [OptionalNullable[models.ComparisonGoal]](../models/comparisongoal.md) | :heavy_minus_sign: | N/A | +| `message` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/comparisonmetricdirection.md b/docs/models/comparisonmetricdirection.md new file mode 100644 index 00000000..12ae5d28 --- /dev/null +++ b/docs/models/comparisonmetricdirection.md @@ -0,0 +1,18 @@ +# ComparisonMetricDirection + +## Example Usage + +```python +from mistralai.client.models import ComparisonMetricDirection + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ComparisonMetricDirection = "maximize" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"maximize"` +- `"minimize"` diff --git a/docs/models/comparisonmetricid.md b/docs/models/comparisonmetricid.md new file mode 100644 index 00000000..27454a83 --- /dev/null +++ b/docs/models/comparisonmetricid.md @@ -0,0 +1,9 @@ +# ComparisonMetricID + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `evaluator` | *str* | :heavy_check_mark: | N/A | +| `statistic` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/comparisonrecordcounts.md b/docs/models/comparisonrecordcounts.md new file mode 100644 index 00000000..03b8a890 --- /dev/null +++ b/docs/models/comparisonrecordcounts.md @@ -0,0 +1,13 @@ +# ComparisonRecordCounts + + +## Fields + +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `matched` | *int* | :heavy_check_mark: | N/A | +| `content_changed` | *int* | :heavy_check_mark: | N/A | +| `content_unknown` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `ambiguous` | *int* | :heavy_check_mark: | N/A | +| `only_in_baseline` | *int* | :heavy_check_mark: | N/A | +| `only_in_candidate` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/comparisonverdict.md b/docs/models/comparisonverdict.md new file mode 100644 index 00000000..f62da994 --- /dev/null +++ b/docs/models/comparisonverdict.md @@ -0,0 +1,23 @@ +# ComparisonVerdict + +## Example Usage + +```python +from mistralai.client.models import ComparisonVerdict + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ComparisonVerdict = "better" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"better"` +- `"worse"` +- `"changed"` +- `"no_detected_difference"` +- `"not_enough_data"` +- `"not_tested"` +- `"not_comparable"` diff --git a/docs/models/connectorerrorcode.md b/docs/models/connectorerrorcode.md index cc9d2153..a8fe2ae8 100644 --- a/docs/models/connectorerrorcode.md +++ b/docs/models/connectorerrorcode.md @@ -16,7 +16,9 @@ This is an open enum. Unrecognized values will not fail type checks. - `"connectors_count_limit_reached"` - `"credentials_rejected"` +- `"oauth_client_registration_failed"` - `"server_unreachable"` - `"custom_connectors_disabled"` - `"connector_in_another_workspace"` - `"connection_in_another_workspace"` +- `"shared_connector_urls_locked"` diff --git a/docs/models/contains.md b/docs/models/contains.md new file mode 100644 index 00000000..c51b7a2a --- /dev/null +++ b/docs/models/contains.md @@ -0,0 +1,13 @@ +# Contains + +The array field contains any or all of the supplied values. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `type` | *Literal["contains"]* | :heavy_check_mark: | N/A | +| `field` | *str* | :heavy_check_mark: | N/A | +| `values` | List[[models.ContainsValue](../models/containsvalue.md)] | :heavy_check_mark: | N/A | +| `mode` | [models.Mode](../models/mode.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/containsvalue.md b/docs/models/containsvalue.md new file mode 100644 index 00000000..9588d6be --- /dev/null +++ b/docs/models/containsvalue.md @@ -0,0 +1,29 @@ +# ContainsValue + + +## Supported Types + +### `int` + +```python +value: int = /* values here */ +``` + +### `float` + +```python +value: float = /* values here */ +``` + +### `datetime` + +```python +value: datetime = /* values here */ +``` + +### `str` + +```python +value: str = /* values here */ +``` + diff --git a/docs/models/deploymentworkerspecinput.md b/docs/models/deploymentworkerspecinput.md index 357f70bf..d0c1bd9b 100644 --- a/docs/models/deploymentworkerspecinput.md +++ b/docs/models/deploymentworkerspecinput.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `github_url` | *OptionalNullable[str]* | :heavy_minus_sign: | Deprecated alias of 'repository_url' for a GitHub repository. Set only 'repository_url'. | +| ~~`github_url`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated alias of 'repository_url' for a GitHub repository. Set only 'repository_url'. | | `repository_url` | *OptionalNullable[str]* | :heavy_minus_sign: | Repository to build the worker from, set instead of 'archive_id': a GitHub repository (`https://github.com//`) or a repository on the Mistral git server (`https://api.globalaegis.net/v1/git//.git`). On the git server you must be able to read the repository; the worker builds from an archive of 'revision' and 'build_directory'. | | `revision` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `archive_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Mistral Cloud archive to build the worker from instead of a repository. The archive is the whole build context: 'dockerfile_path' is relative to its root, and 'build_directory' must be unset. | diff --git a/docs/models/deploymentworkerspecresponse.md b/docs/models/deploymentworkerspecresponse.md index 3444ef03..6d6a27b1 100644 --- a/docs/models/deploymentworkerspecresponse.md +++ b/docs/models/deploymentworkerspecresponse.md @@ -3,14 +3,14 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -| `github_url` | *str* | :heavy_check_mark: | GitHub repository the worker builds from. Empty for a worker built from an archive. | -| `type` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `repository_url` | *OptionalNullable[str]* | :heavy_minus_sign: | Repository the worker builds from, on GitHub or the git server, if any. | -| `revision` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `archive_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Archive the worker builds from, if any. | -| `backend_spec` | [models.BackendSpec](../models/backendspec.md) | :heavy_check_mark: | Backend-specific configuration. 'mistral_cloud' is Mistral Cloud; 'kubernetes' is a deployment that already runs on Kubernetes. | -| `restarted_at` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `commit` | [OptionalNullable[models.GitCommitMetadata]](../models/gitcommitmetadata.md) | :heavy_minus_sign: | N/A | -| `requested_roles` | List[*str*] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ~~`github_url`~~ | *str* | :heavy_check_mark: | :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated: read 'repository_url'. The GitHub repository the worker builds from, empty for any other source. | +| `type` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `repository_url` | *OptionalNullable[str]* | :heavy_minus_sign: | Repository the worker builds from, on GitHub or the git server, if any. | +| `revision` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `archive_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Archive the worker builds from, if any. | +| `backend_spec` | [models.BackendSpec](../models/backendspec.md) | :heavy_check_mark: | Backend-specific configuration. 'mistral_cloud' is Mistral Cloud; 'kubernetes' is a deployment that already runs on Kubernetes. | +| `restarted_at` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `commit` | [OptionalNullable[models.GitCommitMetadata]](../models/gitcommitmetadata.md) | :heavy_minus_sign: | N/A | +| `requested_roles` | List[*str*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/detectionfilerequest.md b/docs/models/detectionfilerequest.md new file mode 100644 index 00000000..a63e8d9d --- /dev/null +++ b/docs/models/detectionfilerequest.md @@ -0,0 +1,10 @@ +# DetectionFileRequest + +Multipart body for media watermark detection: exactly one file. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `file` | [models.File](../models/file.md) | :heavy_check_mark: | The File object (not file name) to be uploaded.
To upload a file and specify a custom file name you should format your request as such:
```bash
file=@path/to/your/file.jsonl;filename=custom_name.jsonl
```
Otherwise, you can just keep the original file name:
```bash
file=@path/to/your/file.jsonl
``` | \ No newline at end of file diff --git a/docs/models/detectionresponse.md b/docs/models/detectionresponse.md new file mode 100644 index 00000000..86ac1062 --- /dev/null +++ b/docs/models/detectionresponse.md @@ -0,0 +1,13 @@ +# DetectionResponse + +Detect response: the watermark-detector verdict and the content-metadata verdict, separately. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `watermarked` | [OptionalNullable[models.Watermarked]](../models/watermarked.md) | :heavy_minus_sign: | Watermark-detector verdict: "true"/"false"; null when the watermark detector did not run or could not decide (see `watermarked_reason`). | +| `watermarked_reason` | *OptionalNullable[str]* | :heavy_minus_sign: | Why the watermark detector produced no verdict (e.g. "Text too short to detect watermarking"); set when `watermarked` is null. | +| `metadata_valid` | [OptionalNullable[models.MetadataValid]](../models/metadatavalid.md) | :heavy_minus_sign: | Content-metadata verdict (C2PA Content Credentials): "true" when the file carries valid credentials signed by Mistral AI, "false" when its credentials are invalid or signed by someone else; null when the file carries no metadata (see `metadata_reason`). | +| `metadata_reason` | *OptionalNullable[str]* | :heavy_minus_sign: | The metadata verdict in plain words. With "true", whether the file declares AI generation ("Signed by Mistral AI and declared as AI-generated") or was signed by Mistral with a certificate that has since expired; with null, why there is no verdict (e.g. "No metadata attached to file" for a media upload, "Not file, text watermark detection" for a text body). | \ No newline at end of file diff --git a/docs/models/detectiontextrequest.md b/docs/models/detectiontextrequest.md new file mode 100644 index 00000000..b2b6d716 --- /dev/null +++ b/docs/models/detectiontextrequest.md @@ -0,0 +1,10 @@ +# DetectionTextRequest + +JSON body for text watermark detection. + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `text` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/evaluationrunscomparison.md b/docs/models/evaluationrunscomparison.md new file mode 100644 index 00000000..9feb6307 --- /dev/null +++ b/docs/models/evaluationrunscomparison.md @@ -0,0 +1,9 @@ +# EvaluationRunsComparison + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `baseline` | [models.ComparedRun](../models/comparedrun.md) | :heavy_check_mark: | N/A | +| `candidates` | List[[models.ComparedCandidate](../models/comparedcandidate.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/keywordretrieverfilter.md b/docs/models/keywordretrieverfilter.md index 4bbfe9dc..9958182a 100644 --- a/docs/models/keywordretrieverfilter.md +++ b/docs/models/keywordretrieverfilter.md @@ -9,6 +9,12 @@ value: models.And = /* values here */ ``` +### `models.Contains` + +```python +value: models.Contains = /* values here */ +``` + ### `models.Equal` ```python diff --git a/docs/models/metadatavalid.md b/docs/models/metadatavalid.md new file mode 100644 index 00000000..b85023dd --- /dev/null +++ b/docs/models/metadatavalid.md @@ -0,0 +1,18 @@ +# MetadataValid + +## Example Usage + +```python +from mistralai.client.models import MetadataValid + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: MetadataValid = "true" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"true"` +- `"false"` diff --git a/docs/models/mode.md b/docs/models/mode.md new file mode 100644 index 00000000..76047964 --- /dev/null +++ b/docs/models/mode.md @@ -0,0 +1,14 @@ +# Mode + +## Example Usage + +```python +from mistralai.client.models import Mode +value: Mode = "any" +``` + + +## Values + +- `"any"` +- `"all"` diff --git a/docs/models/nearestneighbourretrieverfilter.md b/docs/models/nearestneighbourretrieverfilter.md index 6fc00d79..65e079b0 100644 --- a/docs/models/nearestneighbourretrieverfilter.md +++ b/docs/models/nearestneighbourretrieverfilter.md @@ -9,6 +9,12 @@ value: models.And = /* values here */ ``` +### `models.Contains` + +```python +value: models.Contains = /* values here */ +``` + ### `models.Equal` ```python diff --git a/docs/models/notmatch.md b/docs/models/notmatch.md index 00b50c20..a9f8215c 100644 --- a/docs/models/notmatch.md +++ b/docs/models/notmatch.md @@ -9,6 +9,12 @@ value: models.And = /* values here */ ``` +### `models.Contains` + +```python +value: models.Contains = /* values here */ +``` + ### `models.Equal` ```python diff --git a/docs/models/observabilityerrorcode.md b/docs/models/observabilityerrorcode.md index fb6165b8..f4ecae74 100644 --- a/docs/models/observabilityerrorcode.md +++ b/docs/models/observabilityerrorcode.md @@ -66,6 +66,8 @@ This is an open enum. Unrecognized values will not fail type checks. - `"SCORER_ALREADY_EXISTS"` - `"SCORER_CONFIG_KIND_MISMATCH"` - `"EVALUATION_NAME_ALREADY_EXISTS"` +- `"EVALUATION_RUN_NOT_IN_EVALUATION"` +- `"COMPARISON_WORK_LIMIT_EXCEEDED"` - `"OPTIMIZATION_NOT_FOUND"` - `"OPTIMIZATION_TRIAL_KEY_ALREADY_EXISTS"` - `"OPTIMIZATION_TRIAL_OBSERVATION_ALREADY_EXISTS"` diff --git a/docs/models/ormatch.md b/docs/models/ormatch.md index cdb11118..93a1c42d 100644 --- a/docs/models/ormatch.md +++ b/docs/models/ormatch.md @@ -9,6 +9,12 @@ value: models.And = /* values here */ ``` +### `models.Contains` + +```python +value: models.Contains = /* values here */ +``` + ### `models.Equal` ```python diff --git a/docs/models/realtimespeechsession.md b/docs/models/realtimespeechsession.md index 138f899e..80ed8000 100644 --- a/docs/models/realtimespeechsession.md +++ b/docs/models/realtimespeechsession.md @@ -12,4 +12,5 @@ | `streaming_mode` | [models.RealtimeSpeechStreamingMode](../models/realtimespeechstreamingmode.md) | :heavy_check_mark: | N/A | | `response_format` | [models.SpeechOutputFormat](../models/speechoutputformat.md) | :heavy_check_mark: | N/A | | `expressiveness` | *float* | :heavy_check_mark: | N/A | +| `watermarking` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `phoneme_hints` | Dict[str, List[[models.IPAPhoneme](../models/ipaphoneme.md)]] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/realtimespeechsessionupdatepayload.md b/docs/models/realtimespeechsessionupdatepayload.md index 237871da..a59eaf13 100644 --- a/docs/models/realtimespeechsessionupdatepayload.md +++ b/docs/models/realtimespeechsessionupdatepayload.md @@ -10,4 +10,5 @@ | `streaming_mode` | [OptionalNullable[models.RealtimeSpeechStreamingMode]](../models/realtimespeechstreamingmode.md) | :heavy_minus_sign: | responsive (default): short chunks, for conversational turns. long_form: chunks grow as the text goes on, for smoother delivery of long texts. | | `response_format` | [OptionalNullable[models.SpeechOutputFormat]](../models/speechoutputformat.md) | :heavy_minus_sign: | Audio encoding of speech.audio.delta events. pcm is raw 32-bit float little-endian mono. | | `expressiveness` | *OptionalNullable[float]* | :heavy_minus_sign: | Higher values make the delivery more expressive. Minimum 1.0. | +| `watermarking` | *OptionalNullable[bool]* | :heavy_minus_sign: | Apply the server's configured audio watermark. Updates apply before the next synthesis starts. | | `phoneme_hints` | Dict[str, List[[models.IPAPhoneme](../models/ipaphoneme.md)]] | :heavy_minus_sign: | Pronunciation hints mapping a (case-sensitive) word to its ordered list of IPA phones. Replaces the current hints; an empty object clears them. | \ No newline at end of file diff --git a/docs/models/rrfretrieverfilter.md b/docs/models/rrfretrieverfilter.md index c7fa02af..086b3971 100644 --- a/docs/models/rrfretrieverfilter.md +++ b/docs/models/rrfretrieverfilter.md @@ -9,6 +9,12 @@ value: models.And = /* values here */ ``` +### `models.Contains` + +```python +value: models.Contains = /* values here */ +``` + ### `models.Equal` ```python diff --git a/docs/models/speechrequest.md b/docs/models/speechrequest.md index 0548e05b..a1346d29 100644 --- a/docs/models/speechrequest.md +++ b/docs/models/speechrequest.md @@ -16,4 +16,5 @@ | `phoneme_hints` | Dict[str, List[[models.IPAPhoneme](../models/ipaphoneme.md)]] | :heavy_minus_sign: | Optional pronunciation hints mapping a (case-sensitive) word to its ordered list of IPA phones. | | `conversation_history` | List[[models.ConversationHistoryUnion](../models/conversationhistoryunion.md)] | :heavy_minus_sign: | Prior turns, oldest first, alternating and ending on a user turn: `input` is the assistant reply to it. Conditions delivery, not speaker: set `voice_id` to choose the speaker. Requires `voice_id` to be a preset voice whose `kind` is `pvc`. Cannot be combined with `ref_audio`. | | `response_format` | [Optional[models.SpeechOutputFormat]](../models/speechoutputformat.md) | :heavy_minus_sign: | N/A | +| `watermarking` | *OptionalNullable[bool]* | :heavy_minus_sign: | Set to true to mark this output: an audio watermark, plus C2PA content credentials on non-streamed WAV, MP3 and FLAC. | | `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/watermarked.md b/docs/models/watermarked.md new file mode 100644 index 00000000..7aa48ee5 --- /dev/null +++ b/docs/models/watermarked.md @@ -0,0 +1,18 @@ +# Watermarked + +## Example Usage + +```python +from mistralai.client.models import Watermarked + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: Watermarked = "true" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"true"` +- `"false"` diff --git a/docs/models/workflowsworkerspecupdate.md b/docs/models/workflowsworkerspecupdate.md index 6004846a..2df72f48 100644 --- a/docs/models/workflowsworkerspecupdate.md +++ b/docs/models/workflowsworkerspecupdate.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `github_url` | *OptionalNullable[str]* | :heavy_minus_sign: | Deprecated alias of 'repository_url' for a GitHub repository. Set only 'repository_url'. | +| ~~`github_url`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated alias of 'repository_url' for a GitHub repository. Set only 'repository_url'. | | `repository_url` | *OptionalNullable[str]* | :heavy_minus_sign: | Rebuild the worker from this repository, on GitHub or the git server, dropping 'archive_id'. | | `revision` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `archive_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Rebuild the worker from this archive, dropping 'repository_url' and 'revision'. Sending 'repository_url' instead moves it back to a repository. | diff --git a/docs/sdks/audiosessions/README.md b/docs/sdks/audiosessions/README.md index b8c812a5..f761a08f 100644 --- a/docs/sdks/audiosessions/README.md +++ b/docs/sdks/audiosessions/README.md @@ -136,6 +136,7 @@ with Mistral( | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `tools` | List[[models.AudioSessionUpdateRequestTool](../../models/audiosessionupdaterequesttool.md)] | :heavy_minus_sign: | N/A | | `turn` | [OptionalNullable[models.AudioSessionTurnUpdate]](../../models/audiosessionturnupdate.md) | :heavy_minus_sign: | N/A | +| `stt` | [OptionalNullable[models.AudioSessionSTTUpdate]](../../models/audiosessionsttupdate.md) | :heavy_minus_sign: | N/A | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/chat/README.md b/docs/sdks/chat/README.md index 68b36116..0dce1cc7 100644 --- a/docs/sdks/chat/README.md +++ b/docs/sdks/chat/README.md @@ -72,6 +72,7 @@ with Mistral( | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | | `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `service_tier` | [OptionalNullable[models.RequestedServiceTier]](../../models/requestedservicetier.md) | :heavy_minus_sign: | Use auto to request priority capacity with standard fallback. Use priority or fast to require priority capacity. No entitlement returns 403, exhausted priority limits return 429, and unavailable priority service returns 503. Priority requires an enabled model and an available allocation. Use standard_only to request standard capacity. An omitted field selects standard capacity, unless the customer is configured to default to auto. | | +| `watermarking` | *OptionalNullable[bool]* | :heavy_minus_sign: | Set to true to watermark the generated text. | | | `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | @@ -151,6 +152,7 @@ with Mistral( | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | | `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `service_tier` | [OptionalNullable[models.RequestedServiceTier]](../../models/requestedservicetier.md) | :heavy_minus_sign: | Use auto to request priority capacity with standard fallback. Use priority or fast to require priority capacity. No entitlement returns 403, exhausted priority limits return 429, and unavailable priority service returns 503. Priority requires an enabled model and an available allocation. Use standard_only to request standard capacity. An omitted field selects standard capacity, unless the customer is configured to default to auto. | | +| `watermarking` | *OptionalNullable[bool]* | :heavy_minus_sign: | Set to true to watermark the generated text. | | | `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | diff --git a/docs/sdks/evaluationsruns/README.md b/docs/sdks/evaluationsruns/README.md index e479a0e2..7ab2d939 100644 --- a/docs/sdks/evaluationsruns/README.md +++ b/docs/sdks/evaluationsruns/README.md @@ -5,6 +5,7 @@ ### Available Operations * [search](#search) - Search evaluation runs with filters +* [compare](#compare) - Compare candidate runs against a baseline run of the same evaluation * [search_all](#search_all) - Search evaluation runs across all evaluations * [get](#get) - Get a specific evaluation run by ID * [get_statistics](#get_statistics) - Get statistics for a specific evaluation run @@ -63,6 +64,52 @@ with Mistral( | errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | +## compare + +Pairs the records of each candidate with the baseline (by dataset record id, then by content) and returns, per candidate and per metric, the difference on the common records and a verdict: `better` or `worse` only when a paired test supports it, otherwise `no_detected_difference`, `not_enough_data` or `not_tested`. Records whose content changed are set aside. Each candidate also gets an overall verdict for CI (`gate`: `pass`, `fail` or `inconclusive`), with coded reasons and a short summary; only metrics with a goal are counted in it (`counts_in_gate`). Every run must belong to the evaluation (`EVALUATION_RUN_NOT_IN_EVALUATION` otherwise); at most 10 candidates, and at most 250,000 record scores read in total (`COMPARISON_WORK_LIMIT_EXCEEDED` otherwise). What the comparison cannot see: the uncertainty covers the sampling of records only, not a model that changed behind the same alias, a judge that changed, or a file that changed behind a URL. Only the mean of a score and the share of records that meet a goal are tested: pass@k and pass^k show their difference without a verdict, and percentiles, classification metrics and run-level evaluators are not compared yet. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY"), +) as mistral: + + res = mistral.beta.observability.evaluations.runs.compare(evaluation_slug="", baseline_run_id="7dbf9eb7-3034-444f-a0b7-b4d23e80ce7b", candidate_run_ids=[ + "6205acb8-4201-4e9d-94c9-e44fa4e9f903", + "0d6dd513-59cb-4716-8286-d87339cd5fba", + ]) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `evaluation_slug` | *str* | :heavy_check_mark: | N/A | +| `baseline_run_id` | *str* | :heavy_check_mark: | N/A | +| `candidate_run_ids` | List[*str*] | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.EvaluationRunsComparison](../../models/evaluationrunscomparison.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + ## search_all Search evaluation runs across all evaluations diff --git a/docs/sdks/speech/README.md b/docs/sdks/speech/README.md index 44d4ad4f..74b40263 100644 --- a/docs/sdks/speech/README.md +++ b/docs/sdks/speech/README.md @@ -48,6 +48,7 @@ with Mistral( | `phoneme_hints` | Dict[str, List[[models.IPAPhoneme](../../models/ipaphoneme.md)]] | :heavy_minus_sign: | Optional pronunciation hints mapping a (case-sensitive) word to its ordered list of IPA phones. | | `conversation_history` | List[[models.ConversationHistoryUnion](../../models/conversationhistoryunion.md)] | :heavy_minus_sign: | Prior turns, oldest first, alternating and ending on a user turn: `input` is the assistant reply to it. Conditions delivery, not speaker: set `voice_id` to choose the speaker. Requires `voice_id` to be a preset voice whose `kind` is `pvc`. Cannot be combined with `ref_audio`. | | `response_format` | [Optional[models.SpeechOutputFormat]](../../models/speechoutputformat.md) | :heavy_minus_sign: | N/A | +| `watermarking` | *OptionalNullable[bool]* | :heavy_minus_sign: | Set to true to mark this output: an audio watermark, plus C2PA content credentials on non-streamed WAV, MP3 and FLAC. | | `additional_properties` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | diff --git a/docs/sdks/watermarking/README.md b/docs/sdks/watermarking/README.md new file mode 100644 index 00000000..2704eeb3 --- /dev/null +++ b/docs/sdks/watermarking/README.md @@ -0,0 +1,101 @@ +# Watermarking + +## Overview + +### Available Operations + +* [detect](#detect) - Detections +* [detect_multipart](#detect_multipart) - Detections + +## detect + +Detect whether content was produced with a Mistral watermark. + +Accepts exactly one input: a JSON body (``{"text": ...}``) for text, or a multipart ``file`` upload. +Returns the watermark-detector verdict (``watermarked`` + ``watermarked_reason``) and the +content-metadata verdict (``metadata_valid`` + ``metadata_reason``) separately; each flag is ``"true"`` / +``"false"`` / ``null`` (null = not tested, see the matching ``*_reason``). + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY"), +) as mistral: + + res = mistral.watermarking.detect(text="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `text` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DetectionResponse](../../models/detectionresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## detect_multipart + +Detect whether content was produced with a Mistral watermark. + +Accepts exactly one input: a JSON body (``{"text": ...}``) for text, or a multipart ``file`` upload. +Returns the watermark-detector verdict (``watermarked`` + ``watermarked_reason``) and the +content-metadata verdict (``metadata_valid`` + ``metadata_reason``) separately; each flag is ``"true"`` / +``"false"`` / ``null`` (null = not tested, see the matching ``*_reason``). + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY"), +) as mistral: + + res = mistral.watermarking.detect_multipart(file={ + "file_name": "example.file", + "content": open("example.file", "rb"), + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `file` | [models.File](../../models/file.md) | :heavy_check_mark: | The File object (not file name) to be uploaded.
To upload a file and specify a custom file name you should format your request as such:
```bash
file=@path/to/your/file.jsonl;filename=custom_name.jsonl
```
Otherwise, you can just keep the original file name:
```bash
file=@path/to/your/file.jsonl
``` | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DetectionResponse](../../models/detectionresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 3ee3fb21..9e2e8897 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "3.10.0" +version = "3.11.0" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index 31567b3e..fed9de6f 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "3.10.0" +__version__: str = "3.11.0" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.956.1" -__user_agent__: str = "speakeasy-sdk/python 3.10.0 2.956.1 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 3.11.0 2.956.1 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/audio_sessions.py b/src/mistralai/client/audio_sessions.py index 09deb979..630188fb 100644 --- a/src/mistralai/client/audio_sessions.py +++ b/src/mistralai/client/audio_sessions.py @@ -513,6 +513,9 @@ def update( turn: OptionalNullable[ Union[models.AudioSessionTurnUpdate, models.AudioSessionTurnUpdateTypedDict] ] = UNSET, + stt: OptionalNullable[ + Union[models.AudioSessionSTTUpdate, models.AudioSessionSTTUpdateTypedDict] + ] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -531,6 +534,7 @@ def update( :param instructions: :param tools: :param turn: + :param stt: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -559,6 +563,9 @@ def update( turn=utils.get_pydantic_model( turn, OptionalNullable[models.AudioSessionTurnUpdate] ), + stt=utils.get_pydantic_model( + stt, OptionalNullable[models.AudioSessionSTTUpdate] + ), ), ) @@ -642,6 +649,9 @@ async def update_async( turn: OptionalNullable[ Union[models.AudioSessionTurnUpdate, models.AudioSessionTurnUpdateTypedDict] ] = UNSET, + stt: OptionalNullable[ + Union[models.AudioSessionSTTUpdate, models.AudioSessionSTTUpdateTypedDict] + ] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -660,6 +670,7 @@ async def update_async( :param instructions: :param tools: :param turn: + :param stt: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -688,6 +699,9 @@ async def update_async( turn=utils.get_pydantic_model( turn, OptionalNullable[models.AudioSessionTurnUpdate] ), + stt=utils.get_pydantic_model( + stt, OptionalNullable[models.AudioSessionSTTUpdate] + ), ), ) diff --git a/src/mistralai/client/chat.py b/src/mistralai/client/chat.py index 9e2e04c1..086087c9 100644 --- a/src/mistralai/client/chat.py +++ b/src/mistralai/client/chat.py @@ -156,6 +156,7 @@ def complete( ] = UNSET, prompt_cache_key: OptionalNullable[str] = UNSET, service_tier: OptionalNullable[models.RequestedServiceTier] = UNSET, + watermarking: OptionalNullable[bool] = UNSET, safe_prompt: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -193,6 +194,7 @@ def complete( :param guardrails: :param prompt_cache_key: :param service_tier: Use auto to request priority capacity with standard fallback. Use priority or fast to require priority capacity. No entitlement returns 403, exhausted priority limits return 429, and unavailable priority service returns 503. Priority requires an enabled model and an available allocation. Use standard_only to request standard capacity. An omitted field selects standard capacity, unless the customer is configured to default to auto. + :param watermarking: Set to true to watermark the generated text. :param safe_prompt: Whether to inject a safety prompt before all conversations. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -256,6 +258,7 @@ def complete( ), prompt_cache_key=prompt_cache_key, service_tier=service_tier, + watermarking=watermarking, safe_prompt=safe_prompt, ) @@ -380,6 +383,7 @@ async def complete_async( ] = UNSET, prompt_cache_key: OptionalNullable[str] = UNSET, service_tier: OptionalNullable[models.RequestedServiceTier] = UNSET, + watermarking: OptionalNullable[bool] = UNSET, safe_prompt: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -417,6 +421,7 @@ async def complete_async( :param guardrails: :param prompt_cache_key: :param service_tier: Use auto to request priority capacity with standard fallback. Use priority or fast to require priority capacity. No entitlement returns 403, exhausted priority limits return 429, and unavailable priority service returns 503. Priority requires an enabled model and an available allocation. Use standard_only to request standard capacity. An omitted field selects standard capacity, unless the customer is configured to default to auto. + :param watermarking: Set to true to watermark the generated text. :param safe_prompt: Whether to inject a safety prompt before all conversations. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -480,6 +485,7 @@ async def complete_async( ), prompt_cache_key=prompt_cache_key, service_tier=service_tier, + watermarking=watermarking, safe_prompt=safe_prompt, ) @@ -604,6 +610,7 @@ def stream( ] = UNSET, prompt_cache_key: OptionalNullable[str] = UNSET, service_tier: OptionalNullable[models.RequestedServiceTier] = UNSET, + watermarking: OptionalNullable[bool] = UNSET, safe_prompt: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -643,6 +650,7 @@ def stream( :param guardrails: :param prompt_cache_key: :param service_tier: Use auto to request priority capacity with standard fallback. Use priority or fast to require priority capacity. No entitlement returns 403, exhausted priority limits return 429, and unavailable priority service returns 503. Priority requires an enabled model and an available allocation. Use standard_only to request standard capacity. An omitted field selects standard capacity, unless the customer is configured to default to auto. + :param watermarking: Set to true to watermark the generated text. :param safe_prompt: Whether to inject a safety prompt before all conversations. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -706,6 +714,7 @@ def stream( ), prompt_cache_key=prompt_cache_key, service_tier=service_tier, + watermarking=watermarking, safe_prompt=safe_prompt, ) @@ -840,6 +849,7 @@ async def stream_async( ] = UNSET, prompt_cache_key: OptionalNullable[str] = UNSET, service_tier: OptionalNullable[models.RequestedServiceTier] = UNSET, + watermarking: OptionalNullable[bool] = UNSET, safe_prompt: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -879,6 +889,7 @@ async def stream_async( :param guardrails: :param prompt_cache_key: :param service_tier: Use auto to request priority capacity with standard fallback. Use priority or fast to require priority capacity. No entitlement returns 403, exhausted priority limits return 429, and unavailable priority service returns 503. Priority requires an enabled model and an available allocation. Use standard_only to request standard capacity. An omitted field selects standard capacity, unless the customer is configured to default to auto. + :param watermarking: Set to true to watermark the generated text. :param safe_prompt: Whether to inject a safety prompt before all conversations. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -942,6 +953,7 @@ async def stream_async( ), prompt_cache_key=prompt_cache_key, service_tier=service_tier, + watermarking=watermarking, safe_prompt=safe_prompt, ) diff --git a/src/mistralai/client/evaluations_runs.py b/src/mistralai/client/evaluations_runs.py index 697a462c..90cf3738 100644 --- a/src/mistralai/client/evaluations_runs.py +++ b/src/mistralai/client/evaluations_runs.py @@ -338,6 +338,230 @@ async def search_async( raise errors.SDKError("Unexpected response received", http_res) + def compare( + self, + *, + evaluation_slug: str, + baseline_run_id: str, + candidate_run_ids: Iterable[str], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.EvaluationRunsComparison: + r"""Compare candidate runs against a baseline run of the same evaluation + + Pairs the records of each candidate with the baseline (by dataset record id, then by content) and returns, per candidate and per metric, the difference on the common records and a verdict: `better` or `worse` only when a paired test supports it, otherwise `no_detected_difference`, `not_enough_data` or `not_tested`. Records whose content changed are set aside. Each candidate also gets an overall verdict for CI (`gate`: `pass`, `fail` or `inconclusive`), with coded reasons and a short summary; only metrics with a goal are counted in it (`counts_in_gate`). Every run must belong to the evaluation (`EVALUATION_RUN_NOT_IN_EVALUATION` otherwise); at most 10 candidates, and at most 250,000 record scores read in total (`COMPARISON_WORK_LIMIT_EXCEEDED` otherwise). What the comparison cannot see: the uncertainty covers the sampling of records only, not a model that changed behind the same alias, a judge that changed, or a file that changed behind a URL. Only the mean of a score and the share of records that meet a goal are tested: pass@k and pass^k show their difference without a verdict, and percentiles, classification metrics and run-level evaluators are not compared yet. + + :param evaluation_slug: + :param baseline_run_id: + :param candidate_run_ids: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 300000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.CompareEvaluationRunsV2V1ObservabilityEvaluationsV2EvaluationSlugRunsComparePostRequest( + evaluation_slug=evaluation_slug, + compare_evaluation_runs_request=models.CompareEvaluationRunsRequest( + baseline_run_id=baseline_run_id, + candidate_run_ids=utils.unmarshal(candidate_run_ids, List[str]), + ), + ) + + req = self._build_request( + method="POST", + path="/v1/observability/evaluations_v2/{evaluation_slug}/runs/compare", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.compare_evaluation_runs_request, + False, + False, + "json", + models.CompareEvaluationRunsRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="compare_evaluation_runs_v2_v1_observability_evaluations_v2__evaluation_slug__runs_compare_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["beta.observability.evaluations.runs"], + extensions=None, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.EvaluationRunsComparison, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def compare_async( + self, + *, + evaluation_slug: str, + baseline_run_id: str, + candidate_run_ids: Iterable[str], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.EvaluationRunsComparison: + r"""Compare candidate runs against a baseline run of the same evaluation + + Pairs the records of each candidate with the baseline (by dataset record id, then by content) and returns, per candidate and per metric, the difference on the common records and a verdict: `better` or `worse` only when a paired test supports it, otherwise `no_detected_difference`, `not_enough_data` or `not_tested`. Records whose content changed are set aside. Each candidate also gets an overall verdict for CI (`gate`: `pass`, `fail` or `inconclusive`), with coded reasons and a short summary; only metrics with a goal are counted in it (`counts_in_gate`). Every run must belong to the evaluation (`EVALUATION_RUN_NOT_IN_EVALUATION` otherwise); at most 10 candidates, and at most 250,000 record scores read in total (`COMPARISON_WORK_LIMIT_EXCEEDED` otherwise). What the comparison cannot see: the uncertainty covers the sampling of records only, not a model that changed behind the same alias, a judge that changed, or a file that changed behind a URL. Only the mean of a score and the share of records that meet a goal are tested: pass@k and pass^k show their difference without a verdict, and percentiles, classification metrics and run-level evaluators are not compared yet. + + :param evaluation_slug: + :param baseline_run_id: + :param candidate_run_ids: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 300000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.CompareEvaluationRunsV2V1ObservabilityEvaluationsV2EvaluationSlugRunsComparePostRequest( + evaluation_slug=evaluation_slug, + compare_evaluation_runs_request=models.CompareEvaluationRunsRequest( + baseline_run_id=baseline_run_id, + candidate_run_ids=utils.unmarshal(candidate_run_ids, List[str]), + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/observability/evaluations_v2/{evaluation_slug}/runs/compare", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.compare_evaluation_runs_request, + False, + False, + "json", + models.CompareEvaluationRunsRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="compare_evaluation_runs_v2_v1_observability_evaluations_v2__evaluation_slug__runs_compare_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["beta.observability.evaluations.runs"], + extensions=None, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.EvaluationRunsComparison, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + def search_all( self, *, diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index d3700024..bab26e2b 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -327,6 +327,10 @@ TranscriptTypedDict, UnknownTranscript, ) + from .audiosessionsttupdate import ( + AudioSessionSTTUpdate, + AudioSessionSTTUpdateTypedDict, + ) from .audiosessionturnupdate import ( AudioSessionTurnUpdate, AudioSessionTurnUpdateTypedDict, @@ -529,6 +533,47 @@ ClientTasksRequestsCapabilityTypedDict, ) from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict + from .comparabilitycheck import ComparabilityCheck, ComparabilityCheckTypedDict + from .comparabilitycheckcode import ComparabilityCheckCode + from .compare_evaluation_runs_v2_v1_observability_evaluations_v2_evaluation_slug_runs_compare_postop import ( + CompareEvaluationRunsV2V1ObservabilityEvaluationsV2EvaluationSlugRunsComparePostRequest, + CompareEvaluationRunsV2V1ObservabilityEvaluationsV2EvaluationSlugRunsComparePostRequestTypedDict, + ) + from .comparedcandidate import ComparedCandidate, ComparedCandidateTypedDict + from .comparedrun import ComparedRun, ComparedRunTypedDict + from .compareevaluationrunsrequest import ( + CompareEvaluationRunsRequest, + CompareEvaluationRunsRequestTypedDict, + ) + from .comparisonevidence import ComparisonEvidence, ComparisonEvidenceTypedDict + from .comparisonevidencemethod import ComparisonEvidenceMethod + from .comparisonexclusions import ( + ComparisonExclusions, + ComparisonExclusionsTypedDict, + ) + from .comparisonflips import ComparisonFlips, ComparisonFlipsTypedDict + from .comparisongate import ComparisonGate, ComparisonGateTypedDict + from .comparisongatedecision import ComparisonGateDecision + from .comparisongatereason import ( + ComparisonGateReason, + ComparisonGateReasonTypedDict, + ) + from .comparisongatereasoncode import ComparisonGateReasonCode + from .comparisongoal import ComparisonGoal, ComparisonGoalTypedDict + from .comparisongoaloperator import ComparisonGoalOperator + from .comparisongoalrule import ComparisonGoalRule, ComparisonGoalRuleTypedDict + from .comparisongoalside import ComparisonGoalSide, ComparisonGoalSideTypedDict + from .comparisonmetric import ( + ComparisonMetric, + ComparisonMetricDirection, + ComparisonMetricTypedDict, + ) + from .comparisonmetricid import ComparisonMetricID, ComparisonMetricIDTypedDict + from .comparisonrecordcounts import ( + ComparisonRecordCounts, + ComparisonRecordCountsTypedDict, + ) + from .comparisonverdict import ComparisonVerdict from .completionargs import CompletionArgs, CompletionArgsTypedDict from .completionargsstop import CompletionArgsStop, CompletionArgsStopTypedDict from .completionchunk import CompletionChunk, CompletionChunkTypedDict @@ -701,6 +746,13 @@ ConnectorToolResultMetadataTypedDict, ) from .consumertype import ConsumerType + from .contains import ( + Contains, + ContainsTypedDict, + ContainsValue, + ContainsValueTypedDict, + Mode, + ) from .contentchunk import ContentChunk, ContentChunkTypedDict, UnknownContentChunk from .contentsearchfilter import ContentSearchFilter, ContentSearchFilterTypedDict from .contentsearchfiltergroup import ( @@ -1238,6 +1290,20 @@ DetectionDefinitionV1TypedDict, ) from .detectionpattern import DetectionPattern, DetectionPatternTypedDict + from .detectionresponse import ( + DetectionResponse, + DetectionResponseTypedDict, + MetadataValid, + Watermarked, + ) + from .detections_v1_watermarking_detect_post_multipartop import ( + DetectionFileRequest, + DetectionFileRequestTypedDict, + ) + from .detections_v1_watermarking_detect_postop import ( + DetectionTextRequest, + DetectionTextRequestTypedDict, + ) from .displayformat import DisplayFormat from .displayspec import DisplaySpec, DisplaySpecTypedDict from .distancemetric import DistanceMetric @@ -1328,6 +1394,10 @@ EvaluationRunRunScoreV2, EvaluationRunRunScoreV2TypedDict, ) + from .evaluationrunscomparison import ( + EvaluationRunsComparison, + EvaluationRunsComparisonTypedDict, + ) from .evaluationrunscorev2 import ( EvaluationRunScoreV2, EvaluationRunScoreV2TypedDict, @@ -4467,6 +4537,8 @@ "AudioSessionResponse", "AudioSessionResponseStatus", "AudioSessionResponseTypedDict", + "AudioSessionSTTUpdate", + "AudioSessionSTTUpdateTypedDict", "AudioSessionTurnUpdate", "AudioSessionTurnUpdateTypedDict", "AudioSessionUpdateRequest", @@ -4624,6 +4696,45 @@ "Code", "CodeInterpreterTool", "CodeInterpreterToolTypedDict", + "ComparabilityCheck", + "ComparabilityCheckCode", + "ComparabilityCheckTypedDict", + "CompareEvaluationRunsRequest", + "CompareEvaluationRunsRequestTypedDict", + "CompareEvaluationRunsV2V1ObservabilityEvaluationsV2EvaluationSlugRunsComparePostRequest", + "CompareEvaluationRunsV2V1ObservabilityEvaluationsV2EvaluationSlugRunsComparePostRequestTypedDict", + "ComparedCandidate", + "ComparedCandidateTypedDict", + "ComparedRun", + "ComparedRunTypedDict", + "ComparisonEvidence", + "ComparisonEvidenceMethod", + "ComparisonEvidenceTypedDict", + "ComparisonExclusions", + "ComparisonExclusionsTypedDict", + "ComparisonFlips", + "ComparisonFlipsTypedDict", + "ComparisonGate", + "ComparisonGateDecision", + "ComparisonGateReason", + "ComparisonGateReasonCode", + "ComparisonGateReasonTypedDict", + "ComparisonGateTypedDict", + "ComparisonGoal", + "ComparisonGoalOperator", + "ComparisonGoalRule", + "ComparisonGoalRuleTypedDict", + "ComparisonGoalSide", + "ComparisonGoalSideTypedDict", + "ComparisonGoalTypedDict", + "ComparisonMetric", + "ComparisonMetricDirection", + "ComparisonMetricID", + "ComparisonMetricIDTypedDict", + "ComparisonMetricTypedDict", + "ComparisonRecordCounts", + "ComparisonRecordCountsTypedDict", + "ComparisonVerdict", "CompletionArgs", "CompletionArgsStop", "CompletionArgsStopTypedDict", @@ -4732,6 +4843,10 @@ "ConnectorsQueryFilters", "ConnectorsQueryFiltersTypedDict", "ConsumerType", + "Contains", + "ContainsTypedDict", + "ContainsValue", + "ContainsValueTypedDict", "ContentChunk", "ContentChunkTypedDict", "ContentSearchFilter", @@ -5080,8 +5195,14 @@ "DestinationTypedDict", "DetectionDefinitionV1", "DetectionDefinitionV1TypedDict", + "DetectionFileRequest", + "DetectionFileRequestTypedDict", "DetectionPattern", "DetectionPatternTypedDict", + "DetectionResponse", + "DetectionResponseTypedDict", + "DetectionTextRequest", + "DetectionTextRequestTypedDict", "DisplayFormat", "DisplaySpec", "DisplaySpecTypedDict", @@ -5162,6 +5283,8 @@ "EvaluationRunV2ResponseTypedDict", "EvaluationRunV2WithRefsResponse", "EvaluationRunV2WithRefsResponseTypedDict", + "EvaluationRunsComparison", + "EvaluationRunsComparisonTypedDict", "EvaluationV2", "EvaluationV2TypedDict", "EvaluationsV2", @@ -5825,6 +5948,7 @@ "MetadataFilterValue", "MetadataFilterValueTypedDict", "MetadataTypedDict", + "MetadataValid", "MetricAggregation", "MetricDefinition", "MetricDefinitionTypedDict", @@ -5838,6 +5962,7 @@ "MistralEmbeddingModel", "MistralEmbeddingModelTypedDict", "MistralPromptMode", + "Mode", "ModelCapabilities", "ModelCapabilitiesTypedDict", "ModelConversation", @@ -7160,6 +7285,7 @@ "VoiceResponseTypedDict", "VoiceUpdateRequest", "VoiceUpdateRequestTypedDict", + "Watermarked", "WebSearchPremiumTool", "WebSearchPremiumToolTypedDict", "WebSearchTool", @@ -7506,6 +7632,8 @@ "Transcript": ".audiosessionresponse", "TranscriptTypedDict": ".audiosessionresponse", "UnknownTranscript": ".audiosessionresponse", + "AudioSessionSTTUpdate": ".audiosessionsttupdate", + "AudioSessionSTTUpdateTypedDict": ".audiosessionsttupdate", "AudioSessionTurnUpdate": ".audiosessionturnupdate", "AudioSessionTurnUpdateTypedDict": ".audiosessionturnupdate", "AudioSessionUpdateRequest": ".audiosessionupdaterequest", @@ -7651,6 +7779,45 @@ "ClientTasksRequestsCapabilityTypedDict": ".clienttasksrequestscapability", "CodeInterpreterTool": ".codeinterpretertool", "CodeInterpreterToolTypedDict": ".codeinterpretertool", + "ComparabilityCheck": ".comparabilitycheck", + "ComparabilityCheckTypedDict": ".comparabilitycheck", + "ComparabilityCheckCode": ".comparabilitycheckcode", + "CompareEvaluationRunsV2V1ObservabilityEvaluationsV2EvaluationSlugRunsComparePostRequest": ".compare_evaluation_runs_v2_v1_observability_evaluations_v2_evaluation_slug_runs_compare_postop", + "CompareEvaluationRunsV2V1ObservabilityEvaluationsV2EvaluationSlugRunsComparePostRequestTypedDict": ".compare_evaluation_runs_v2_v1_observability_evaluations_v2_evaluation_slug_runs_compare_postop", + "ComparedCandidate": ".comparedcandidate", + "ComparedCandidateTypedDict": ".comparedcandidate", + "ComparedRun": ".comparedrun", + "ComparedRunTypedDict": ".comparedrun", + "CompareEvaluationRunsRequest": ".compareevaluationrunsrequest", + "CompareEvaluationRunsRequestTypedDict": ".compareevaluationrunsrequest", + "ComparisonEvidence": ".comparisonevidence", + "ComparisonEvidenceTypedDict": ".comparisonevidence", + "ComparisonEvidenceMethod": ".comparisonevidencemethod", + "ComparisonExclusions": ".comparisonexclusions", + "ComparisonExclusionsTypedDict": ".comparisonexclusions", + "ComparisonFlips": ".comparisonflips", + "ComparisonFlipsTypedDict": ".comparisonflips", + "ComparisonGate": ".comparisongate", + "ComparisonGateTypedDict": ".comparisongate", + "ComparisonGateDecision": ".comparisongatedecision", + "ComparisonGateReason": ".comparisongatereason", + "ComparisonGateReasonTypedDict": ".comparisongatereason", + "ComparisonGateReasonCode": ".comparisongatereasoncode", + "ComparisonGoal": ".comparisongoal", + "ComparisonGoalTypedDict": ".comparisongoal", + "ComparisonGoalOperator": ".comparisongoaloperator", + "ComparisonGoalRule": ".comparisongoalrule", + "ComparisonGoalRuleTypedDict": ".comparisongoalrule", + "ComparisonGoalSide": ".comparisongoalside", + "ComparisonGoalSideTypedDict": ".comparisongoalside", + "ComparisonMetric": ".comparisonmetric", + "ComparisonMetricDirection": ".comparisonmetric", + "ComparisonMetricTypedDict": ".comparisonmetric", + "ComparisonMetricID": ".comparisonmetricid", + "ComparisonMetricIDTypedDict": ".comparisonmetricid", + "ComparisonRecordCounts": ".comparisonrecordcounts", + "ComparisonRecordCountsTypedDict": ".comparisonrecordcounts", + "ComparisonVerdict": ".comparisonverdict", "CompletionArgs": ".completionargs", "CompletionArgsTypedDict": ".completionargs", "CompletionArgsStop": ".completionargsstop", @@ -7761,6 +7928,11 @@ "ConnectorToolResultMetadata": ".connectortoolresultmetadata", "ConnectorToolResultMetadataTypedDict": ".connectortoolresultmetadata", "ConsumerType": ".consumertype", + "Contains": ".contains", + "ContainsTypedDict": ".contains", + "ContainsValue": ".contains", + "ContainsValueTypedDict": ".contains", + "Mode": ".contains", "ContentChunk": ".contentchunk", "ContentChunkTypedDict": ".contentchunk", "UnknownContentChunk": ".contentchunk", @@ -8140,6 +8312,14 @@ "DetectionDefinitionV1TypedDict": ".detectiondefinitionv1", "DetectionPattern": ".detectionpattern", "DetectionPatternTypedDict": ".detectionpattern", + "DetectionResponse": ".detectionresponse", + "DetectionResponseTypedDict": ".detectionresponse", + "MetadataValid": ".detectionresponse", + "Watermarked": ".detectionresponse", + "DetectionFileRequest": ".detections_v1_watermarking_detect_post_multipartop", + "DetectionFileRequestTypedDict": ".detections_v1_watermarking_detect_post_multipartop", + "DetectionTextRequest": ".detections_v1_watermarking_detect_postop", + "DetectionTextRequestTypedDict": ".detections_v1_watermarking_detect_postop", "DisplayFormat": ".displayformat", "DisplaySpec": ".displayspec", "DisplaySpecTypedDict": ".displayspec", @@ -8211,6 +8391,8 @@ "EvaluationRunRecordV2ResponseTypedDict": ".evaluationrunrecordv2response", "EvaluationRunRunScoreV2": ".evaluationrunrunscorev2", "EvaluationRunRunScoreV2TypedDict": ".evaluationrunrunscorev2", + "EvaluationRunsComparison": ".evaluationrunscomparison", + "EvaluationRunsComparisonTypedDict": ".evaluationrunscomparison", "EvaluationRunScoreV2": ".evaluationrunscorev2", "EvaluationRunScoreV2TypedDict": ".evaluationrunscorev2", "EvaluationRunV2Response": ".evaluationrunv2response", diff --git a/src/mistralai/client/models/and_.py b/src/mistralai/client/models/and_.py index 316b8372..f153ecd9 100644 --- a/src/mistralai/client/models/and_.py +++ b/src/mistralai/client/models/and_.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .contains import Contains, ContainsTypedDict from .equal import Equal, EqualTypedDict from .in_ import In, InTypedDict from .range import Range, RangeTypedDict @@ -43,13 +44,14 @@ class And(BaseModel): "NotTypedDict", EqualTypedDict, InTypedDict, + ContainsTypedDict, RangeTypedDict, ], ) AndMatch = Annotated[ - Union[And, Equal, In, "Not", "Or", Range], Field(discriminator="type") + Union[And, Contains, Equal, In, "Not", "Or", Range], Field(discriminator="type") ] diff --git a/src/mistralai/client/models/audiosessionsttupdate.py b/src/mistralai/client/models/audiosessionsttupdate.py new file mode 100644 index 00000000..66ea9a9b --- /dev/null +++ b/src/mistralai/client/models/audiosessionsttupdate.py @@ -0,0 +1,59 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .audioturndetectionconfig import ( + AudioTurnDetectionConfig, + AudioTurnDetectionConfigTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from mistralai.client.types.basemodel import current_filtered_dump +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class AudioSessionSTTUpdateTypedDict(TypedDict): + turn_detection: NotRequired[Nullable[AudioTurnDetectionConfigTypedDict]] + + +class AudioSessionSTTUpdate(BaseModel): + turn_detection: OptionalNullable[AudioTurnDetectionConfig] = UNSET + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set(["turn_detection"]) + nullable_fields = set(["turn_detection"]) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/audiosessionupdaterequest.py b/src/mistralai/client/models/audiosessionupdaterequest.py index 476d6f00..63d40af7 100644 --- a/src/mistralai/client/models/audiosessionupdaterequest.py +++ b/src/mistralai/client/models/audiosessionupdaterequest.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .audiosessionsttupdate import AudioSessionSTTUpdate, AudioSessionSTTUpdateTypedDict from .audiosessionturnupdate import ( AudioSessionTurnUpdate, AudioSessionTurnUpdateTypedDict, @@ -68,6 +69,7 @@ class AudioSessionUpdateRequestTypedDict(TypedDict): instructions: NotRequired[Nullable[str]] tools: NotRequired[Nullable[List[AudioSessionUpdateRequestToolTypedDict]]] turn: NotRequired[Nullable[AudioSessionTurnUpdateTypedDict]] + stt: NotRequired[Nullable[AudioSessionSTTUpdateTypedDict]] class AudioSessionUpdateRequest(BaseModel): @@ -77,13 +79,15 @@ class AudioSessionUpdateRequest(BaseModel): turn: OptionalNullable[AudioSessionTurnUpdate] = UNSET + stt: OptionalNullable[AudioSessionSTTUpdate] = UNSET + @model_serializer(mode="wrap") def _serialize_model_with_info(self, handler, info): return serialize_with_info(self.serialize_model, handler, info) def serialize_model(self, handler): - optional_fields = set(["instructions", "tools", "turn"]) - nullable_fields = set(["instructions", "tools", "turn"]) + optional_fields = set(["instructions", "tools", "turn", "stt"]) + nullable_fields = set(["instructions", "tools", "turn", "stt"]) exclude_none = current_exclude_none() skip_filtered = exclude_none is False or current_filtered_dump() serialized = handler(self) diff --git a/src/mistralai/client/models/chatcompletionrequest.py b/src/mistralai/client/models/chatcompletionrequest.py index 295807c6..8768bb73 100644 --- a/src/mistralai/client/models/chatcompletionrequest.py +++ b/src/mistralai/client/models/chatcompletionrequest.py @@ -144,6 +144,8 @@ class ChatCompletionRequestTypedDict(TypedDict): prompt_cache_key: NotRequired[Nullable[str]] service_tier: NotRequired[Nullable[RequestedServiceTier]] r"""Use auto to request priority capacity with standard fallback. Use priority or fast to require priority capacity. No entitlement returns 403, exhausted priority limits return 429, and unavailable priority service returns 503. Priority requires an enabled model and an available allocation. Use standard_only to request standard capacity. An omitted field selects standard capacity, unless the customer is configured to default to auto.""" + watermarking: NotRequired[Nullable[bool]] + r"""Set to true to watermark the generated text.""" safe_prompt: NotRequired[bool] r"""Whether to inject a safety prompt before all conversations.""" @@ -225,6 +227,9 @@ class ChatCompletionRequest(BaseModel): service_tier: OptionalNullable[RequestedServiceTier] = UNSET r"""Use auto to request priority capacity with standard fallback. Use priority or fast to require priority capacity. No entitlement returns 403, exhausted priority limits return 429, and unavailable priority service returns 503. Priority requires an enabled model and an available allocation. Use standard_only to request standard capacity. An omitted field selects standard capacity, unless the customer is configured to default to auto.""" + watermarking: OptionalNullable[bool] = UNSET + r"""Set to true to watermark the generated text.""" + safe_prompt: Optional[bool] = None r"""Whether to inject a safety prompt before all conversations.""" @@ -262,6 +267,7 @@ def serialize_model(self, handler): "guardrails", "prompt_cache_key", "service_tier", + "watermarking", "safe_prompt", ] ) @@ -289,6 +295,7 @@ def serialize_model(self, handler): "guardrails", "prompt_cache_key", "service_tier", + "watermarking", ] ) exclude_none = current_exclude_none() diff --git a/src/mistralai/client/models/chatcompletionstreamrequest.py b/src/mistralai/client/models/chatcompletionstreamrequest.py index fe119847..13aea80e 100644 --- a/src/mistralai/client/models/chatcompletionstreamrequest.py +++ b/src/mistralai/client/models/chatcompletionstreamrequest.py @@ -143,6 +143,8 @@ class ChatCompletionStreamRequestTypedDict(TypedDict): prompt_cache_key: NotRequired[Nullable[str]] service_tier: NotRequired[Nullable[RequestedServiceTier]] r"""Use auto to request priority capacity with standard fallback. Use priority or fast to require priority capacity. No entitlement returns 403, exhausted priority limits return 429, and unavailable priority service returns 503. Priority requires an enabled model and an available allocation. Use standard_only to request standard capacity. An omitted field selects standard capacity, unless the customer is configured to default to auto.""" + watermarking: NotRequired[Nullable[bool]] + r"""Set to true to watermark the generated text.""" safe_prompt: NotRequired[bool] r"""Whether to inject a safety prompt before all conversations.""" @@ -223,6 +225,9 @@ class ChatCompletionStreamRequest(BaseModel): service_tier: OptionalNullable[RequestedServiceTier] = UNSET r"""Use auto to request priority capacity with standard fallback. Use priority or fast to require priority capacity. No entitlement returns 403, exhausted priority limits return 429, and unavailable priority service returns 503. Priority requires an enabled model and an available allocation. Use standard_only to request standard capacity. An omitted field selects standard capacity, unless the customer is configured to default to auto.""" + watermarking: OptionalNullable[bool] = UNSET + r"""Set to true to watermark the generated text.""" + safe_prompt: Optional[bool] = None r"""Whether to inject a safety prompt before all conversations.""" @@ -260,6 +265,7 @@ def serialize_model(self, handler): "guardrails", "prompt_cache_key", "service_tier", + "watermarking", "safe_prompt", ] ) @@ -287,6 +293,7 @@ def serialize_model(self, handler): "guardrails", "prompt_cache_key", "service_tier", + "watermarking", ] ) exclude_none = current_exclude_none() diff --git a/src/mistralai/client/models/comparabilitycheck.py b/src/mistralai/client/models/comparabilitycheck.py new file mode 100644 index 00000000..6d6ef26b --- /dev/null +++ b/src/mistralai/client/models/comparabilitycheck.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .comparabilitycheckcode import ComparabilityCheckCode +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class ComparabilityCheckTypedDict(TypedDict): + code: ComparabilityCheckCode + message: str + + +class ComparabilityCheck(BaseModel): + code: ComparabilityCheckCode + + message: str diff --git a/src/mistralai/client/models/comparabilitycheckcode.py b/src/mistralai/client/models/comparabilitycheckcode.py new file mode 100644 index 00000000..7b034853 --- /dev/null +++ b/src/mistralai/client/models/comparabilitycheckcode.py @@ -0,0 +1,24 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union + + +ComparabilityCheckCode = Union[ + Literal[ + "dataset_differs", + "no_common_records", + "content_changed", + "num_generations_changed", + "evaluator_missing", + "evaluator_spec_changed", + "goal_changed", + "direction_changed", + "judge_changed", + "run_in_progress", + "run_not_completed", + "error_rate_high", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/compare_evaluation_runs_v2_v1_observability_evaluations_v2_evaluation_slug_runs_compare_postop.py b/src/mistralai/client/models/compare_evaluation_runs_v2_v1_observability_evaluations_v2_evaluation_slug_runs_compare_postop.py new file mode 100644 index 00000000..0f12f52d --- /dev/null +++ b/src/mistralai/client/models/compare_evaluation_runs_v2_v1_observability_evaluations_v2_evaluation_slug_runs_compare_postop.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .compareevaluationrunsrequest import ( + CompareEvaluationRunsRequest, + CompareEvaluationRunsRequestTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class CompareEvaluationRunsV2V1ObservabilityEvaluationsV2EvaluationSlugRunsComparePostRequestTypedDict( + TypedDict +): + evaluation_slug: str + compare_evaluation_runs_request: CompareEvaluationRunsRequestTypedDict + + +class CompareEvaluationRunsV2V1ObservabilityEvaluationsV2EvaluationSlugRunsComparePostRequest( + BaseModel +): + evaluation_slug: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + compare_evaluation_runs_request: Annotated[ + CompareEvaluationRunsRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/comparedcandidate.py b/src/mistralai/client/models/comparedcandidate.py new file mode 100644 index 00000000..cdbf5047 --- /dev/null +++ b/src/mistralai/client/models/comparedcandidate.py @@ -0,0 +1,37 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .comparabilitycheck import ComparabilityCheck, ComparabilityCheckTypedDict +from .comparedrun import ComparedRun, ComparedRunTypedDict +from .comparisongate import ComparisonGate, ComparisonGateTypedDict +from .comparisonmetric import ComparisonMetric, ComparisonMetricTypedDict +from .comparisonrecordcounts import ( + ComparisonRecordCounts, + ComparisonRecordCountsTypedDict, +) +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class ComparedCandidateTypedDict(TypedDict): + run: ComparedRunTypedDict + summary: str + gate: ComparisonGateTypedDict + comparability: List[ComparabilityCheckTypedDict] + records: ComparisonRecordCountsTypedDict + metrics: List[ComparisonMetricTypedDict] + + +class ComparedCandidate(BaseModel): + run: ComparedRun + + summary: str + + gate: ComparisonGate + + comparability: List[ComparabilityCheck] + + records: ComparisonRecordCounts + + metrics: List[ComparisonMetric] diff --git a/src/mistralai/client/models/comparedrun.py b/src/mistralai/client/models/comparedrun.py new file mode 100644 index 00000000..8a6eab96 --- /dev/null +++ b/src/mistralai/client/models/comparedrun.py @@ -0,0 +1,65 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from mistralai.client.types.basemodel import current_filtered_dump +from pydantic import model_serializer +from typing import List +from typing_extensions import TypedDict + + +class ComparedRunTypedDict(TypedDict): + id: str + name: str + status: str + tags: List[str] + created_at: Nullable[datetime] + record_count: Nullable[int] + failed_record_count: Nullable[int] + num_generations: int + + +class ComparedRun(BaseModel): + id: str + + name: str + + status: str + + tags: List[str] + + created_at: Nullable[datetime] + + record_count: Nullable[int] + + failed_record_count: Nullable[int] + + num_generations: int + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/compareevaluationrunsrequest.py b/src/mistralai/client/models/compareevaluationrunsrequest.py new file mode 100644 index 00000000..2d4db940 --- /dev/null +++ b/src/mistralai/client/models/compareevaluationrunsrequest.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class CompareEvaluationRunsRequestTypedDict(TypedDict): + baseline_run_id: str + candidate_run_ids: List[str] + + +class CompareEvaluationRunsRequest(BaseModel): + baseline_run_id: str + + candidate_run_ids: List[str] diff --git a/src/mistralai/client/models/comparisonevidence.py b/src/mistralai/client/models/comparisonevidence.py new file mode 100644 index 00000000..a57ecaf1 --- /dev/null +++ b/src/mistralai/client/models/comparisonevidence.py @@ -0,0 +1,76 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .comparisonevidencemethod import ComparisonEvidenceMethod +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from mistralai.client.types.basemodel import current_filtered_dump +from pydantic import model_serializer +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class ComparisonEvidenceTypedDict(TypedDict): + pairs: int + method: NotRequired[Nullable[ComparisonEvidenceMethod]] + interval: NotRequired[Nullable[List[Nullable[float]]]] + p_value: NotRequired[Nullable[float]] + adjusted_p_value: NotRequired[Nullable[float]] + reason: NotRequired[Nullable[str]] + + +class ComparisonEvidence(BaseModel): + pairs: int + + method: OptionalNullable[ComparisonEvidenceMethod] = UNSET + + interval: OptionalNullable[List[Nullable[float]]] = UNSET + + p_value: OptionalNullable[float] = UNSET + + adjusted_p_value: OptionalNullable[float] = UNSET + + reason: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set( + ["method", "interval", "p_value", "adjusted_p_value", "reason"] + ) + nullable_fields = set( + ["method", "interval", "p_value", "adjusted_p_value", "reason"] + ) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/comparisonevidencemethod.py b/src/mistralai/client/models/comparisonevidencemethod.py new file mode 100644 index 00000000..51063f9a --- /dev/null +++ b/src/mistralai/client/models/comparisonevidencemethod.py @@ -0,0 +1,14 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union + + +ComparisonEvidenceMethod = Union[ + Literal[ + "paired_t", + "mcnemar_exact", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/comparisonexclusions.py b/src/mistralai/client/models/comparisonexclusions.py new file mode 100644 index 00000000..a7439604 --- /dev/null +++ b/src/mistralai/client/models/comparisonexclusions.py @@ -0,0 +1,54 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from mistralai.client.types.basemodel import current_filtered_dump +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class ComparisonExclusionsTypedDict(TypedDict): + r"""Common records left out of this metric: ``evidence.pairs + errors + unscored`` is ``records.matched``.""" + + errors: NotRequired[int] + new_errors: NotRequired[int] + unscored: NotRequired[int] + + +class ComparisonExclusions(BaseModel): + r"""Common records left out of this metric: ``evidence.pairs + errors + unscored`` is ``records.matched``.""" + + errors: Optional[int] = 0 + + new_errors: Optional[int] = 0 + + unscored: Optional[int] = 0 + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set(["errors", "new_errors", "unscored"]) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/comparisonflips.py b/src/mistralai/client/models/comparisonflips.py new file mode 100644 index 00000000..bc4bca9e --- /dev/null +++ b/src/mistralai/client/models/comparisonflips.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class ComparisonFlipsTypedDict(TypedDict): + pass_to_fail: int + fail_to_pass: int + + +class ComparisonFlips(BaseModel): + pass_to_fail: int + + fail_to_pass: int diff --git a/src/mistralai/client/models/comparisongate.py b/src/mistralai/client/models/comparisongate.py new file mode 100644 index 00000000..be812810 --- /dev/null +++ b/src/mistralai/client/models/comparisongate.py @@ -0,0 +1,19 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .comparisongatedecision import ComparisonGateDecision +from .comparisongatereason import ComparisonGateReason, ComparisonGateReasonTypedDict +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class ComparisonGateTypedDict(TypedDict): + decision: ComparisonGateDecision + reasons: List[ComparisonGateReasonTypedDict] + + +class ComparisonGate(BaseModel): + decision: ComparisonGateDecision + + reasons: List[ComparisonGateReason] diff --git a/src/mistralai/client/models/comparisongatedecision.py b/src/mistralai/client/models/comparisongatedecision.py new file mode 100644 index 00000000..597920b0 --- /dev/null +++ b/src/mistralai/client/models/comparisongatedecision.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union + + +ComparisonGateDecision = Union[ + Literal[ + "pass", + "fail", + "inconclusive", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/comparisongatereason.py b/src/mistralai/client/models/comparisongatereason.py new file mode 100644 index 00000000..230e78ca --- /dev/null +++ b/src/mistralai/client/models/comparisongatereason.py @@ -0,0 +1,63 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .comparisongatereasoncode import ComparisonGateReasonCode +from .comparisonmetricid import ComparisonMetricID, ComparisonMetricIDTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from mistralai.client.types.basemodel import current_filtered_dump +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class ComparisonGateReasonTypedDict(TypedDict): + code: ComparisonGateReasonCode + message: str + metric_id: NotRequired[Nullable[ComparisonMetricIDTypedDict]] + + +class ComparisonGateReason(BaseModel): + code: ComparisonGateReasonCode + + message: str + + metric_id: OptionalNullable[ComparisonMetricID] = UNSET + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set(["metric_id"]) + nullable_fields = set(["metric_id"]) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/comparisongatereasoncode.py b/src/mistralai/client/models/comparisongatereasoncode.py new file mode 100644 index 00000000..46d6edc9 --- /dev/null +++ b/src/mistralai/client/models/comparisongatereasoncode.py @@ -0,0 +1,22 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union + + +ComparisonGateReasonCode = Union[ + Literal[ + "run_in_progress", + "run_not_completed", + "error_rate_high", + "dataset_differs", + "no_common_records", + "metric_worse", + "metric_not_comparable", + "no_metric_in_gate", + "nothing_tested", + "no_proven_regression", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/comparisongoal.py b/src/mistralai/client/models/comparisongoal.py new file mode 100644 index 00000000..ce2899ec --- /dev/null +++ b/src/mistralai/client/models/comparisongoal.py @@ -0,0 +1,75 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .comparisongoalside import ComparisonGoalSide, ComparisonGoalSideTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from mistralai.client.types.basemodel import current_filtered_dump +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class ComparisonGoalTypedDict(TypedDict): + baseline: Nullable[ComparisonGoalSideTypedDict] + candidate: Nullable[ComparisonGoalSideTypedDict] + scope: Literal["whole_run"] + + +class ComparisonGoal(BaseModel): + baseline: Nullable[ComparisonGoalSide] + + candidate: Nullable[ComparisonGoalSide] + + scope: Annotated[ + Annotated[ + Optional[Literal["whole_run"]], AfterValidator(validate_const("whole_run")) + ], + pydantic.Field(alias="scope"), + ] = "whole_run" + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set(["scope"]) + nullable_fields = set(["baseline", "candidate"]) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + ComparisonGoal.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/comparisongoaloperator.py b/src/mistralai/client/models/comparisongoaloperator.py new file mode 100644 index 00000000..eb6bb858 --- /dev/null +++ b/src/mistralai/client/models/comparisongoaloperator.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union + + +ComparisonGoalOperator = Union[ + Literal[ + "gte", + "lte", + "between", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/comparisongoalrule.py b/src/mistralai/client/models/comparisongoalrule.py new file mode 100644 index 00000000..8628a0b3 --- /dev/null +++ b/src/mistralai/client/models/comparisongoalrule.py @@ -0,0 +1,75 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .comparisongoaloperator import ComparisonGoalOperator +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from mistralai.client.types.basemodel import current_filtered_dump +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class ComparisonGoalRuleTypedDict(TypedDict): + r"""One condition of an evaluator's goal, as configured: ``statistic`` ``operator`` ``value`` (or min and max).""" + + statistic: str + operator: ComparisonGoalOperator + value: NotRequired[Nullable[float]] + min: NotRequired[Nullable[float]] + max: NotRequired[Nullable[float]] + min_coverage: NotRequired[Nullable[float]] + + +class ComparisonGoalRule(BaseModel): + r"""One condition of an evaluator's goal, as configured: ``statistic`` ``operator`` ``value`` (or min and max).""" + + statistic: str + + operator: ComparisonGoalOperator + + value: OptionalNullable[float] = UNSET + + min: OptionalNullable[float] = UNSET + + max: OptionalNullable[float] = UNSET + + min_coverage: OptionalNullable[float] = UNSET + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set(["value", "min", "max", "min_coverage"]) + nullable_fields = set(["value", "min", "max", "min_coverage"]) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/comparisongoalside.py b/src/mistralai/client/models/comparisongoalside.py new file mode 100644 index 00000000..66fe3568 --- /dev/null +++ b/src/mistralai/client/models/comparisongoalside.py @@ -0,0 +1,47 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .comparisongoalrule import ComparisonGoalRule, ComparisonGoalRuleTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from mistralai.client.types.basemodel import current_filtered_dump +from pydantic import model_serializer +from typing import List +from typing_extensions import TypedDict + + +class ComparisonGoalSideTypedDict(TypedDict): + met: Nullable[bool] + rules: List[ComparisonGoalRuleTypedDict] + + +class ComparisonGoalSide(BaseModel): + met: Nullable[bool] + + rules: List[ComparisonGoalRule] + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/comparisonmetric.py b/src/mistralai/client/models/comparisonmetric.py new file mode 100644 index 00000000..7b80976a --- /dev/null +++ b/src/mistralai/client/models/comparisonmetric.py @@ -0,0 +1,109 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .comparisonevidence import ComparisonEvidence, ComparisonEvidenceTypedDict +from .comparisonexclusions import ComparisonExclusions, ComparisonExclusionsTypedDict +from .comparisonflips import ComparisonFlips, ComparisonFlipsTypedDict +from .comparisongoal import ComparisonGoal, ComparisonGoalTypedDict +from .comparisonmetricid import ComparisonMetricID, ComparisonMetricIDTypedDict +from .comparisonverdict import ComparisonVerdict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, + current_exclude_none, + serialize_with_info, +) +from mistralai.client.types.basemodel import current_filtered_dump +from pydantic import model_serializer +from typing import Literal, Union +from typing_extensions import NotRequired, TypedDict + + +ComparisonMetricDirection = Union[ + Literal[ + "maximize", + "minimize", + ], + UnrecognizedStr, +] + + +class ComparisonMetricTypedDict(TypedDict): + id: ComparisonMetricIDTypedDict + counts_in_gate: bool + direction: Nullable[ComparisonMetricDirection] + baseline: Nullable[float] + candidate: Nullable[float] + delta: Nullable[float] + verdict: ComparisonVerdict + evidence: ComparisonEvidenceTypedDict + excluded: ComparisonExclusionsTypedDict + r"""Common records left out of this metric: ``evidence.pairs + errors + unscored`` is ``records.matched``.""" + message: str + flips: NotRequired[Nullable[ComparisonFlipsTypedDict]] + goal: NotRequired[Nullable[ComparisonGoalTypedDict]] + + +class ComparisonMetric(BaseModel): + id: ComparisonMetricID + + counts_in_gate: bool + + direction: Nullable[ComparisonMetricDirection] + + baseline: Nullable[float] + + candidate: Nullable[float] + + delta: Nullable[float] + + verdict: ComparisonVerdict + + evidence: ComparisonEvidence + + excluded: ComparisonExclusions + r"""Common records left out of this metric: ``evidence.pairs + errors + unscored`` is ``records.matched``.""" + + message: str + + flips: OptionalNullable[ComparisonFlips] = UNSET + + goal: OptionalNullable[ComparisonGoal] = UNSET + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set(["flips", "goal"]) + nullable_fields = set( + ["direction", "baseline", "candidate", "delta", "flips", "goal"] + ) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/comparisonmetricid.py b/src/mistralai/client/models/comparisonmetricid.py new file mode 100644 index 00000000..76512ca3 --- /dev/null +++ b/src/mistralai/client/models/comparisonmetricid.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class ComparisonMetricIDTypedDict(TypedDict): + evaluator: str + statistic: str + + +class ComparisonMetricID(BaseModel): + evaluator: str + + statistic: str diff --git a/src/mistralai/client/models/comparisonrecordcounts.py b/src/mistralai/client/models/comparisonrecordcounts.py new file mode 100644 index 00000000..904da563 --- /dev/null +++ b/src/mistralai/client/models/comparisonrecordcounts.py @@ -0,0 +1,59 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from mistralai.client.types.basemodel import current_filtered_dump +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class ComparisonRecordCountsTypedDict(TypedDict): + matched: int + content_changed: int + ambiguous: int + only_in_baseline: int + only_in_candidate: int + content_unknown: NotRequired[int] + + +class ComparisonRecordCounts(BaseModel): + matched: int + + content_changed: int + + ambiguous: int + + only_in_baseline: int + + only_in_candidate: int + + content_unknown: Optional[int] = 0 + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set(["content_unknown"]) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/comparisonverdict.py b/src/mistralai/client/models/comparisonverdict.py new file mode 100644 index 00000000..3c322823 --- /dev/null +++ b/src/mistralai/client/models/comparisonverdict.py @@ -0,0 +1,19 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union + + +ComparisonVerdict = Union[ + Literal[ + "better", + "worse", + "changed", + "no_detected_difference", + "not_enough_data", + "not_tested", + "not_comparable", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/connectorerrorcode.py b/src/mistralai/client/models/connectorerrorcode.py index b9c9a7a8..2f47ce3b 100644 --- a/src/mistralai/client/models/connectorerrorcode.py +++ b/src/mistralai/client/models/connectorerrorcode.py @@ -9,10 +9,12 @@ Literal[ "connectors_count_limit_reached", "credentials_rejected", + "oauth_client_registration_failed", "server_unreachable", "custom_connectors_disabled", "connector_in_another_workspace", "connection_in_another_workspace", + "shared_connector_urls_locked", ], UnrecognizedStr, ] diff --git a/src/mistralai/client/models/contains.py b/src/mistralai/client/models/contains.py new file mode 100644 index 00000000..9b21892b --- /dev/null +++ b/src/mistralai/client/models/contains.py @@ -0,0 +1,54 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import BaseModel +from mistralai.client.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import List, Literal, Union +from typing_extensions import Annotated, TypeAliasType, TypedDict + + +ContainsValueTypedDict = TypeAliasType( + "ContainsValueTypedDict", Union[int, float, datetime, str] +) + + +ContainsValue = TypeAliasType("ContainsValue", Union[int, float, datetime, str]) + + +Mode = Literal[ + "any", + "all", +] + + +class ContainsTypedDict(TypedDict): + r"""The array field contains any or all of the supplied values.""" + + field: str + values: List[ContainsValueTypedDict] + mode: Mode + type: Literal["contains"] + + +class Contains(BaseModel): + r"""The array field contains any or all of the supplied values.""" + + field: str + + values: List[ContainsValue] + + mode: Mode + + type: Annotated[ + Annotated[Literal["contains"], AfterValidator(validate_const("contains"))], + pydantic.Field(alias="type"), + ] = "contains" + + +try: + Contains.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/deploymentworkerspecinput.py b/src/mistralai/client/models/deploymentworkerspecinput.py index 38d6fe6b..bea04caa 100644 --- a/src/mistralai/client/models/deploymentworkerspecinput.py +++ b/src/mistralai/client/models/deploymentworkerspecinput.py @@ -15,9 +15,10 @@ serialize_with_info, ) from mistralai.client.types.basemodel import current_filtered_dump +import pydantic from pydantic import model_serializer from typing import List -from typing_extensions import NotRequired, TypedDict +from typing_extensions import Annotated, NotRequired, TypedDict class DeploymentWorkerSpecInputTypedDict(TypedDict): @@ -35,7 +36,12 @@ class DeploymentWorkerSpecInputTypedDict(TypedDict): class DeploymentWorkerSpecInput(BaseModel): - github_url: OptionalNullable[str] = UNSET + github_url: Annotated[ + OptionalNullable[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET r"""Deprecated alias of 'repository_url' for a GitHub repository. Set only 'repository_url'.""" repository_url: OptionalNullable[str] = UNSET diff --git a/src/mistralai/client/models/deploymentworkerspecresponse.py b/src/mistralai/client/models/deploymentworkerspecresponse.py index 2ada9b7d..d733dc13 100644 --- a/src/mistralai/client/models/deploymentworkerspecresponse.py +++ b/src/mistralai/client/models/deploymentworkerspecresponse.py @@ -22,6 +22,7 @@ ) from mistralai.client.types.basemodel import current_filtered_dump from mistralai.client.utils.unions import parse_open_union +import pydantic from pydantic import ConfigDict, model_serializer from pydantic.functional_validators import BeforeValidator from typing import Any, List, Literal, Optional, Union @@ -76,7 +77,7 @@ class UnknownBackendSpec(BaseModel): class DeploymentWorkerSpecResponseTypedDict(TypedDict): github_url: str - r"""GitHub repository the worker builds from. Empty for a worker built from an archive.""" + r"""Deprecated: read 'repository_url'. The GitHub repository the worker builds from, empty for any other source.""" backend_spec: BackendSpecTypedDict r"""Backend-specific configuration. 'mistral_cloud' is Mistral Cloud; 'kubernetes' is a deployment that already runs on Kubernetes.""" type: NotRequired[str] @@ -91,8 +92,13 @@ class DeploymentWorkerSpecResponseTypedDict(TypedDict): class DeploymentWorkerSpecResponse(BaseModel): - github_url: str - r"""GitHub repository the worker builds from. Empty for a worker built from an archive.""" + github_url: Annotated[ + str, + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] + r"""Deprecated: read 'repository_url'. The GitHub repository the worker builds from, empty for any other source.""" backend_spec: BackendSpec r"""Backend-specific configuration. 'mistral_cloud' is Mistral Cloud; 'kubernetes' is a deployment that already runs on Kubernetes.""" diff --git a/src/mistralai/client/models/detectionresponse.py b/src/mistralai/client/models/detectionresponse.py new file mode 100644 index 00000000..fe1f7f6d --- /dev/null +++ b/src/mistralai/client/models/detectionresponse.py @@ -0,0 +1,100 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, + current_exclude_none, + serialize_with_info, +) +from mistralai.client.types.basemodel import current_filtered_dump +from pydantic import model_serializer +from typing import Literal, Union +from typing_extensions import NotRequired, TypedDict + + +Watermarked = Union[ + Literal[ + "true", + "false", + ], + UnrecognizedStr, +] + + +MetadataValid = Union[ + Literal[ + "true", + "false", + ], + UnrecognizedStr, +] + + +class DetectionResponseTypedDict(TypedDict): + r"""Detect response: the watermark-detector verdict and the content-metadata verdict, separately.""" + + watermarked: NotRequired[Nullable[Watermarked]] + r"""Watermark-detector verdict: \"true\"/\"false\"; null when the watermark detector did not run or could not decide (see `watermarked_reason`).""" + watermarked_reason: NotRequired[Nullable[str]] + r"""Why the watermark detector produced no verdict (e.g. \"Text too short to detect watermarking\"); set when `watermarked` is null.""" + metadata_valid: NotRequired[Nullable[MetadataValid]] + r"""Content-metadata verdict (C2PA Content Credentials): \"true\" when the file carries valid credentials signed by Mistral AI, \"false\" when its credentials are invalid or signed by someone else; null when the file carries no metadata (see `metadata_reason`).""" + metadata_reason: NotRequired[Nullable[str]] + r"""The metadata verdict in plain words. With \"true\", whether the file declares AI generation (\"Signed by Mistral AI and declared as AI-generated\") or was signed by Mistral with a certificate that has since expired; with null, why there is no verdict (e.g. \"No metadata attached to file\" for a media upload, \"Not file, text watermark detection\" for a text body).""" + + +class DetectionResponse(BaseModel): + r"""Detect response: the watermark-detector verdict and the content-metadata verdict, separately.""" + + watermarked: OptionalNullable[Watermarked] = UNSET + r"""Watermark-detector verdict: \"true\"/\"false\"; null when the watermark detector did not run or could not decide (see `watermarked_reason`).""" + + watermarked_reason: OptionalNullable[str] = UNSET + r"""Why the watermark detector produced no verdict (e.g. \"Text too short to detect watermarking\"); set when `watermarked` is null.""" + + metadata_valid: OptionalNullable[MetadataValid] = UNSET + r"""Content-metadata verdict (C2PA Content Credentials): \"true\" when the file carries valid credentials signed by Mistral AI, \"false\" when its credentials are invalid or signed by someone else; null when the file carries no metadata (see `metadata_reason`).""" + + metadata_reason: OptionalNullable[str] = UNSET + r"""The metadata verdict in plain words. With \"true\", whether the file declares AI generation (\"Signed by Mistral AI and declared as AI-generated\") or was signed by Mistral with a certificate that has since expired; with null, why there is no verdict (e.g. \"No metadata attached to file\" for a media upload, \"Not file, text watermark detection\" for a text body).""" + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set( + ["watermarked", "watermarked_reason", "metadata_valid", "metadata_reason"] + ) + nullable_fields = set( + ["watermarked", "watermarked_reason", "metadata_valid", "metadata_reason"] + ) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/detections_v1_watermarking_detect_post_multipartop.py b/src/mistralai/client/models/detections_v1_watermarking_detect_post_multipartop.py new file mode 100644 index 00000000..0ef5539a --- /dev/null +++ b/src/mistralai/client/models/detections_v1_watermarking_detect_post_multipartop.py @@ -0,0 +1,39 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .file import File, FileTypedDict +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, MultipartFormMetadata +from typing_extensions import Annotated, TypedDict + + +class DetectionFileRequestTypedDict(TypedDict): + r"""Multipart body for media watermark detection: exactly one file.""" + + file: FileTypedDict + r"""The File object (not file name) to be uploaded. + To upload a file and specify a custom file name you should format your request as such: + ```bash + file=@path/to/your/file.jsonl;filename=custom_name.jsonl + ``` + Otherwise, you can just keep the original file name: + ```bash + file=@path/to/your/file.jsonl + ``` + """ + + +class DetectionFileRequest(BaseModel): + r"""Multipart body for media watermark detection: exactly one file.""" + + file: Annotated[File, FieldMetadata(multipart=MultipartFormMetadata(file=True))] + r"""The File object (not file name) to be uploaded. + To upload a file and specify a custom file name you should format your request as such: + ```bash + file=@path/to/your/file.jsonl;filename=custom_name.jsonl + ``` + Otherwise, you can just keep the original file name: + ```bash + file=@path/to/your/file.jsonl + ``` + """ diff --git a/src/mistralai/client/models/detections_v1_watermarking_detect_postop.py b/src/mistralai/client/models/detections_v1_watermarking_detect_postop.py new file mode 100644 index 00000000..a8f04c0d --- /dev/null +++ b/src/mistralai/client/models/detections_v1_watermarking_detect_postop.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class DetectionTextRequestTypedDict(TypedDict): + r"""JSON body for text watermark detection.""" + + text: str + + +class DetectionTextRequest(BaseModel): + r"""JSON body for text watermark detection.""" + + text: str diff --git a/src/mistralai/client/models/evaluationrunscomparison.py b/src/mistralai/client/models/evaluationrunscomparison.py new file mode 100644 index 00000000..3e02d214 --- /dev/null +++ b/src/mistralai/client/models/evaluationrunscomparison.py @@ -0,0 +1,19 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .comparedcandidate import ComparedCandidate, ComparedCandidateTypedDict +from .comparedrun import ComparedRun, ComparedRunTypedDict +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class EvaluationRunsComparisonTypedDict(TypedDict): + baseline: ComparedRunTypedDict + candidates: List[ComparedCandidateTypedDict] + + +class EvaluationRunsComparison(BaseModel): + baseline: ComparedRun + + candidates: List[ComparedCandidate] diff --git a/src/mistralai/client/models/keywordretriever.py b/src/mistralai/client/models/keywordretriever.py index 16bf4217..3b7681b4 100644 --- a/src/mistralai/client/models/keywordretriever.py +++ b/src/mistralai/client/models/keywordretriever.py @@ -2,6 +2,7 @@ from __future__ import annotations from .and_ import And, AndTypedDict +from .contains import Contains, ContainsTypedDict from .equal import Equal, EqualTypedDict from .in_ import In, InTypedDict from .not_ import Not, NotTypedDict @@ -39,13 +40,14 @@ NotTypedDict, EqualTypedDict, InTypedDict, + ContainsTypedDict, RangeTypedDict, ], ) KeywordRetrieverFilter = Annotated[ - Union[And, Equal, In, Not, Or, Range], Field(discriminator="type") + Union[And, Contains, Equal, In, Not, Or, Range], Field(discriminator="type") ] diff --git a/src/mistralai/client/models/nearestneighbourretriever.py b/src/mistralai/client/models/nearestneighbourretriever.py index 2294d0f1..4041caf0 100644 --- a/src/mistralai/client/models/nearestneighbourretriever.py +++ b/src/mistralai/client/models/nearestneighbourretriever.py @@ -2,6 +2,7 @@ from __future__ import annotations from .and_ import And, AndTypedDict +from .contains import Contains, ContainsTypedDict from .equal import Equal, EqualTypedDict from .in_ import In, InTypedDict from .not_ import Not, NotTypedDict @@ -33,13 +34,14 @@ NotTypedDict, EqualTypedDict, InTypedDict, + ContainsTypedDict, RangeTypedDict, ], ) NearestNeighbourRetrieverFilter = Annotated[ - Union[And, Equal, In, Not, Or, Range], Field(discriminator="type") + Union[And, Contains, Equal, In, Not, Or, Range], Field(discriminator="type") ] diff --git a/src/mistralai/client/models/not_.py b/src/mistralai/client/models/not_.py index 3b02ecbd..b5032619 100644 --- a/src/mistralai/client/models/not_.py +++ b/src/mistralai/client/models/not_.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .contains import Contains, ContainsTypedDict from .equal import Equal, EqualTypedDict from .in_ import In, InTypedDict from .range import Range, RangeTypedDict @@ -43,13 +44,14 @@ class Not(BaseModel): "NotTypedDict", EqualTypedDict, InTypedDict, + ContainsTypedDict, RangeTypedDict, ], ) NotMatch = Annotated[ - Union["And", Equal, In, Not, "Or", Range], Field(discriminator="type") + Union["And", Contains, Equal, In, Not, "Or", Range], Field(discriminator="type") ] diff --git a/src/mistralai/client/models/observabilityerrorcode.py b/src/mistralai/client/models/observabilityerrorcode.py index d24fcfa7..162a9dc5 100644 --- a/src/mistralai/client/models/observabilityerrorcode.py +++ b/src/mistralai/client/models/observabilityerrorcode.py @@ -59,6 +59,8 @@ "SCORER_ALREADY_EXISTS", "SCORER_CONFIG_KIND_MISMATCH", "EVALUATION_NAME_ALREADY_EXISTS", + "EVALUATION_RUN_NOT_IN_EVALUATION", + "COMPARISON_WORK_LIMIT_EXCEEDED", "OPTIMIZATION_NOT_FOUND", "OPTIMIZATION_TRIAL_KEY_ALREADY_EXISTS", "OPTIMIZATION_TRIAL_OBSERVATION_ALREADY_EXISTS", diff --git a/src/mistralai/client/models/or_.py b/src/mistralai/client/models/or_.py index 98854a13..bae27bce 100644 --- a/src/mistralai/client/models/or_.py +++ b/src/mistralai/client/models/or_.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .contains import Contains, ContainsTypedDict from .equal import Equal, EqualTypedDict from .in_ import In, InTypedDict from .range import Range, RangeTypedDict @@ -43,13 +44,14 @@ class Or(BaseModel): "NotTypedDict", EqualTypedDict, InTypedDict, + ContainsTypedDict, RangeTypedDict, ], ) OrMatch = Annotated[ - Union["And", Equal, In, "Not", Or, Range], Field(discriminator="type") + Union["And", Contains, Equal, In, "Not", Or, Range], Field(discriminator="type") ] diff --git a/src/mistralai/client/models/realtimespeechsession.py b/src/mistralai/client/models/realtimespeechsession.py index b91e05b2..a3df88c4 100644 --- a/src/mistralai/client/models/realtimespeechsession.py +++ b/src/mistralai/client/models/realtimespeechsession.py @@ -15,7 +15,7 @@ ) from mistralai.client.types.basemodel import current_filtered_dump from pydantic import model_serializer -from typing import Dict, List +from typing import Dict, List, Optional from typing_extensions import NotRequired, TypedDict @@ -27,6 +27,7 @@ class RealtimeSpeechSessionTypedDict(TypedDict): response_format: SpeechOutputFormat expressiveness: float voice: NotRequired[Nullable[str]] + watermarking: NotRequired[bool] phoneme_hints: NotRequired[Nullable[Dict[str, List[IPAPhoneme]]]] @@ -45,6 +46,8 @@ class RealtimeSpeechSession(BaseModel): voice: OptionalNullable[str] = UNSET + watermarking: Optional[bool] = False + phoneme_hints: OptionalNullable[Dict[str, List[IPAPhoneme]]] = UNSET @model_serializer(mode="wrap") @@ -52,7 +55,7 @@ def _serialize_model_with_info(self, handler, info): return serialize_with_info(self.serialize_model, handler, info) def serialize_model(self, handler): - optional_fields = set(["voice", "phoneme_hints"]) + optional_fields = set(["voice", "watermarking", "phoneme_hints"]) nullable_fields = set(["voice", "phoneme_hints"]) exclude_none = current_exclude_none() skip_filtered = exclude_none is False or current_filtered_dump() diff --git a/src/mistralai/client/models/realtimespeechsessionupdatepayload.py b/src/mistralai/client/models/realtimespeechsessionupdatepayload.py index 755f1c56..dfb7a875 100644 --- a/src/mistralai/client/models/realtimespeechsessionupdatepayload.py +++ b/src/mistralai/client/models/realtimespeechsessionupdatepayload.py @@ -30,6 +30,8 @@ class RealtimeSpeechSessionUpdatePayloadTypedDict(TypedDict): r"""Audio encoding of speech.audio.delta events. pcm is raw 32-bit float little-endian mono.""" expressiveness: NotRequired[Nullable[float]] r"""Higher values make the delivery more expressive. Minimum 1.0.""" + watermarking: NotRequired[Nullable[bool]] + r"""Apply the server's configured audio watermark. Updates apply before the next synthesis starts.""" phoneme_hints: NotRequired[Nullable[Dict[str, List[IPAPhoneme]]]] r"""Pronunciation hints mapping a (case-sensitive) word to its ordered list of IPA phones. Replaces the current hints; an empty object clears them.""" @@ -50,6 +52,9 @@ class RealtimeSpeechSessionUpdatePayload(BaseModel): expressiveness: OptionalNullable[float] = UNSET r"""Higher values make the delivery more expressive. Minimum 1.0.""" + watermarking: OptionalNullable[bool] = UNSET + r"""Apply the server's configured audio watermark. Updates apply before the next synthesis starts.""" + phoneme_hints: OptionalNullable[Dict[str, List[IPAPhoneme]]] = UNSET r"""Pronunciation hints mapping a (case-sensitive) word to its ordered list of IPA phones. Replaces the current hints; an empty object clears them.""" @@ -65,6 +70,7 @@ def serialize_model(self, handler): "streaming_mode", "response_format", "expressiveness", + "watermarking", "phoneme_hints", ] ) @@ -75,6 +81,7 @@ def serialize_model(self, handler): "streaming_mode", "response_format", "expressiveness", + "watermarking", "phoneme_hints", ] ) diff --git a/src/mistralai/client/models/rrfretriever.py b/src/mistralai/client/models/rrfretriever.py index ad576f24..8439cf77 100644 --- a/src/mistralai/client/models/rrfretriever.py +++ b/src/mistralai/client/models/rrfretriever.py @@ -2,6 +2,7 @@ from __future__ import annotations from .and_ import And, AndTypedDict +from .contains import Contains, ContainsTypedDict from .equal import Equal, EqualTypedDict from .in_ import In, InTypedDict from .keywordretriever import KeywordRetriever, KeywordRetrieverTypedDict @@ -49,13 +50,14 @@ NotTypedDict, EqualTypedDict, InTypedDict, + ContainsTypedDict, RangeTypedDict, ], ) RRFRetrieverFilter = Annotated[ - Union[And, Equal, In, Not, Or, Range], Field(discriminator="type") + Union[And, Contains, Equal, In, Not, Or, Range], Field(discriminator="type") ] diff --git a/src/mistralai/client/models/speechrequest.py b/src/mistralai/client/models/speechrequest.py index 207f5c06..4041a6e7 100644 --- a/src/mistralai/client/models/speechrequest.py +++ b/src/mistralai/client/models/speechrequest.py @@ -50,6 +50,8 @@ class SpeechRequestTypedDict(TypedDict): conversation_history: NotRequired[Nullable[List[ConversationHistoryUnionTypedDict]]] r"""Prior turns, oldest first, alternating and ending on a user turn: `input` is the assistant reply to it. Conditions delivery, not speaker: set `voice_id` to choose the speaker. Requires `voice_id` to be a preset voice whose `kind` is `pvc`. Cannot be combined with `ref_audio`.""" response_format: NotRequired[SpeechOutputFormat] + watermarking: NotRequired[Nullable[bool]] + r"""Set to true to mark this output: an audio watermark, plus C2PA content credentials on non-streamed WAV, MP3 and FLAC.""" class SpeechRequest(BaseModel): @@ -86,6 +88,9 @@ class SpeechRequest(BaseModel): response_format: Optional[SpeechOutputFormat] = None + watermarking: OptionalNullable[bool] = UNSET + r"""Set to true to mark this output: an audio watermark, plus C2PA content credentials on non-streamed WAV, MP3 and FLAC.""" + @property def additional_properties(self): return self.__pydantic_extra__ @@ -111,6 +116,7 @@ def serialize_model(self, handler): "phoneme_hints", "conversation_history", "response_format", + "watermarking", ] ) nullable_fields = set( @@ -123,6 +129,7 @@ def serialize_model(self, handler): "expressiveness", "phoneme_hints", "conversation_history", + "watermarking", ] ) exclude_none = current_exclude_none() diff --git a/src/mistralai/client/models/workflowsworkerspecupdate.py b/src/mistralai/client/models/workflowsworkerspecupdate.py index fe1b1b9c..b58e2497 100644 --- a/src/mistralai/client/models/workflowsworkerspecupdate.py +++ b/src/mistralai/client/models/workflowsworkerspecupdate.py @@ -15,9 +15,10 @@ serialize_with_info, ) from mistralai.client.types.basemodel import current_filtered_dump +import pydantic from pydantic import model_serializer from typing import List -from typing_extensions import NotRequired, TypedDict +from typing_extensions import Annotated, NotRequired, TypedDict class WorkflowsWorkerSpecUpdateTypedDict(TypedDict): @@ -35,7 +36,12 @@ class WorkflowsWorkerSpecUpdateTypedDict(TypedDict): class WorkflowsWorkerSpecUpdate(BaseModel): - github_url: OptionalNullable[str] = UNSET + github_url: Annotated[ + OptionalNullable[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET r"""Deprecated alias of 'repository_url' for a GitHub repository. Set only 'repository_url'.""" repository_url: OptionalNullable[str] = UNSET diff --git a/src/mistralai/client/sdk.py b/src/mistralai/client/sdk.py index 92b83fa6..3403172f 100644 --- a/src/mistralai/client/sdk.py +++ b/src/mistralai/client/sdk.py @@ -29,6 +29,7 @@ from mistralai.client.ocr import Ocr from mistralai.client.realtime import Realtime from mistralai.client.responses import Responses + from mistralai.client.watermarking import Watermarking from mistralai.client.workflows import Workflows @@ -37,6 +38,7 @@ class Mistral(BaseSDK): beta: "Beta" audio: "Audio" + watermarking: "Watermarking" models: "Models" r"""Model Management API""" responses: "Responses" @@ -62,6 +64,7 @@ class Mistral(BaseSDK): _sub_sdk_map = { "beta": ("mistralai.client.beta", "Beta"), "audio": ("mistralai.client.audio", "Audio"), + "watermarking": ("mistralai.client.watermarking", "Watermarking"), "models": ("mistralai.client.models_", "Models"), "responses": ("mistralai.client.responses", "Responses"), "realtime": ("mistralai.client.realtime", "Realtime"), diff --git a/src/mistralai/client/speech.py b/src/mistralai/client/speech.py index 7d57be47..e1c98149 100644 --- a/src/mistralai/client/speech.py +++ b/src/mistralai/client/speech.py @@ -42,6 +42,7 @@ def complete( ] ] = UNSET, response_format: Optional[models.SpeechOutputFormat] = None, + watermarking: OptionalNullable[bool] = UNSET, additional_properties: Optional[Mapping[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -61,6 +62,7 @@ def complete( :param phoneme_hints: Optional pronunciation hints mapping a (case-sensitive) word to its ordered list of IPA phones. :param conversation_history: Prior turns, oldest first, alternating and ending on a user turn: `input` is the assistant reply to it. Conditions delivery, not speaker: set `voice_id` to choose the speaker. Requires `voice_id` to be a preset voice whose `kind` is `pvc`. Cannot be combined with `ref_audio`. :param response_format: + :param watermarking: Set to true to mark this output: an audio watermark, plus C2PA content credentials on non-streamed WAV, MP3 and FLAC. :param additional_properties: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -90,6 +92,7 @@ def complete( ] ] = UNSET, response_format: Optional[models.SpeechOutputFormat] = None, + watermarking: OptionalNullable[bool] = UNSET, additional_properties: Optional[Mapping[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -109,6 +112,7 @@ def complete( :param phoneme_hints: Optional pronunciation hints mapping a (case-sensitive) word to its ordered list of IPA phones. :param conversation_history: Prior turns, oldest first, alternating and ending on a user turn: `input` is the assistant reply to it. Conditions delivery, not speaker: set `voice_id` to choose the speaker. Requires `voice_id` to be a preset voice whose `kind` is `pvc`. Cannot be combined with `ref_audio`. :param response_format: + :param watermarking: Set to true to mark this output: an audio watermark, plus C2PA content credentials on non-streamed WAV, MP3 and FLAC. :param additional_properties: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -138,6 +142,7 @@ def complete( ] ] = UNSET, response_format: Optional[models.SpeechOutputFormat] = None, + watermarking: OptionalNullable[bool] = UNSET, additional_properties: Optional[Mapping[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -159,6 +164,7 @@ def complete( :param phoneme_hints: Optional pronunciation hints mapping a (case-sensitive) word to its ordered list of IPA phones. :param conversation_history: Prior turns, oldest first, alternating and ending on a user turn: `input` is the assistant reply to it. Conditions delivery, not speaker: set `voice_id` to choose the speaker. Requires `voice_id` to be a preset voice whose `kind` is `pvc`. Cannot be combined with `ref_audio`. :param response_format: + :param watermarking: Set to true to mark this output: an audio watermark, plus C2PA content credentials on non-streamed WAV, MP3 and FLAC. :param additional_properties: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -187,6 +193,7 @@ def complete( ] ] = UNSET, response_format: Optional[models.SpeechOutputFormat] = None, + watermarking: OptionalNullable[bool] = UNSET, additional_properties: Optional[Mapping[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -208,6 +215,7 @@ def complete( :param phoneme_hints: Optional pronunciation hints mapping a (case-sensitive) word to its ordered list of IPA phones. :param conversation_history: Prior turns, oldest first, alternating and ending on a user turn: `input` is the assistant reply to it. Conditions delivery, not speaker: set `voice_id` to choose the speaker. Requires `voice_id` to be a preset voice whose `kind` is `pvc`. Cannot be combined with `ref_audio`. :param response_format: + :param watermarking: Set to true to mark this output: an audio watermark, plus C2PA content credentials on non-streamed WAV, MP3 and FLAC. :param additional_properties: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -244,6 +252,7 @@ def complete( OptionalNullable[List[models.ConversationHistoryUnion]], ), response_format=response_format, + watermarking=watermarking, **(utils.unmarshal(additional_properties, Optional[Dict[str, Any]]) or {}), ) @@ -347,6 +356,7 @@ async def complete_async( ] ] = UNSET, response_format: Optional[models.SpeechOutputFormat] = None, + watermarking: OptionalNullable[bool] = UNSET, additional_properties: Optional[Mapping[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -366,6 +376,7 @@ async def complete_async( :param phoneme_hints: Optional pronunciation hints mapping a (case-sensitive) word to its ordered list of IPA phones. :param conversation_history: Prior turns, oldest first, alternating and ending on a user turn: `input` is the assistant reply to it. Conditions delivery, not speaker: set `voice_id` to choose the speaker. Requires `voice_id` to be a preset voice whose `kind` is `pvc`. Cannot be combined with `ref_audio`. :param response_format: + :param watermarking: Set to true to mark this output: an audio watermark, plus C2PA content credentials on non-streamed WAV, MP3 and FLAC. :param additional_properties: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -395,6 +406,7 @@ async def complete_async( ] ] = UNSET, response_format: Optional[models.SpeechOutputFormat] = None, + watermarking: OptionalNullable[bool] = UNSET, additional_properties: Optional[Mapping[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -414,6 +426,7 @@ async def complete_async( :param phoneme_hints: Optional pronunciation hints mapping a (case-sensitive) word to its ordered list of IPA phones. :param conversation_history: Prior turns, oldest first, alternating and ending on a user turn: `input` is the assistant reply to it. Conditions delivery, not speaker: set `voice_id` to choose the speaker. Requires `voice_id` to be a preset voice whose `kind` is `pvc`. Cannot be combined with `ref_audio`. :param response_format: + :param watermarking: Set to true to mark this output: an audio watermark, plus C2PA content credentials on non-streamed WAV, MP3 and FLAC. :param additional_properties: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -443,6 +456,7 @@ async def complete_async( ] ] = UNSET, response_format: Optional[models.SpeechOutputFormat] = None, + watermarking: OptionalNullable[bool] = UNSET, additional_properties: Optional[Mapping[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -465,6 +479,7 @@ async def complete_async( :param phoneme_hints: Optional pronunciation hints mapping a (case-sensitive) word to its ordered list of IPA phones. :param conversation_history: Prior turns, oldest first, alternating and ending on a user turn: `input` is the assistant reply to it. Conditions delivery, not speaker: set `voice_id` to choose the speaker. Requires `voice_id` to be a preset voice whose `kind` is `pvc`. Cannot be combined with `ref_audio`. :param response_format: + :param watermarking: Set to true to mark this output: an audio watermark, plus C2PA content credentials on non-streamed WAV, MP3 and FLAC. :param additional_properties: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -493,6 +508,7 @@ async def complete_async( ] ] = UNSET, response_format: Optional[models.SpeechOutputFormat] = None, + watermarking: OptionalNullable[bool] = UNSET, additional_properties: Optional[Mapping[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -515,6 +531,7 @@ async def complete_async( :param phoneme_hints: Optional pronunciation hints mapping a (case-sensitive) word to its ordered list of IPA phones. :param conversation_history: Prior turns, oldest first, alternating and ending on a user turn: `input` is the assistant reply to it. Conditions delivery, not speaker: set `voice_id` to choose the speaker. Requires `voice_id` to be a preset voice whose `kind` is `pvc`. Cannot be combined with `ref_audio`. :param response_format: + :param watermarking: Set to true to mark this output: an audio watermark, plus C2PA content credentials on non-streamed WAV, MP3 and FLAC. :param additional_properties: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -551,6 +568,7 @@ async def complete_async( OptionalNullable[List[models.ConversationHistoryUnion]], ), response_format=response_format, + watermarking=watermarking, **(utils.unmarshal(additional_properties, Optional[Dict[str, Any]]) or {}), ) diff --git a/src/mistralai/client/watermarking.py b/src/mistralai/client/watermarking.py new file mode 100644 index 00000000..6d6a35c2 --- /dev/null +++ b/src/mistralai/client/watermarking.py @@ -0,0 +1,415 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from mistralai.client import errors, models, utils +from mistralai.client._hooks import HookContext +from mistralai.client.types import OptionalNullable, UNSET +from mistralai.client.utils import get_security_from_env +from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response +from typing import Mapping, Optional, Union + + +class Watermarking(BaseSDK): + def detect( + self, + *, + text: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DetectionResponse: + r"""Detections + + Detect whether content was produced with a Mistral watermark. + + Accepts exactly one input: a JSON body (``{\"text\": ...}``) for text, or a multipart ``file`` upload. + Returns the watermark-detector verdict (``watermarked`` + ``watermarked_reason``) and the + content-metadata verdict (``metadata_valid`` + ``metadata_reason``) separately; each flag is ``\"true\"`` / + ``\"false\"`` / ``null`` (null = not tested, see the matching ``*_reason``). + + :param text: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 300000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DetectionTextRequest( + text=text, + ) + + req = self._build_request( + method="POST", + path="/v1/watermarking/detect", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.DetectionTextRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="detections_v1_watermarking_detect_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["watermarking"], + extensions=None, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.DetectionResponse, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def detect_async( + self, + *, + text: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DetectionResponse: + r"""Detections + + Detect whether content was produced with a Mistral watermark. + + Accepts exactly one input: a JSON body (``{\"text\": ...}``) for text, or a multipart ``file`` upload. + Returns the watermark-detector verdict (``watermarked`` + ``watermarked_reason``) and the + content-metadata verdict (``metadata_valid`` + ``metadata_reason``) separately; each flag is ``\"true\"`` / + ``\"false\"`` / ``null`` (null = not tested, see the matching ``*_reason``). + + :param text: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 300000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DetectionTextRequest( + text=text, + ) + + req = self._build_request_async( + method="POST", + path="/v1/watermarking/detect", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.DetectionTextRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="detections_v1_watermarking_detect_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["watermarking"], + extensions=None, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.DetectionResponse, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def detect_multipart( + self, + *, + file: Union[models.File, models.FileTypedDict], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DetectionResponse: + r"""Detections + + Detect whether content was produced with a Mistral watermark. + + Accepts exactly one input: a JSON body (``{\"text\": ...}``) for text, or a multipart ``file`` upload. + Returns the watermark-detector verdict (``watermarked`` + ``watermarked_reason``) and the + content-metadata verdict (``metadata_valid`` + ``metadata_reason``) separately; each flag is ``\"true\"`` / + ``\"false\"`` / ``null`` (null = not tested, see the matching ``*_reason``). + + :param file: The File object (not file name) to be uploaded. + To upload a file and specify a custom file name you should format your request as such: + ```bash + file=@path/to/your/file.jsonl;filename=custom_name.jsonl + ``` + Otherwise, you can just keep the original file name: + ```bash + file=@path/to/your/file.jsonl + ``` + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 300000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DetectionFileRequest( + file=utils.get_pydantic_model(file, models.File), + ) + + req = self._build_request( + method="POST", + path="/v1/watermarking/detect", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "multipart", models.DetectionFileRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="detections_v1_watermarking_detect_post_multipart", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["watermarking"], + extensions=None, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.DetectionResponse, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def detect_multipart_async( + self, + *, + file: Union[models.File, models.FileTypedDict], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DetectionResponse: + r"""Detections + + Detect whether content was produced with a Mistral watermark. + + Accepts exactly one input: a JSON body (``{\"text\": ...}``) for text, or a multipart ``file`` upload. + Returns the watermark-detector verdict (``watermarked`` + ``watermarked_reason``) and the + content-metadata verdict (``metadata_valid`` + ``metadata_reason``) separately; each flag is ``\"true\"`` / + ``\"false\"`` / ``null`` (null = not tested, see the matching ``*_reason``). + + :param file: The File object (not file name) to be uploaded. + To upload a file and specify a custom file name you should format your request as such: + ```bash + file=@path/to/your/file.jsonl;filename=custom_name.jsonl + ``` + Otherwise, you can just keep the original file name: + ```bash + file=@path/to/your/file.jsonl + ``` + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 300000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DetectionFileRequest( + file=utils.get_pydantic_model(file, models.File), + ) + + req = self._build_request_async( + method="POST", + path="/v1/watermarking/detect", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "multipart", models.DetectionFileRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="detections_v1_watermarking_detect_post_multipart", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["watermarking"], + extensions=None, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.DetectionResponse, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/mistralai/extra/observability/redaction_policies.py b/src/mistralai/extra/observability/redaction_policies.py index 826afb9d..35673e50 100644 --- a/src/mistralai/extra/observability/redaction_policies.py +++ b/src/mistralai/extra/observability/redaction_policies.py @@ -250,8 +250,9 @@ def redact_status_description(self, description: str | None) -> str | None: *DEFAULT_TOKEN_PATTERNS, # Email addresses re.compile(r"\b[A-Za-z0-9._%+\-]+@[A-Za-z0-9.\-]+\.[A-Za-z]{2,}\b"), - # Credit-card-like sequences (13-16 digits, optional spaces/dashes) - re.compile(r"\b(?:\d[ -]?){13,16}\b"), + # Credit-card-like sequences (13-16 digits, optional spaces/dashes). Not next to a + # letter, digit, underscore or dash, so the digit-only groups of a UUID are kept. + re.compile(r"(? None: if self._closed: raise RuntimeError("Connection is closed") @@ -173,6 +174,7 @@ async def update_session( "streaming_mode": streaming_mode, "expressiveness": expressiveness, "phoneme_hints": phoneme_hints, + "watermarking": watermarking, } fields = {name: value for name, value in fields.items() if value is not None} if not fields: @@ -260,6 +262,7 @@ async def connect( streaming_mode: Optional[RealtimeSpeechStreamingMode] = None, expressiveness: Optional[float] = None, phoneme_hints: Optional[Dict[str, List[IPAPhoneme]]] = None, + watermarking: Optional[bool] = None, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, @@ -330,6 +333,7 @@ async def connect( streaming_mode, expressiveness, phoneme_hints, + watermarking, ) if any(value is not None for value in session_fields): await connection.update_session( @@ -339,6 +343,7 @@ async def connect( streaming_mode=streaming_mode, expressiveness=expressiveness, phoneme_hints=phoneme_hints, + watermarking=watermarking, ) return connection @@ -363,6 +368,7 @@ async def speak_stream( streaming_mode: Optional[RealtimeSpeechStreamingMode] = None, expressiveness: Optional[float] = None, phoneme_hints: Optional[Dict[str, List[IPAPhoneme]]] = None, + watermarking: Optional[bool] = None, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, @@ -375,6 +381,7 @@ async def speak_stream( streaming_mode=streaming_mode, expressiveness=expressiveness, phoneme_hints=phoneme_hints, + watermarking=watermarking, server_url=server_url, timeout_ms=timeout_ms, http_headers=http_headers, diff --git a/src/mistralai/extra/tests/test_realtime_speech.py b/src/mistralai/extra/tests/test_realtime_speech.py index ad2e735d..fbb87b2f 100644 --- a/src/mistralai/extra/tests/test_realtime_speech.py +++ b/src/mistralai/extra/tests/test_realtime_speech.py @@ -181,6 +181,13 @@ async def test_update_session_sends_phoneme_hints(self) -> None: ], ) + async def test_update_session_sends_watermarking_false(self) -> None: + ws = FakeWebSocket() + await _connection(ws).update_session(watermarking=False) + self.assertEqual( + ws.sent, [{"type": "session.update", "session": {"watermarking": False}}] + ) + async def test_update_session_clears_phoneme_hints_with_empty_mapping( self, ) -> None: diff --git a/src/mistralai/extra/tests/test_redaction_policies.py b/src/mistralai/extra/tests/test_redaction_policies.py index 1cf6b3b9..cfb3fd74 100644 --- a/src/mistralai/extra/tests/test_redaction_policies.py +++ b/src/mistralai/extra/tests/test_redaction_policies.py @@ -236,6 +236,36 @@ def test_secret_patterns_redacted( assert secret not in value assert DEFAULT_REDACTED_VALUE in value + @pytest.mark.parametrize( + "card", + [ + "4111111111111111", + "4111 1111 1111 1111", + "4111-1111-1111-1111", + "378282246310005", + "3782 822463 10005", + "4222222222222", + ], + ) + def test_card_number_redacted(self, regex_policy: RegexRedactionPolicy, card: str): + out = regex_policy.redact_attributes({"v": f"card {card} here"}) + assert out["v"] == "card [REDACTED] here" + + @pytest.mark.parametrize( + "uuid", + [ + "12345678-9012-4567-8c9d-0123456789ab", + "12345678-9012-4567-1234-0123456789ab", + "abcdef01-2345-4678-9012-345678901234", + "12345678-1234-1234-1234-123456789012", + ], + ) + def test_uuid_with_digit_groups_kept( + self, regex_policy: RegexRedactionPolicy, uuid: str + ): + out = regex_policy.redact_attributes({"v": f"execution {uuid} failed"}) + assert out["v"] == f"execution {uuid} failed" + def test_string_sequence_scanned_preserving_container( self, regex_policy: RegexRedactionPolicy ): diff --git a/uv.lock b/uv.lock index a2c90e5f..44925599 100644 --- a/uv.lock +++ b/uv.lock @@ -1274,7 +1274,7 @@ wheels = [ [[package]] name = "mistralai" -version = "3.10.0" +version = "3.11.0" source = { editable = "." } dependencies = [ { name = "eval-type-backport" },