diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index e19e16701..da618215b 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: cfe6944e067faa7851832c66c9b4b340 + docChecksum: 2076c6c8658fb7e7290053c41ef07b03 docVersion: 1.0.0 speakeasyVersion: 1.796.4 generationVersion: 2.935.1 - releaseVersion: 3.6.0 - configChecksum: e989c703205a842171b583faeec42be4 + releaseVersion: 3.7.0 + configChecksum: 6e4d4ead370097a00aaaf2b4965d1766 repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: 53136f90-a575-4cae-b8d9-b64cd15c6143 - pristine_commit_hash: d18bece5899675225816b484a4335ed500dc94e1 - pristine_tree_hash: 6fc1736b4a815dcf15ba0bfe80ed6804ad66aac2 + generation_id: 4f1a65e9-0a54-41bc-8453-e5c885e89eae + pristine_commit_hash: 1983b5ccfb113368d9e8aaf6e5787e4d15ce52a0 + pristine_tree_hash: 3abe639228285bf554fdfff7cd4a87c358feec22 features: python: acceptHeaders: 3.0.0 @@ -108,6 +108,10 @@ trackedFiles: id: c25113506e99 last_write_checksum: sha1:7d01cdc71769f865d8f9f6fa58a904299a858334 pristine_git_object: 07dd761ba3392797d11b6e88e3c711f5e005df83 + docs/models/addworkflowtagsv1workflowsworkflowidentifiertagspostrequest.md: + id: 3a419c91edc8 + last_write_checksum: sha1:1c1e0157da145d417d0756a24287cfe4a204d07b + pristine_git_object: ffdb9e4130766602331b2c232fb8dc3969c457dd docs/models/agent.md: id: ffdbb4c53c87 last_write_checksum: sha1:568c13a4d6ccbd079989bd6a1af02c847e3e15c0 @@ -952,6 +956,10 @@ trackedFiles: id: ab8459b05bf8 last_write_checksum: sha1:0649d285e2893d070161b0292746b78f8efb1684 pristine_git_object: 3e249e891465a1cbb062ea6da6ddeca73453df35 + docs/models/connectoropenapispec.md: + id: 335f710e05dd + last_write_checksum: sha1:e88ee5918a2b18c3068b9a58e9a6298c41038c2d + pristine_git_object: ed2b22794d4cd0d1c245b68c067c73b1f301e35b docs/models/connectorsharetoorganizationv1request.md: id: 3365095e04fc last_write_checksum: sha1:92f4a7249771b80cc373480b4ee47c9d7e108041 @@ -1420,6 +1428,18 @@ trackedFiles: id: 4aeef9c346a6 last_write_checksum: sha1:534d41134f3e784c36a533a5beb6dd3da90fdf6d pristine_git_object: 7f3dce9726595cc7f7d13e2a51b928e3dbd3a910 + docs/models/createtrigger.md: + id: 865c3703c37e + last_write_checksum: sha1:0f02be6e51928ea6bada8fd558454aa33ca6ce09 + pristine_git_object: 5b692ad07a69bfe16f7218c4deb9bd301ad70a50 + docs/models/createtriggeraction.md: + id: d618776abc75 + last_write_checksum: sha1:7cce654a9dbf1ae23764b2fd80e761b56f5a4cd5 + pristine_git_object: 8c276759655849452987938087011af5f8708e30 + docs/models/createwebhook.md: + id: 3103d2a611e4 + last_write_checksum: sha1:8eadb1b50b07e82fed16c9fd918afdcacfcb2f29 + pristine_git_object: 44680f1af7de448c7fd3c32faf9c0ea397e5ef5a docs/models/credentialscreateorupdate.md: id: b2a0e87b0a91 last_write_checksum: sha1:6744a0910a2dd17f1336fa8f8608f38a628ab844 @@ -1600,10 +1620,18 @@ trackedFiles: id: 9e8b2520b58d last_write_checksum: sha1:3a3b017f16dba95df67cf719c3e0a7f0a6303f71 pristine_git_object: 09b7120276bcdb5462f8355698d351eca42b93bd + docs/models/deletetriggerv1triggerstriggeriddeleterequest.md: + id: d8ed7dc6b3cb + last_write_checksum: sha1:3796107b594da1905f6d95ffb2ffe36158e69cb6 + pristine_git_object: 1831853d7112934e1d6c28464c244ae0ef32412c docs/models/deletevoicev1audiovoicesvoiceiddeleterequest.md: id: aaf676347dbb last_write_checksum: sha1:b54fcfcfb0d1e528380ca273ecb6e84349ca9cd6 pristine_git_object: 0afc04f2ce115a8f48aa5f2e99b0fe02facce90e + docs/models/deletewebhookv1webhookswebhookiddeleterequest.md: + id: 20502f0b0647 + last_write_checksum: sha1:e1106d982bb52d77f82144bd8a1988834d5563f2 + pristine_git_object: 79cb040ed72d3be0dca50cf8f27108ac65ed71df docs/models/deltamessage.md: id: 6c5ed6b60968 last_write_checksum: sha1:c49575abe1bb581db1ae497b7a3b1ff2820abfbc @@ -1616,6 +1644,10 @@ trackedFiles: id: 6e698d27f72d last_write_checksum: sha1:e13120959ebef255d8d9dba09508c572e3bd5642 pristine_git_object: ec8b7e7b5fa7dbbd51d79ede5b259e7b42ca8826 + docs/models/deploymentarchiveresponse.md: + id: c9806b9cd328 + last_write_checksum: sha1:1b4eb9f791fde0b33ec049c8c87516b618a20fec + pristine_git_object: c2b2b8d310b1f554198690a3cb644698453a93b8 docs/models/deploymentbuildstate.md: id: 7019a1189d21 last_write_checksum: sha1:9b6733368e984fb7267420507282b72bbd9f617c @@ -1690,12 +1722,12 @@ trackedFiles: pristine_git_object: 2f1d4bc3cb1e2c7dae1ba59235b5c82af28c6aca docs/models/deploymentworkerspecinput.md: id: 1cd06cd8089d - last_write_checksum: sha1:f548c5cef035d51fe112249f575696ed71aa8ffb - pristine_git_object: 616e9aa173439275b5008830f4d6e4d75f3ce589 + last_write_checksum: sha1:83ce5b488ec222a40f92d9a5e446bd3d4dc81dce + pristine_git_object: 998865a7dfc9b90003c76c435cd88aa4b764c522 docs/models/deploymentworkerspecresponse.md: id: cad5b4a16cab - last_write_checksum: sha1:bc75fc1ab4e40698bf0fed8412078d755f96b56c - pristine_git_object: 8c857ee32f5f82649568050ba5cd2235f8d9ac51 + last_write_checksum: sha1:c33768f431534823eaf8eb8a32999606513424dc + pristine_git_object: 31b742e8652c4d0e3c19f1cca8208be5aa5f0063 docs/models/destination.md: id: 687894272b1a last_write_checksum: sha1:4d201936acfdd6e3424b57d8f71e306564314b8d @@ -2136,6 +2168,10 @@ trackedFiles: id: c8c1559b454f last_write_checksum: sha1:98b580deaae5c4720cf905907db49e966b5e294a pristine_git_object: 073ab76999d4f1b8b0b6b89feacc5137b156c4e5 + docs/models/getdeploymentarchivev1workflowsdeploymentsnamearchivegetrequest.md: + id: 48a8ec1a873b + last_write_checksum: sha1:96696ccb98ef2de106f13156a7cce49bf446c886 + pristine_git_object: 4fb0d705e148a0eeced6e594249461c13fb01334 docs/models/getdeploymentlogsorder.md: id: ac011698ccfe last_write_checksum: sha1:825be68cb64e295447a725b7d03195667226fd92 @@ -2202,8 +2238,8 @@ trackedFiles: pristine_git_object: 154ece82c1932053d4764d7d8fb2ab0f394027b2 docs/models/getlog.md: id: 1302e80d8cee - last_write_checksum: sha1:124888d01c22fca2b7a2567711258648c1d1b454 - pristine_git_object: 7a1ab4b9a682bc5943b8f29a6f416d1c657d2939 + last_write_checksum: sha1:c1353fe963d03a40b2b491c176bd06d8dc6b892c + pristine_git_object: 4b618a2214ff43b598cae2d3fd3def7b31e254ba docs/models/getlogfieldoptions.md: id: d0cb1bd3a1ac last_write_checksum: sha1:aaccad0bc2f03efea4fe2ba4dfe152f4445e4568 @@ -2294,16 +2330,16 @@ trackedFiles: pristine_git_object: d9fb6c41debdd66ababc0337f231133d17af5493 docs/models/getspan.md: id: c94b8e82cc0c - last_write_checksum: sha1:fb098efab596b43e8fcc5ba4e5af2f298b243779 - pristine_git_object: eeb9a38b82b149685e8a22ca8776419c76553a5b + last_write_checksum: sha1:a8c98bf0fb96dd691467821990c9f1a1264d1f63 + pristine_git_object: 35a7b74c6edccd5008a3f27572eccbab22e1e539 docs/models/getspanbyidv1observabilitytracestraceidspansspanidgetrequest.md: id: 00787737ae5d last_write_checksum: sha1:d8b3eeb8719a1434a588398c6696efce10f8bee5 pristine_git_object: 700096880328bbbd651dd4eb6c8c0a48c19ac1d8 docs/models/getspanevaluation.md: id: cfdab85f925f - last_write_checksum: sha1:d7ff5a5af2134c79bd4d3c3a985ffc8585538da7 - pristine_git_object: d1365ad3a2a34a715e5a558c769a5f8bffdc079e + last_write_checksum: sha1:bfdc683e63c4916b4972afcc0e07766b1aa6c590 + pristine_git_object: fa9832b0ee2ac8df5204c8b244d5e626faaa9123 docs/models/getspanevaluationfieldoptions.md: id: 122f17a4cbab last_write_checksum: sha1:31c11d4d3a2e0e2bc8ce26d8caad48de1bbecb7d @@ -2358,8 +2394,8 @@ trackedFiles: pristine_git_object: 8c959e39e9e98f88886eb1d80190fba365447684 docs/models/gettrace.md: id: e6e0f02a25b6 - last_write_checksum: sha1:a9c760d6f33d97e5a3d657646cbfc53dbdd4a4ac - pristine_git_object: 245bd8eb25e5304a05053136dcf01cc360ea1da8 + last_write_checksum: sha1:c8555c52788664b78b14789c33d4d33e08d9a9ee + pristine_git_object: d32944ddb5de6637362b12665102a81ab2e1c9d5 docs/models/gettracebyidv1observabilitytracestraceidgetrequest.md: id: 6aa95bf83ddb last_write_checksum: sha1:e53c356c3d2e65934c90b832ac76b0fe0ce0c858 @@ -2388,6 +2424,10 @@ trackedFiles: id: 78072bc7d38b last_write_checksum: sha1:e2b20fb98e67ed327a6ae2c48dd3ba6afa68ae06 pristine_git_object: 9c8d0c57b4fdebc8eb7901f5c619f699340c268e + docs/models/gettriggerv1triggerstriggeridgetrequest.md: + id: 987f4d41d44d + last_write_checksum: sha1:ba9c3a9bb384089aff50bc471ed7324da903941f + pristine_git_object: d00ffae47fe3415740220b6426bc933f571c000b docs/models/getvoicesampleaudiov1audiovoicesvoiceidsamplegetrequest.md: id: fa1b72f3aa6b last_write_checksum: sha1:10b8897bf884ac876559ef574a76bee6df3b7afb @@ -2396,6 +2436,14 @@ trackedFiles: id: ff2e9c3966c2 last_write_checksum: sha1:83baeac8591dbf035dd1c04fbe9c06e0e65afcd8 pristine_git_object: 09caf65c1d4f3415ccf2a1095a54748a7f6ca2df + docs/models/getwebhooksigningsecretv1webhookswebhookidsigningsecretgetrequest.md: + id: 9dd1136e099a + last_write_checksum: sha1:9139af1e7d35af30825970e168ba5a68cf36a7b4 + pristine_git_object: c4764f210ee492cfbca9699a2d306bc6ff74c141 + docs/models/getwebhookv1webhookswebhookidgetrequest.md: + id: a4a03bf358a2 + last_write_checksum: sha1:e045cf9bbd852250e7831f2a149e6986c813a565 + pristine_git_object: 5fc3c841c28d8b433f05a2000b93e793fe9e0fdf docs/models/getworkfloweventsv1workflowseventslistgetrequest.md: id: cb48ac6b32b0 last_write_checksum: sha1:7194b7cd11b927fefdf242e651d8cdc705680f30 @@ -2538,8 +2586,8 @@ trackedFiles: pristine_git_object: a83894376f6491d9c600c1b9469ae09cfa0b3830 docs/models/httpconnector.md: id: eeb95c7a05cd - last_write_checksum: sha1:09486bfc1d06f59474ab353d76fe2d0a22766e58 - pristine_git_object: 75d6ff0a10af716d9d0abded5cea8ffa6d48247d + last_write_checksum: sha1:627610880c846a5fe6a761e34856c30edce9845d + pristine_git_object: 720197af18ab0070f3eaf5d790464db2cc4af460 docs/models/httpstatus.md: id: 88abba969ffd last_write_checksum: sha1:088800f9bbd8ce7db0f1dc948044558fef268636 @@ -3056,6 +3104,14 @@ trackedFiles: id: 6d0348014cf3 last_write_checksum: sha1:1b0db546c947944285a6d10cc7615cc55f2056bf pristine_git_object: f4a4df8f701b307b6dc58e13011c88ed93a7d704 + docs/models/listtriggereventsv1triggerstriggerideventsgetrequest.md: + id: 7fea7eb325bb + last_write_checksum: sha1:bfa5ea2c31e9663e940befd61d2a16d37d08bf78 + pristine_git_object: 7c717b2944b663f615b32ebfaf6926b896a7a974 + docs/models/listtriggersv1triggersgetrequest.md: + id: d0393236a63f + last_write_checksum: sha1:219ac6aeb761c81c2fb4f2de209a75a1bf187cbe + pristine_git_object: f22c8404f61b22c5bec44354ae273b0b224f59ef docs/models/listvoicesv1audiovoicesgetrequest.md: id: 2728f62b4ff4 last_write_checksum: sha1:ef9581d0fa6fbabde734174727c9600fd46c9938 @@ -3536,6 +3592,18 @@ trackedFiles: id: 5258de4242cb last_write_checksum: sha1:858c8e3e3d2e6d588ac18623a6fe9fb83f3d70d3 pristine_git_object: 9e2452d77020c65a220e09bce21bf68a4a1b6ee5 + docs/models/openapifilesource.md: + id: 61840300294b + last_write_checksum: sha1:a6ce93bff25e333f6f55acad591a35563736026b + pristine_git_object: 6c88e6dbe6730a4db88ea7be58e8783044d17d0c + docs/models/openapispecsource.md: + id: f660c5d0ef4d + last_write_checksum: sha1:02013f2a1ed353fe3c3db14713cb298766eaa1c7 + pristine_git_object: 9afea5df8292b79e201ecb92b7600640fc5155cd + docs/models/openapiurlsource.md: + id: 2b8452a4c388 + last_write_checksum: sha1:4e9e9d7ff74a27d9c44eae26840ff112554ee045 + pristine_git_object: 5282361fe44dabf8cabac16016f440f24f20aeff docs/models/operator.md: id: 1b6d3fc58add last_write_checksum: sha1:75e19fc8da4d7427f61372f06e200c73387099d6 @@ -4914,8 +4982,8 @@ trackedFiles: pristine_git_object: 512806fbfbe9ff7a67e551cda72dae43a9f2565c docs/models/skillslistrequest.md: id: 98bee99e9885 - last_write_checksum: sha1:555b779d2a2b352d034152f9e7b7261c9e2a2029 - pristine_git_object: 322f5c2185adeba6ab5e2c5c26e134eb5b67ca4e + last_write_checksum: sha1:3f53f87b62a5e1b119f1540b671d285468a0a130 + pristine_git_object: abfbe408cecf958b08748f07300189d963da3640 docs/models/skillslistresponse.md: id: 086be6025c04 last_write_checksum: sha1:cb5a96c2bb085fa3b50fa924e66dbddfad2ddb15 @@ -5194,8 +5262,8 @@ trackedFiles: pristine_git_object: d6287bd23a85c5c6b00c7a051322249a0d2d72a4 docs/models/systemv2.md: id: 9d388dd8520e - last_write_checksum: sha1:e5c08f30767122d899bb609cd8396c42252088a0 - pristine_git_object: 068ac38ecfa94d9db09df6f4eb6212b6dc18c98b + last_write_checksum: sha1:07c41f3b478dea306a45dfa9a7a7c07182ccf91b + pristine_git_object: 811af984b600e9685ddff1a3f44558f40e3fdf16 docs/models/tableformat.md: id: d8cd08c55c3c last_write_checksum: sha1:3ef23d504527602f2d0789d2cfb1a6629115f41a @@ -5536,10 +5604,42 @@ trackedFiles: id: 7026de9d2e76 last_write_checksum: sha1:6c1a5e4711af9c656c5556f8c9514eafd7402bd5 pristine_git_object: 7c2cec653113185edd0af67dc49f5879dffb43b7 + docs/models/trigger.md: + id: 440750569a4b + last_write_checksum: sha1:d3f5c00ecd7d5f756d5bb26c8dd9ea3a05cb8d9e + pristine_git_object: 7c3ef3b467f9855d9ac77f44e92f4d3e89c3ea96 + docs/models/triggeraction.md: + id: fcc4c2236cd6 + last_write_checksum: sha1:b46006dbf47272f73fcc49d8d2f858dd7590b810 + pristine_git_object: 48cc6d9537f245fa412f4745e970e7b3834269d7 + docs/models/triggeractiontype.md: + id: 9296ab724f3c + last_write_checksum: sha1:3407bc2bbc4c384d976cc726765927aa59357c8e + pristine_git_object: 26bdfe93b3f8d7c759a9cce0acd243549c636bf5 + docs/models/triggerevent.md: + id: 2f47bbbd0ce7 + last_write_checksum: sha1:37881e092c40c24e2c222f3e3da3ad043379b51d + pristine_git_object: 343aed98a344cedc447cb1535d7a11dd6b31d83e + docs/models/triggereventlist.md: + id: 06a04a36d400 + last_write_checksum: sha1:8fc66b10517d67ed5f6555612811a47874ae5265 + pristine_git_object: 5b89338bb60d0e1d5b7114f4033859003ce6f22b + docs/models/triggerhandler.md: + id: 868abb40b3bf + last_write_checksum: sha1:79e1bdb1ebce8cf4a03a4e8c16baecd1526c07bd + pristine_git_object: 521c76513788ae322470d8f939f403739613d127 docs/models/triggerschedulev1workflowsschedulesscheduleidtriggerpostrequest.md: id: 6398ea20f152 last_write_checksum: sha1:3ccfe5613e51fb139cb37a31f03cb3d64a8439db pristine_git_object: 5ddbf9a7ca7502b8d58df20eb28f5d8a4cc5962c + docs/models/triggersownertype.md: + id: 987544ed07b0 + last_write_checksum: sha1:260579e5322adae90585270b57bbf5e10ec7a3bd + pristine_git_object: fca093440c9963705bd66e8cc71dfcb9486984e9 + docs/models/triggerstatusvalue.md: + id: 9dccb8d7084b + last_write_checksum: sha1:b12b746e6d84da47dafaec9c05094e01c623a1bf + pristine_git_object: bd7b41dc87275f0a983278c59670ef69007a5503 docs/models/truncation.md: id: 075cd6c561df last_write_checksum: sha1:f1313c40232729f3b275736c78c1f42e63d14659 @@ -5946,8 +6046,8 @@ trackedFiles: pristine_git_object: 47d317fc64ae6c35b1924c79dfe0b4f668651e0d docs/models/voicecreaterequest.md: id: 1014a6e8d549 - last_write_checksum: sha1:329f21c64fbfe54d13313c51ac92a57d268fe5c3 - pristine_git_object: 5cc2d972e9b2ca13b19b63cc796537ab7618859b + last_write_checksum: sha1:22888ec313c60708811688e0d134a6e47bd0b502 + pristine_git_object: 365ce79c3ca35dd0adc4bb0a7547138799cf506c docs/models/voicegender.md: id: 64611cefbb5a last_write_checksum: sha1:84778b9e7284f24d5abf2b88f283665dbe7ab991 @@ -5974,8 +6074,28 @@ trackedFiles: pristine_git_object: 4fd44508028c881e62d1938ece441f42d2949a69 docs/models/voiceupdaterequest.md: id: 7fbbdd315066 - last_write_checksum: sha1:57171f91ad4a1c3d8d88b69662bb8343763e09f0 - pristine_git_object: 2747aa9950fcdbd99018a8be6a9b5f990aa4eb40 + last_write_checksum: sha1:468cb44465846b7aa242bb5c41279700ce7a6d96 + pristine_git_object: 23b8f1d005fcbb85ea564719cfa42d5d1bb1d83b + docs/models/webhook.md: + id: 20220f003054 + last_write_checksum: sha1:ceb9956ef1136df43e70e38918f8b7e246a7a469 + pristine_git_object: 46d39b92c03efc5c9a46f841daf5e70495c18f13 + docs/models/webhookprovider.md: + id: df0553e72901 + last_write_checksum: sha1:57278c05a7fa02c7948ea6f833e0c62ab06960a3 + pristine_git_object: 6c282f6d6c5826932c2907b75209283d38db67b5 + docs/models/webhooksignatureencoding.md: + id: d192333b310c + last_write_checksum: sha1:f545b37a6cc07e86b2c4cd624cc23ecae126ea24 + pristine_git_object: 313d11a5bd8d1cfa0142fbc36134dec32f82b412 + docs/models/webhooksignaturehashalgorithm.md: + id: 3679b9c54649 + last_write_checksum: sha1:900974f0dec3c216736fc4cff19665c2c19e33f9 + pristine_git_object: 60010349ed1d4b217948007ae293d72d7642ba43 + docs/models/webhooksigningsecret.md: + id: 8c063469bf2b + last_write_checksum: sha1:a302f2ad03b6ad385d00d8b0e11dcd42cdf252db + pristine_git_object: 14c35a1b0e3e4bd7302c228d701cdd3e06b95378 docs/models/websearchpremiumtool.md: id: 267988aa8c3f last_write_checksum: sha1:38f80a43f73a13ddedc7730f853c092a48b665f9 @@ -6202,8 +6322,12 @@ trackedFiles: pristine_git_object: af919c68028854c00c2b611bd79235dc24d52fda docs/models/workflowsworkerspecupdate.md: id: a7af8bf36e09 - last_write_checksum: sha1:96e43e57d821f3f268374a7c2577ba941cc7abf5 - pristine_git_object: f4a50e0794c5e76d254aefb16458b6c404e28ec5 + last_write_checksum: sha1:9ae0f611273a26d7f44fb0755bb4574363ee926d + pristine_git_object: 1a7eac7018b82b2b9558038a708b6766f65208d5 + docs/models/workflowtagsaddrequest.md: + id: 90d3e59be6af + last_write_checksum: sha1:4a4f5c1b6ce6fda985f5698e0adebd47f776c825 + pristine_git_object: 6ddaf50358d7745bd9e2e6689e42f6006c8040cd docs/models/workflowtaskfailedattributes.md: id: 7f329c44d7fb last_write_checksum: sha1:432c70ec990e81e2de79c14efbbb6161b60e1b3e @@ -6276,6 +6400,10 @@ trackedFiles: id: 7633a87d946d last_write_checksum: sha1:8bda49ab537c80fc64d2101dc8805a7bdbc5009c pristine_git_object: 27998993253580c3437153cc816f83a2a6979b41 + docs/sdks/contextsearchindexes/README.md: + id: 9f2adeab6c2a + last_write_checksum: sha1:9854b723e0374a8aa8dda681ac2e86367bf10149 + pristine_git_object: 86cde143a5a08a3e0396120341792047a38b89cd docs/sdks/conversations/README.md: id: e22a9d2c5424 last_write_checksum: sha1:d0a4e55b1f1c9acc6e9b7cf5925faf930a911d26 @@ -6290,8 +6418,8 @@ trackedFiles: pristine_git_object: d6a095e3d7ab169613a8b3338fa72508235d0729 docs/sdks/deployments/README.md: id: e7c5559ab768 - last_write_checksum: sha1:92bc821cd27d1125ad1b26c57a36c00d2519ccb5 - pristine_git_object: 5deb17c8bc0bdc6725ad4a8c39fb6fc8fe79fa35 + last_write_checksum: sha1:3ad3b133b0fa416297b39117c8ebc25d95318d36 + pristine_git_object: 8370638e400c2c257cbb2829afb928dbf27341ea docs/sdks/documents/README.md: id: 9758e88a0a9d last_write_checksum: sha1:57b97c82e4a26a51efa5fdf1995f8f55b6947f78 @@ -6352,10 +6480,6 @@ trackedFiles: id: 5adacd63da21 last_write_checksum: sha1:6f230ad86d99a2a916ffd42437edb02f7f71a514 pristine_git_object: da7cb5a91dd8982dea2b38e1fbc000ec233396c9 - docs/sdks/managedindexes/README.md: - id: 24213eb90409 - last_write_checksum: sha1:cd58854022bb4373cbbafbbb899a6e83c49135a1 - pristine_git_object: 86c00374f68c20a26daa9a04a23ccab87af2a4a0 docs/sdks/metrics/README.md: id: a8545d964e21 last_write_checksum: sha1:826a1a941e7687218cd0670e4fdb1f7a65118464 @@ -6372,6 +6496,10 @@ trackedFiles: id: 51c08468cf58 last_write_checksum: sha1:ee12d2a70c3b963055d0c3e1f89ed7043f841971 pristine_git_object: 054c7233896226df670804e3d977d27c966df53d + docs/sdks/ragsearchindexes/README.md: + id: 16979d558b1d + last_write_checksum: sha1:bf6259fabb8f7d65993f073e58f58d831bfdaabd + pristine_git_object: bf6c052b2dd3f473524a6401bfac46670dca2241 docs/sdks/realtimesessions/README.md: id: 9ecc8ee669a5 last_write_checksum: sha1:73bdf3ff4e98863534439cd1b37b455a27cf4cd7 @@ -6384,18 +6512,14 @@ trackedFiles: id: 2f28c809a225 last_write_checksum: sha1:ed27d25b618632207500e122efa02e948d7f9b38 pristine_git_object: 693ddf7603e063695eea96134b8125f31b7ecb7b - docs/sdks/searchindexes/README.md: - id: b58e7a6ab4f1 - last_write_checksum: sha1:bf6259fabb8f7d65993f073e58f58d831bfdaabd - pristine_git_object: bf6c052b2dd3f473524a6401bfac46670dca2241 docs/sdks/serviceaccounts/README.md: id: f172389e7190 last_write_checksum: sha1:b5ef427193fad28f1b156cb0137fe54a27f2c79d pristine_git_object: 28ba82968d32757bfc2f742f2a22b4b3b00bbb04 docs/sdks/skills/README.md: id: 3a14a5c90791 - last_write_checksum: sha1:c9e2abe7f69ba015160191e327185785e38535e0 - pristine_git_object: c0339ef9d33793b7e15581fdf0693fc4ce5b9f21 + last_write_checksum: sha1:cddc42a86ed34b38d6e0518ae6aa1efb93be9a98 + pristine_git_object: 8b48e01616d60a11e5ce072e9181bb01fa3064f9 docs/sdks/spans/README.md: id: 594028be109d last_write_checksum: sha1:20c480912fcd4b344a0c053e358add1f51777827 @@ -6412,18 +6536,26 @@ trackedFiles: id: 089cf94ecf47 last_write_checksum: sha1:70fd085d2ed65ce114fcfe8bab0c547c45bd26af pristine_git_object: 1fdee0acef98b28e600ebc58c6e539d984cee0a4 + docs/sdks/triggers/README.md: + id: 6706220e8a9c + last_write_checksum: sha1:26ca6190d23c3bb111ae05cd22a2987607cb89e0 + pristine_git_object: 71859867f715643ccb16cb51594d07414f38b93c docs/sdks/users/README.md: id: 5d80027045fe last_write_checksum: sha1:d974bb8c02961043a289d55a1d9cee5c21fafc36 pristine_git_object: 2add30581e137a01bf6d49928fcba2c5b24d33c7 docs/sdks/voices/README.md: id: 4f1a657c8f68 - last_write_checksum: sha1:cf3cb90e9fa35fba2f3625b0260805fb45543e63 - pristine_git_object: 941c6bb5d8685e62f4be9a311123a1c73d555551 + last_write_checksum: sha1:6868e0cf21ff101be1f3e5e234bf18cf4f0af035 + pristine_git_object: b65bc329498ec586903ca83fc37ce01ebff23995 + docs/sdks/webhooks/README.md: + id: e21b32d786a4 + last_write_checksum: sha1:e0998b8b5fbffe7f6a825d28f50895c1c61bf50b + pristine_git_object: 768e58f125f420e60fd764a7b2871da98f7e6d64 docs/sdks/workflows/README.md: id: 80c76ce944c0 - last_write_checksum: sha1:4ffa1eec7f076e12280b9bcc86dbda538096ef24 - pristine_git_object: 5da2fd8245527fba839ccc85de4efde9e1864984 + last_write_checksum: sha1:59ed88c7627fdd4c02ca90354c6c739b7423a0f6 + pristine_git_object: 16cba2aa024b191cfb49eb5c119ed1281a50299b docs/sdks/workflowsevents/README.md: id: 514b42269280 last_write_checksum: sha1:e1f79ed953c3f14770bb8d3f01ff84ac26ac0f26 @@ -6462,8 +6594,8 @@ trackedFiles: pristine_git_object: 5052bb072d14c65419bf49bdc1a47500cb03ae56 src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:eb2f38c76b6186585c38f1a15cb08e729b316504 - pristine_git_object: 729425f91764a66b7771d3c38a92436dc4c640f5 + last_write_checksum: sha1:de8982b337897c29d89b353d48763bf32dc180a4 + pristine_git_object: ccdd84d587c221f562f0d09159459100f8ed8420 src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:414c7375fcd63266d196840fa8d1274d60aae2dc @@ -6474,8 +6606,8 @@ trackedFiles: pristine_git_object: 33c5dc7a4df43b29440c9dbad331ac8d7687f7fa src/mistralai/client/audio.py: id: 7a8ed2e90d61 - last_write_checksum: sha1:099cc88835f202ea25d9198e3dd3b442dbc4ebf1 - pristine_git_object: f3ce69ba7ac66727a9fe9bb7e526f14a0ed3367d + last_write_checksum: sha1:fda6a0328013127fc2808df4541cacd5dda3dad4 + pristine_git_object: b90dfc5a956356c4914741c5f2796d261d867058 src/mistralai/client/audio_agents.py: id: 51d0d033a222 last_write_checksum: sha1:821781f7939a513d740d18c5ed71d685e2daa627 @@ -6494,12 +6626,16 @@ trackedFiles: pristine_git_object: f2c04da0896816f402e48047bb51e0692213e13f src/mistralai/client/beta.py: id: 981417f45147 - last_write_checksum: sha1:d6dd904ad18838bf4192ed5f21349da415f5c92d - pristine_git_object: 37297dc8ac14e0f0a94175e3d21cc8ca7fb16ce2 + last_write_checksum: sha1:6637c19308c11325c0f504f2ad8c04d038c2091c + pristine_git_object: a0eb7813f1901b1c62b09751c1bebb0a558aa1e0 src/mistralai/client/beta_agents.py: id: b64ad29b7174 last_write_checksum: sha1:5915e0fad1ee46d11684eca33c512a49560346da pristine_git_object: 60d085f5239bb5142bcd241428f62a1007eec24c + src/mistralai/client/beta_context.py: + id: 9760702adcf8 + last_write_checksum: sha1:eb9f1be7e6a3f09cc4897cbb55db12095eb43579 + pristine_git_object: d3776b5313ea3e147969ad48d76b8ae6821fcadc src/mistralai/client/beta_prompts.py: id: bb124f107a50 last_write_checksum: sha1:d4db5b7c176a0f65ef9bb023d26a06d41e2cbaf3 @@ -6516,6 +6652,10 @@ trackedFiles: id: 39da03126050 last_write_checksum: sha1:fab4fe914f7e7169fdc697ffff0cddde2393ae87 pristine_git_object: bb3fc4a1e937bb523427281f30e7373d00c13c15 + src/mistralai/client/context_search_indexes.py: + id: 4ce058aafe7b + last_write_checksum: sha1:7ac3d369727b6331b0a596b0c10a33027839570d + pristine_git_object: 74f86ccc34bb10ff6bf510897a1211b9ef30b47a src/mistralai/client/conversations.py: id: 40692a878064 last_write_checksum: sha1:37a8e5b453f5cd77dac8cfec4e2a744285069aa1 @@ -6530,8 +6670,8 @@ trackedFiles: pristine_git_object: 3c56085cbad0bb8b72c47f65bf71662dd84d6c14 src/mistralai/client/deployments.py: id: a874b267fcb9 - last_write_checksum: sha1:71121d51e6c8cc160761511783725c1b92d60293 - pristine_git_object: 310cc260dc8a6de9abaa842378183da73558d082 + last_write_checksum: sha1:91a166899a60a12da176c16f9c4015bd742b81fc + pristine_git_object: 0d0f4fa61f45ab8c1eed5e71a8b5c8d0ebdbec51 src/mistralai/client/documents.py: id: bcc17286c31c last_write_checksum: sha1:a8cf00aa683204dc4cfd72d38debe6ab98dbc594 @@ -6624,18 +6764,14 @@ trackedFiles: id: 8cf582f9ca81 last_write_checksum: sha1:9ab5033d9a792bfb61a1fbfdc8ae61e24da488b0 pristine_git_object: e7755cdc9230bbb9a87fff16930099911959c558 - src/mistralai/client/managed_indexes.py: - id: b6dd0fca653d - last_write_checksum: sha1:26c6d9a04c1b87e60221efbb1cef9a4b69bb0c38 - pristine_git_object: 0e5b80e29cb9acf864055c4ae8394c9421bc4a30 src/mistralai/client/metrics.py: id: 937cb03f8130 last_write_checksum: sha1:461f34f2e6b943241208de01bbbf5f57ec6a31b4 pristine_git_object: 41d7f799e8a2afa860b4193f7752e094f1c624b2 src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:f9019f990040b4bdc89401030f4a2d489214cd8a - pristine_git_object: 4c21494c59eefea68c1c910af8094ab9654a2a25 + last_write_checksum: sha1:51a056cb4aaaf0093026ae2c4b02027c4b75cc65 + pristine_git_object: 4cc0d5397fa44f226ed41971cf13357d2f23114b src/mistralai/client/models/accepteddocumentresponse.py: id: f529b784daff last_write_checksum: sha1:2eb3c7dc0d7165987aefda841b1ceada6698c15d @@ -6672,6 +6808,10 @@ trackedFiles: id: d01ef9cb3955 last_write_checksum: sha1:a9db06c787a8b9e72d81435675d969891b95f8e5 pristine_git_object: 800b91cc3697b5fad3c256169f39d318d6c0e053 + src/mistralai/client/models/add_workflow_tags_v1_workflows_workflow_identifier_tags_postop.py: + id: 55327aade75f + last_write_checksum: sha1:2cb2cb5f7824307ae55d34786ff253db0ed85fda + pristine_git_object: 8237d21dab0b693bcd0ed8bc3ee9c15f2f7ed71f src/mistralai/client/models/agent.py: id: 1336849c84fb last_write_checksum: sha1:de7ce5efebefb928e6c44844e6945d93a113d5c8 @@ -7320,6 +7460,10 @@ trackedFiles: id: 8b7f3521ec95 last_write_checksum: sha1:6cbdcf8ef6a71255cd988628fc19da12cef3b75e pristine_git_object: 3189aa2eccf3f5cf96ee9ad1465266e223c074c7 + src/mistralai/client/models/connectoropenapispec.py: + id: 8637823d061f + last_write_checksum: sha1:1547b3ee33782f66d1716cff3381730f4893d17a + pristine_git_object: 072d3918a815cdee11ddf52843667a35e4a3e51a src/mistralai/client/models/connectorsqueryfilters.py: id: 3b9fc81aa726 last_write_checksum: sha1:fb9a3328a1ba2bd8089b4387cb4f1b379fe1d7b0 @@ -7524,6 +7668,18 @@ trackedFiles: id: d5d19aa97adf last_write_checksum: sha1:f57fc464897d1eb5ad263a3efa022932bee8580d pristine_git_object: 24cea8e06328f8bff7662b6674b232953df17fb6 + src/mistralai/client/models/createtrigger.py: + id: 494992a1b245 + last_write_checksum: sha1:7c2b1916bba272e4492b905d89b459bd64c0580b + pristine_git_object: 1d7d8fcfe412754cd2744cd510db2be1b4e55072 + src/mistralai/client/models/createtriggeraction.py: + id: 53806d5728cc + last_write_checksum: sha1:b1cb439053828bfde0d52372c677a97ffcf378b2 + pristine_git_object: 357297ea953718e2968389375368950c4040fe6a + src/mistralai/client/models/createwebhook.py: + id: 2d412260fe2e + last_write_checksum: sha1:d328392bd04655aea73883b0de1c9c3c157872b1 + pristine_git_object: ef808bf9e56be47f176d0d824509edca4a20479e src/mistralai/client/models/credentialscreateorupdate.py: id: 9927546f2487 last_write_checksum: sha1:68fcdfe367f5ece20c03adfbe82cd98395e2adcf @@ -7664,10 +7820,18 @@ trackedFiles: id: 4c12d7361d00 last_write_checksum: sha1:7deabd71ae6607989147d681a25658fee299981a pristine_git_object: 6f43e521330a7e03167c16a0897aef12713defdd + src/mistralai/client/models/delete_trigger_v1_triggers_trigger_id_deleteop.py: + id: 1800a2d3106b + last_write_checksum: sha1:091856924fc829189ebfa7d368092111cd640a32 + pristine_git_object: c3a033b0febcb77103d3f523a8edf70dac15b2a7 src/mistralai/client/models/delete_voice_v1_audio_voices_voice_id_deleteop.py: id: a84ce12a8251 last_write_checksum: sha1:c4c25619eac86da3c23b195647a56da54e34f2da pristine_git_object: 14775396ce5bef87c3c08f955e16d23fd3dfbcd3 + src/mistralai/client/models/delete_webhook_v1_webhooks_webhook_id_deleteop.py: + id: 95e325fdeec2 + last_write_checksum: sha1:9f4484e1c6c5a8bf2671ffaeacdb047cdd1db085 + pristine_git_object: be123a3f91e66210e1c7ce4a4f723b3ebfad0094 src/mistralai/client/models/deletebatchjobresponse.py: id: 79a43aab6cf9 last_write_checksum: sha1:2945387a313395e7bf8ea8344ca088d0d6b55f6a @@ -7712,6 +7876,10 @@ trackedFiles: id: 144d264e128e last_write_checksum: sha1:7242eed5d7f9e6abc608fe1d235d491a4a21a0db pristine_git_object: f13c706a211f70568d609b69ca03474a1cc43779 + src/mistralai/client/models/deploymentarchiveresponse.py: + id: a7a3d2ddaec6 + last_write_checksum: sha1:15288b3f6034b6679fd28f9197d336cd44a19539 + pristine_git_object: e09759af8ebc1b3af2334ae43aac0f08fb93de1b src/mistralai/client/models/deploymentbuildstate.py: id: 61e9001287f8 last_write_checksum: sha1:1495ac929b42b454a229d26644005b3868dbd90c @@ -7778,12 +7946,12 @@ trackedFiles: pristine_git_object: 9d890efe21490dde13316d7072bea5cd27ae7086 src/mistralai/client/models/deploymentworkerspecinput.py: id: 635133e69342 - last_write_checksum: sha1:11c7eb22eacb3bdec873e067151656cc21204180 - pristine_git_object: 44ee3db68a474d5af1487d1848350d1565f7ab50 + last_write_checksum: sha1:3d86ffc26fe4d368a3ab2f274a076ea25461f93d + pristine_git_object: cd64633637d84fdfd1227af65dfcace7aef98975 src/mistralai/client/models/deploymentworkerspecresponse.py: id: e56d154527fd - last_write_checksum: sha1:bdfa3a8d8905479a71b18b016eccf9d6404a9cee - pristine_git_object: 5b44534527c1508027157655e0516d56484e2171 + last_write_checksum: sha1:2b336a7d4306513fb16687ff5509c302befdeb21 + pristine_git_object: 5eaf78443eff8e602c0aab21584017950520d752 src/mistralai/client/models/detectiondefinitionv1.py: id: a37492166ac9 last_write_checksum: sha1:8b3faadaf93fe76468bfc55ed9326f28ed0ce9a8 @@ -8160,6 +8328,10 @@ trackedFiles: id: 3e4f4e2447ac last_write_checksum: sha1:033fba3dbc2fd31ffbcc83fcd7145e75201c9973 pristine_git_object: 4d8fa5cc9d6cb16a7c53298818cda9b5704b6bec + src/mistralai/client/models/get_deployment_archive_v1_workflows_deployments_name_archive_getop.py: + id: 2f77ece66f19 + last_write_checksum: sha1:b4e574bde40f046de0a4449a01901e0c2ff96386 + pristine_git_object: bd0efc99fce1b0b607ef028f82f9ab90292d66ee src/mistralai/client/models/get_deployment_logsop.py: id: 5d6df36b14ff last_write_checksum: sha1:426147690862d820c5b5bd88e0e258465a4507af @@ -8276,6 +8448,10 @@ trackedFiles: id: e0cacaec1f92 last_write_checksum: sha1:93021cc0a3064fe72007107addb75097d3c63b7e pristine_git_object: bd8c487a64fef5d4b3f4b6f1d99de822ca14d908 + src/mistralai/client/models/get_trigger_v1_triggers_trigger_id_getop.py: + id: a180c90aa0ca + last_write_checksum: sha1:8bda99f86f6ee7fb44d8d71f371ad68433a198b4 + pristine_git_object: 11deca7fc8ed84075f226a2d4435a7a1227525d1 src/mistralai/client/models/get_voice_sample_audio_v1_audio_voices_voice_id_sample_getop.py: id: a5838063aee4 last_write_checksum: sha1:700734d9e52f8295daee46c7ac911426f7c1b454 @@ -8284,6 +8460,14 @@ trackedFiles: id: b6ca849d5005 last_write_checksum: sha1:b6ef71fb653fadec743608185749b13b57eb665f pristine_git_object: 65c2156a6438289954a97d6c21a11083b79a6954 + src/mistralai/client/models/get_webhook_signing_secret_v1_webhooks_webhook_id_signing_secret_getop.py: + id: f47d3841df15 + last_write_checksum: sha1:8d55789ad667acdb937b66a5afdedd1b703fed73 + pristine_git_object: e9585702de82f00c2330888c89425c7906727ad2 + src/mistralai/client/models/get_webhook_v1_webhooks_webhook_id_getop.py: + id: 9bad5b46538f + last_write_checksum: sha1:47506bcdca81e4b2ca609c939d077d4fa195f68d + pristine_git_object: a9363c578168349b2c8a6b63967cf3b72e5ecb1f src/mistralai/client/models/get_workflow_events_v1_workflows_events_list_getop.py: id: 9d6d093835d6 last_write_checksum: sha1:aeda6e2c6b0905172b0d1f851f12b89eadcec0ed @@ -8358,8 +8542,8 @@ trackedFiles: pristine_git_object: ea11a37a97a28070703acb20d93ee2ab25608b66 src/mistralai/client/models/getlog.py: id: c9beb29863bc - last_write_checksum: sha1:c41b3c298b4a566984ffee0aa81b97cc75c81096 - pristine_git_object: c38d89acc740a0347ce16792763979b6e7a11205 + last_write_checksum: sha1:76cfbec781b7f84fa7df26664b00affdbd6364ef + pristine_git_object: 159e0ad3e265f578c76703edfd5c39dea9692161 src/mistralai/client/models/getlogfieldoptions.py: id: cdb24e2ec44c last_write_checksum: sha1:148de09178fe2714b50a324aafe0223716b9af6d @@ -8382,12 +8566,12 @@ trackedFiles: pristine_git_object: 5af0306c75258844654178a7d0f0420b0083798e src/mistralai/client/models/getspan.py: id: eebc129308d2 - last_write_checksum: sha1:49dcf111ff0af31d6aba24af9ac0ff1a667ac071 - pristine_git_object: a7d4330e92b2ddcf836eeccaeabde68435bd770f + last_write_checksum: sha1:a3a9c76d6e044472030ad98b920f3976dd3052b9 + pristine_git_object: cac1d34014fc9a824bac7e0d0a5deaad15e0de54 src/mistralai/client/models/getspanevaluation.py: id: 274e902cefd1 - last_write_checksum: sha1:7855f2437e115c1d8aaade23b2ccf6231bb83cbe - pristine_git_object: 0cd5baaf927ff6dd303d0c20f8ec0d51637fcba8 + last_write_checksum: sha1:bd038025a01c55a87288d26c532a4c96329907af + pristine_git_object: 33b913aa4278348f59a5c95f57cd568635e7acd3 src/mistralai/client/models/getspanevaluationfieldoptions.py: id: 345fd459adff last_write_checksum: sha1:011b20b6fec43ece6217db7e5e0a62bded972d21 @@ -8418,8 +8602,8 @@ trackedFiles: pristine_git_object: 41ea953240ee6c75fcec7e8e7c570e75131fd6a1 src/mistralai/client/models/gettrace.py: id: 3c7e1abbc64a - last_write_checksum: sha1:1ed0434bbd9c47393eb8e237c98a667442365058 - pristine_git_object: a39240122577d437f57368dab6cd01fdbaa364ad + last_write_checksum: sha1:c2f7c201e9458e82fbf88ca21481026ddb82a2f4 + pristine_git_object: a9102b2d3a895f2752378cb40524a153cef774c3 src/mistralai/client/models/gettracefieldoptions.py: id: 9b0f5432d5ef last_write_checksum: sha1:48d8402542b6bcdab7918bc985483bc9d4a415c5 @@ -8494,8 +8678,8 @@ trackedFiles: pristine_git_object: e462da4c6f4ebb4bacc57ecc26a4cb52416d645c src/mistralai/client/models/httpconnector.py: id: 29d326e2d741 - last_write_checksum: sha1:36f305a45c543ba1d82c344a46f9ea76594d7ffd - pristine_git_object: 1d0d39148594a633bfe87c8c4cd7cf28ab2e365f + last_write_checksum: sha1:143fa1620f440522b5deae87ff936061e9d099b3 + pristine_git_object: 7a8047530967b2d328bd6db253d634e2f1a920da src/mistralai/client/models/httpstatus.py: id: 56faca222b54 last_write_checksum: sha1:98a58c5644f17d0b4d312b42ee3a3468852194bb @@ -8844,6 +9028,14 @@ trackedFiles: id: 6d3ece77abbd last_write_checksum: sha1:2d55b61197af920c0eda1a7c39f356498019d346 pristine_git_object: db35a10e509e69eaca1cfd27cb15a4ab28c82582 + src/mistralai/client/models/list_trigger_events_v1_triggers_trigger_id_events_getop.py: + id: 170db319f6c7 + last_write_checksum: sha1:fc847eb2cc30bbb26a811fdabe2e2740820f1f3e + pristine_git_object: ff9b2745909dbcd0028c9a7d529d21e85397e6b8 + src/mistralai/client/models/list_triggers_v1_triggers_getop.py: + id: db022690157a + last_write_checksum: sha1:ab9705d12ad4e8c1d308b16a3863a0bdb567c36a + pristine_git_object: e2bbf7d7427dfebbc666e8009f6e0bb40bd25615 src/mistralai/client/models/list_voices_v1_audio_voices_getop.py: id: 6b3ce5be1294 last_write_checksum: sha1:3547a866b767bfec893fc926a971aefc8ff5442c @@ -9332,6 +9524,18 @@ trackedFiles: id: 272b7e1785d5 last_write_checksum: sha1:ac9b8a1745b5968cbb0e361b8f7e1fcababf9d91 pristine_git_object: 880923b2cb7e9d534944ca2c2394ee97b6f1a405 + src/mistralai/client/models/openapifilesource.py: + id: 850a1f0a8db6 + last_write_checksum: sha1:b76a43723fca213e653f79bae74647334d89dfc5 + pristine_git_object: 0226a6650179d98e9fd335deac802901da91f18d + src/mistralai/client/models/openapispecsource.py: + id: 7c0f5fd12b23 + last_write_checksum: sha1:036fb7db53cc480c9a609b5a98e5ec4bf97ff61a + pristine_git_object: d1548f1978604f10d7b569e0284815975c75fe94 + src/mistralai/client/models/openapiurlsource.py: + id: 6d3d1e8c084c + last_write_checksum: sha1:faa0274539b21ac19223fbb81e814b0f257ac257 + pristine_git_object: 0827e753f194a12129f90756b4a4a11cdc6ab695 src/mistralai/client/models/optimization.py: id: 24f84b2bcffa last_write_checksum: sha1:2e83971a8de07658c5cf351d6dbf407848c2f96b @@ -10338,8 +10542,8 @@ trackedFiles: pristine_git_object: b179e2daab6eea52b09bba496b24abb7146bf6ee src/mistralai/client/models/skills_listop.py: id: b3600a24a06d - last_write_checksum: sha1:de3f6374431dba15b4a0bb53c099f8920b27144b - pristine_git_object: 56f9ba3369e4fc80fe2eb1345fc73a68b2491ccd + last_write_checksum: sha1:fcbb874f07cb8bec3c6c7b5e1ac0d48b3af70d39 + pristine_git_object: f425ee5fceb35639ae68ff30cf34a0d99d788343 src/mistralai/client/models/skills_update_version_metadataop.py: id: ae5f5535c372 last_write_checksum: sha1:522202a8e73c56b792acf058c6c950c272a75e43 @@ -10522,8 +10726,8 @@ trackedFiles: pristine_git_object: 1a70cc755533db5681a2be0fe8cbe61a6c237876 src/mistralai/client/models/systemv2.py: id: a2db8246ae38 - last_write_checksum: sha1:3e42a70a2a80376aa80767505a1ebc2116a2d67a - pristine_git_object: 651a6562d09f288b2bd980838219aa36f6dc622f + last_write_checksum: sha1:1b73445d29fe0c079d9dd6fcea787afe236c111f + pristine_git_object: 4f8ea848c700d84ea233182f9225ae0c0bda2069 src/mistralai/client/models/tagfilter.py: id: e9afa8027749 last_write_checksum: sha1:1ab5ac8666d0f9251eb9dffd24a9df707754f064 @@ -10796,10 +11000,42 @@ trackedFiles: id: fb2c6238e8c0 last_write_checksum: sha1:7f522cb9f78a87294404024f7697abff85f007ab pristine_git_object: d015143860a3540f7d916e5147d4e75640af68cb + src/mistralai/client/models/trigger.py: + id: 4db4c68cbab4 + last_write_checksum: sha1:1bb49e70b3261a9520ea98072383136ff06ff54e + pristine_git_object: 1ea6bccf2ca065c6fe2621d8ac7205eda51b7694 src/mistralai/client/models/trigger_schedule_v1_workflows_schedules_schedule_id_trigger_postop.py: id: 99d0d53968f6 last_write_checksum: sha1:ecbb947a46b643bedb3d618393f6b08d8399771f pristine_git_object: aac1614577a3a706fbfe2c1d628c8296e07dc10c + src/mistralai/client/models/triggeraction.py: + id: f3f3cf5d436a + last_write_checksum: sha1:5088791e4938f3ea361cc58a6c141a0c471d3b46 + pristine_git_object: 6eb1ed007fc2d2a4358307066c0b3a09c07458d0 + src/mistralai/client/models/triggeractiontype.py: + id: e780582cff0a + last_write_checksum: sha1:e7a44453a0b1f6c1e9088d5fb5cf93b8a0a9ec21 + pristine_git_object: 419717e1642fc94dd330164e50e0cc2e279c7ffc + src/mistralai/client/models/triggerevent.py: + id: 31e112b6a55c + last_write_checksum: sha1:9bd7f2c55168fa4076305a2650359ed9d159c59d + pristine_git_object: 03c043a3c163356bde21b5dce78f835ca26820ea + src/mistralai/client/models/triggereventlist.py: + id: 1bb13d7402d5 + last_write_checksum: sha1:c9b4c3074e8ef50d53047b5a43ef58633754b020 + pristine_git_object: fa51bbcec44bd79f0aea8418b46dcb6221c48aaf + src/mistralai/client/models/triggerhandler.py: + id: a070f7d49de2 + last_write_checksum: sha1:f178519caa082c1f3fb0af215006e09013daf526 + pristine_git_object: ddd1adde117c5834f8aea5a7814809958c07dd8f + src/mistralai/client/models/triggersownertype.py: + id: 0049efb89025 + last_write_checksum: sha1:1caeb7002d2e7db275ade096964690016df1142d + pristine_git_object: e8d4637dcbe5a33312120e8a2e3d4258dc6d8ad0 + src/mistralai/client/models/triggerstatusvalue.py: + id: e5071edc30c9 + last_write_checksum: sha1:d396168950b596b798ce72ff063bd6ee8cc95702 + pristine_git_object: 2489dffd0303b1f86f36ab652dbeebc456e98154 src/mistralai/client/models/turbinemeta.py: id: 084d588caa1e last_write_checksum: sha1:8105437dbce3e18968d55ff0c777f226edb00f7e @@ -11114,8 +11350,8 @@ trackedFiles: pristine_git_object: 8b80b9bc57702877cba351e05df920ae1a10959b src/mistralai/client/models/voicecreaterequest.py: id: 9a1752117dec - last_write_checksum: sha1:69e830f1b942aeb9146f408bf8dac2e8bc5c2990 - pristine_git_object: 9cc46db7c09e8a7966ca0ffe963846ab119a3626 + last_write_checksum: sha1:9abe02435159fc12d4551aae12bfde6646bb225b + pristine_git_object: 114d702fce39ebd5e879797eac910e54f2e2ba59 src/mistralai/client/models/voicegender.py: id: bd01f8fe635e last_write_checksum: sha1:0f128cf6a50f32adb311bfcdab78be1c5a3919d6 @@ -11138,8 +11374,28 @@ trackedFiles: pristine_git_object: a31dba1763d6b5f58ae3e7c964930bbe6f664bf7 src/mistralai/client/models/voiceupdaterequest.py: id: 798f8ff225de - last_write_checksum: sha1:207b679acc610ddfae0bdf03d6593d9d72032904 - pristine_git_object: 184e27ecc1c381635c878a0ea3481358e80f1702 + last_write_checksum: sha1:e7b522de1b8563a2c9f6702fd437b9f2339e29db + pristine_git_object: 40a7cfe8b2954ea824568b26709f36b0e99cbfb3 + src/mistralai/client/models/webhook.py: + id: 49d93e206d98 + last_write_checksum: sha1:a63c8561540f3749fb419038e17a3a819cd7f3b9 + pristine_git_object: 8ca1139cd6648bfb67932342601c6a10b3813019 + src/mistralai/client/models/webhookprovider.py: + id: 542cbffe37bb + last_write_checksum: sha1:ee648e7b45ae7fab7e36cdd63a5d1203e70e53f0 + pristine_git_object: f839a49cb91f58e9ce347c6b107e82c04ea99dc3 + src/mistralai/client/models/webhooksignatureencoding.py: + id: befd0ab53d2d + last_write_checksum: sha1:26b68ab393592730410bcfd6f66c562167a005a5 + pristine_git_object: 2ed21b85825d2e4b36de5919ad5e07053e13c190 + src/mistralai/client/models/webhooksignaturehashalgorithm.py: + id: 45b4112a2cd2 + last_write_checksum: sha1:d67ce0161f220289735b3ce9949e4eb88345935a + pristine_git_object: 1a851a96d8d836ae6e1c5a20a0ead24a5c806bee + src/mistralai/client/models/webhooksigningsecret.py: + id: 19d22f797a68 + last_write_checksum: sha1:6e07dcd582536538b35c83a3df9fbca9929e5b78 + pristine_git_object: 90db7f69edd77e6a9a025eabea2ce78870ecb47d src/mistralai/client/models/websearchpremiumtool.py: id: bfe88af887e3 last_write_checksum: sha1:cd2bcc57cacd5062c1f5c10f1c7e0e88bcd7be82 @@ -11358,8 +11614,12 @@ trackedFiles: pristine_git_object: bb2125ebd596b95ba6059fbfe11f44ab6816f38d src/mistralai/client/models/workflowsworkerspecupdate.py: id: 97b61c6693ee - last_write_checksum: sha1:ac5fafd2653486a8ff2022bc544d34d67437c2d5 - pristine_git_object: 95df520bc49f18f8d077717aea2087983540f2a9 + last_write_checksum: sha1:a2c06331aefcba783edc0c319b1035693ceac7cb + pristine_git_object: f4be31fb3784e7885b9ed6dfed17d5ca9e53c9cc + src/mistralai/client/models/workflowtagsaddrequest.py: + id: bd6f98cfbcd1 + last_write_checksum: sha1:917d2596aa1bbbc767851389e6b1e2b3168b7a2a + pristine_git_object: 918086fa565420f4d6cb4583b1f23dd596c2d26c src/mistralai/client/models/workflowtaskfailedattributes.py: id: c4c09c4d5ea7 last_write_checksum: sha1:d3b625e82829db536aa7ea79dbc19510a45a5016 @@ -11418,8 +11678,12 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 src/mistralai/client/rag.py: id: 2c2b641de1b6 - last_write_checksum: sha1:ff5b63ae8ae922a4cd088d15f57da1e54b9858ea - pristine_git_object: eb3346f17cf29f80998d3344f5c94fea20898377 + last_write_checksum: sha1:252cc4ac534081bf723be605cd4c28e2b5616d67 + pristine_git_object: 6381adae8fde71a0524ad30a0ae61c204ed4881e + src/mistralai/client/rag_search_indexes.py: + id: 1be866c27d7d + last_write_checksum: sha1:46eae6d6061000fa04329c0abbae59c05ea8f76f + pristine_git_object: 513d7c2c8c0685f7f0bad51e1dcf13e3d5c547ac src/mistralai/client/realtime.py: id: 9d55a65b4bc9 last_write_checksum: sha1:bde4c6f342c4666bdc7f9aac5d0aa0f7eec4b9ad @@ -11444,18 +11708,14 @@ trackedFiles: id: b7dd68a0235e last_write_checksum: sha1:48e972ef8320f040615c204729cecbbabb28e1b0 pristine_git_object: d91c93e74a31a5231fbd647ae84e52b6c98e5ec9 - src/mistralai/client/search_indexes.py: - id: c5a0a7df993a - last_write_checksum: sha1:5f38fab20b6160a286587ec55012e80af3715de9 - pristine_git_object: 678d56b573d1c7892149c4f83bac4a9bf2078472 src/mistralai/client/service_accounts.py: id: d4210b455fcf last_write_checksum: sha1:17f5088e8ed3896289ea84be6a06c2cbf3b56dce pristine_git_object: fad87b856438d8c6eed16de19ed6b21d40ecf671 src/mistralai/client/skills.py: id: d00f9eb877ec - last_write_checksum: sha1:bba7a08e25707c8a2d3362d713e0f0865fa3c000 - pristine_git_object: 8765d9befa939c6e7d2f83e08bb3c2d71a4e36e9 + last_write_checksum: sha1:13ac2903fd7c7d92c3186cdaae6af476a238c9d4 + pristine_git_object: 7300aeea1450bc12a7e0dc603aa527ca025247e3 src/mistralai/client/spans.py: id: 408477ccb9d4 last_write_checksum: sha1:4cafd3c81c0e824d55d00f860fdc68585cb7a9c7 @@ -11472,6 +11732,10 @@ trackedFiles: id: 75b45780c978 last_write_checksum: sha1:9ff689c72d3f799284c5e4ebcdecb7ac49419b1f pristine_git_object: dde165617c3d402a10caf275ca0eda287160ba02 + src/mistralai/client/triggers.py: + id: da752a2b7018 + last_write_checksum: sha1:dd2e7994a3f3e35ff3d7c2a9a58bd6edd8ab8aea + pristine_git_object: f6ca62658002c40f81db8de3727d944a991b5b62 src/mistralai/client/types/__init__.py: id: 000b943f821c last_write_checksum: sha1:f9ad14217f832e74f594285960125add50324be9 @@ -11570,12 +11834,16 @@ trackedFiles: pristine_git_object: 2bba1465bded520b0acc8c51d6ec77d3b601d338 src/mistralai/client/voices.py: id: ab76b1377d79 - last_write_checksum: sha1:6ecbbd9439c47c94cfbdc3ffed0440f014c62a13 - pristine_git_object: d024e3a2fd64ff7a66a60d3ec4c2f4cfeff666a7 + last_write_checksum: sha1:5a4ec740bcb21dca07c271f7a03d2eb5fda08c46 + pristine_git_object: 39c02925f9ae73ed604203090777b757d0e48eb4 + src/mistralai/client/webhooks.py: + id: dce4e52bb6d9 + last_write_checksum: sha1:5b0f3bd985808eedb85c9286e662f3549a476f5f + pristine_git_object: 4b32347d9b6d1359c9bf0f1d14c107117f707292 src/mistralai/client/workflows.py: id: e2a0381191f6 - last_write_checksum: sha1:d81b7d2fe6863cbc3665cc1748056c0f7f488f75 - pristine_git_object: 6e2b94dc7990d7be476be90ed655a01d70ce95d8 + last_write_checksum: sha1:e6b08ae9d74ea3b44afb96c8ab173ececa9c2572 + pristine_git_object: d22c76cc21d05e69e14c0a192060a56a66ed455a src/mistralai/client/workflows_events.py: id: 6d4f674ce8ef last_write_checksum: sha1:132dcc7cb1c790a1d61c4cd4a38c6c1fa7bd5ac0 @@ -14361,7 +14629,7 @@ examples: trace_id: "" responses: "200": - application/json: {"customer_id": "", "organization_id": "", "workspace_id": "", "user_id": "", "trace_id": "", "root_span_id": "", "root_span_name": "", "start_time": "2025-10-05T23:00:19.469Z", "end_time": "2026-03-27T13:19:54.471Z", "duration_ns": 845999, "service_name": "", "environment": "", "conversation_id": "", "workflow_name": "", "agent_id": "", "agent_name": "", "status_code": "Error", "error_count": 752897, "span_count": 844729, "gen_ai_span_count": 268823, "llm_call_count": 716513, "tool_call_count": 899647, "retrieval_count": 51874, "evaluation_count": 454413, "input_tokens": 162737, "output_tokens": 349146, "cache_read_input_tokens": 964559, "cache_creation_input_tokens": 10396, "models_used": [""], "tools_used": [""], "first_turn_last_input_message": "", "first_turn_last_output_message": "", "last_turn_last_input_message": "", "last_turn_last_output_message": ""} + application/json: {"customer_id": "", "organization_id": "", "workspace_id": "", "user_id": "", "service_account_id": "", "trace_id": "", "root_span_id": "", "root_span_name": "", "start_time": "2025-10-05T23:00:19.469Z", "end_time": "2026-03-27T13:19:54.471Z", "duration_ns": 845999, "service_name": "", "environment": "", "conversation_id": "", "workflow_name": "", "agent_id": "", "agent_name": "", "status_code": "Error", "error_count": 752897, "span_count": 844729, "gen_ai_span_count": 268823, "llm_call_count": 716513, "tool_call_count": 899647, "retrieval_count": 51874, "evaluation_count": 454413, "input_tokens": 162737, "output_tokens": 349146, "cache_read_input_tokens": 964559, "cache_creation_input_tokens": 10396, "models_used": [""], "tools_used": [""], "first_turn_last_input_message": "", "first_turn_last_output_message": "", "last_turn_last_input_message": "", "last_turn_last_output_message": ""} "400": application/json: {"detail": {"message": "", "error_code": "EVALUATION_NAME_ALREADY_EXISTS"}} get_trace_spans_v1_observability_traces__trace_id__spans_get: @@ -14394,7 +14662,7 @@ examples: span_id: "" responses: "200": - application/json: {"customer_id": "", "organization_id": "", "workspace_id": "", "user_id": "", "trace_id": "", "span_id": "", "parent_span_id": "", "trace_state": "", "start_time": "2026-01-20T21:14:26.260Z", "end_time": "2024-01-20T15:01:29.829Z", "duration_ns": 49973, "span_name": "", "span_kind": "", "service_name": "", "status_code": "Ok", "status_message": "", "error_type": "", "operation_name": "", "provider_name": "", "request_model": "", "response_model": "", "response_id": "", "output_type": "", "conversation_id": "", "data_source_id": "", "agent_id": "", "agent_name": "", "agent_version": "", "agent_description": "", "workflow_name": "", "prompt_name": "", "tool_name": "", "tool_type": "", "tool_call_id": "", "input_messages": "", "output_messages": "", "system_instructions": "", "tool_definitions": "", "tool_call_arguments": "", "tool_call_result": "", "request_choice_count": 769978, "request_max_tokens": 607415, "request_temperature": 135.82, "request_top_p": 4327.29, "request_top_k": 4877.05, "request_presence_penalty": 2549.88, "request_frequency_penalty": 3080.95, "request_seed": 20619, "request_stop_sequences": ["", "", ""], "request_encoding_formats": ["", ""], "response_finish_reasons": ["", ""], "usage_input_tokens": 866445, "usage_output_tokens": 944843, "usage_cache_read_input_tokens": 767817, "usage_cache_creation_input_tokens": 86146, "resource_attributes": {"key": "", "key1": "", "key2": ""}, "span_attributes": {"key": "", "key1": "", "key2": ""}, "scope_name": "", "scope_version": ""} + application/json: {"customer_id": "", "organization_id": "", "workspace_id": "", "user_id": "", "service_account_id": "", "trace_id": "", "span_id": "", "parent_span_id": "", "trace_state": "", "start_time": "2026-01-20T21:14:26.260Z", "end_time": "2024-01-20T15:01:29.829Z", "duration_ns": 49973, "span_name": "", "span_kind": "", "service_name": "", "status_code": "Ok", "status_message": "", "error_type": "", "operation_name": "", "provider_name": "", "request_model": "", "response_model": "", "response_id": "", "output_type": "", "conversation_id": "", "data_source_id": "", "agent_id": "", "agent_name": "", "agent_version": "", "agent_description": "", "workflow_name": "", "prompt_name": "", "tool_name": "", "tool_type": "", "tool_call_id": "", "input_messages": "", "output_messages": "", "system_instructions": "", "tool_definitions": "", "tool_call_arguments": "", "tool_call_result": "", "request_choice_count": 769978, "request_max_tokens": 607415, "request_temperature": 135.82, "request_top_p": 4327.29, "request_top_k": 4877.05, "request_presence_penalty": 2549.88, "request_frequency_penalty": 3080.95, "request_seed": 20619, "request_stop_sequences": ["", "", ""], "request_encoding_formats": ["", ""], "response_finish_reasons": ["", ""], "usage_input_tokens": 866445, "usage_output_tokens": 944843, "usage_cache_read_input_tokens": 767817, "usage_cache_creation_input_tokens": 86146, "resource_attributes": {"key": "", "key1": "", "key2": ""}, "span_attributes": {"key": "", "key1": "", "key2": ""}, "scope_name": "", "scope_version": ""} "400": application/json: {"detail": {"message": "", "error_code": "PROJECT_NAME_ALREADY_EXISTS"}} search_spans_v1_observability_spans_search_post: @@ -14964,7 +15232,7 @@ examples: create_deployment_v1_workflows_deployments_post: speakeasy-default-create-deployment-v1-workflows-deployments-post: requestBody: - application/json: {"name": "", "spec": {"github_url": "https://ugly-parade.com"}, "hardened": false} + application/json: {"name": "", "spec": {}, "hardened": false} responses: "202": application/json: {"service_id": "", "name": "", "spec": {"github_url": "https://unwieldy-jump.net/", "type": "workflows_worker", "backend_spec": {"type": "kubernetes"}}, "resources": {}, "status": {"available_replicas": 0, "ready_replicas": 0}, "created_at": "2025-09-24T17:27:41.536Z", "updated_at": "2024-07-04T17:27:19.277Z", "stopped": false, "is_hardened": false} @@ -16036,80 +16304,117 @@ examples: responses: "200": application/json: {"input_tokens": 363814, "object": "response.input_tokens"} + create_trigger_v1_triggers_post: + speakeasy-default-create-trigger-v1-triggers-post: + requestBody: + application/json: {"event_source_id": "07adfb82-bcd1-462d-94df-cd3f8421627e", "handler": "spaces", "action": {"primitive_id": "", "type": "start_workflow"}, "owner_type": "workspace", "title": ""} + responses: + "201": + application/json: {"id": "4cd94062-13d7-43c1-aa97-cb218cce4081", "creator_id": "93459625-7dc3-4ad1-96a1-86906ac35cc5", "workspace_id": "c3d70e3c-87bc-4754-a916-35e1d23a5568", "organization_id": "fbb0dd8e-050d-43d5-bf9d-57eae35af646", "customer_id": "7c960a33-3b09-4159-8b99-231b586876ee", "owner_type": "user", "event_source": {"id": "8d07d28d-70f6-42dc-9a05-975d19c4410c", "creator_id": "585a9395-1ae7-482b-bfe4-f2270ca2b92a", "organization_id": "3198fee7-0e96-4d08-a794-2e198c86ace1", "workspace_id": "51d1fc5e-a7e6-4088-aaf1-5c48c7217a50", "owner_type": "workspace", "provider": "linear", "name": "", "url": "https://pleasant-representation.net", "http_method": "", "url_verified": false, "signature_hash_algorithm": "sha1", "signature_header_name": "", "validity_period_second": 410285, "signature_extractor_regex": "", "timestamp_extractor_regex": "", "signature_payload_pattern": "", "signature_encoding": "hex", "success_status_code": null, "event_type_path": "", "expires_at": "2025-10-03T14:15:52.300Z", "created_at": "2025-01-12T04:45:22.228Z", "updated_at": "2026-10-31T00:58:36.673Z"}, "handler": "spaces", "action": {"primitive_id": "", "type": "deploy_app"}, "filters": "", "title": ""} + "422": + application/json: {} + list_triggers_v1_triggers_get: + speakeasy-default-list-triggers-v1-triggers-get: + responses: + "200": + application/json: [{"id": "2b76ee01-9b8a-4762-85d2-f66e9fe70b95", "creator_id": "f5a24b4d-712a-4090-ba06-a33e8ade5ef0", "workspace_id": "500d9f13-5814-4652-812c-df12a98bcece", "organization_id": "eca151fb-b0ff-4f29-816b-501a46d6bab2", "customer_id": "960449c4-ceba-4907-bd48-b4fe8b17567b", "owner_type": "workspace", "event_source": {"id": "d7c138a2-f969-4e88-a77e-4a4fe4911025", "creator_id": "94a30b26-a01b-47d3-a823-e0306d206968", "organization_id": "9acfef44-204a-43af-a278-a50c589e3888", "workspace_id": "14f123a5-fcfb-45f4-9197-b63a880ce89c", "owner_type": "workspace", "provider": "notion", "name": "", "url": "https://unique-underpants.org/", "http_method": "", "url_verified": false, "signature_hash_algorithm": "sha256", "signature_header_name": "", "validity_period_second": 728623, "signature_extractor_regex": "", "timestamp_extractor_regex": "", "signature_payload_pattern": "", "signature_encoding": "base64", "success_status_code": 780537, "event_type_path": "", "expires_at": "2024-08-16T03:28:38.070Z", "created_at": "2024-08-24T10:37:45.413Z", "updated_at": "2024-03-12T03:00:48.509Z"}, "handler": "workflows", "action": {"primitive_id": "", "type": "start_agent_session"}, "filters": "", "title": ""}] + "422": + application/json: {} + get_trigger_v1_triggers__trigger_id__get: + speakeasy-default-get-trigger-v1-triggers-trigger-id-get: + parameters: + path: + trigger_id: "8a031c37-160a-4451-9fb0-960dab51da01" + responses: + "200": + application/json: {"id": "66689bde-cc8d-4443-9be0-8015c701307c", "creator_id": "0c60ac43-82cc-4c83-aee3-121b4e3ba0fd", "workspace_id": "bbfb577c-ee22-4434-ad21-9840e17368c4", "organization_id": "ac8760a7-02e0-4048-b55c-3ec992206b00", "customer_id": "37634795-5fba-4dd6-b386-2308e6f6da68", "owner_type": "workspace", "event_source": {"id": "c164a9d7-0352-498f-921c-ef7da16d2609", "creator_id": "69790ccb-851d-4892-92e6-689371431ef1", "organization_id": "f50a9ed5-661a-4b66-a5de-5d43192715ea", "workspace_id": "c850b307-a8c4-4899-a1c7-f5934e9d0b57", "owner_type": "workspace", "provider": "linear", "name": "", "url": "https://dead-handover.net", "http_method": "", "url_verified": false, "signature_hash_algorithm": null, "signature_header_name": "", "validity_period_second": 642868, "signature_extractor_regex": "", "timestamp_extractor_regex": null, "signature_payload_pattern": "", "signature_encoding": "base64", "success_status_code": 77778, "event_type_path": "", "expires_at": "2026-12-12T11:33:03.201Z", "created_at": "2026-01-20T07:19:33.587Z", "updated_at": "2025-04-22T04:45:58.089Z"}, "handler": "agents", "action": {"primitive_id": "", "type": "start_agent_session"}, "filters": "", "title": ""} + "422": + application/json: {} + delete_trigger_v1_triggers__trigger_id__delete: + speakeasy-default-delete-trigger-v1-triggers-trigger-id-delete: + parameters: + path: + trigger_id: "c36bea2b-c2da-4ac5-b1bf-26d98b1c90b3" + responses: + "422": + application/json: {} + list_trigger_events_v1_triggers__trigger_id__events_get: + speakeasy-default-list-trigger-events-v1-triggers-trigger-id-events-get: + parameters: + path: + trigger_id: "a4a77501-7106-45dd-ba40-61b80d862c18" + query: + limit: 10 + responses: + "200": + application/json: {"data": [{"event_id": "7f6b4b9c-bc57-4a5d-881a-e5c05733ac8f", "trigger_id": "2cac02f0-8e0f-4963-a6fc-7fd2d3a461ab", "source_id": "817da86a-4bed-46f8-9f92-a97f49b7fe69", "status": "SUBMISSION_FAILED", "received_at": "2025-04-18T19:41:19.362Z", "submitted_at": "2024-06-16T21:01:17.784Z", "triggered_at": "2025-01-22T03:40:41.653Z", "detail": "", "url": "https://blushing-overheard.net"}]} + "422": + application/json: {} + list_webhooks_v1_webhooks_get: + speakeasy-default-list-webhooks-v1-webhooks-get: + responses: + "200": + application/json: [{"id": "01f1864c-96e9-4d5f-a774-19fa68259aae", "creator_id": "e04605a5-0c3a-44f5-8174-8b9d00bb62a9", "organization_id": "a383705e-9f42-4d65-8dd3-e46652f02733", "workspace_id": "c77a8db2-8470-4807-9a8f-6ff0e448540b", "owner_type": "workspace", "provider": "linear", "name": "", "url": "https://appropriate-euphonium.net", "http_method": "", "url_verified": false, "signature_hash_algorithm": "sha1", "signature_header_name": "", "validity_period_second": 219410, "signature_extractor_regex": "", "timestamp_extractor_regex": "", "signature_payload_pattern": "", "signature_encoding": "hex", "success_status_code": 879044, "event_type_path": "", "expires_at": "2026-02-05T19:35:19.723Z", "created_at": "2026-07-21T12:55:48.708Z", "updated_at": "2025-03-20T01:03:48.721Z"}] + create_webhook_v1_webhooks_post: + speakeasy-default-create-webhook-v1-webhooks-post: + requestBody: + application/json: {"provider": "slack", "name": ""} + responses: + "201": + application/json: {"id": "15c9ca7f-daee-4dd5-acfb-9a350cb76a49", "creator_id": "86a61ea8-2606-4d85-816a-565fcaec65e7", "organization_id": "5d64d579-58cb-46dc-b84c-cace801308d8", "workspace_id": "3f107d27-43a4-449f-aceb-bc22ce49b553", "owner_type": "workspace", "provider": "lucca", "name": "", "url": "https://juicy-unique.info/", "http_method": "", "url_verified": true, "signature_hash_algorithm": "sha1", "signature_header_name": null, "validity_period_second": 253992, "signature_extractor_regex": "", "timestamp_extractor_regex": null, "signature_payload_pattern": "", "signature_encoding": "hex", "success_status_code": 253105, "event_type_path": "", "expires_at": "2026-11-17T15:21:38.880Z", "created_at": "2024-01-07T18:36:44.596Z", "updated_at": "2025-11-18T12:25:38.194Z"} + "422": + application/json: {} + get_webhook_v1_webhooks__webhook_id__get: + speakeasy-default-get-webhook-v1-webhooks-webhook-id-get: + parameters: + path: + webhook_id: "de67528b-7424-4bfa-98e4-5c117313e2ce" + responses: + "200": + application/json: {"id": "5761c6fb-2af6-4bef-ba60-d95bfd75fbc1", "creator_id": "c853b361-0fe6-48e2-9598-ecb26298c488", "organization_id": "68bb120f-6620-4d62-8337-cabe3e8e20ed", "workspace_id": "e2c7a43f-9de7-4b09-86aa-dd60358670d4", "owner_type": "workspace", "provider": "lucca", "name": "", "url": "https://interesting-necklace.com/", "http_method": "", "url_verified": false, "signature_hash_algorithm": "sha256", "signature_header_name": null, "validity_period_second": 863949, "signature_extractor_regex": "", "timestamp_extractor_regex": "", "signature_payload_pattern": "", "signature_encoding": "base64", "success_status_code": 855925, "event_type_path": "", "expires_at": "2024-08-27T06:30:38.202Z", "created_at": "2024-01-24T19:44:57.487Z", "updated_at": "2026-02-19T15:57:53.484Z"} + "422": + application/json: {} + delete_webhook_v1_webhooks__webhook_id__delete: + speakeasy-default-delete-webhook-v1-webhooks-webhook-id-delete: + parameters: + path: + webhook_id: "97c2e685-f7cb-4949-a2cd-267a02c742c5" + responses: + "422": + application/json: {} + get_webhook_signing_secret_v1_webhooks__webhook_id__signing_secret_get: + speakeasy-default-get-webhook-signing-secret-v1-webhooks-webhook-id-signing-secret-get: + parameters: + path: + webhook_id: "171d0caa-bac1-4282-aeac-1fe92c67d7ff" + responses: + "200": + application/json: {"signing_secret": ""} + "422": + application/json: {} + add_workflow_tags_v1_workflows__workflow_identifier__tags_post: + speakeasy-default-add-workflow-tags-v1-workflows-workflow-identifier-tags-post: + parameters: + path: + workflow_identifier: "" + requestBody: + application/json: {"tags": []} + responses: + "422": + application/json: {} + get_deployment_archive_v1_workflows_deployments__name__archive_get: + speakeasy-default-get-deployment-archive-v1-workflows-deployments-name-archive-get: + parameters: + path: + name: "" + responses: + "200": + application/json: {"archive_id": "c5d9d788-04a4-46e3-a894-c9f0775e23c6"} + "422": + application/json: {} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: | - ## Python SDK Changes: - * `mistral.beta.observability.judges.create()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.judges.list()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.judges.fetch()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.judges.delete()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.judges.update()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.judges.judge_conversation()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.datasets.create()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.datasets.list()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.datasets.fetch()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.datasets.delete()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.datasets.update()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.datasets.list_records()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.datasets.create_record()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.datasets.import_from_file()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.datasets.import_from_playground()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.datasets.import_from_spans()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.datasets.import_from_dataset_records()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.datasets.export_to_jsonl()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.datasets.fetch_task()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.datasets.list_tasks()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.datasets.records.fetch()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.datasets.records.delete()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.datasets.records.bulk_delete()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.datasets.records.judge()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.datasets.records.update_payload()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.datasets.records.update_properties()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.evaluations.create_pipeline()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.evaluations.list_pipelines()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.evaluations.get_pipeline()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.evaluations.update_pipeline()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.evaluations.delete_pipeline()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.evaluations.list()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.evaluations.get()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.evaluations.projects.list()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.evaluations.projects.get()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.evaluations.runs.search()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.evaluations.runs.search_all()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.evaluations.runs.get()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.evaluations.runs.get_statistics()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.evaluations.runs.compute_statistics()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.evaluations.records.get()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.evaluations.records.search()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.evaluations.optimizations.list()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.evaluations.optimizations.get()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.evaluations.optimizations.list_trials()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.logs.search()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.logs.list()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.logs.fetch_options()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.traces.search()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.traces.aggregate()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.traces.get_trace_fields()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.traces.get_trace_by_id()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.traces.get_trace_spans()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.traces.fetch_options()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.traces.get_span_by_id()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.spans.search_spans()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.spans.aggregate()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.spans.aggregate_span_evaluations()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.spans.search_span_evaluations()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.spans.search_latest_span_evaluations()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.spans.search_pipeline_results()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.spans.list_span_fields()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.spans.list_span_eval_fields()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.spans.fetch_span_field_options()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.observability.spans.fetch_span_eval_field_options()`: `error.detail.error_code.enum(optimization_trial_observation_already_exists)` **Added** - * `mistral.beta.connectors.create()`: `response.union(mcp).connection_preferences[].name` **Changed** - * `mistral.beta.connectors.list()`: `response.items[].union(mcp).connection_preferences[].name` **Changed** - * `mistral.beta.connectors.get()`: `response.union(mcp).connection_preferences[].name` **Changed** - * `mistral.beta.connectors.update()`: `response.union(http).connection_preferences[].name` **Changed** - * `mistral.beta.rag.managed_indexes.create()`: `error.status[403]` **Added** +releaseNotes: "## Python SDK Changes:\n* `mistral.audio.voices.create()`: `request` **Changed** (Breaking ⚠️)\n* `mistral.audio.voices.update()`: `request.gender` **Changed** (Breaking ⚠️)\n* `mistral.beta.context.search_indexes.create()`: **Added**\n* `mistral.beta.context.search_indexes.list()`: **Added**\n* `mistral.beta.context.search_indexes.get()`: **Added**\n* `mistral.beta.context.search_indexes.update()`: **Added**\n* `mistral.beta.context.search_indexes.delete()`: **Added**\n* `mistral.beta.context.search_indexes.ingest_documents()`: **Added**\n* `mistral.beta.context.search_indexes.delete_documents()`: **Added**\n* `mistral.beta.context.search_indexes.search()`: **Added**\n* `mistral.beta.context.search_indexes.navigate()`: **Added**\n* `mistral.beta.context.search_indexes.read()`: **Added**\n* `mistral.beta.context.search_indexes.grep()`: **Added**\n* `mistral.beta.context.search_indexes.get_chunk()`: **Added**\n* `mistral.beta.context.search_indexes.get_index_summary()`: **Added**\n* `mistral.beta.context.search_indexes.set_index_summary()`: **Added**\n* `mistral.beta.triggers.create()`: **Added**\n* `mistral.beta.triggers.list()`: **Added**\n* `mistral.beta.triggers.get()`: **Added**\n* `mistral.beta.triggers.delete()`: **Added**\n* `mistral.beta.triggers.list_events()`: **Added**\n* `mistral.beta.webhooks.list()`: **Added**\n* `mistral.beta.webhooks.create()`: **Added**\n* `mistral.beta.webhooks.get()`: **Added**\n* `mistral.beta.webhooks.delete()`: **Added**\n* `mistral.beta.webhooks.get_signing_secret()`: **Added**\n* `mistral.workflows.add_workflow_tags()`: **Added**\n* `mistral.workflows.deployments.get_deployment_archive()`: **Added**\n* `mistral.beta.rag.managed_indexes.create()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.rag.managed_indexes.list()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.rag.managed_indexes.get()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.rag.managed_indexes.update()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.rag.managed_indexes.delete()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.rag.managed_indexes.ingest_documents()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.rag.managed_indexes.delete_documents()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.rag.managed_indexes.search()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.rag.managed_indexes.navigate()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.rag.managed_indexes.read()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.rag.managed_indexes.grep()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.rag.managed_indexes.get_chunk()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.rag.managed_indexes.get_index_summary()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.rag.managed_indexes.set_index_summary()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.observability.evaluations.runs.search()`: `response.runs.results[].system` **Changed**\n* `mistral.beta.observability.evaluations.runs.search_all()`: `response.runs.results[].system` **Changed**\n* `mistral.beta.observability.evaluations.runs.get()`: `response.system` **Changed**\n* `mistral.beta.observability.evaluations.optimizations.list_trials()`: `response.trials.results[].observations[].run.system` **Changed**\n* `mistral.beta.observability.logs.search()`: `response.logs.results[].service_account_id` **Added**\n* `mistral.beta.observability.traces.search()`: `response.traces.results[].service_account_id` **Added**\n* `mistral.beta.observability.traces.get_trace_by_id()`: `response.service_account_id` **Added**\n* `mistral.beta.observability.traces.get_trace_spans()`: `response.spans.results[].service_account_id` **Added**\n* `mistral.beta.observability.traces.get_span_by_id()`: `response.service_account_id` **Added**\n* `mistral.beta.observability.spans.search_spans()`: `response.spans.results[].service_account_id` **Added**\n* `mistral.beta.observability.spans.search_span_evaluations()`: `response.span_evaluations.results[].service_account_id` **Added**\n* `mistral.beta.observability.spans.search_latest_span_evaluations()`: `response.span_evaluations.results[].service_account_id` **Added**\n* `mistral.beta.connectors.create()`: `response.union(http).openapi_spec` **Added**\n* `mistral.beta.connectors.list()`: `response.items[].union(http).openapi_spec` **Added**\n* `mistral.beta.connectors.get()`: `response.union(http).openapi_spec` **Added**\n* `mistral.beta.connectors.update()`: `response.union(http).openapi_spec` **Added**\n* `mistral.workflows.deployments.list_deployments()`: `response.deployments[].managed.spec` **Changed**\n* `mistral.workflows.deployments.create_deployment()`: \n * `request.spec` **Changed**\n * `response.spec` **Changed**\n* `mistral.workflows.deployments.update_deployment()`: \n * `request.spec` **Changed**\n * `response.spec` **Changed**\n* `mistral.workflows.deployments.delete_deployment()`: `response.spec` **Changed**\n* `mistral.workflows.deployments.get_deployment()`: `response.managed.spec` **Changed**\n* `mistral.workflows.deployments.stop_deployment()`: `response.spec` **Changed**\n* `mistral.workflows.deployments.start_deployment()`: `response.spec` **Changed**\n* `mistral.workflows.deployments.restart_deployment()`: `response.spec` **Changed**\n" generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 99e0b379a..9cd59c89b 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 3.6.0 + version: 3.7.0 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 904917c0b..ab46332e0 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,48 +1,48 @@ speakeasyVersion: 1.796.4 sources: mistral-azure-source: - sourceNamespace: mistral-openapi-azure - sourceRevisionDigest: sha256:faccd49c0a52252b8dfcc666a6a1ba3fa5c7eb36f93c58c9b49547c98a254918 - sourceBlobDigest: sha256:b6f756ef1d57d93defe29a9f6789c746bd0c3b09e3f9e5fa0344ddf9ca47e5d7 + sourceNamespace: mistral-azure-source + sourceRevisionDigest: sha256:770ac07c9b06ef11f4d85ad9c7cc379e0d38d23fa2d9d6eb5651575e02d9026e + sourceBlobDigest: sha256:bfe5b11add50de471036f70a7a10994e81f96e2518daaec547e746a3e59b9524 tags: - latest - - speakeasy-mistralai-azure-sdk-26292833044-1 + - 1.0.0 mistral-google-cloud-source: - sourceNamespace: mistral-openapi-google-cloud - sourceRevisionDigest: sha256:34edde5edcaf43acc036c9635cf4c60ce4e86f49b3fa2bed8960b995454e8d7c - sourceBlobDigest: sha256:4e9e44f332073700612c1311c0d844241cc4b206140b82d5951879e1efdb0f2d + sourceNamespace: mistral-google-cloud-source + sourceRevisionDigest: sha256:7a28488e88f783adfc2bd9d6c633103cdf76075afe92a11117eb679d170f590f + sourceBlobDigest: sha256:a7a4ba0f3c0dd2d9e85c6cdb04cf142af87d4cc369935db797755d35d52e3be0 tags: - latest - - speakeasy-mistralai-gcp-sdk-26292830187-1 + - 1.0.0 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:a4f1649fc6d293f9cf3652df5b6dea61d16c4824bbc429194f9ec20b9f798a8c - sourceBlobDigest: sha256:16df92d5f5fb961cb5677c2db17092202548f7d2aea908d800653d1b5596cd78 + sourceRevisionDigest: sha256:36a8b6581aacc9133bd49339da1d2410a9fa8ee2d3c51a5ec91dc12550cb4221 + sourceBlobDigest: sha256:123b96271beeb26e8318ce2f49bb29a3969f6709eeb44d59bd9d754d75825d6a tags: - latest - 1.0.0 targets: mistralai-azure-sdk: source: mistral-azure-source - sourceNamespace: mistral-openapi-azure - sourceRevisionDigest: sha256:faccd49c0a52252b8dfcc666a6a1ba3fa5c7eb36f93c58c9b49547c98a254918 - sourceBlobDigest: sha256:b6f756ef1d57d93defe29a9f6789c746bd0c3b09e3f9e5fa0344ddf9ca47e5d7 + sourceNamespace: mistral-azure-source + sourceRevisionDigest: sha256:770ac07c9b06ef11f4d85ad9c7cc379e0d38d23fa2d9d6eb5651575e02d9026e + sourceBlobDigest: sha256:bfe5b11add50de471036f70a7a10994e81f96e2518daaec547e746a3e59b9524 codeSamplesNamespace: mistral-openapi-azure-code-samples - codeSamplesRevisionDigest: sha256:aecd1edc929a931b5f9ce9013142d15163e9f4b9f6e11d96e96123177edd0d62 + codeSamplesRevisionDigest: sha256:431e4c0d580bb13706ee04dc2664aa732ad3c40c134a3f2cef813c0426a5995d mistralai-gcp-sdk: source: mistral-google-cloud-source - sourceNamespace: mistral-openapi-google-cloud - sourceRevisionDigest: sha256:34edde5edcaf43acc036c9635cf4c60ce4e86f49b3fa2bed8960b995454e8d7c - sourceBlobDigest: sha256:4e9e44f332073700612c1311c0d844241cc4b206140b82d5951879e1efdb0f2d + sourceNamespace: mistral-google-cloud-source + sourceRevisionDigest: sha256:7a28488e88f783adfc2bd9d6c633103cdf76075afe92a11117eb679d170f590f + sourceBlobDigest: sha256:a7a4ba0f3c0dd2d9e85c6cdb04cf142af87d4cc369935db797755d35d52e3be0 codeSamplesNamespace: mistral-openapi-google-cloud-code-samples - codeSamplesRevisionDigest: sha256:5da37f5c1b536a390868432838e6bcb81db4a4701a44b28f19c6ebb64c3c499f + codeSamplesRevisionDigest: sha256:db64d8f29701a872fa964a12dd7acdedd332a1ddb40af209ad42c70ef19b0a00 mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:a4f1649fc6d293f9cf3652df5b6dea61d16c4824bbc429194f9ec20b9f798a8c - sourceBlobDigest: sha256:16df92d5f5fb961cb5677c2db17092202548f7d2aea908d800653d1b5596cd78 + sourceRevisionDigest: sha256:36a8b6581aacc9133bd49339da1d2410a9fa8ee2d3c51a5ec91dc12550cb4221 + sourceBlobDigest: sha256:123b96271beeb26e8318ce2f49bb29a3969f6709eeb44d59bd9d754d75825d6a codeSamplesNamespace: mistral-openapi-python-code-samples - codeSamplesRevisionDigest: sha256:0768cbd3d8153d3e6f7de9fc36f22055898671d601895f2f55b95c0fec812490 + codeSamplesRevisionDigest: sha256:d2a3d80cb1096f0c10b28e7574fb2df4889d9477d7e6972260b1b1b9c6c8c121 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.796.4 @@ -50,9 +50,13 @@ workflow: mistral-azure-source: inputs: - location: ../openapi/specs/v2/azure-sdk.yaml + registry: + location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-azure-source mistral-google-cloud-source: inputs: - location: ../openapi/specs/v2/google-cloud-sdk.yaml + registry: + location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-google-cloud-source mistral-openapi: inputs: - location: ../openapi/specs/v2/main-sdk.yaml diff --git a/README-PYPI.md b/README-PYPI.md index b4e53c749..ae87a137d 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -571,6 +571,24 @@ print(res.choices[0].message.content) * [update](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#update) - Update a connector. * [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#delete) - Delete a connector. +### [Beta.Context.SearchIndexes](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md) + +* [create](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#create) - Create a managed index +* [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#list) - List managed indexes +* [get](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#get) - Get a managed index +* [update](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#update) - Update a managed index schema +* [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#delete) - Delete a managed index +* [ingest_documents](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#ingest_documents) - Ingest documents into a managed index +* [delete_documents](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#delete_documents) - Delete documents from a managed index +* [search](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#search) - Search a managed index +* [navigate](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#navigate) - Navigate to adjacent chunks +* [read](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#read) - Read chunks within a span +* [grep](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#grep) - Grep for a pattern within a source +* [get_chunk](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#get_chunk) - Get a single chunk by id +* [get_index_summary](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#get_index_summary) - Get Managed Index Summary +* [generate_index_summary](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#generate_index_summary) - Generate a summary field for a managed index +* [set_index_summary](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#set_index_summary) - Set Managed Index Summary + ### [Beta.Conversations](https://github.com/mistralai/client-python/blob/main/docs/sdks/conversations/README.md) * [start](https://github.com/mistralai/client-python/blob/main/docs/sdks/conversations/README.md#start) - Create a conversation and append entries to it. @@ -730,30 +748,12 @@ print(res.choices[0].message.content) * [register](https://github.com/mistralai/client-python/blob/main/docs/sdks/ingestionpipelineconfigurations/README.md#register) - Register Config * [update_run_info](https://github.com/mistralai/client-python/blob/main/docs/sdks/ingestionpipelineconfigurations/README.md#update_run_info) - Update Run Info -### [Beta.Rag.ManagedIndexes](https://github.com/mistralai/client-python/blob/main/docs/sdks/managedindexes/README.md) - -* [create](https://github.com/mistralai/client-python/blob/main/docs/sdks/managedindexes/README.md#create) - Create a managed index -* [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/managedindexes/README.md#list) - List managed indexes -* [get](https://github.com/mistralai/client-python/blob/main/docs/sdks/managedindexes/README.md#get) - Get a managed index -* [update](https://github.com/mistralai/client-python/blob/main/docs/sdks/managedindexes/README.md#update) - Update a managed index schema -* [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/managedindexes/README.md#delete) - Delete a managed index -* [ingest_documents](https://github.com/mistralai/client-python/blob/main/docs/sdks/managedindexes/README.md#ingest_documents) - Ingest documents into a managed index -* [delete_documents](https://github.com/mistralai/client-python/blob/main/docs/sdks/managedindexes/README.md#delete_documents) - Delete documents from a managed index -* [search](https://github.com/mistralai/client-python/blob/main/docs/sdks/managedindexes/README.md#search) - Search a managed index -* [navigate](https://github.com/mistralai/client-python/blob/main/docs/sdks/managedindexes/README.md#navigate) - Navigate to adjacent chunks -* [read](https://github.com/mistralai/client-python/blob/main/docs/sdks/managedindexes/README.md#read) - Read chunks within a span -* [grep](https://github.com/mistralai/client-python/blob/main/docs/sdks/managedindexes/README.md#grep) - Grep for a pattern within a source -* [get_chunk](https://github.com/mistralai/client-python/blob/main/docs/sdks/managedindexes/README.md#get_chunk) - Get a single chunk by id -* [get_index_summary](https://github.com/mistralai/client-python/blob/main/docs/sdks/managedindexes/README.md#get_index_summary) - Get Managed Index Summary -* [generate_index_summary](https://github.com/mistralai/client-python/blob/main/docs/sdks/managedindexes/README.md#generate_index_summary) - Generate a summary field for a managed index -* [set_index_summary](https://github.com/mistralai/client-python/blob/main/docs/sdks/managedindexes/README.md#set_index_summary) - Set Managed Index Summary - -### [Beta.Rag.SearchIndexes](https://github.com/mistralai/client-python/blob/main/docs/sdks/searchindexes/README.md) - -* [get_deployment_summaries](https://github.com/mistralai/client-python/blob/main/docs/sdks/searchindexes/README.md#get_deployment_summaries) - Get Deployment Summaries -* [register_deployment](https://github.com/mistralai/client-python/blob/main/docs/sdks/searchindexes/README.md#register_deployment) - Register (or re-register) a search index -* [unregister_deployment](https://github.com/mistralai/client-python/blob/main/docs/sdks/searchindexes/README.md#unregister_deployment) - Unregister Deployment -* [update_index_metrics](https://github.com/mistralai/client-python/blob/main/docs/sdks/searchindexes/README.md#update_index_metrics) - Update Index Metrics +### [Beta.Rag.SearchIndexes](https://github.com/mistralai/client-python/blob/main/docs/sdks/ragsearchindexes/README.md) + +* [get_deployment_summaries](https://github.com/mistralai/client-python/blob/main/docs/sdks/ragsearchindexes/README.md#get_deployment_summaries) - Get Deployment Summaries +* [register_deployment](https://github.com/mistralai/client-python/blob/main/docs/sdks/ragsearchindexes/README.md#register_deployment) - Register (or re-register) a search index +* [unregister_deployment](https://github.com/mistralai/client-python/blob/main/docs/sdks/ragsearchindexes/README.md#unregister_deployment) - Unregister Deployment +* [update_index_metrics](https://github.com/mistralai/client-python/blob/main/docs/sdks/ragsearchindexes/README.md#update_index_metrics) - Update Index Metrics ### [Beta.ServiceAccounts](https://github.com/mistralai/client-python/blob/main/docs/sdks/serviceaccounts/README.md) @@ -778,6 +778,14 @@ print(res.choices[0].message.content) * [get_version](https://github.com/mistralai/client-python/blob/main/docs/sdks/skills/README.md#get_version) - GetSkillVersion * [update_version_metadata](https://github.com/mistralai/client-python/blob/main/docs/sdks/skills/README.md#update_version_metadata) - UpdateSkillVersionMetadata +### [Beta.Triggers](https://github.com/mistralai/client-python/blob/main/docs/sdks/triggers/README.md) + +* [create](https://github.com/mistralai/client-python/blob/main/docs/sdks/triggers/README.md#create) - Create Trigger +* [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/triggers/README.md#list) - List Triggers +* [get](https://github.com/mistralai/client-python/blob/main/docs/sdks/triggers/README.md#get) - Get Trigger +* [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/triggers/README.md#delete) - Delete Trigger +* [list_events](https://github.com/mistralai/client-python/blob/main/docs/sdks/triggers/README.md#list_events) - List Trigger Events + ### [Beta.Users](https://github.com/mistralai/client-python/blob/main/docs/sdks/users/README.md) * [get_identity](https://github.com/mistralai/client-python/blob/main/docs/sdks/users/README.md#get_identity) - Get Identity @@ -785,6 +793,14 @@ print(res.choices[0].message.content) * [list_workspaces](https://github.com/mistralai/client-python/blob/main/docs/sdks/users/README.md#list_workspaces) - List Workspaces * [whoami](https://github.com/mistralai/client-python/blob/main/docs/sdks/users/README.md#whoami) - Whoami +### [Beta.Webhooks](https://github.com/mistralai/client-python/blob/main/docs/sdks/webhooks/README.md) + +* [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/webhooks/README.md#list) - List Webhooks +* [create](https://github.com/mistralai/client-python/blob/main/docs/sdks/webhooks/README.md#create) - Create Webhook +* [get](https://github.com/mistralai/client-python/blob/main/docs/sdks/webhooks/README.md#get) - Get Webhook +* [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/webhooks/README.md#delete) - Delete Webhook +* [get_signing_secret](https://github.com/mistralai/client-python/blob/main/docs/sdks/webhooks/README.md#get_signing_secret) - Get Webhook Signing Secret + ### [Chat](https://github.com/mistralai/client-python/blob/main/docs/sdks/chat/README.md) * [complete](https://github.com/mistralai/client-python/blob/main/docs/sdks/chat/README.md#complete) - Chat Completion @@ -853,6 +869,7 @@ print(res.choices[0].message.content) * [get_workflow_registration](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflows/README.md#get_workflow_registration) - Get Workflow Registration * [bulk_archive_workflows](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflows/README.md#bulk_archive_workflows) - Bulk Archive Workflows * [bulk_unarchive_workflows](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflows/README.md#bulk_unarchive_workflows) - Bulk Unarchive Workflows +* [add_workflow_tags](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflows/README.md#add_workflow_tags) - Add Workflow Tags * [archive_workflow](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflows/README.md#archive_workflow) - Archive Workflow * [unarchive_workflow](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflows/README.md#unarchive_workflow) - Unarchive Workflow @@ -868,6 +885,7 @@ print(res.choices[0].message.content) * [start_deployment](https://github.com/mistralai/client-python/blob/main/docs/sdks/deployments/README.md#start_deployment) - Start Deployment * [restart_deployment](https://github.com/mistralai/client-python/blob/main/docs/sdks/deployments/README.md#restart_deployment) - Restart Deployment * [list_deployment_workers](https://github.com/mistralai/client-python/blob/main/docs/sdks/deployments/README.md#list_deployment_workers) - List Deployment Workers +* [get_deployment_archive](https://github.com/mistralai/client-python/blob/main/docs/sdks/deployments/README.md#get_deployment_archive) - Get Deployment Archive * [get_deployment_logs](https://github.com/mistralai/client-python/blob/main/docs/sdks/deployments/README.md#get_deployment_logs) - Get Deployment Logs * [stream_deployment_logs](https://github.com/mistralai/client-python/blob/main/docs/sdks/deployments/README.md#stream_deployment_logs) - Stream Deployment Logs @@ -986,7 +1004,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.rag.managed_indexes.generate_index_summary(language="en", index_name="", force=False) + res = mistral.beta.context.search_indexes.generate_index_summary(language="en", index_name="", force=False) with res as jsonl_stream: for event in jsonl_stream: @@ -1166,8 +1184,8 @@ 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 178 of 290 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 65 of 290 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 302 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 65 of 302 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 e6576d750..59bbec57c 100644 --- a/README.md +++ b/README.md @@ -571,6 +571,24 @@ print(res.choices[0].message.content) * [update](docs/sdks/connectors/README.md#update) - Update a connector. * [delete](docs/sdks/connectors/README.md#delete) - Delete a connector. +### [Beta.Context.SearchIndexes](docs/sdks/contextsearchindexes/README.md) + +* [create](docs/sdks/contextsearchindexes/README.md#create) - Create a managed index +* [list](docs/sdks/contextsearchindexes/README.md#list) - List managed indexes +* [get](docs/sdks/contextsearchindexes/README.md#get) - Get a managed index +* [update](docs/sdks/contextsearchindexes/README.md#update) - Update a managed index schema +* [delete](docs/sdks/contextsearchindexes/README.md#delete) - Delete a managed index +* [ingest_documents](docs/sdks/contextsearchindexes/README.md#ingest_documents) - Ingest documents into a managed index +* [delete_documents](docs/sdks/contextsearchindexes/README.md#delete_documents) - Delete documents from a managed index +* [search](docs/sdks/contextsearchindexes/README.md#search) - Search a managed index +* [navigate](docs/sdks/contextsearchindexes/README.md#navigate) - Navigate to adjacent chunks +* [read](docs/sdks/contextsearchindexes/README.md#read) - Read chunks within a span +* [grep](docs/sdks/contextsearchindexes/README.md#grep) - Grep for a pattern within a source +* [get_chunk](docs/sdks/contextsearchindexes/README.md#get_chunk) - Get a single chunk by id +* [get_index_summary](docs/sdks/contextsearchindexes/README.md#get_index_summary) - Get Managed Index Summary +* [generate_index_summary](docs/sdks/contextsearchindexes/README.md#generate_index_summary) - Generate a summary field for a managed index +* [set_index_summary](docs/sdks/contextsearchindexes/README.md#set_index_summary) - Set Managed Index Summary + ### [Beta.Conversations](docs/sdks/conversations/README.md) * [start](docs/sdks/conversations/README.md#start) - Create a conversation and append entries to it. @@ -730,30 +748,12 @@ print(res.choices[0].message.content) * [register](docs/sdks/ingestionpipelineconfigurations/README.md#register) - Register Config * [update_run_info](docs/sdks/ingestionpipelineconfigurations/README.md#update_run_info) - Update Run Info -### [Beta.Rag.ManagedIndexes](docs/sdks/managedindexes/README.md) - -* [create](docs/sdks/managedindexes/README.md#create) - Create a managed index -* [list](docs/sdks/managedindexes/README.md#list) - List managed indexes -* [get](docs/sdks/managedindexes/README.md#get) - Get a managed index -* [update](docs/sdks/managedindexes/README.md#update) - Update a managed index schema -* [delete](docs/sdks/managedindexes/README.md#delete) - Delete a managed index -* [ingest_documents](docs/sdks/managedindexes/README.md#ingest_documents) - Ingest documents into a managed index -* [delete_documents](docs/sdks/managedindexes/README.md#delete_documents) - Delete documents from a managed index -* [search](docs/sdks/managedindexes/README.md#search) - Search a managed index -* [navigate](docs/sdks/managedindexes/README.md#navigate) - Navigate to adjacent chunks -* [read](docs/sdks/managedindexes/README.md#read) - Read chunks within a span -* [grep](docs/sdks/managedindexes/README.md#grep) - Grep for a pattern within a source -* [get_chunk](docs/sdks/managedindexes/README.md#get_chunk) - Get a single chunk by id -* [get_index_summary](docs/sdks/managedindexes/README.md#get_index_summary) - Get Managed Index Summary -* [generate_index_summary](docs/sdks/managedindexes/README.md#generate_index_summary) - Generate a summary field for a managed index -* [set_index_summary](docs/sdks/managedindexes/README.md#set_index_summary) - Set Managed Index Summary - -### [Beta.Rag.SearchIndexes](docs/sdks/searchindexes/README.md) - -* [get_deployment_summaries](docs/sdks/searchindexes/README.md#get_deployment_summaries) - Get Deployment Summaries -* [register_deployment](docs/sdks/searchindexes/README.md#register_deployment) - Register (or re-register) a search index -* [unregister_deployment](docs/sdks/searchindexes/README.md#unregister_deployment) - Unregister Deployment -* [update_index_metrics](docs/sdks/searchindexes/README.md#update_index_metrics) - Update Index Metrics +### [Beta.Rag.SearchIndexes](docs/sdks/ragsearchindexes/README.md) + +* [get_deployment_summaries](docs/sdks/ragsearchindexes/README.md#get_deployment_summaries) - Get Deployment Summaries +* [register_deployment](docs/sdks/ragsearchindexes/README.md#register_deployment) - Register (or re-register) a search index +* [unregister_deployment](docs/sdks/ragsearchindexes/README.md#unregister_deployment) - Unregister Deployment +* [update_index_metrics](docs/sdks/ragsearchindexes/README.md#update_index_metrics) - Update Index Metrics ### [Beta.ServiceAccounts](docs/sdks/serviceaccounts/README.md) @@ -778,6 +778,14 @@ print(res.choices[0].message.content) * [get_version](docs/sdks/skills/README.md#get_version) - GetSkillVersion * [update_version_metadata](docs/sdks/skills/README.md#update_version_metadata) - UpdateSkillVersionMetadata +### [Beta.Triggers](docs/sdks/triggers/README.md) + +* [create](docs/sdks/triggers/README.md#create) - Create Trigger +* [list](docs/sdks/triggers/README.md#list) - List Triggers +* [get](docs/sdks/triggers/README.md#get) - Get Trigger +* [delete](docs/sdks/triggers/README.md#delete) - Delete Trigger +* [list_events](docs/sdks/triggers/README.md#list_events) - List Trigger Events + ### [Beta.Users](docs/sdks/users/README.md) * [get_identity](docs/sdks/users/README.md#get_identity) - Get Identity @@ -785,6 +793,14 @@ print(res.choices[0].message.content) * [list_workspaces](docs/sdks/users/README.md#list_workspaces) - List Workspaces * [whoami](docs/sdks/users/README.md#whoami) - Whoami +### [Beta.Webhooks](docs/sdks/webhooks/README.md) + +* [list](docs/sdks/webhooks/README.md#list) - List Webhooks +* [create](docs/sdks/webhooks/README.md#create) - Create Webhook +* [get](docs/sdks/webhooks/README.md#get) - Get Webhook +* [delete](docs/sdks/webhooks/README.md#delete) - Delete Webhook +* [get_signing_secret](docs/sdks/webhooks/README.md#get_signing_secret) - Get Webhook Signing Secret + ### [Chat](docs/sdks/chat/README.md) * [complete](docs/sdks/chat/README.md#complete) - Chat Completion @@ -853,6 +869,7 @@ print(res.choices[0].message.content) * [get_workflow_registration](docs/sdks/workflows/README.md#get_workflow_registration) - Get Workflow Registration * [bulk_archive_workflows](docs/sdks/workflows/README.md#bulk_archive_workflows) - Bulk Archive Workflows * [bulk_unarchive_workflows](docs/sdks/workflows/README.md#bulk_unarchive_workflows) - Bulk Unarchive Workflows +* [add_workflow_tags](docs/sdks/workflows/README.md#add_workflow_tags) - Add Workflow Tags * [archive_workflow](docs/sdks/workflows/README.md#archive_workflow) - Archive Workflow * [unarchive_workflow](docs/sdks/workflows/README.md#unarchive_workflow) - Unarchive Workflow @@ -868,6 +885,7 @@ print(res.choices[0].message.content) * [start_deployment](docs/sdks/deployments/README.md#start_deployment) - Start Deployment * [restart_deployment](docs/sdks/deployments/README.md#restart_deployment) - Restart Deployment * [list_deployment_workers](docs/sdks/deployments/README.md#list_deployment_workers) - List Deployment Workers +* [get_deployment_archive](docs/sdks/deployments/README.md#get_deployment_archive) - Get Deployment Archive * [get_deployment_logs](docs/sdks/deployments/README.md#get_deployment_logs) - Get Deployment Logs * [stream_deployment_logs](docs/sdks/deployments/README.md#stream_deployment_logs) - Stream Deployment Logs @@ -986,7 +1004,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.rag.managed_indexes.generate_index_summary(language="en", index_name="", force=False) + res = mistral.beta.context.search_indexes.generate_index_summary(language="en", index_name="", force=False) with res as jsonl_stream: for event in jsonl_stream: @@ -1166,8 +1184,8 @@ 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 178 of 290 methods.* -* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 65 of 290 methods.* +* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 189 of 302 methods.* +* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 65 of 302 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. @@ -1465,8 +1483,6 @@ with Mistral(api_key=os.environ["MISTRAL_API_KEY"]) as client: ) ``` -In dedicated mode, traces go to `/telemetry/v1/traces` on the client's `server_url` if one is set, otherwise to `https://api.mistral.ai`, including for the named `eu`/`us` servers. Set `MISTRAL_OTLP_TRACES_ENDPOINT` to send traces to a separate collector. - ### Provider modes `configure_telemetry(client, provider=...)` selects where spans go and who owns the export pipeline: @@ -1554,7 +1570,7 @@ configure_telemetry( | Variable | Description | Default | | -------- | ----------- | ------- | | `MISTRAL_SDK_TELEMETRY` | Auto-enable telemetry: `dedicated`, `global`, or `false`. | unset (disabled) | -| `MISTRAL_OTLP_TRACES_ENDPOINT` | Override the OTLP traces endpoint used in dedicated mode. | Client `server_url` + `/telemetry/v1/traces` if set, otherwise `https://api.mistral.ai/telemetry/v1/traces` | +| `MISTRAL_OTLP_TRACES_ENDPOINT` | Override the OTLP traces endpoint used in dedicated mode. | `https://api.mistral.ai/telemetry/v1/traces` | | `MISTRAL_SDK_DEBUG_TRACING` | Set to `true` for verbose tracing logs. | `false` | | `MISTRAL_API_KEY` | Used as the bearer token for the dedicated-mode exporter. | — | diff --git a/RELEASES.md b/RELEASES.md index 1e0cae9e3..af43e4fe5 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1676,3 +1676,122 @@ Based on: - [python v3.6.0] . ### Releases - [PyPI v3.6.0] https://pypi.org/project/mistralai/3.6.0 - . + +## 2026-11-01 13:00:38 +### 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 +Removed from the stable API surface (1): +- `VoiceCreateRequest.slug` +#### Stable type changes +Changed types or signatures on the stable surface (6): +- `DeploymentWorkerSpecInput.github_url: str -> OptionalNullable[str]` +- `DeploymentWorkerSpecInputTypedDict.github_url: str -> NotRequired[Nullable[str]]` +- `VoiceCreateRequest.gender: OptionalNullable[str] -> OptionalNullable[VoiceGender]` +- `VoiceCreateRequestTypedDict.gender: NotRequired[Nullable[str]] -> NotRequired[Nullable[VoiceGender]]` +- `VoiceUpdateRequest.gender: OptionalNullable[str] -> OptionalNullable[VoiceGender]` +- `VoiceUpdateRequestTypedDict.gender: NotRequired[Nullable[str]] -> NotRequired[Nullable[VoiceGender]]` +#### Beta surface changes +Removed from the beta surface (41): +- `ManagedIndexes` +- `SearchIndexes` +- `Rag.managed_indexes` +- `ManagedIndexes.create` +- `ManagedIndexes.create_async` +- `ManagedIndexes.delete` +- `ManagedIndexes.delete_async` +- `ManagedIndexes.delete_documents` +- `ManagedIndexes.delete_documents_async` +- `ManagedIndexes.generate_index_summary` +- `ManagedIndexes.generate_index_summary_async` +- `ManagedIndexes.get` +- `ManagedIndexes.get_async` +- `ManagedIndexes.get_chunk` +- `ManagedIndexes.get_chunk_async` +- `ManagedIndexes.get_index_summary` +- `ManagedIndexes.get_index_summary_async` +- `ManagedIndexes.grep` +- `ManagedIndexes.grep_async` +- `ManagedIndexes.ingest_documents` +- `ManagedIndexes.ingest_documents_async` +- `ManagedIndexes.list` +- `ManagedIndexes.list_async` +- `ManagedIndexes.navigate` +- `ManagedIndexes.navigate_async` +- ...and 16 more + +Changed types or signatures in beta (1): +- `Rag.search_indexes: SearchIndexes -> RagSearchIndexes` + +Now required on an existing beta model (3): +- `Beta.context` +- `Beta.triggers` +- `Beta.webhooks` +
+ +### API changes +#### Breaking changes + +- Changed field `gender` in `sdk.audio.voices.create()` and `sdk.audio.voices.update()`. +- Removed field `slug` from request in `sdk.audio.voices.create()`. + +#### Beta API changes + +- Removed beta operations: `sdk.beta.rag.managed_indexes.list()`, `sdk.beta.rag.managed_indexes.create()`, `sdk.beta.rag.managed_indexes.get()`, `sdk.beta.rag.managed_indexes.update()`, `sdk.beta.rag.managed_indexes.delete()`, `sdk.beta.rag.managed_indexes.ingest_documents()`, `sdk.beta.rag.managed_indexes.delete_documents()`, `sdk.beta.rag.managed_indexes.search()`, `sdk.beta.rag.managed_indexes.navigate()`, `sdk.beta.rag.managed_indexes.read()`, `sdk.beta.rag.managed_indexes.grep()`, `sdk.beta.rag.managed_indexes.get_chunk()`, `sdk.beta.rag.managed_indexes.get_index_summary()`, and `sdk.beta.rag.managed_indexes.set_index_summary()`. + +#### Added operations + +Stable: + +- `sdk.workflows.add_workflow_tags()` +- `sdk.workflows.deployments.get_deployment_archive()` + +Beta: + +- `sdk.beta.context.search_indexes.list()` +- `sdk.beta.context.search_indexes.create()` +- `sdk.beta.context.search_indexes.get()` +- `sdk.beta.context.search_indexes.update()` +- `sdk.beta.context.search_indexes.delete()` +- `sdk.beta.context.search_indexes.ingest_documents()` +- `sdk.beta.context.search_indexes.delete_documents()` +- `sdk.beta.context.search_indexes.search()` +- `sdk.beta.context.search_indexes.navigate()` +- `sdk.beta.context.search_indexes.read()` +- `sdk.beta.context.search_indexes.grep()` +- `sdk.beta.context.search_indexes.get_chunk()` +- `sdk.beta.context.search_indexes.get_index_summary()` +- `sdk.beta.context.search_indexes.set_index_summary()` +- `sdk.beta.triggers.list()` +- `sdk.beta.triggers.create()` +- `sdk.beta.triggers.get()` +- `sdk.beta.triggers.delete()` +- `sdk.beta.triggers.list_events()` +- `sdk.beta.webhooks.list()` +- `sdk.beta.webhooks.create()` +- `sdk.beta.webhooks.get()` +- `sdk.beta.webhooks.delete()` +- `sdk.beta.webhooks.get_signing_secret()` + +#### Schema changes + +- Added response fields `kind` and `spec` in `sdk.beta.observability.evaluations.runs.search()`, `sdk.beta.observability.evaluations.runs.search_all()`, `sdk.beta.observability.evaluations.runs.get()`, and `sdk.beta.observability.evaluations.optimizations.list_trials()`. +- Added response field `service_account_id` across beta observability logs, beta observability traces, beta observability spans (8 operations). +- Added response field `openapi_spec` in `sdk.beta.connectors.list()`, `sdk.beta.connectors.create()`, `sdk.beta.connectors.get()`, and `sdk.beta.connectors.update()`. +- Added response field `archive_id` across workflows deployments (8 operations). +- Added field `requested_roles` across workflows deployments (8 operations). +- Added request field `archive_id` in `sdk.workflows.deployments.create_deployment()` and `sdk.workflows.deployments.update_deployment()`. +- Changed request field `github_url` in `sdk.workflows.deployments.create_deployment()`. + +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.796.4 (2.935.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v3.7.0] . +### Releases +- [PyPI v3.7.0] https://pypi.org/project/mistralai/3.7.0 - . diff --git a/docs/models/addworkflowtagsv1workflowsworkflowidentifiertagspostrequest.md b/docs/models/addworkflowtagsv1workflowsworkflowidentifiertagspostrequest.md new file mode 100644 index 000000000..ffdb9e413 --- /dev/null +++ b/docs/models/addworkflowtagsv1workflowsworkflowidentifiertagspostrequest.md @@ -0,0 +1,9 @@ +# AddWorkflowTagsV1WorkflowsWorkflowIdentifierTagsPostRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `workflow_identifier` | *str* | :heavy_check_mark: | N/A | +| `workflow_tags_add_request` | [models.WorkflowTagsAddRequest](../models/workflowtagsaddrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectoropenapispec.md b/docs/models/connectoropenapispec.md new file mode 100644 index 000000000..ed2b22794 --- /dev/null +++ b/docs/models/connectoropenapispec.md @@ -0,0 +1,8 @@ +# ConnectorOpenAPISpec + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `source` | [Nullable[models.OpenAPISpecSource]](../models/openapispecsource.md) | :heavy_check_mark: | Where the spec came from. Null when unknown, e.g. a file uploaded without a name, or hidden, e.g. on Mistral connectors. | \ No newline at end of file diff --git a/docs/models/createtrigger.md b/docs/models/createtrigger.md new file mode 100644 index 000000000..5b692ad07 --- /dev/null +++ b/docs/models/createtrigger.md @@ -0,0 +1,13 @@ +# CreateTrigger + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `event_source_id` | *str* | :heavy_check_mark: | ID of the event source that fires this trigger | +| `handler` | [models.TriggerHandler](../models/triggerhandler.md) | :heavy_check_mark: | N/A | +| `action` | [models.CreateTriggerAction](../models/createtriggeraction.md) | :heavy_check_mark: | N/A | +| `filters` | *OptionalNullable[str]* | :heavy_minus_sign: | jmespath expression to filter events, e.g. event_type == 'push' && repository.name == 'dashboard' | +| `owner_type` | [models.TriggersOwnerType](../models/triggersownertype.md) | :heavy_check_mark: | N/A | +| `title` | *str* | :heavy_check_mark: | Human-readable title of the trigger | \ No newline at end of file diff --git a/docs/models/createtriggeraction.md b/docs/models/createtriggeraction.md new file mode 100644 index 000000000..8c2767596 --- /dev/null +++ b/docs/models/createtriggeraction.md @@ -0,0 +1,9 @@ +# CreateTriggerAction + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `primitive_id` | *str* | :heavy_check_mark: | ID of the target primitive (workflow, agent, or app) | +| `type` | [models.TriggerActionType](../models/triggeractiontype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/createwebhook.md b/docs/models/createwebhook.md new file mode 100644 index 000000000..44680f1af --- /dev/null +++ b/docs/models/createwebhook.md @@ -0,0 +1,22 @@ +# CreateWebhook + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `provider` | [models.WebhookProvider](../models/webhookprovider.md) | :heavy_check_mark: | N/A | +| `owner_type` | [Optional[models.TriggersOwnerType]](../models/triggersownertype.md) | :heavy_minus_sign: | N/A | +| `name` | *str* | :heavy_check_mark: | Human-readable name for this webhook | +| `secret` | *OptionalNullable[str]* | :heavy_minus_sign: | Signing secret provided by the third-party provider | +| `encryption_key` | *OptionalNullable[str]* | :heavy_minus_sign: | Encryption key used to decrypt webhook payloads | +| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `signature_hash_algorithm` | [OptionalNullable[models.WebhookSignatureHashAlgorithm]](../models/webhooksignaturehashalgorithm.md) | :heavy_minus_sign: | N/A | +| `signature_header_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `validity_period_second` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `signature_extractor_regex` | *OptionalNullable[str]* | :heavy_minus_sign: | Regex to extract signature, eg sha256=(.*) | +| `timestamp_extractor_regex` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `signature_payload_pattern` | *OptionalNullable[str]* | :heavy_minus_sign: | Pattern for signature payload, eg {body} or {timestamp}.{body} | +| `signature_encoding` | [OptionalNullable[models.WebhookSignatureEncoding]](../models/webhooksignatureencoding.md) | :heavy_minus_sign: | N/A | +| `success_status_code` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `event_type_path` | *OptionalNullable[str]* | :heavy_minus_sign: | Path to extract event type, eg body.type or headers.X-GitHub-Event | \ No newline at end of file diff --git a/docs/models/deletetriggerv1triggerstriggeriddeleterequest.md b/docs/models/deletetriggerv1triggerstriggeriddeleterequest.md new file mode 100644 index 000000000..1831853d7 --- /dev/null +++ b/docs/models/deletetriggerv1triggerstriggeriddeleterequest.md @@ -0,0 +1,8 @@ +# DeleteTriggerV1TriggersTriggerIDDeleteRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `trigger_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/deletewebhookv1webhookswebhookiddeleterequest.md b/docs/models/deletewebhookv1webhookswebhookiddeleterequest.md new file mode 100644 index 000000000..79cb040ed --- /dev/null +++ b/docs/models/deletewebhookv1webhookswebhookiddeleterequest.md @@ -0,0 +1,8 @@ +# DeleteWebhookV1WebhooksWebhookIDDeleteRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `webhook_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/deploymentarchiveresponse.md b/docs/models/deploymentarchiveresponse.md new file mode 100644 index 000000000..c2b2b8d31 --- /dev/null +++ b/docs/models/deploymentarchiveresponse.md @@ -0,0 +1,11 @@ +# DeploymentArchiveResponse + +The archive a managed deployment builds from, with a signed URL to download it. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `archive_id` | *str* | :heavy_check_mark: | Mistral Cloud archive the worker builds from | +| `download_url` | *OptionalNullable[str]* | :heavy_minus_sign: | A signed URL to download the archive, which expires within 24 hours. Null once Mistral Cloud has deleted the archive. | \ No newline at end of file diff --git a/docs/models/deploymentworkerspecinput.md b/docs/models/deploymentworkerspecinput.md index 616e9aa17..998865a7d 100644 --- a/docs/models/deploymentworkerspecinput.md +++ b/docs/models/deploymentworkerspecinput.md @@ -3,8 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `github_url` | *str* | :heavy_check_mark: | N/A | -| `revision` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `backend_spec` | [OptionalNullable[models.DeploymentMistralCloudBackendSpec]](../models/deploymentmistralcloudbackendspec.md) | :heavy_minus_sign: | Backend-specific configuration for the Mistral Cloud backend. | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `github_url` | *OptionalNullable[str]* | :heavy_minus_sign: | GitHub repository to build the worker from. Set this or 'archive_id', not both. | +| `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. | +| `backend_spec` | [OptionalNullable[models.DeploymentMistralCloudBackendSpec]](../models/deploymentmistralcloudbackendspec.md) | :heavy_minus_sign: | Backend-specific configuration for the Mistral Cloud backend. | +| `requested_roles` | List[*str*] | :heavy_minus_sign: | Workspace roles, by name, that the deployment's service account holds beyond `workflow_executor`. Granted only if the deploying user holds them. | \ No newline at end of file diff --git a/docs/models/deploymentworkerspecresponse.md b/docs/models/deploymentworkerspecresponse.md index 8c857ee32..31b742e86 100644 --- a/docs/models/deploymentworkerspecresponse.md +++ b/docs/models/deploymentworkerspecresponse.md @@ -5,9 +5,11 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -| `github_url` | *str* | :heavy_check_mark: | N/A | +| `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 | | `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 | \ No newline at end of file +| `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/getdeploymentarchivev1workflowsdeploymentsnamearchivegetrequest.md b/docs/models/getdeploymentarchivev1workflowsdeploymentsnamearchivegetrequest.md new file mode 100644 index 000000000..4fb0d705e --- /dev/null +++ b/docs/models/getdeploymentarchivev1workflowsdeploymentsnamearchivegetrequest.md @@ -0,0 +1,8 @@ +# GetDeploymentArchiveV1WorkflowsDeploymentsNameArchiveGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getlog.md b/docs/models/getlog.md index 7a1ab4b9a..4b618a221 100644 --- a/docs/models/getlog.md +++ b/docs/models/getlog.md @@ -9,6 +9,7 @@ | `organization_id` | *str* | :heavy_check_mark: | N/A | | `workspace_id` | *str* | :heavy_check_mark: | N/A | | `user_id` | *str* | :heavy_check_mark: | N/A | +| `service_account_id` | *Optional[str]* | :heavy_minus_sign: | N/A | | `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | `trace_id` | *str* | :heavy_check_mark: | N/A | | `span_id` | *str* | :heavy_check_mark: | N/A | diff --git a/docs/models/getspan.md b/docs/models/getspan.md index eeb9a38b8..35a7b74c6 100644 --- a/docs/models/getspan.md +++ b/docs/models/getspan.md @@ -9,6 +9,7 @@ | `organization_id` | *str* | :heavy_check_mark: | N/A | | `workspace_id` | *str* | :heavy_check_mark: | N/A | | `user_id` | *str* | :heavy_check_mark: | N/A | +| `service_account_id` | *Optional[str]* | :heavy_minus_sign: | N/A | | `trace_id` | *str* | :heavy_check_mark: | N/A | | `span_id` | *str* | :heavy_check_mark: | N/A | | `parent_span_id` | *str* | :heavy_check_mark: | N/A | diff --git a/docs/models/getspanevaluation.md b/docs/models/getspanevaluation.md index d1365ad3a..fa9832b0e 100644 --- a/docs/models/getspanevaluation.md +++ b/docs/models/getspanevaluation.md @@ -9,6 +9,7 @@ | `organization_id` | *str* | :heavy_check_mark: | N/A | | `workspace_id` | *str* | :heavy_check_mark: | N/A | | `user_id` | *str* | :heavy_check_mark: | N/A | +| `service_account_id` | *Optional[str]* | :heavy_minus_sign: | N/A | | `trace_id` | *str* | :heavy_check_mark: | N/A | | `span_id` | *str* | :heavy_check_mark: | N/A | | `response_id` | *str* | :heavy_check_mark: | N/A | diff --git a/docs/models/gettrace.md b/docs/models/gettrace.md index 245bd8eb2..d32944ddb 100644 --- a/docs/models/gettrace.md +++ b/docs/models/gettrace.md @@ -9,6 +9,7 @@ | `organization_id` | *str* | :heavy_check_mark: | N/A | | `workspace_id` | *str* | :heavy_check_mark: | N/A | | `user_id` | *str* | :heavy_check_mark: | N/A | +| `service_account_id` | *Optional[str]* | :heavy_minus_sign: | N/A | | `trace_id` | *str* | :heavy_check_mark: | N/A | | `root_span_id` | *str* | :heavy_check_mark: | N/A | | `root_span_name` | *str* | :heavy_check_mark: | N/A | diff --git a/docs/models/gettriggerv1triggerstriggeridgetrequest.md b/docs/models/gettriggerv1triggerstriggeridgetrequest.md new file mode 100644 index 000000000..d00ffae47 --- /dev/null +++ b/docs/models/gettriggerv1triggerstriggeridgetrequest.md @@ -0,0 +1,8 @@ +# GetTriggerV1TriggersTriggerIDGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `trigger_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getwebhooksigningsecretv1webhookswebhookidsigningsecretgetrequest.md b/docs/models/getwebhooksigningsecretv1webhookswebhookidsigningsecretgetrequest.md new file mode 100644 index 000000000..c4764f210 --- /dev/null +++ b/docs/models/getwebhooksigningsecretv1webhookswebhookidsigningsecretgetrequest.md @@ -0,0 +1,8 @@ +# GetWebhookSigningSecretV1WebhooksWebhookIDSigningSecretGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `webhook_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getwebhookv1webhookswebhookidgetrequest.md b/docs/models/getwebhookv1webhookswebhookidgetrequest.md new file mode 100644 index 000000000..5fc3c841c --- /dev/null +++ b/docs/models/getwebhookv1webhookswebhookidgetrequest.md @@ -0,0 +1,8 @@ +# GetWebhookV1WebhooksWebhookIDGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `webhook_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/httpconnector.md b/docs/models/httpconnector.md index 75d6ff0a1..720197af1 100644 --- a/docs/models/httpconnector.md +++ b/docs/models/httpconnector.md @@ -29,4 +29,5 @@ | `mistral` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `is_authenticated` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | `tools` | List[[models.ConnectorTool](../models/connectortool.md)] | :heavy_minus_sign: | N/A | -| `protocol` | *Literal["http"]* | :heavy_check_mark: | N/A | \ No newline at end of file +| `protocol` | *Literal["http"]* | :heavy_check_mark: | N/A | +| `openapi_spec` | [OptionalNullable[models.ConnectorOpenAPISpec]](../models/connectoropenapispec.md) | :heavy_minus_sign: | The OpenAPI spec the connector tools are converted from. Null when it has none. | \ No newline at end of file diff --git a/docs/models/listtriggereventsv1triggerstriggerideventsgetrequest.md b/docs/models/listtriggereventsv1triggerstriggerideventsgetrequest.md new file mode 100644 index 000000000..7c717b294 --- /dev/null +++ b/docs/models/listtriggereventsv1triggerstriggerideventsgetrequest.md @@ -0,0 +1,9 @@ +# ListTriggerEventsV1TriggersTriggerIDEventsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `trigger_id` | *str* | :heavy_check_mark: | N/A | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of events to return | \ No newline at end of file diff --git a/docs/models/listtriggersv1triggersgetrequest.md b/docs/models/listtriggersv1triggersgetrequest.md new file mode 100644 index 000000000..f22c8404f --- /dev/null +++ b/docs/models/listtriggersv1triggersgetrequest.md @@ -0,0 +1,10 @@ +# ListTriggersV1TriggersGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `handler` | [OptionalNullable[models.TriggerHandler]](../models/triggerhandler.md) | :heavy_minus_sign: | Filter by handler type | +| `primitive_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by primitive ID (workflow, agent, or app) | +| `event_source_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by event source ID (webhook id) | \ No newline at end of file diff --git a/docs/models/openapifilesource.md b/docs/models/openapifilesource.md new file mode 100644 index 000000000..6c88e6dbe --- /dev/null +++ b/docs/models/openapifilesource.md @@ -0,0 +1,9 @@ +# OpenAPIFileSource + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `type` | *Literal["file"]* | :heavy_check_mark: | N/A | +| `filename` | *str* | :heavy_check_mark: | The name of the uploaded file. | \ No newline at end of file diff --git a/docs/models/openapispecsource.md b/docs/models/openapispecsource.md new file mode 100644 index 000000000..9afea5df8 --- /dev/null +++ b/docs/models/openapispecsource.md @@ -0,0 +1,17 @@ +# OpenAPISpecSource + + +## Supported Types + +### `models.OpenAPIFileSource` + +```python +value: models.OpenAPIFileSource = /* values here */ +``` + +### `models.OpenAPIURLSource` + +```python +value: models.OpenAPIURLSource = /* values here */ +``` + diff --git a/docs/models/openapiurlsource.md b/docs/models/openapiurlsource.md new file mode 100644 index 000000000..5282361fe --- /dev/null +++ b/docs/models/openapiurlsource.md @@ -0,0 +1,9 @@ +# OpenAPIURLSource + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `type` | *Literal["url"]* | :heavy_check_mark: | N/A | +| `url` | *str* | :heavy_check_mark: | The URL the spec was downloaded from, without its userinfo, query string and fragment. | \ No newline at end of file diff --git a/docs/models/skillslistrequest.md b/docs/models/skillslistrequest.md index 322f5c218..abfbe408c 100644 --- a/docs/models/skillslistrequest.md +++ b/docs/models/skillslistrequest.md @@ -3,13 +3,13 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `page_token` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `alias` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `fields` | List[*str*] | :heavy_minus_sign: | N/A | -| `sort_field` | [Optional[models.ListSortField]](../models/listsortfield.md) | :heavy_minus_sign: | Defaults to created_at when omitted. | -| `sort_direction_query_parameter` | [Optional[models.ListSortDirection]](../models/listsortdirection.md) | :heavy_minus_sign: | Defaults to descending for timestamp fields and ascending for text fields. | -| `sort_by` | *Optional[str]* | :heavy_minus_sign: | REST-friendly alias for sort.field. Supported values: created_at, last_modified_at, name, title. | -| `sort_direction_query_parameter1` | *Optional[str]* | :heavy_minus_sign: | REST-friendly alias for sort.direction. Supported values: asc, desc. | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page_token` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `alias` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `fields` | List[*str*] | :heavy_minus_sign: | Projection over each listed Skill. definition.description is the only definition path a list accepts; body and assets are read one skill at a time with GetSkill. | +| `sort_field` | [Optional[models.ListSortField]](../models/listsortfield.md) | :heavy_minus_sign: | Defaults to created_at when omitted. | +| `sort_direction_query_parameter` | [Optional[models.ListSortDirection]](../models/listsortdirection.md) | :heavy_minus_sign: | Defaults to descending for timestamp fields and ascending for text fields. | +| `sort_by` | *Optional[str]* | :heavy_minus_sign: | REST-friendly alias for sort.field. Supported values: created_at, last_modified_at, name, title. | +| `sort_direction_query_parameter1` | *Optional[str]* | :heavy_minus_sign: | REST-friendly alias for sort.direction. Supported values: asc, desc. | \ No newline at end of file diff --git a/docs/models/systemv2.md b/docs/models/systemv2.md index 068ac38ec..811af984b 100644 --- a/docs/models/systemv2.md +++ b/docs/models/systemv2.md @@ -10,4 +10,6 @@ | `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | `deleted_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | `name` | *str* | :heavy_check_mark: | N/A | -| `params` | Dict[str, [models.Params](../models/params.md)] | :heavy_check_mark: | N/A | \ No newline at end of file +| `params` | Dict[str, [models.Params](../models/params.md)] | :heavy_check_mark: | N/A | +| `kind` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `spec` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/trigger.md b/docs/models/trigger.md new file mode 100644 index 000000000..7c3ef3b46 --- /dev/null +++ b/docs/models/trigger.md @@ -0,0 +1,18 @@ +# Trigger + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `creator_id` | *str* | :heavy_check_mark: | N/A | +| `workspace_id` | *str* | :heavy_check_mark: | N/A | +| `organization_id` | *str* | :heavy_check_mark: | N/A | +| `customer_id` | *str* | :heavy_check_mark: | N/A | +| `owner_type` | [models.TriggersOwnerType](../models/triggersownertype.md) | :heavy_check_mark: | N/A | +| `event_source` | [models.Webhook](../models/webhook.md) | :heavy_check_mark: | N/A | +| `handler` | [models.TriggerHandler](../models/triggerhandler.md) | :heavy_check_mark: | N/A | +| `action` | [models.TriggerAction](../models/triggeraction.md) | :heavy_check_mark: | N/A | +| `filters` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `title` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/triggeraction.md b/docs/models/triggeraction.md new file mode 100644 index 000000000..48cc6d953 --- /dev/null +++ b/docs/models/triggeraction.md @@ -0,0 +1,9 @@ +# TriggerAction + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `primitive_id` | *str* | :heavy_check_mark: | N/A | +| `type` | [models.TriggerActionType](../models/triggeractiontype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/triggeractiontype.md b/docs/models/triggeractiontype.md new file mode 100644 index 000000000..26bdfe93b --- /dev/null +++ b/docs/models/triggeractiontype.md @@ -0,0 +1,20 @@ +# TriggerActionType + +## Example Usage + +```python +from mistralai.client.models import TriggerActionType + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: TriggerActionType = "start_workflow" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"start_workflow"` +- `"build_app"` +- `"deploy_app"` +- `"start_agent_session"` diff --git a/docs/models/triggerevent.md b/docs/models/triggerevent.md new file mode 100644 index 000000000..343aed98a --- /dev/null +++ b/docs/models/triggerevent.md @@ -0,0 +1,16 @@ +# TriggerEvent + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | N/A | +| `trigger_id` | *str* | :heavy_check_mark: | N/A | +| `source_id` | *str* | :heavy_check_mark: | N/A | +| `status` | [models.TriggerStatusValue](../models/triggerstatusvalue.md) | :heavy_check_mark: | N/A | +| `received_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `submitted_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `triggered_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `detail` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `url` | *Nullable[str]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/triggereventlist.md b/docs/models/triggereventlist.md new file mode 100644 index 000000000..5b89338bb --- /dev/null +++ b/docs/models/triggereventlist.md @@ -0,0 +1,8 @@ +# TriggerEventList + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `data` | List[[models.TriggerEvent](../models/triggerevent.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/triggerhandler.md b/docs/models/triggerhandler.md new file mode 100644 index 000000000..521c76513 --- /dev/null +++ b/docs/models/triggerhandler.md @@ -0,0 +1,19 @@ +# TriggerHandler + +## Example Usage + +```python +from mistralai.client.models import TriggerHandler + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: TriggerHandler = "workflows" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"workflows"` +- `"agents"` +- `"spaces"` diff --git a/docs/models/triggersownertype.md b/docs/models/triggersownertype.md new file mode 100644 index 000000000..fca093440 --- /dev/null +++ b/docs/models/triggersownertype.md @@ -0,0 +1,18 @@ +# TriggersOwnerType + +## Example Usage + +```python +from mistralai.client.models import TriggersOwnerType + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: TriggersOwnerType = "workspace" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"workspace"` +- `"user"` diff --git a/docs/models/triggerstatusvalue.md b/docs/models/triggerstatusvalue.md new file mode 100644 index 000000000..bd7b41dc8 --- /dev/null +++ b/docs/models/triggerstatusvalue.md @@ -0,0 +1,20 @@ +# TriggerStatusValue + +## Example Usage + +```python +from mistralai.client.models import TriggerStatusValue + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: TriggerStatusValue = "SUBMITTED" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"SUBMITTED"` +- `"SUBMISSION_FAILED"` +- `"TRIGGERED"` +- `"TRIGGER_FAILED"` diff --git a/docs/models/voicecreaterequest.md b/docs/models/voicecreaterequest.md index 5cc2d972e..365ce79c3 100644 --- a/docs/models/voicecreaterequest.md +++ b/docs/models/voicecreaterequest.md @@ -5,16 +5,15 @@ Request model for creating a new voice with base64 audio. ## Fields -| Field | Type | Required | Description | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| `name` | *str* | :heavy_check_mark: | N/A | -| `slug` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `languages` | List[*str*] | :heavy_minus_sign: | N/A | -| `gender` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `age` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `tags` | List[*str*] | :heavy_minus_sign: | N/A | -| `color` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `retention_notice` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `sample_audio` | *OptionalNullable[str]* | :heavy_minus_sign: | Base64-encoded audio file | -| `sample_filename` | *OptionalNullable[str]* | :heavy_minus_sign: | Original filename for extension detection | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `languages` | List[*str*] | :heavy_minus_sign: | N/A | +| `gender` | [OptionalNullable[models.VoiceGender]](../models/voicegender.md) | :heavy_minus_sign: | N/A | +| `age` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `tags` | List[*str*] | :heavy_minus_sign: | N/A | +| `color` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `retention_notice` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `sample_audio` | *OptionalNullable[str]* | :heavy_minus_sign: | Base64-encoded audio file | +| `sample_filename` | *OptionalNullable[str]* | :heavy_minus_sign: | Original filename for extension detection | \ No newline at end of file diff --git a/docs/models/voiceupdaterequest.md b/docs/models/voiceupdaterequest.md index 2747aa995..23b8f1d00 100644 --- a/docs/models/voiceupdaterequest.md +++ b/docs/models/voiceupdaterequest.md @@ -5,12 +5,12 @@ Request model for partially updating voice metadata. ## Fields -| Field | Type | Required | Description | -| ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `languages` | List[*str*] | :heavy_minus_sign: | N/A | -| `gender` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `age` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `tags` | List[*str*] | :heavy_minus_sign: | N/A | -| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `retention_notice` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `languages` | List[*str*] | :heavy_minus_sign: | N/A | +| `gender` | [OptionalNullable[models.VoiceGender]](../models/voicegender.md) | :heavy_minus_sign: | N/A | +| `age` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `tags` | List[*str*] | :heavy_minus_sign: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `retention_notice` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/webhook.md b/docs/models/webhook.md new file mode 100644 index 000000000..46d39b92c --- /dev/null +++ b/docs/models/webhook.md @@ -0,0 +1,29 @@ +# Webhook + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `creator_id` | *str* | :heavy_check_mark: | N/A | +| `organization_id` | *str* | :heavy_check_mark: | N/A | +| `workspace_id` | *str* | :heavy_check_mark: | N/A | +| `owner_type` | [models.TriggersOwnerType](../models/triggersownertype.md) | :heavy_check_mark: | N/A | +| `provider` | [models.WebhookProvider](../models/webhookprovider.md) | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `url` | *str* | :heavy_check_mark: | N/A | +| `http_method` | *str* | :heavy_check_mark: | N/A | +| `url_verified` | *Nullable[bool]* | :heavy_check_mark: | N/A | +| `signature_hash_algorithm` | [Nullable[models.WebhookSignatureHashAlgorithm]](../models/webhooksignaturehashalgorithm.md) | :heavy_check_mark: | N/A | +| `signature_header_name` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `validity_period_second` | *Nullable[int]* | :heavy_check_mark: | N/A | +| `signature_extractor_regex` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `timestamp_extractor_regex` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `signature_payload_pattern` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `signature_encoding` | [Nullable[models.WebhookSignatureEncoding]](../models/webhooksignatureencoding.md) | :heavy_check_mark: | N/A | +| `success_status_code` | *Nullable[int]* | :heavy_check_mark: | N/A | +| `event_type_path` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/webhookprovider.md b/docs/models/webhookprovider.md new file mode 100644 index 000000000..6c282f6d6 --- /dev/null +++ b/docs/models/webhookprovider.md @@ -0,0 +1,24 @@ +# WebhookProvider + +## Example Usage + +```python +from mistralai.client.models import WebhookProvider + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: WebhookProvider = "slack" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"slack"` +- `"github"` +- `"notion"` +- `"lucca"` +- `"linear"` +- `"microsoft"` +- `"ashby"` +- `"custom"` diff --git a/docs/models/webhooksignatureencoding.md b/docs/models/webhooksignatureencoding.md new file mode 100644 index 000000000..313d11a5b --- /dev/null +++ b/docs/models/webhooksignatureencoding.md @@ -0,0 +1,18 @@ +# WebhookSignatureEncoding + +## Example Usage + +```python +from mistralai.client.models import WebhookSignatureEncoding + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: WebhookSignatureEncoding = "hex" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"hex"` +- `"base64"` diff --git a/docs/models/webhooksignaturehashalgorithm.md b/docs/models/webhooksignaturehashalgorithm.md new file mode 100644 index 000000000..60010349e --- /dev/null +++ b/docs/models/webhooksignaturehashalgorithm.md @@ -0,0 +1,18 @@ +# WebhookSignatureHashAlgorithm + +## Example Usage + +```python +from mistralai.client.models import WebhookSignatureHashAlgorithm + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: WebhookSignatureHashAlgorithm = "sha256" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"sha256"` +- `"sha1"` diff --git a/docs/models/webhooksigningsecret.md b/docs/models/webhooksigningsecret.md new file mode 100644 index 000000000..14c35a1b0 --- /dev/null +++ b/docs/models/webhooksigningsecret.md @@ -0,0 +1,10 @@ +# WebhookSigningSecret + +Signing secret for a Notion webhook, returned to complete URL verification + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `signing_secret` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/workflowsworkerspecupdate.md b/docs/models/workflowsworkerspecupdate.md index f4a50e079..1a7eac701 100644 --- a/docs/models/workflowsworkerspecupdate.md +++ b/docs/models/workflowsworkerspecupdate.md @@ -3,8 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `github_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `revision` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `backend_spec` | [OptionalNullable[models.DeploymentMistralCloudBackendSpec]](../models/deploymentmistralcloudbackendspec.md) | :heavy_minus_sign: | Backend-specific configuration for the Mistral Cloud backend. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `github_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `revision` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `archive_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Rebuild the worker from this archive, dropping 'github_url' and 'revision'. Sending 'github_url' instead moves it back to a repository. | +| `backend_spec` | [OptionalNullable[models.DeploymentMistralCloudBackendSpec]](../models/deploymentmistralcloudbackendspec.md) | :heavy_minus_sign: | Backend-specific configuration for the Mistral Cloud backend. | +| `requested_roles` | List[*str*] | :heavy_minus_sign: | The complete workspace-role set after the update, beyond `workflow_executor`. Replaces the current roles; omit it to leave them unchanged, send an empty list to drop all extras. Granted only if the deploying user holds them. | \ No newline at end of file diff --git a/docs/models/workflowtagsaddrequest.md b/docs/models/workflowtagsaddrequest.md new file mode 100644 index 000000000..6ddaf5035 --- /dev/null +++ b/docs/models/workflowtagsaddrequest.md @@ -0,0 +1,8 @@ +# WorkflowTagsAddRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `tags` | List[*str*] | :heavy_check_mark: | Tags to add to the workflow. Existing tags are kept. | \ No newline at end of file diff --git a/docs/sdks/managedindexes/README.md b/docs/sdks/contextsearchindexes/README.md similarity index 97% rename from docs/sdks/managedindexes/README.md rename to docs/sdks/contextsearchindexes/README.md index 86c00374f..86cde143a 100644 --- a/docs/sdks/managedindexes/README.md +++ b/docs/sdks/contextsearchindexes/README.md @@ -1,4 +1,4 @@ -# Beta.Rag.ManagedIndexes +# Beta.Context.SearchIndexes ## Overview @@ -36,7 +36,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.rag.managed_indexes.create(name="", config=models.ManagedIndexConfig( + res = mistral.beta.context.search_indexes.create(name="", config=models.ManagedIndexConfig( embedding=models.CustomEmbeddingModel( name="", dimensions=378243, @@ -84,7 +84,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.rag.managed_indexes.list(page_size=20) + res = mistral.beta.context.search_indexes.list(page_size=20) while res is not None: # Handle items @@ -131,7 +131,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.rag.managed_indexes.get(index_name="") + res = mistral.beta.context.search_indexes.get(index_name="") # Handle response print(res) @@ -172,7 +172,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.rag.managed_indexes.update(index_name="", schema={}) + res = mistral.beta.context.search_indexes.update(index_name="", schema={}) # Handle response print(res) @@ -213,7 +213,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.rag.managed_indexes.delete(index_name="") + res = mistral.beta.context.search_indexes.delete(index_name="") # Handle response print(res) @@ -254,7 +254,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.rag.managed_indexes.ingest_documents(index_name="", documents=[]) + res = mistral.beta.context.search_indexes.ingest_documents(index_name="", documents=[]) # Handle response print(res) @@ -296,7 +296,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.rag.managed_indexes.delete_documents(index_name="", document_ids=[ + res = mistral.beta.context.search_indexes.delete_documents(index_name="", document_ids=[ "", "", "", @@ -342,7 +342,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.rag.managed_indexes.search(index_name="", retriever=models.RRFRetriever( + res = mistral.beta.context.search_indexes.search(index_name="", retriever=models.RRFRetriever( top_k=20, retrievers=[ models.KeywordRetriever( @@ -394,7 +394,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.rag.managed_indexes.navigate(index_name="", source_id="", start_offset=46390, end_offset=670471, direction="next", top_k=1, content_type="content") + res = mistral.beta.context.search_indexes.navigate(index_name="", source_id="", start_offset=46390, end_offset=670471, direction="next", top_k=1, content_type="content") # Handle response print(res) @@ -441,7 +441,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.rag.managed_indexes.read(index_name="", source_id="", top_k=20, content_type="content") + res = mistral.beta.context.search_indexes.read(index_name="", source_id="", top_k=20, content_type="content") # Handle response print(res) @@ -487,7 +487,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.rag.managed_indexes.grep(index_name="", source_id="", pattern="", top_k=5, content_type="content") + res = mistral.beta.context.search_indexes.grep(index_name="", source_id="", pattern="", top_k=5, content_type="content") # Handle response print(res) @@ -533,7 +533,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.rag.managed_indexes.get_chunk(index_name="", chunk_id="") + res = mistral.beta.context.search_indexes.get_chunk(index_name="", chunk_id="") # Handle response print(res) @@ -575,7 +575,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.rag.managed_indexes.get_index_summary(language="de", index_name="") + res = mistral.beta.context.search_indexes.get_index_summary(language="de", index_name="") # Handle response print(res) @@ -623,7 +623,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.rag.managed_indexes.generate_index_summary(language="en", index_name="", force=False) + res = mistral.beta.context.search_indexes.generate_index_summary(language="en", index_name="", force=False) with res as jsonl_stream: for event in jsonl_stream: @@ -668,7 +668,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.rag.managed_indexes.set_index_summary(language="nl", index_name="", content="", status="handwritten", translated=False) + res = mistral.beta.context.search_indexes.set_index_summary(language="nl", index_name="", content="", status="handwritten", translated=False) # Handle response print(res) diff --git a/docs/sdks/deployments/README.md b/docs/sdks/deployments/README.md index 5deb17c8b..8370638e4 100644 --- a/docs/sdks/deployments/README.md +++ b/docs/sdks/deployments/README.md @@ -14,6 +14,7 @@ * [start_deployment](#start_deployment) - Start Deployment * [restart_deployment](#restart_deployment) - Restart Deployment * [list_deployment_workers](#list_deployment_workers) - List Deployment Workers +* [get_deployment_archive](#get_deployment_archive) - Get Deployment Archive * [get_deployment_logs](#get_deployment_logs) - Get Deployment Logs * [stream_deployment_logs](#stream_deployment_logs) - Stream Deployment Logs @@ -123,9 +124,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.workflows.deployments.create_deployment(name="", spec={ - "github_url": "https://ugly-parade.com", - }, hardened=False) + res = mistral.workflows.deployments.create_deployment(name="", spec={}, hardened=False) # Handle response print(res) @@ -446,6 +445,50 @@ with Mistral( | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | +## get_deployment_archive + +Get the archive a managed deployment builds from, with a signed URL to download it. + +`download_url` expires within 24 hours, and is null once Mistral Cloud has deleted the archive. +A deployment that builds from a repository answers 404. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.deployments.get_deployment_archive(name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `name` | *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.DeploymentArchiveResponse](../../models/deploymentarchiveresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + ## get_deployment_logs Retrieve logs for a deployment (across all of its workers). diff --git a/docs/sdks/searchindexes/README.md b/docs/sdks/ragsearchindexes/README.md similarity index 100% rename from docs/sdks/searchindexes/README.md rename to docs/sdks/ragsearchindexes/README.md diff --git a/docs/sdks/skills/README.md b/docs/sdks/skills/README.md index c0339ef9d..8b48e0161 100644 --- a/docs/sdks/skills/README.md +++ b/docs/sdks/skills/README.md @@ -41,17 +41,17 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `page_token` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `alias` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `fields` | List[*str*] | :heavy_minus_sign: | N/A | -| `sort_field` | [Optional[models.ListSortField]](../../models/listsortfield.md) | :heavy_minus_sign: | Defaults to created_at when omitted. | -| `sort_direction_query_parameter` | [Optional[models.ListSortDirection]](../../models/listsortdirection.md) | :heavy_minus_sign: | Defaults to descending for timestamp fields and ascending for text fields. | -| `sort_by` | *Optional[str]* | :heavy_minus_sign: | REST-friendly alias for sort.field. Supported values: created_at, last_modified_at, name, title. | -| `sort_direction_query_parameter1` | *Optional[str]* | :heavy_minus_sign: | REST-friendly alias for sort.direction. Supported values: asc, desc. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page_token` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `alias` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `fields` | List[*str*] | :heavy_minus_sign: | Projection over each listed Skill. definition.description is the only definition path a list accepts; body and assets are read one skill at a time with GetSkill. | +| `sort_field` | [Optional[models.ListSortField]](../../models/listsortfield.md) | :heavy_minus_sign: | Defaults to created_at when omitted. | +| `sort_direction_query_parameter` | [Optional[models.ListSortDirection]](../../models/listsortdirection.md) | :heavy_minus_sign: | Defaults to descending for timestamp fields and ascending for text fields. | +| `sort_by` | *Optional[str]* | :heavy_minus_sign: | REST-friendly alias for sort.field. Supported values: created_at, last_modified_at, name, title. | +| `sort_direction_query_parameter1` | *Optional[str]* | :heavy_minus_sign: | REST-friendly alias for sort.direction. Supported values: asc, desc. | +| `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/triggers/README.md b/docs/sdks/triggers/README.md new file mode 100644 index 000000000..71859867f --- /dev/null +++ b/docs/sdks/triggers/README.md @@ -0,0 +1,222 @@ +# Beta.Triggers + +## Overview + +### Available Operations + +* [create](#create) - Create Trigger +* [list](#list) - List Triggers +* [get](#get) - Get Trigger +* [delete](#delete) - Delete Trigger +* [list_events](#list_events) - List Trigger Events + +## create + +Create Trigger + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.triggers.create(event_source_id="07adfb82-bcd1-462d-94df-cd3f8421627e", handler="spaces", action={ + "primitive_id": "", + "type": "start_workflow", + }, owner_type="workspace", title="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `event_source_id` | *str* | :heavy_check_mark: | ID of the event source that fires this trigger | +| `handler` | [models.TriggerHandler](../../models/triggerhandler.md) | :heavy_check_mark: | N/A | +| `action` | [models.CreateTriggerAction](../../models/createtriggeraction.md) | :heavy_check_mark: | N/A | +| `owner_type` | [models.TriggersOwnerType](../../models/triggersownertype.md) | :heavy_check_mark: | N/A | +| `title` | *str* | :heavy_check_mark: | Human-readable title of the trigger | +| `filters` | *OptionalNullable[str]* | :heavy_minus_sign: | jmespath expression to filter events, e.g. event_type == 'push' && repository.name == 'dashboard' | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.Trigger](../../models/trigger.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## list + +List Triggers + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.triggers.list() + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `handler` | [OptionalNullable[models.TriggerHandler]](../../models/triggerhandler.md) | :heavy_minus_sign: | Filter by handler type | +| `primitive_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by primitive ID (workflow, agent, or app) | +| `event_source_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by event source ID (webhook id) | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[List[models.Trigger]](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +Get Trigger + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.triggers.get(trigger_id="8a031c37-160a-4451-9fb0-960dab51da01") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `trigger_id` | *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.Trigger](../../models/trigger.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## delete + +Delete Trigger + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + mistral.beta.triggers.delete(trigger_id="c36bea2b-c2da-4ac5-b1bf-26d98b1c90b3") + + # Use the SDK ... + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `trigger_id` | *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. | + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## list_events + +List Trigger Events + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.triggers.list_events(trigger_id="a4a77501-7106-45dd-ba40-61b80d862c18", limit=10) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `trigger_id` | *str* | :heavy_check_mark: | N/A | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of events to return | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.TriggerEventList](../../models/triggereventlist.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/voices/README.md b/docs/sdks/voices/README.md index 941c6bb5d..b65bc3294 100644 --- a/docs/sdks/voices/README.md +++ b/docs/sdks/voices/README.md @@ -85,9 +85,8 @@ with Mistral( | Parameter | Type | Required | Description | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | `name` | *str* | :heavy_check_mark: | N/A | -| `slug` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `languages` | List[*str*] | :heavy_minus_sign: | N/A | -| `gender` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `gender` | [OptionalNullable[models.VoiceGender]](../../models/voicegender.md) | :heavy_minus_sign: | N/A | | `age` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | `tags` | List[*str*] | :heavy_minus_sign: | N/A | | `color` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | @@ -179,7 +178,7 @@ with Mistral( | `voice_id` | *str* | :heavy_check_mark: | N/A | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `languages` | List[*str*] | :heavy_minus_sign: | N/A | -| `gender` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `gender` | [OptionalNullable[models.VoiceGender]](../../models/voicegender.md) | :heavy_minus_sign: | N/A | | `age` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | `tags` | List[*str*] | :heavy_minus_sign: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | diff --git a/docs/sdks/webhooks/README.md b/docs/sdks/webhooks/README.md new file mode 100644 index 000000000..768e58f12 --- /dev/null +++ b/docs/sdks/webhooks/README.md @@ -0,0 +1,223 @@ +# Beta.Webhooks + +## Overview + +### Available Operations + +* [list](#list) - List Webhooks +* [create](#create) - Create Webhook +* [get](#get) - Get Webhook +* [delete](#delete) - Delete Webhook +* [get_signing_secret](#get_signing_secret) - Get Webhook Signing Secret + +## list + +List Webhooks + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.webhooks.list() + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[List[models.Webhook]](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## create + +Create Webhook + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.webhooks.create(provider="slack", name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `provider` | [models.WebhookProvider](../../models/webhookprovider.md) | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | Human-readable name for this webhook | +| `owner_type` | [Optional[models.TriggersOwnerType]](../../models/triggersownertype.md) | :heavy_minus_sign: | N/A | +| `secret` | *OptionalNullable[str]* | :heavy_minus_sign: | Signing secret provided by the third-party provider | +| `encryption_key` | *OptionalNullable[str]* | :heavy_minus_sign: | Encryption key used to decrypt webhook payloads | +| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `signature_hash_algorithm` | [OptionalNullable[models.WebhookSignatureHashAlgorithm]](../../models/webhooksignaturehashalgorithm.md) | :heavy_minus_sign: | N/A | +| `signature_header_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `validity_period_second` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `signature_extractor_regex` | *OptionalNullable[str]* | :heavy_minus_sign: | Regex to extract signature, eg sha256=(.*) | +| `timestamp_extractor_regex` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `signature_payload_pattern` | *OptionalNullable[str]* | :heavy_minus_sign: | Pattern for signature payload, eg {body} or {timestamp}.{body} | +| `signature_encoding` | [OptionalNullable[models.WebhookSignatureEncoding]](../../models/webhooksignatureencoding.md) | :heavy_minus_sign: | N/A | +| `success_status_code` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `event_type_path` | *OptionalNullable[str]* | :heavy_minus_sign: | Path to extract event type, eg body.type or headers.X-GitHub-Event | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.Webhook](../../models/webhook.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +Get Webhook + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.webhooks.get(webhook_id="de67528b-7424-4bfa-98e4-5c117313e2ce") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `webhook_id` | *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.Webhook](../../models/webhook.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## delete + +Delete Webhook + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + mistral.beta.webhooks.delete(webhook_id="97c2e685-f7cb-4949-a2cd-267a02c742c5") + + # Use the SDK ... + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `webhook_id` | *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. | + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get_signing_secret + +Get Webhook Signing Secret + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.webhooks.get_signing_secret(webhook_id="171d0caa-bac1-4282-aeac-1fe92c67d7ff") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `webhook_id` | *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.WebhookSigningSecret](../../models/webhooksigningsecret.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/workflows/README.md b/docs/sdks/workflows/README.md index 5da2fd824..16cba2aa0 100644 --- a/docs/sdks/workflows/README.md +++ b/docs/sdks/workflows/README.md @@ -13,6 +13,7 @@ * [get_workflow_registration](#get_workflow_registration) - Get Workflow Registration * [bulk_archive_workflows](#bulk_archive_workflows) - Bulk Archive Workflows * [bulk_unarchive_workflows](#bulk_unarchive_workflows) - Bulk Unarchive Workflows +* [add_workflow_tags](#add_workflow_tags) - Add Workflow Tags * [archive_workflow](#archive_workflow) - Archive Workflow * [unarchive_workflow](#unarchive_workflow) - Unarchive Workflow @@ -436,6 +437,43 @@ with Mistral( | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | +## add_workflow_tags + +Add Workflow Tags + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + mistral.workflows.add_workflow_tags(workflow_identifier="", tags=[]) + + # Use the SDK ... + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `workflow_identifier` | *str* | :heavy_check_mark: | N/A | +| `tags` | List[*str*] | :heavy_check_mark: | Tags to add to the workflow. Existing tags are kept. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + ## archive_workflow Archive Workflow diff --git a/lgtm.yaml b/lgtm.yaml new file mode 100644 index 000000000..55494dcab --- /dev/null +++ b/lgtm.yaml @@ -0,0 +1,29 @@ +version: 2 +# The generated clients carry every team's spec changes, so any spec-owning team +# may approve a regen: CODEOWNERS is satisfied by one owner, so this widens who +# can approve without adding a second required approval. open-pr.sh drops the +# auto-requested reviewers whose specs the regen does not carry, so a regen only +# notifies the teams actually in it. +# +# This is every team owning a source in SOURCES_DEFS in openapi/main.py, which +# is what compiles into these clients, plus the overlays that shape them. Keep +# it in step: a team missing here is auto-requested on nothing and cannot +# satisfy the code-owner review on a regen carrying its own operations. +defaults: + owners: ['@mistralai/engineering-ai-registry', '@mistralai/engineering-sdk', '@mistralai/engineering-audio-ocr', '@mistralai/engineering-billing', '@mistralai/engineering-connectors-platform', '@mistralai/engineering-context', '@mistralai/engineering-identity-access-management', '@mistralai/engineering-inference', '@mistralai/engineering-observability', '@mistralai/engineering-workflows'] + blocking: true +rules: + # The widening above is for generated output. These are the hand-written paths, + # taken from each client's .genignore, and a spec team has no more claim on them + # than on any other code here. Last match wins, so they stay with us. + # + # Keep a regen inside one rule. GitHub asks for one approval per matched rule, + # so a regen touching both this set and the generated one needs two: a spec + # team's, and then ours. Nothing below may be a path a regen writes. + - 'examples/': '@mistralai/engineering-ai-registry' + - 'utils/': '@mistralai/engineering-ai-registry' + - 'scripts/': '@mistralai/engineering-ai-registry' + - 'src/mistralai/extra/': '@mistralai/engineering-ai-registry' + - 'src/mistralai/extra/voice_agents/': '@mistralai/engineering-audio-ocr' + - 'src/mistralai/extra/tests/voice_agents/': '@mistralai/engineering-audio-ocr' + - 'examples/audio/voice_agents/': '@mistralai/engineering-audio-ocr' diff --git a/packages/azure/.speakeasy/gen.lock b/packages/azure/.speakeasy/gen.lock index 2cf9a1c4a..02cf54baa 100644 --- a/packages/azure/.speakeasy/gen.lock +++ b/packages/azure/.speakeasy/gen.lock @@ -1,20 +1,20 @@ lockVersion: 2.0.0 id: dc40fa48-2c4d-46ad-ac8b-270749770f34 management: - docChecksum: e657bc210fa9d8169a75517584cfe478 + docChecksum: 2db13dd0bdf34bbefe3d57ddc1d19e42 docVersion: 1.0.0 speakeasyVersion: 1.796.4 generationVersion: 2.935.1 - releaseVersion: 2.1.0 - configChecksum: 4b4e7c6c507a635ed850e06610340683 + releaseVersion: 2.2.0 + configChecksum: e1daa59cef11cc34f9ce5dec6d23474d repoURL: https://github.com/mistralai/client-python.git repoSubDirectory: packages/azure installationURL: https://github.com/mistralai/client-python.git#subdirectory=packages/azure published: true persistentEdits: - generation_id: d61b48ac-b8bb-4ca2-8350-b4a5bb1fa171 - pristine_commit_hash: d08df4229827af5f857fd61aa404959ffb0742f4 - pristine_tree_hash: 2eff64fe2459dddd34bd3d9188914efc67aea538 + generation_id: 89e3954d-2a21-4a2d-94cd-d8932b224f8a + pristine_commit_hash: be14f52c807d51003f7acfc32659769c073ec7be + pristine_tree_hash: 606e673eb52691f053ff109debb289aa50f25ec5 features: python: additionalDependencies: 1.1.0 @@ -23,6 +23,7 @@ features: constsAndDefaults: 1.0.7 core: 6.1.2 defaultEnabledRetries: 0.2.0 + deprecations: 3.0.2 enumUnions: 0.1.1 envVarSecurityUsage: 0.3.3 examples: 3.0.4 @@ -73,22 +74,26 @@ trackedFiles: id: dec4d9809e25 last_write_checksum: sha1:6bf766a7b49ca2b706bb4eb88ba2d56406e06e1e pristine_git_object: 11ea5c6a700e7b92f5cbd29e88e41b834f8b8ef4 + docs/models/block.md: + id: 37aeed3d7dc4 + last_write_checksum: sha1:3a3d663edfa4a812a9c06daad87a4143dff9d7e5 + pristine_git_object: 087bec2ac5a1821720cfde579c9ec8214a3d35d3 docs/models/builtinconnectors.md: id: 9d14e972f08a - last_write_checksum: sha1:2e88e09c549c6101d8ee93978514e168f5d348e3 - pristine_git_object: 150f89b05ac988beb0bd8072ba6d9326fb0c9d3e + last_write_checksum: sha1:5a591c7142951eca830281910d5d6bd1cf88b7d1 + pristine_git_object: 457aaa472c3af7664bc22df668758236014cd291 docs/models/chatcompletionchoice.md: id: 0d15c59ab501 - last_write_checksum: sha1:f3c9fa3cc092674a36bf28552b6900d62871b789 - pristine_git_object: 79d24a335c7ca1acb1469213d60ced2ec4987461 + last_write_checksum: sha1:ad872d121000209fca2c236dada4ff942c638bb4 + pristine_git_object: ad33d4d2fa90b8234671ed980aedf4848d6fea4f docs/models/chatcompletionchoicefinishreason.md: id: 225764da91d3 last_write_checksum: sha1:fb429ef425a1b01bd6e1a6cb5770034683ebef72 pristine_git_object: 1ca6a646a7b9ef2b4dd9b0ba8de9e6c8aa63db93 docs/models/chatcompletionrequest.md: id: adffe90369d0 - last_write_checksum: sha1:c88753689fc6e0ef5dbbb0c3c6ac69d05e290b85 - pristine_git_object: ba44a0661680b2e757d08e898bf399f4d5c2dc11 + last_write_checksum: sha1:9f5d3ac1bfc1b31022f3a2a100b6769d561e3a65 + pristine_git_object: 054c969192ba495724668ed34e356f2e2745ae50 docs/models/chatcompletionrequestmessage.md: id: 3f5e170d418c last_write_checksum: sha1:7921c5a508a9f88adc01caab34e26182b8035607 @@ -99,8 +104,8 @@ trackedFiles: pristine_git_object: 749296d420c0671d2a1d6d22483b51f577a86485 docs/models/chatcompletionrequesttool.md: id: 01554a1b158a - last_write_checksum: sha1:e7259e65ba3c614e5e70d0d55c88db03e90097d0 - pristine_git_object: 572d12ca006caead244387a5e91000ac33b0aa0e + last_write_checksum: sha1:d682d551e7a2398cfaf907335b9f084f20c1f2cb + pristine_git_object: 52d4935542f9adac9ba43e868a31f09b20226022 docs/models/chatcompletionrequesttoolchoice.md: id: b97041b2f15b last_write_checksum: sha1:7ad7eb133f70e07d0d6a9def36aadd08b35cf861 @@ -109,10 +114,22 @@ trackedFiles: id: 7c53b24681b9 last_write_checksum: sha1:a56581c0846638cfe6df26d3045fb4f874ccd931 pristine_git_object: a0465ffbfc5558628953e03fbc53b80bbdc8649b + docs/models/chatcompletionresponsechoicelogprobs.md: + id: dc3e83fa645a + last_write_checksum: sha1:a78d8b0881106c4c83f44ea854c65707ac10267d + pristine_git_object: 5059edbd28cfdd50b1bceffaa7de93fc61078c4f + docs/models/chatcompletionresponsetokenlogprobs.md: + id: df8c5d05277e + last_write_checksum: sha1:913b3c8e252ec3210c9acd3873ee386582b3731f + pristine_git_object: 4efd44dcafc6375c4d0d25c1c8462adfb3e41065 + docs/models/chatcompletionresponsetokenlogprobstopk.md: + id: 53553dd720d7 + last_write_checksum: sha1:e4e5a380aae119bb40203369371873caa3ab42b3 + pristine_git_object: 7c7b26cd6c469a82bc16aa4b7a794cf3e506efc7 docs/models/chatcompletionstreamrequest.md: id: cf8f29558a68 - last_write_checksum: sha1:52faa9fc8bebad9ebc6b8d9be01d2f7890a4a515 - pristine_git_object: c3d90e133c2b4c1714cbddaa653ae646daed82dc + last_write_checksum: sha1:7a8db975c56d416dd0e7c0c7a07bfb383842ba47 + pristine_git_object: b3b572b45837e2c35411d2aee85f95f3e702240d docs/models/chatcompletionstreamrequestmessage.md: id: 053a98476cd2 last_write_checksum: sha1:8270692463fab1243d9de4bbef7162daa64e52c5 @@ -123,16 +140,12 @@ trackedFiles: pristine_git_object: a48460a92ac47fec1de2188ba46b238229736d32 docs/models/chatcompletionstreamrequesttool.md: id: cbfb16fb3b03 - last_write_checksum: sha1:163ad1e31d7ba4eaef7797b399d1323465e97110 - pristine_git_object: 48998fcbb16a8ce5f5a4fd8b2794125d97e935ac + last_write_checksum: sha1:dc03dcf2779444a15d820fe73b06e2c3df025a91 + pristine_git_object: 446b7712a2ae9deb8a628206a126064e7aba646e docs/models/chatcompletionstreamrequesttoolchoice.md: id: 210d5e5b1413 last_write_checksum: sha1:0543164caf3f4fb2bef3061dbd1a5e6b34b17ae9 pristine_git_object: 43f3ca3809bf1a2a040e2ad7c19a2b22db0b73f8 - docs/models/codeinterpretertool.md: - id: f009740c6e54 - last_write_checksum: sha1:a2114d61a98a48b4365a77c0c75c06ca834367ad - pristine_git_object: 6302fc627d7c49442b6c9aec19c70fdceaf7c519 docs/models/completionchunk.md: id: 60cb30423c60 last_write_checksum: sha1:61b976fe2e71236cf7941ee1635decc31bd304b2 @@ -143,16 +156,16 @@ trackedFiles: pristine_git_object: 7a66e8fee2bb0f1c58166177653893bb05b98f1d docs/models/completionresponsestreamchoice.md: id: d56824d615a6 - last_write_checksum: sha1:0296a490df009dbfd04893fdebcc88dd6102a872 - pristine_git_object: 1532c25b8fc065d486f52d4610a7f757e5340875 + last_write_checksum: sha1:c4c83ae4fdec894a744f55ec080b27552f2e815b + pristine_git_object: a7f65dd9648512ed69c55fbc9bc80948d9e67121 docs/models/completionresponsestreamchoicefinishreason.md: id: 5f1fbfc90b8e last_write_checksum: sha1:4bb61177835571bc4a271f14e1e2ea1780556d85 pristine_git_object: f1bd6ad8a352b557344644bc1f55446e4024d795 docs/models/confidencescoresgranularity.md: id: 76a175c65878 - last_write_checksum: sha1:049eeb8421d61023dd5652cea4df1c62d8152914 - pristine_git_object: 32161eeed231ad16e4dbb212cce624d58f3093ea + last_write_checksum: sha1:e2873ffce33b5ab47e23de07a7d55f6cb818a21a + pristine_git_object: cd17d5037cfa62acfe48a069ee8d1b6ce344f173 docs/models/contentchunk.md: id: d2d3a32080cd last_write_checksum: sha1:5839a26cdc412b78caad7fb59df97bdcea57be6d @@ -163,8 +176,8 @@ trackedFiles: pristine_git_object: 107f1bd428b1f39b36f75e5a10532bc462967ce5 docs/models/customconnector.md: id: 7bcc77607afa - last_write_checksum: sha1:ce9e8ffac3f83e08269fbed5d2dffbfeb9f8649a - pristine_git_object: 0a0b69217abb0fbcbe30fad32c239aea070d3740 + last_write_checksum: sha1:b059c45ad5fcf6deffe0a77910645b94aca4067b + pristine_git_object: 742add3f6175576bc55b33d3fbb27a6387e90469 docs/models/deltamessage.md: id: 6c5ed6b60968 last_write_checksum: sha1:c49575abe1bb581db1ae497b7a3b1ff2820abfbc @@ -265,38 +278,94 @@ trackedFiles: id: f23959dcc4b0 last_write_checksum: sha1:ca434f8479c3f5e868db1269e86efa5e0d9070e2 pristine_git_object: 89f80436474e3c2293bb4fcafce11e626e2cdf79 + docs/models/ocrasidetextblock.md: + id: f70a1dee9058 + last_write_checksum: sha1:fecb19af70295e3b1fbfc7ac5eac0a2c212e6fdf + pristine_git_object: 3b63094f9ed1faeb29f8f8828af288a17fc33e51 + docs/models/ocrblockconfidencescores.md: + id: 2f91539c992b + last_write_checksum: sha1:dd9b8d43211673cf2c09e00334733bc9643de160 + pristine_git_object: 49f84a7010cc805b8c4ed095c1952d9911dfb056 + docs/models/ocrcaptionblock.md: + id: 8dee3ae7cc64 + last_write_checksum: sha1:0d1827b3c9d4c384f860e73ff2edeb253bd5fb6a + pristine_git_object: 612909b7907f0d5d020412cd42207db2e743beeb + docs/models/ocrcodeblock.md: + id: cf573ee145ef + last_write_checksum: sha1:2836e6a8476acaa1b163ee8049c6f8b71edeb128 + pristine_git_object: f20ecd13d261d4e1e2a330f98dee7e70565852c2 docs/models/ocrconfidencescore.md: id: 44a3cb211acc last_write_checksum: sha1:d88c21a3aa36f24e00c2b24c31bc54944d1fc73f pristine_git_object: 73fdcb28b1044bb7122ba6609708979c17a46e5e + docs/models/ocrequationblock.md: + id: a9450fe13197 + last_write_checksum: sha1:f22676944efff0cee3f5aeb228d1758880da7085 + pristine_git_object: 9e8368fa8a41aadf94773b494b0b018b58da4f5a + docs/models/ocrfooterblock.md: + id: 8f726428e66d + last_write_checksum: sha1:b5e742a200b4c5f73af084596d5e35f63626bafc + pristine_git_object: a19ade852b629738d9a8322436a338e45219dfe7 + docs/models/ocrheaderblock.md: + id: 2fd90b301b1a + last_write_checksum: sha1:09683ee224e7845f416fc87a27f14019ae4194c7 + pristine_git_object: 28c72ae61c218a454e922f3c1cd159fc12dd8e53 + docs/models/ocrimageblock.md: + id: 7ec5340dab29 + last_write_checksum: sha1:f71027dfd8acb9f11276ffecead8472375745d40 + pristine_git_object: ef84f54ce833d1b12e86fdccfec25eb3f65ffe3e docs/models/ocrimageobject.md: id: b72f3c5853b2 last_write_checksum: sha1:90c5158dec6a7b31c858677b6a8efa1e3cabd504 pristine_git_object: 3c0d5544a80499b011467f29ef83d49f53801af6 + docs/models/ocrlistblock.md: + id: 6a1b9aa88a44 + last_write_checksum: sha1:27bf895637aff07d0c9c330714da8b8ba6d41b77 + pristine_git_object: f560d217a6ab387ff859b6d671f8a2c7c293692a docs/models/ocrpageconfidencescores.md: id: 4bc78fe53e38 - last_write_checksum: sha1:26733f345c69b188d372290784688a972fe39dbf - pristine_git_object: bffb214868dd74e617c87ff19e3909419d9acc97 + last_write_checksum: sha1:f61bc8d1243a719cdd296683859e1817f7f7baa4 + pristine_git_object: 1c56b63e31795e40f347e44ad8e3086929180802 docs/models/ocrpagedimensions.md: id: b3429f9883f5 last_write_checksum: sha1:6435aa56e6153b0c90a546818ed780105ae1042a pristine_git_object: c93ca64d5e20319ec6ec1bcb82b28c6ce0940f29 docs/models/ocrpageobject.md: id: 88a9e101b11e - last_write_checksum: sha1:84b903d90dadcac943000b90e8a8e8a81c8b92fa - pristine_git_object: 0fc55052cdf2360131c0adcec93a732e2b0f78c5 + last_write_checksum: sha1:a7fa0bb8d0d7a8d1a701748395ce9dc82093ca15 + pristine_git_object: 5f5c3cd5b274bb92228106b3204cba7d2a63c73b + docs/models/ocrreferencesblock.md: + id: c1614ca10b63 + last_write_checksum: sha1:1cc3d011b6ae9852d039b8b233bdbd39b5430e39 + pristine_git_object: 99f93108ee39c9386aa6fd6ed3aa3d23eebecf45 docs/models/ocrrequest.md: id: 6862a3fc2d0f - last_write_checksum: sha1:d06488b0ac9343813db7fe9f58d3a8450d7fa663 - pristine_git_object: 2066b90339c5bfb795e94581edc47412fac75a2e + last_write_checksum: sha1:59340dd18f7862eafd39a572c24bd856b893296b + pristine_git_object: 87902439be598f2ff813e2c2824cb12311fff955 docs/models/ocrresponse.md: id: 30042328fb78 last_write_checksum: sha1:8e4a4ae404ea752f3e9f1108c2a5f89ed6cfb143 pristine_git_object: 0a309317644eedc643009b6cec3a7dbb142b1a15 + docs/models/ocrsignatureblock.md: + id: 9d55fdaa416a + last_write_checksum: sha1:f61720d405af6d191890a0c87aab587c55071c82 + pristine_git_object: 62c189fee1e67da5825fd3fbf8504521eb585a57 + docs/models/ocrtableblock.md: + id: 0077842c24d0 + last_write_checksum: sha1:8e10ae182c3d497e967f24c9a58940f45dd03ca6 + pristine_git_object: 0d5f962abc3ed8368816e98b6caa551e7e1f000b docs/models/ocrtableobject.md: id: c967796380e6 last_write_checksum: sha1:deb1715d618330b4f791b7237955e697d26c6bc2 pristine_git_object: 2da8f6105dd83d7f4d067c74298316ab512c9c3f + docs/models/ocrtextblock.md: + id: ec731e2067f3 + last_write_checksum: sha1:6960cd4611007d4d2f607256d5307bceddfadb29 + pristine_git_object: 718df621b650245440ae89beaece0ca896a096e7 + docs/models/ocrtitleblock.md: + id: 2602d3e1db41 + last_write_checksum: sha1:f5b2783e278fe6b1ee07a3807604e889ae834ae4 + pristine_git_object: f13cc07829e5f24f09ad2823cd88ab633ef7803c docs/models/ocrusageinfo.md: id: 419abbb8353a last_write_checksum: sha1:6e717a3f3de3c464e8b3237f06867cdfecec339e @@ -311,8 +380,8 @@ trackedFiles: pristine_git_object: fae3c1ca4ba2c2ddb3b7de401ecdc8d56dcc7740 docs/models/reasoningeffort.md: id: c8fd630d3f07 - last_write_checksum: sha1:e76b9260f9dd23ab2f0c6a700602f918c3792857 - pristine_git_object: f39e92ac9f7c6a19e24b5773252d179e1b3856a9 + last_write_checksum: sha1:1b2f4a896a7c7f22525d5b2174eef05b0512bf7d + pristine_git_object: c9676fb5d282662714929ccc2645566f0a93b5d2 docs/models/referencechunk.md: id: 07895f9debfd last_write_checksum: sha1:3d35227a4f7612301fd5f17a445c4c2b712f0bf1 @@ -417,14 +486,6 @@ trackedFiles: id: 304bdf06ef8b last_write_checksum: sha1:1f297f34069668f6107f2c0389606efe413ff5a8 pristine_git_object: 5bcea5b5d12e72222720af2c014d64ec4bdfee4a - docs/models/websearchpremiumtool.md: - id: 267988aa8c3f - last_write_checksum: sha1:38f80a43f73a13ddedc7730f853c092a48b665f9 - pristine_git_object: 78b736cd314617caa0d77f3c42015212e37ab539 - docs/models/websearchtool.md: - id: fc4df52fb9b5 - last_write_checksum: sha1:72636dc7ae74264bb5158d284ef6f83da5290b27 - pristine_git_object: 4ca7333c412ad819e3e02c61debe402e3f9b0af9 py.typed: id: 258c3ed47ae4 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 @@ -455,16 +516,16 @@ trackedFiles: pristine_git_object: e851b8328fa83243f6eff6e4b837fb2e1c2a51f6 src/mistralai/azure/client/_version.py: id: a77160e60e5d - last_write_checksum: sha1:8fb41b82ba2a880e575251697f318c8f62fcd2dd - pristine_git_object: d2dee30aa4c6c8303bd0146b15d96d1981d7218a + last_write_checksum: sha1:5d49b13885e0dc9760fb5d151ded06af08e8dc50 + pristine_git_object: a177337f668fe61e69f6155fb9e37111b6476a80 src/mistralai/azure/client/basesdk.py: id: 5a585a95ec21 last_write_checksum: sha1:a6d5dfb0c3ca993fe2861b650c38910861fdb059 pristine_git_object: 6cbb6dc7ce41952ccf3a4bf4af9a12fdc5f803ec src/mistralai/azure/client/chat.py: id: c18454e628d7 - last_write_checksum: sha1:93ef030bd6a60a90fe8c44aa0c28279dff7cafba - pristine_git_object: 608ec88c2a8ccd19f666c96809ced834a1f07c16 + last_write_checksum: sha1:01ed88b4e3c785e876e5f575b19b02aa9c1cf442 + pristine_git_object: 4bf3cfd59996786955545ff4b85c6e9419f3552a src/mistralai/azure/client/errors/__init__.py: id: f377703514d9 last_write_checksum: sha1:36c516c11f8083c3380a72c1d0f0718a3345f24b @@ -495,8 +556,8 @@ trackedFiles: pristine_git_object: 2b2e342b3ec61d354edd6e48b45c02da132b30b1 src/mistralai/azure/client/models/__init__.py: id: "335011330e21" - last_write_checksum: sha1:19ab292c86de25adc40cb0f8159cdfa382386e36 - pristine_git_object: d9c28adc636c9eb1e204eeee4775bb8ba53e5a25 + last_write_checksum: sha1:f37f08490cb0f9aa052df2a9d4a27381c5ea5507 + pristine_git_object: 4620e85530a5a71eefb7e144f2464bfeb4cd2c46 src/mistralai/azure/client/models/apikeyauth.py: id: 90b0600cb391 last_write_checksum: sha1:77e9e4546f94890349f82ed033b679bf495e7c48 @@ -507,28 +568,36 @@ trackedFiles: pristine_git_object: f5e3316b0ff4818cb7b5d2d14d8fc6c4b4f951b9 src/mistralai/azure/client/models/builtinconnectors.py: id: d260ad466b17 - last_write_checksum: sha1:4e94744e3854d4cdc9d1272e4f1d9371f9829a5f - pristine_git_object: 6a3b2476d54096722eb3e7a271629d108028bd35 + last_write_checksum: sha1:ec06c6f641c60aafd20022dde8d6788cec14b170 + pristine_git_object: 4907807f730fb93a2777e848023d17b9c248386b src/mistralai/azure/client/models/chatcompletionchoice.py: id: 6942c7db5891 - last_write_checksum: sha1:a99520160412adfa8b53d4d054c4d192d82920a1 - pristine_git_object: 7ab8832c80929a48412d03aae4e718a855229cfa + last_write_checksum: sha1:1f26db29252951ae268db65f6056642a2f6aec4e + pristine_git_object: b741e03332ea6b8e2d283d7980d5947d789a1a9a src/mistralai/azure/client/models/chatcompletionrequest.py: id: 0c711c870184 - last_write_checksum: sha1:b290e59c11479f7c5d7e555a220fb99bb8c105e5 - pristine_git_object: 90dc0101c736b0dc10b3725fec32401c2300d559 + last_write_checksum: sha1:c3ddfdfb7fc3fcbd6b38e95e162fc91fea8b06fc + pristine_git_object: 36807d44a8b72fd1fd032e877139cf4e84f2c1f9 src/mistralai/azure/client/models/chatcompletionresponse.py: id: bdfacf065e9e last_write_checksum: sha1:c72fb624e7475a551d37e0b291b64bcf772c402a pristine_git_object: d41f9c6fab670cf7c961f50b1302f9a88cf48162 + src/mistralai/azure/client/models/chatcompletionresponsechoicelogprobs.py: + id: 21abf03eb869 + last_write_checksum: sha1:631fbf3332bdd538b5499f7d0fb0a21d58ae2075 + pristine_git_object: 63d7f70763186546b48c9075afbbeb42bfdee28c + src/mistralai/azure/client/models/chatcompletionresponsetokenlogprobs.py: + id: 830dedac3a99 + last_write_checksum: sha1:3a5e95708d9a88dc04bf7f56d1ef1c965fb7f8b0 + pristine_git_object: f6bee1b795eda9115e3f7aeee7673f227d41a1f3 + src/mistralai/azure/client/models/chatcompletionresponsetokenlogprobstopk.py: + id: 21cf498a7836 + last_write_checksum: sha1:f727807e02cecdd1dfa72f0d5af9b7b037d52837 + pristine_git_object: 957a6ab9737a2c34a25ebab022bf1de31ef58d97 src/mistralai/azure/client/models/chatcompletionstreamrequest.py: id: da00a7feb4ef - last_write_checksum: sha1:409ecde82694094b5acf730c6c87225649fb826e - pristine_git_object: 757d623150bc7b7e8ed9ebd514b3294f56d12f32 - src/mistralai/azure/client/models/codeinterpretertool.py: - id: b3a6fae1bf7c - last_write_checksum: sha1:25194d72cececa577ad4a010a910a346e25fb331 - pristine_git_object: 0f588be3278948fb4864c5193171f223d7372108 + last_write_checksum: sha1:b4d9b9480d3a47a3bc85862c82c4e1fb0c533ded + pristine_git_object: 7023771dcc49539b1d4da24a367991bdd9fb7e2f src/mistralai/azure/client/models/completionchunk.py: id: 28d620f25510 last_write_checksum: sha1:d980ae761d584f526417413c29d26a644adbbdd8 @@ -539,16 +608,16 @@ trackedFiles: pristine_git_object: c4b272871d9b3ea8443f469d29b0825706c25c00 src/mistralai/azure/client/models/completionresponsestreamchoice.py: id: 3ba5d7ba8a13 - last_write_checksum: sha1:215e9f0290c30472f322ca0baad251ddd363e90d - pristine_git_object: 36be83026bcd9431f87238971fca8e566a4c831c + last_write_checksum: sha1:7915f21384771d6710e9b7ad471b891f0d0e1314 + pristine_git_object: b87d60265a3f2465cb4fc561bfbaac05cf538897 src/mistralai/azure/client/models/contentchunk.py: id: 1f65e4f8f731 last_write_checksum: sha1:cf11e1f061d3c8af040ebbdba0b25d4177e1cea4 pristine_git_object: 17efcc7d5825461576cf61257908688cffd23eb7 src/mistralai/azure/client/models/customconnector.py: id: 667abbf974f5 - last_write_checksum: sha1:f09cb9cec77152f13d2943aa4e855a07b3cb95f3 - pristine_git_object: c9b871c7c4f543e5da494b4c77e5bb0eb97c136c + last_write_checksum: sha1:33c98c2cc85631de18a735c9eee320971eed59e4 + pristine_git_object: 0fb0dfc5dea008a8d1bac37ef328ee95e9787ae9 src/mistralai/azure/client/models/deltamessage.py: id: b7dab1d158de last_write_checksum: sha1:1d9f3d87e728503470a62274bf4e14fbb334d0cf @@ -629,38 +698,94 @@ trackedFiles: id: 11354c05bf86 last_write_checksum: sha1:130bd53306d15d52f9dbc370bf1cfc129ba9ea30 pristine_git_object: 3da345fce3ac1a56977ea6e216c7c03fbc751716 + src/mistralai/azure/client/models/ocrasidetextblock.py: + id: dc087a29224b + last_write_checksum: sha1:bca4d8ae3b596f8fa22a7ea6bb0f69b10829010d + pristine_git_object: 0aa4902f66f4f0435c9b6950391227bd3348ea61 + src/mistralai/azure/client/models/ocrblockconfidencescores.py: + id: 7d3eba26e167 + last_write_checksum: sha1:f16f4f24ddbf2fa3b0be949b6bdf8da6fc665891 + pristine_git_object: 3def7cd667099614bda0a30405ea0cbe45bd26d6 + src/mistralai/azure/client/models/ocrcaptionblock.py: + id: 49fc909d8b7c + last_write_checksum: sha1:bdfd621ded8ae4b72f4701cec4c2f2b10b932695 + pristine_git_object: c542a274220082d8d4c942fa498d9f8eb74a8275 + src/mistralai/azure/client/models/ocrcodeblock.py: + id: d3acc92d5ef6 + last_write_checksum: sha1:4a0fad7eb723200264340f39783f3ce534fd5e9a + pristine_git_object: 4e79fb4bb4afb41f7c5166e0576c84d64487074e src/mistralai/azure/client/models/ocrconfidencescore.py: id: 523a4fdcb5b5 last_write_checksum: sha1:fd008d51230ccdeaec923814c2d850f26ae0aab5 pristine_git_object: 7ac59069009c5263d7c3ec016eb3dc5ccb12aea4 + src/mistralai/azure/client/models/ocrequationblock.py: + id: 24496fef2d4d + last_write_checksum: sha1:23a17b9ff78ad3db72824c18ed63f4f405c11f96 + pristine_git_object: eea629f6e9ba1deaae4c3c202d36f100da293f44 + src/mistralai/azure/client/models/ocrfooterblock.py: + id: e7ebdac7527b + last_write_checksum: sha1:dee2a24100a8e7601a022989c636340f0ebfde24 + pristine_git_object: 1ddb57f9a38f0a86a1ce4b4b81b967bd0147eae3 + src/mistralai/azure/client/models/ocrheaderblock.py: + id: 8cc0b33631bf + last_write_checksum: sha1:66df30cb8c19dd106107cfa50752c90f3e5eab3b + pristine_git_object: 5b43731b27ba0645b2054d1bb525c571a5f9cc41 + src/mistralai/azure/client/models/ocrimageblock.py: + id: a85b3de93ce9 + last_write_checksum: sha1:865142f4a3b803b614d50fbe20fd7686a6cb98a9 + pristine_git_object: 69a24365385b8c95803f7e57e89770ca5469597e src/mistralai/azure/client/models/ocrimageobject.py: id: 9c9f987d94bb last_write_checksum: sha1:ddad5de6270b68f86ffd79322ce24dc8429b328a pristine_git_object: 91d7ac0e16b3c9aafc055d1456de17abef14864f + src/mistralai/azure/client/models/ocrlistblock.py: + id: 6a1891373e56 + last_write_checksum: sha1:c4705cba9b2d16e5bf19d0ea6474c774ae149036 + pristine_git_object: b466b669b1886b9fe265bf8e6db961a33dc18719 src/mistralai/azure/client/models/ocrpageconfidencescores.py: id: 697ff82a29a0 - last_write_checksum: sha1:7db4c357f8bfa78a6b448a5d80678b3c4e86c123 - pristine_git_object: 2d5d7a1ac3113eaa295ec98a739487beb03820a3 + last_write_checksum: sha1:c1af200c325d99d18de44a3abdda72d624041569 + pristine_git_object: d3b06ea6c99edd66212c0915c7224c5a66761daf src/mistralai/azure/client/models/ocrpagedimensions.py: id: 7669a25f32b3 last_write_checksum: sha1:60642db6bb61f0e96204fb78d3aa0bd80dd0a7e5 pristine_git_object: 12858da92de99aa6da9d6e148df3ba7ee37496c7 src/mistralai/azure/client/models/ocrpageobject.py: id: eea193b05126 - last_write_checksum: sha1:b7a51aa640c4fc234618b9f362ab5972f39242ee - pristine_git_object: 08b5dbcb3734353dc44d235553ea98109be92795 + last_write_checksum: sha1:986c32b70bc2fb600a8df6b661f52999319ec73c + pristine_git_object: 2e7a04728edcdc291db89e6446440da90c72b3ed + src/mistralai/azure/client/models/ocrreferencesblock.py: + id: a1ee0b18c9ba + last_write_checksum: sha1:bb556dd4e6580688004808829474cc4c5efe27ae + pristine_git_object: 9527b55ac901fb3f246d089204bcb1a71d124aea src/mistralai/azure/client/models/ocrrequest.py: id: 365a5b4776a2 - last_write_checksum: sha1:c59138d47c445ee26cdbeb290c56ad2f126a4b59 - pristine_git_object: 731c0cf82fd659a5a41917b7f2416cabbf322a85 + last_write_checksum: sha1:b0589b59250c56afb4848d5f09d12f738dceb19f + pristine_git_object: 02dca6e2e5e047c40eb386e1a95c59b417c47eff src/mistralai/azure/client/models/ocrresponse.py: id: b8cde8c16a4c last_write_checksum: sha1:d34db61dc06e7755e827e54c1b7e8c37b1ad5d12 pristine_git_object: 6e27f574d2a4588f758c52be064744541265d5d7 + src/mistralai/azure/client/models/ocrsignatureblock.py: + id: 6e083238f931 + last_write_checksum: sha1:cc50aee23e4e326df5abd24681598ba61c35e415 + pristine_git_object: fc97ca280c722ff5666aaadfe278fba1c0e126c4 + src/mistralai/azure/client/models/ocrtableblock.py: + id: 2c3c20f28356 + last_write_checksum: sha1:b1bbe176ee118367c8fbc371922487d95f5f58f0 + pristine_git_object: 435f3bc2d6390ec31fa8b0f443ad29e8a8176705 src/mistralai/azure/client/models/ocrtableobject.py: id: c2cd51b8789e last_write_checksum: sha1:46a369822ea4311807e2103c22f42b19630fb2d9 pristine_git_object: 07bc7c1309e5aef087b1b78f43be1041cd70460c + src/mistralai/azure/client/models/ocrtextblock.py: + id: 1ab01374ec09 + last_write_checksum: sha1:feafc90a4bbc3c9a6aa0c54fe00afac110d67cbb + pristine_git_object: 5126cbf8c6bdd3927686143164b79864df5d5639 + src/mistralai/azure/client/models/ocrtitleblock.py: + id: 0ae175ea05d4 + last_write_checksum: sha1:ac7a1db59925678ef2f484a7fa7f8b93e1e2752c + pristine_git_object: ec31a74c9d8bfb8f4b7784ebadb589e0ec944f7f src/mistralai/azure/client/models/ocrusageinfo.py: id: 5e9118cac468 last_write_checksum: sha1:12f75c7d33a9f784eaafc97b24e94350fea2ae41 @@ -671,8 +796,8 @@ trackedFiles: pristine_git_object: 3d94feb5181b714b773ce4158af2bf786f382fa5 src/mistralai/azure/client/models/reasoningeffort.py: id: 16ce306129e5 - last_write_checksum: sha1:703d87ae8c89b9fa9284833c45daa77752c3a8e8 - pristine_git_object: 43ffa02b8407ab64d41f23c3a56c02fe275e38de + last_write_checksum: sha1:0a3e500595d5f3c4d35e93523fbd89ef4d6fcafa + pristine_git_object: f0dbb8722fa6b914bc77f059582a5e4ef5a836d2 src/mistralai/azure/client/models/referencechunk.py: id: c9612f854670 last_write_checksum: sha1:20193f683118bf6491fbf54c103c9b7433d9c2de @@ -711,12 +836,12 @@ trackedFiles: pristine_git_object: ecfb5f34f0b09cedd026db218e99fdff5c994df8 src/mistralai/azure/client/models/toolcall.py: id: c65e6f79e539 - last_write_checksum: sha1:c4892903cf784b2c9c419e0531dd50d73c7de117 - pristine_git_object: 87ccd030b41a93ad28a62accb84ec6bdbbb1d477 + last_write_checksum: sha1:dd874f17c6e1a9a3cdc8c62bff769a3493550a6d + pristine_git_object: 4046cb21d256aa3b99f62dd990dd7624839ea5b9 src/mistralai/azure/client/models/toolchoice.py: id: c25062b5de34 - last_write_checksum: sha1:8d33cc71f03e577f9ec3f98a23096d3eb75742cb - pristine_git_object: 15d1da1cebd1d8c36c33d60a4b57725e85c8f1e5 + last_write_checksum: sha1:a205cd15d1257e58604da57d896625fe16330b44 + pristine_git_object: cbfb7de2d2bc05573c6e27380d53e8aec1bae75e src/mistralai/azure/client/models/toolchoiceenum.py: id: cc06ba3a8d21 last_write_checksum: sha1:3dbba9a58c5569aafe115f3f7713a52b01ad8620 @@ -745,32 +870,26 @@ trackedFiles: id: f2b84813e2ea last_write_checksum: sha1:ab5b5f28322856248c4288cce029c385100b80c4 pristine_git_object: aaa72f21ce4ccbea4d7278539d898c5e9f799e44 - src/mistralai/azure/client/models/websearchpremiumtool.py: - id: 4b8bc6d9411d - last_write_checksum: sha1:7ae05870a61adb37cf8f2b7828f728b55fdd1440 - pristine_git_object: 252d8803e71d18b01e702ec2cbc6f57db0191e73 - src/mistralai/azure/client/models/websearchtool.py: - id: f0af7a3db559 - last_write_checksum: sha1:f5ed31a377eec433ebd35e6754a313590a5f83d3 - pristine_git_object: 363e033128fe7eb091280a58d53d0013b2020930 src/mistralai/azure/client/ocr.py: id: 5817c10c9297 - last_write_checksum: sha1:fffff6f8edc5778263590d3ba236e2b92d5cb895 - pristine_git_object: 3b909306deef04ddb3d84548f59c70e8ebe676f7 + last_write_checksum: sha1:7340c8780b4a0e33dc8ea6c8bfe850252a01da43 + pristine_git_object: 5ddfa9377de9f85d6d47ef81846082ac885e534f src/mistralai/azure/client/py.typed: id: e88369f116d2 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 src/mistralai/azure/client/sdkconfiguration.py: id: 602f74633eed - last_write_checksum: sha1:163fe779949725d81181f39b70d6922fc2cb8099 - pristine_git_object: 919225f9bf2e4315f879f0da6c7f8b3e6157bd58 + last_write_checksum: sha1:e619f929156e84da6a4d40f4e024341dc2a701a9 + pristine_git_object: aa1ac7c62a1805c4137c9c436d1afa387750c89e src/mistralai/azure/client/types/__init__.py: id: f79033f78412 last_write_checksum: sha1:f9ad14217f832e74f594285960125add50324be9 pristine_git_object: faa268137bc01c9d08cfadc4797017db48747a96 src/mistralai/azure/client/types/base64fileinput.py: + id: 973794f4d9b1 last_write_checksum: sha1:1522687ae3398374c35710cad993a6e82b5ab99d + pristine_git_object: 862566fe2b1db830276b390e136e65090e5963d2 src/mistralai/azure/client/types/basemodel.py: id: fd244927c80c last_write_checksum: sha1:10d84aedeb9d35edfdadf2c3020caa1d24d8b584 @@ -879,7 +998,7 @@ examples: application/json: {} userExample: requestBody: - application/json: {"model": "CX-9", "document": {"type": "document_url", "document_url": "https://upset-labourer.net/"}, "bbox_annotation_format": {"type": "text"}, "document_annotation_format": {"type": "text"}} + application/json: {"model": "CX-9", "document": {"type": "document_url", "document_url": "https://upset-labourer.net/"}, "bbox_annotation_format": {"type": "text"}, "document_annotation_format": {"type": "text"}, "include_blocks": true} responses: "200": application/json: {"pages": [{"index": 1, "markdown": "# LEVERAGING UNLABELED DATA TO PREDICT OUT-OF-DISTRIBUTION PERFORMANCE\nSaurabh Garg*
Carnegie Mellon University
sgarg2@andrew.cmu.edu
Sivaraman Balakrishnan
Carnegie Mellon University
sbalakri@andrew.cmu.edu
Zachary C. Lipton
Carnegie Mellon University
zlipton@andrew.cmu.edu\n## Behnam Neyshabur\nGoogle Research, Blueshift team
neyshabur@google.com\nHanie Sedghi
Google Research, Brain team
hsedghi@google.com\n#### Abstract\nReal-world machine learning deployments are characterized by mismatches between the source (training) and target (test) distributions that may cause performance drops. In this work, we investigate methods for predicting the target domain accuracy using only labeled source data and unlabeled target data. We propose Average Thresholded Confidence (ATC), a practical method that learns a threshold on the model's confidence, predicting accuracy as the fraction of unlabeled examples for which model confidence exceeds that threshold. ATC outperforms previous methods across several model architectures, types of distribution shifts (e.g., due to synthetic corruptions, dataset reproduction, or novel subpopulations), and datasets (WILDS, ImageNet, BREEDS, CIFAR, and MNIST). In our experiments, ATC estimates target performance $2-4 \\times$ more accurately than prior methods. We also explore the theoretical foundations of the problem, proving that, in general, identifying the accuracy is just as hard as identifying the optimal predictor and thus, the efficacy of any method rests upon (perhaps unstated) assumptions on the nature of the shift. Finally, analyzing our method on some toy distributions, we provide insights concerning when it works ${ }^{1}$.\n## 1 INTRODUCTION\nMachine learning models deployed in the real world typically encounter examples from previously unseen distributions. While the IID assumption enables us to evaluate models using held-out data from the source distribution (from which training data is sampled), this estimate is no longer valid in presence of a distribution shift. Moreover, under such shifts, model accuracy tends to degrade (Szegedy et al., 2014; Recht et al., 2019; Koh et al., 2021). Commonly, the only data available to the practitioner are a labeled training set (source) and unlabeled deployment-time data which makes the problem more difficult. In this setting, detecting shifts in the distribution of covariates is known to be possible (but difficult) in theory (Ramdas et al., 2015), and in practice (Rabanser et al., 2018). However, producing an optimal predictor using only labeled source and unlabeled target data is well-known to be impossible absent further assumptions (Ben-David et al., 2010; Lipton et al., 2018).\nTwo vital questions that remain are: (i) the precise conditions under which we can estimate a classifier's target-domain accuracy; and (ii) which methods are most practically useful. To begin, the straightforward way to assess the performance of a model under distribution shift would be to collect labeled (target domain) examples and then to evaluate the model on that data. However, collecting fresh labeled data from the target distribution is prohibitively expensive and time-consuming, especially if the target distribution is non-stationary. Hence, instead of using labeled data, we aim to use unlabeled data from the target distribution, that is comparatively abundant, to predict model performance. Note that in this work, our focus is not to improve performance on the target but, rather, to estimate the accuracy on the target for a given classifier.\n[^0]: Work done in part while Saurabh Garg was interning at Google ${ }^{1}$ Code is available at [https://github.com/saurabhgarg1996/ATC_code](https://github.com/saurabhgarg1996/ATC_code).\n", "images": [], "dimensions": {"dpi": 200, "height": 2200, "width": 1700}}, {"index": 2, "markdown": "![img-0.jpeg](img-0.jpeg)\nFigure 1: Illustration of our proposed method ATC. Left: using source domain validation data, we identify a threshold on a score (e.g. negative entropy) computed on model confidence such that fraction of examples above the threshold matches the validation set accuracy. ATC estimates accuracy on unlabeled target data as the fraction of examples with the score above the threshold. Interestingly, this threshold yields accurate estimates on a wide set of target distributions resulting from natural and synthetic shifts. Right: Efficacy of ATC over previously proposed approaches on our testbed with a post-hoc calibrated model. To obtain errors on the same scale, we rescale all errors with Average Confidence (AC) error. Lower estimation error is better. See Table 1 for exact numbers and comparison on various types of distribution shift. See Sec. 5 for details on our testbed.\nRecently, numerous methods have been proposed for this purpose (Deng & Zheng, 2021; Chen et al., 2021b; Jiang et al., 2021; Deng et al., 2021; Guillory et al., 2021). These methods either require calibration on the target domain to yield consistent estimates (Jiang et al., 2021; Guillory et al., 2021) or additional labeled data from several target domains to learn a linear regression function on a distributional distance that then predicts model performance (Deng et al., 2021; Deng & Zheng, 2021; Guillory et al., 2021). However, methods that require calibration on the target domain typically yield poor estimates since deep models trained and calibrated on source data are not, in general, calibrated on a (previously unseen) target domain (Ovadia et al., 2019). Besides, methods that leverage labeled data from target domains rely on the fact that unseen target domains exhibit strong linear correlation with seen target domains on the underlying distance measure and, hence, can be rendered ineffective when such target domains with labeled data are unavailable (in Sec. 5.1 we demonstrate such a failure on a real-world distribution shift problem). Therefore, throughout the paper, we assume access to labeled source data and only unlabeled data from target domain(s).\nIn this work, we first show that absent assumptions on the source classifier or the nature of the shift, no method of estimating accuracy will work generally (even in non-contrived settings). To estimate accuracy on target domain perfectly, we highlight that even given perfect knowledge of the labeled source distribution (i.e., $p_{s}(x, y)$ ) and unlabeled target distribution (i.e., $p_{t}(x)$ ), we need restrictions on the nature of the shift such that we can uniquely identify the target conditional $p_{t}(y \\mid x)$. Thus, in general, identifying the accuracy of the classifier is as hard as identifying the optimal predictor.\nSecond, motivated by the superiority of methods that use maximum softmax probability (or logit) of a model for Out-Of-Distribution (OOD) detection (Hendrycks & Gimpel, 2016; Hendrycks et al., 2019), we propose a simple method that leverages softmax probability to predict model performance. Our method, Average Thresholded Confidence (ATC), learns a threshold on a score (e.g., maximum confidence or negative entropy) of model confidence on validation source data and predicts target domain accuracy as the fraction of unlabeled target points that receive a score above that threshold. ATC selects a threshold on validation source data such that the fraction of source examples that receive the score above the threshold match the accuracy of those examples. Our primary contribution in ATC is the proposal of obtaining the threshold and observing its efficacy on (practical) accuracy estimation. Importantly, our work takes a step forward in positively answering the question raised in Deng & Zheng (2021); Deng et al. (2021) about a practical strategy to select a threshold that enables accuracy prediction with thresholded model confidence.\n", "images": [{"id": "img-0.jpeg", "top_left_x": 292, "top_left_y": 217, "bottom_right_x": 1405, "bottom_right_y": 649, "image_base64": ""}], "dimensions": {"dpi": 200, "height": 2200, "width": 1700}}, {"index": 3, "markdown": "", "images": [], "dimensions": {"dpi": 539192, "height": 944919, "width": 247256}}, {"index": 27, "markdown": "![img-8.jpeg](img-8.jpeg)\nFigure 9: Scatter plot of predicted accuracy versus (true) OOD accuracy for vision datasets except MNIST with a ResNet50 model. Results reported by aggregating MAE numbers over 4 different seeds.\n", "images": [{"id": "img-8.jpeg", "top_left_x": 290, "top_left_y": 226, "bottom_right_x": 1405, "bottom_right_y": 1834, "image_base64": ""}], "dimensions": {"dpi": 200, "height": 2200, "width": 1700}}, {"index": 28, "markdown": "| Dataset | Shift | IM | | AC | | DOC | | GDE | ATC-MC (Ours) | | ATC-NE (Ours) | | | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | | | | Pre T | Post T | Pre T | Post T | Pre T | Post T | Post T | Pre T | Post T | Pre T | Post T | | CIFAR10 | Natural | 6.60 | 5.74 | 9.88 | 6.89 | 7.25 | 6.07 | 4.77 | 3.21 | 3.02 | 2.99 | 2.85 | | | | (0.35) | (0.30) | (0.16) | (0.13) | (0.15) | (0.16) | (0.13) | (0.49) | (0.40) | (0.37) | (0.29) | | | Synthetic | 12.33 | 10.20 | 16.50 | 11.91 | 13.87 | 11.08 | 6.55 | 4.65 | 4.25 | 4.21 | 3.87 | | | | (0.51) | (0.48) | (0.26) | (0.17) | (0.18) | (0.17) | (0.35) | (0.55) | (0.55) | (0.55) | (0.75) | | CIFAR100 | Synthetic | 13.69 | 11.51 | 23.61 | 13.10 | 14.60 | 10.14 | 9.85 | 5.50 | 4.75 | 4.72 | 4.94 | | | | (0.55) | (0.41) | (1.16) | (0.80) | (0.77) | (0.64) | (0.57) | (0.70) | (0.73) | (0.74) | (0.74) | | ImageNet200 | Natural | 12.37 | 8.19 | 22.07 | 8.61 | 15.17 | 7.81 | 5.13 | 4.37 | 2.04 | 3.79 | 1.45 | | | | (0.25) | (0.33) | (0.08) | (0.25) | (0.11) | (0.29) | (0.08) | (0.39) | (0.24) | (0.30) | (0.27) | | | Synthetic | 19.86 | 12.94 | 32.44 | 13.35 | 25.02 | 12.38 | 5.41 | 5.93 | 3.09 | 5.00 | 2.68 | | | | (1.38) | (1.81) | (1.00) | (1.30) | (1.10) | (1.38) | (0.89) | (1.38) | (0.87) | (1.28) | (0.45) | | ImageNet | Natural | 7.77 | 6.50 | 18.13 | 6.02 | 8.13 | 5.76 | 6.23 | 3.88 | 2.17 | 2.06 | 0.80 | | | | (0.27) | (0.33) | (0.23) | (0.34) | (0.27) | (0.37) | (0.41) | (0.53) | (0.62) | (0.54) | (0.44) | | | Synthetic | 13.39 | 10.12 | 24.62 | 8.51 | 13.55 | 7.90 | 6.32 | 3.34 | 2.53 | 2.61 | 4.89 | | | | (0.53) | (0.63) | (0.64) | (0.71) | (0.61) | (0.72) | (0.33) | (0.53) | (0.36) | (0.33) | (0.83) | | FMoW-WILDS | Natural | 5.53 | 4.31 | 33.53 | 12.84 | 5.94 | 4.45 | 5.74 | 3.06 | 2.70 | 3.02 | 2.72 | | | | (0.33) | (0.63) | (0.13) | (12.06) | (0.36) | (0.77) | (0.55) | (0.36) | (0.54) | (0.35) | (0.44) | | RxRx1-WILDS | Natural | 5.80 | 5.72 | 7.90 | 4.84 | 5.98 | 5.98 | 6.03 | 4.66 | 4.56 | 4.41 | 4.47 | | | | (0.17) | (0.15) | (0.24) | (0.09) | (0.15) | (0.13) | (0.08) | (0.38) | (0.38) | (0.31) | (0.26) | | Amazon-WILDS | Natural | 2.40 | 2.29 | 8.01 | 2.38 | 2.40 | 2.28 | 17.87 | 1.65 | 1.62 | 1.60 | 1.59 | | | | (0.08) | (0.09) | (0.53) | (0.17) | (0.09) | (0.09) | (0.18) | (0.06) | (0.05) | (0.14) | (0.15) | | CivilCom.-WILDS | Natural | 12.64 | 10.80 | 16.76 | 11.03 | 13.31 | 10.99 | 16.65 | | 7.14 | | | | | | (0.52) | (0.48) | (0.53) | (0.49) | (0.52) | (0.49) | (0.25) | | (0.41) | | | | MNIST | Natural | 18.48 | 15.99 | 21.17 | 14.81 | 20.19 | 14.56 | 24.42 | 5.02 | 2.40 | 3.14 | 3.50 | | | | (0.45) | (1.53) | (0.24) | (3.89) | (0.23) | (3.47) | (0.41) | (0.44) | (1.83) | (0.49) | (0.17) | | ENTITY-13 | Same | 16.23 | 11.14 | 24.97 | 10.88 | 19.08 | 10.47 | 10.71 | 5.39 | 3.88 | 4.58 | 4.19 | | | | (0.77) | (0.65) | (0.70) | (0.77) | (0.65) | (0.72) | (0.74) | (0.92) | (0.61) | (0.85) | (0.16) | | | Novel | 28.53 | 22.02 | 38.33 | 21.64 | 32.43 | 21.22 | 20.61 | 13.58 | 10.28 | 12.25 | 6.63 | | | | (0.82) | (0.68) | (0.75) | (0.86) | (0.69) | (0.80) | (0.60) | (1.15) | (1.34) | (1.21) | (0.93) | | ENTITY-30 | Same | 18.59 | 14.46 | 28.82 | 14.30 | 21.63 | 13.46 | 12.92 | 9.12 | 7.75 | 8.15 | 7.64 | | | | (0.51) | (0.52) | (0.43) | (0.71) | (0.37) | (0.59) | (0.14) | (0.62) | (0.72) | (0.68) | (0.88) | | | Novel | 32.34 | 26.85 | 44.02 | 26.27 | 36.82 | 25.42 | 23.16 | 17.75 | 14.30 | 15.60 | 10.57 | | | | (0.60) | (0.58) | (0.56) | (0.79) | (0.47) | (0.68) | (0.12) | (0.76) | (0.85) | (0.86) | (0.86) | | NONLIVING-26 | Same | 18.66 | 17.17 | 26.39 | 16.14 | 19.86 | 15.58 | 16.63 | 10.87 | 10.24 | 10.07 | 10.26 | | | | (0.76) | (0.74) | (0.82) | (0.81) | (0.67) | (0.76) | (0.45) | (0.98) | (0.83) | (0.92) | (1.18) | | | Novel | 33.43 | 31.53 | 41.66 | 29.87 | 35.13 | 29.31 | 29.56 | 21.70 | 20.12 | 19.08 | 18.26 | | | | (0.67) | (0.65) | (0.67) | (0.71) | (0.54) | (0.64) | (0.21) | (0.86) | (0.75) | (0.82) | (1.12) | | LIVING-17 | Same | 12.63 | 11.05 | 18.32 | 10.46 | 14.43 | 10.14 | 9.87 | 4.57 | 3.95 | 3.81 | 4.21 | | | | (1.25) | (1.20) | (1.01) | (1.12) | (1.11) | (1.16) | (0.61) | (0.71) | (0.48) | (0.22) | (0.53) | | | Novel | 29.03 | 26.96 | 35.67 | 26.11 | 31.73 | 25.73 | 23.53 | 16.15 | 14.49 | 12.97 | 11.39 | | | | (1.44) | (1.38) | (1.09) | (1.27) | (1.19) | (1.35) | (0.52) | (1.36) | (1.46) | (1.52) | (1.72) |\nTable 3: Mean Absolute estimation Error (MAE) results for different datasets in our setup grouped by the nature of shift. 'Same' refers to same subpopulation shifts and 'Novel' refers novel subpopulation shifts. We include details about the target sets considered in each shift in Table 2. Post T denotes use of TS calibration on source. For language datasets, we use DistilBERT-base-uncased, for vision dataset we report results with DenseNet model with the exception of MNIST where we use FCN. Across all datasets, we observe that ATC achieves superior performance (lower MAE is better). For GDE post T and pre T estimates match since TS doesn't alter the argmax prediction. Results reported by aggregating MAE numbers over 4 different seeds. Values in parenthesis (i.e., $(\\cdot)$ ) denote standard deviation values.\n", "images": [], "dimensions": {"dpi": 200, "height": 2200, "width": 1700}}, {"index": 29, "markdown": "| Dataset | Shift | IM | | AC | | DOC | | GDE | ATC-MC (Ours) | | ATC-NE (Ours) | | | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | | | | Pre T | Post T | Pre T | Post T | Pre T | Post T | Post T | Pre T | Post T | Pre T | Post T | | CIFAR10 | Natural | 7.14 | 6.20 | 10.25 | 7.06 | 7.68 | 6.35 | 5.74 | 4.02 | 3.85 | 3.76 | 3.38 | | | | (0.14) | (0.11) | (0.31) | (0.33) | (0.28) | (0.27) | (0.25) | (0.38) | (0.30) | (0.33) | (0.32) | | | Synthetic | 12.62 | 10.75 | 16.50 | 11.91 | 13.93 | 11.20 | 7.97 | 5.66 | 5.03 | 4.87 | 3.63 | | | | (0.76) | (0.71) | (0.28) | (0.24) | (0.29) | (0.28) | (0.13) | (0.64) | (0.71) | (0.71) | (0.62) | | CIFAR100 | Synthetic | 12.77 | 12.34 | 16.89 | 12.73 | 11.18 | 9.63 | 12.00 | 5.61 | 5.55 | 5.65 | 5.76 | | | | (0.43) | (0.68) | (0.20) | (2.59) | (0.35) | (1.25) | (0.48) | (0.51) | (0.55) | (0.35) | (0.27) | | ImageNet200 | Natural | 12.63 | 7.99 | 23.08 | 7.22 | 15.40 | 6.33 | 5.00 | 4.60 | 1.80 | 4.06 | 1.38 | | | | (0.59) | (0.47) | (0.31) | (0.22) | (0.42) | (0.24) | (0.36) | (0.63) | (0.17) | (0.69) | (0.29) | | | Synthetic | 20.17 | 11.74 | 33.69 | 9.51 | 25.49 | 8.61 | 4.19 | 5.37 | 2.78 | 4.53 | 3.58 | | | | (0.74) | (0.80) | (0.73) | (0.51) | (0.66) | (0.50) | (0.14) | (0.88) | (0.23) | (0.79) | (0.33) | | ImageNet | Natural | 8.09 | 6.42 | 21.66 | 5.91 | 8.53 | 5.21 | 5.90 | 3.93 | 1.89 | 2.45 | 0.73 | | | | (0.25) | (0.28) | (0.38) | (0.22) | (0.26) | (0.25) | (0.44) | (0.26) | (0.21) | (0.16) | (0.10) | | | Synthetic | 13.93 | 9.90 | 28.05 | 7.56 | 13.82 | 6.19 | 6.70 | 3.33 | 2.55 | 2.12 | 5.06 | | | | (0.14) | (0.23) | (0.39) | (0.13) | (0.31) | (0.07) | (0.52) | (0.25) | (0.25) | (0.31) | (0.27) | | FMoW-WILDS | Natural | 5.15 | 3.55 | 34.64 | 5.03 | 5.58 | 3.46 | 5.08 | 2.59 | 2.33 | 2.52 | 2.22 | | | | (0.19) | (0.41) | (0.22) | (0.29) | (0.17) | (0.37) | (0.46) | (0.32) | (0.28) | (0.25) | (0.30) | | RxRx1-WILDS | Natural | 6.17 | 6.11 | 21.05 | 5.21 | 6.54 | 6.27 | 6.82 | 5.30 | 5.20 | 5.19 | 5.63 | | | | (0.20) | (0.24) | (0.31) | (0.18) | (0.21) | (0.20) | (0.31) | (0.30) | (0.44) | (0.43) | (0.55) | | Entity-13 | Same | 18.32 | 14.38 | 27.79 | 13.56 | 20.50 | 13.22 | 16.09 | 9.35 | 7.50 | 7.80 | 6.94 | | | | (0.29) | (0.53) | (1.18) | (0.58) | (0.47) | (0.58) | (0.84) | (0.79) | (0.65) | (0.62) | (0.71) | | | Novel | 28.82 | 24.03 | 38.97 | 22.96 | 31.66 | 22.61 | 25.26 | 17.11 | 13.96 | 14.75 | 9.94 | | | | (0.30) | (0.55) | (1.32) | (0.59) | (0.54) | (0.58) | (1.08) | (0.93) | (0.64) | (0.78) | | | Entity-30 | Same | 16.91 | 14.61 | 26.84 | 14.37 | 18.60 | 13.11 | 13.74 | 8.54 | 7.94 | 7.77 | 8.04 | | | | (1.33) | (1.11) | (2.15) | (1.34) | (1.69) | (1.30) | (1.07) | (1.47) | (1.38) | (1.44) | (1.51) | | | Novel | 28.66 | 25.83 | 39.21 | 25.03 | 30.95 | 23.73 | 23.15 | 15.57 | 13.24 | 12.44 | 11.05 | | | | (1.16) | (0.88) | (2.03) | (1.11) | (1.64) | (1.11) | (0.51) | (1.44) | (1.15) | (1.26) | (1.13) | | NonLIVING-26 | Same | 17.43 | 15.95 | 27.70 | 15.40 | 18.06 | 14.58 | 16.99 | 10.79 | 10.13 | 10.05 | 10.29 | | | | (0.90) | (0.86) | (0.90) | (0.69) | (1.00) | (0.78) | (1.25) | (0.62) | (0.32) | (0.46) | (0.79) | | | Novel | 29.51 | 27.75 | 40.02 | 26.77 | 30.36 | 25.93 | 27.70 | 19.64 | 17.75 | 16.90 | 15.69 | | | | (0.86) | (0.82) | (0.76) | (0.82) | (0.95) | (0.80) | (1.42) | (0.68) | (0.53) | (0.60) | (0.83) | | LIVING-17 | Same | 14.28 | 12.21 | 23.46 | 11.16 | 15.22 | 10.78 | 10.49 | 4.92 | 4.23 | 4.19 | 4.73 | | | | (0.96) | (0.93) | (1.16) | (0.90) | (0.96) | (0.99) | (0.97) | (0.57) | (0.42) | (0.35) | (0.24) | | | Novel | 28.91 | 26.35 | 38.62 | 24.91 | 30.32 | 24.52 | 22.49 | 15.42 | 13.02 | 12.29 | 10.34 | | | | (0.66) | (0.73) | (1.01) | (0.61) | (0.59) | (0.74) | (0.85) | (0.59) | (0.53) | (0.73) | (0.62) |\nTable 4: Mean Absolute estimation Error (MAE) results for different datasets in our setup grouped by the nature of shift for ResNet model. 'Same' refers to same subpopulation shifts and 'Novel' refers novel subpopulation shifts. We include details about the target sets considered in each shift in Table 2. Post T denotes use of TS calibration on source. Across all datasets, we observe that ATC achieves superior performance (lower MAE is better). For GDE post T and pre T estimates match since TS doesn't alter the argmax prediction. Results reported by aggregating MAE numbers over 4 different seeds. Values in parenthesis (i.e., $(\\cdot)$ ) denote standard deviation values.\n", "images": [], "dimensions": {"dpi": 200, "height": 2200, "width": 1700}}], "model": "mistral-ocr-2503-completion", "usage_info": {"pages_processed": 29, "doc_size_bytes": null}} diff --git a/packages/azure/.speakeasy/gen.yaml b/packages/azure/.speakeasy/gen.yaml index f6b1d5ad9..8c274feb0 100644 --- a/packages/azure/.speakeasy/gen.yaml +++ b/packages/azure/.speakeasy/gen.yaml @@ -30,7 +30,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.1.0 + version: 2.2.0 additionalDependencies: dev: pytest: ^8.2.2 @@ -45,12 +45,18 @@ python: authors: - Mistral baseErrorName: MistralAzureError + bodyVariantOverloads: false clientServerStatusCodesAsErrors: true constFieldCasing: normal defaultErrorName: SDKError description: Python Client SDK for the Mistral AI API in Azure. + durationFormat: false enableCustomCodeRegions: false enumFormat: union + errorSchemaValidation: true + eventStreamClassNames: + async: EventStreamAsync + sync: EventStream fixFlags: asyncPaginationSep2025: true conflictResistantModelImportsFeb2026: true @@ -72,18 +78,25 @@ python: webhooks: "" inferUnionDiscriminators: true inputModelSuffix: input + inputTypedDictSuffix: TypedDict license: "" maxMethodParams: 999 methodArguments: infer-optional-args + methodTimeoutArgument: timeout-ms + methodTimeoutUnits: milliseconds moduleName: mistralai.azure.client multipartArrayFormat: standard + optionalDependencies: {} outputModelSuffix: output packageManager: uv packageName: mistralai-azure preApplyUnionDiscriminators: true pytestFilterWarnings: [] pytestTimeout: 0 + rawResponseHelpers: false responseFormat: flat + responseSchemaValidation: true sseFlatResponse: false templateVersion: v2 useAsyncHooks: false + uuidFormat: false diff --git a/packages/azure/docs/models/block.md b/packages/azure/docs/models/block.md new file mode 100644 index 000000000..087bec2ac --- /dev/null +++ b/packages/azure/docs/models/block.md @@ -0,0 +1,83 @@ +# Block + + +## Supported Types + +### `models.OCRAsideTextBlock` + +```python +value: models.OCRAsideTextBlock = /* values here */ +``` + +### `models.OCRCaptionBlock` + +```python +value: models.OCRCaptionBlock = /* values here */ +``` + +### `models.OCRCodeBlock` + +```python +value: models.OCRCodeBlock = /* values here */ +``` + +### `models.OCREquationBlock` + +```python +value: models.OCREquationBlock = /* values here */ +``` + +### `models.OCRFooterBlock` + +```python +value: models.OCRFooterBlock = /* values here */ +``` + +### `models.OCRHeaderBlock` + +```python +value: models.OCRHeaderBlock = /* values here */ +``` + +### `models.OCRImageBlock` + +```python +value: models.OCRImageBlock = /* values here */ +``` + +### `models.OCRListBlock` + +```python +value: models.OCRListBlock = /* values here */ +``` + +### `models.OCRReferencesBlock` + +```python +value: models.OCRReferencesBlock = /* values here */ +``` + +### `models.OCRSignatureBlock` + +```python +value: models.OCRSignatureBlock = /* values here */ +``` + +### `models.OCRTableBlock` + +```python +value: models.OCRTableBlock = /* values here */ +``` + +### `models.OCRTextBlock` + +```python +value: models.OCRTextBlock = /* values here */ +``` + +### `models.OCRTitleBlock` + +```python +value: models.OCRTitleBlock = /* values here */ +``` + diff --git a/packages/azure/docs/models/builtinconnectors.md b/packages/azure/docs/models/builtinconnectors.md index 150f89b05..457aaa472 100644 --- a/packages/azure/docs/models/builtinconnectors.md +++ b/packages/azure/docs/models/builtinconnectors.md @@ -15,3 +15,4 @@ value: BuiltInConnectors = "web_search" - `"code_interpreter"` - `"image_generation"` - `"document_library"` +- `"mistral_mcp"` diff --git a/packages/azure/docs/models/chatcompletionchoice.md b/packages/azure/docs/models/chatcompletionchoice.md index 79d24a335..ad33d4d2f 100644 --- a/packages/azure/docs/models/chatcompletionchoice.md +++ b/packages/azure/docs/models/chatcompletionchoice.md @@ -3,9 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `index` | *int* | :heavy_check_mark: | N/A | 0 | -| `message` | [Optional[models.AssistantMessage]](../models/assistantmessage.md) | :heavy_minus_sign: | N/A | | -| `messages` | List[[models.DeltaMessage](../models/deltamessage.md)] | :heavy_minus_sign: | N/A | | -| `finish_reason` | [models.ChatCompletionChoiceFinishReason](../models/chatcompletionchoicefinishreason.md) | :heavy_check_mark: | N/A | stop | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `index` | *int* | :heavy_check_mark: | N/A | 0 | +| `message` | [Optional[models.AssistantMessage]](../models/assistantmessage.md) | :heavy_minus_sign: | N/A | | +| `messages` | List[[models.DeltaMessage](../models/deltamessage.md)] | :heavy_minus_sign: | N/A | | +| `finish_reason` | [models.ChatCompletionChoiceFinishReason](../models/chatcompletionchoicefinishreason.md) | :heavy_check_mark: | N/A | stop | +| `logprobs` | [OptionalNullable[models.ChatCompletionResponseChoiceLogprobs]](../models/chatcompletionresponsechoicelogprobs.md) | :heavy_minus_sign: | N/A | | +| `prompt_logprobs` | [OptionalNullable[models.ChatCompletionResponseChoiceLogprobs]](../models/chatcompletionresponsechoicelogprobs.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/packages/azure/docs/models/chatcompletionrequest.md b/packages/azure/docs/models/chatcompletionrequest.md index ba44a0661..054c96919 100644 --- a/packages/azure/docs/models/chatcompletionrequest.md +++ b/packages/azure/docs/models/chatcompletionrequest.md @@ -19,6 +19,13 @@ | `tool_choice` | [Optional[models.ChatCompletionRequestToolChoice]](../models/chatcompletionrequesttoolchoice.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. | | | `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | +| `min_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `repetition_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | +| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | +| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `prompt_logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | +| `top_prompt_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | | `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | | `prediction` | [Optional[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | | diff --git a/packages/azure/docs/models/chatcompletionrequesttool.md b/packages/azure/docs/models/chatcompletionrequesttool.md index 572d12ca0..52d493554 100644 --- a/packages/azure/docs/models/chatcompletionrequesttool.md +++ b/packages/azure/docs/models/chatcompletionrequesttool.md @@ -9,24 +9,6 @@ value: models.Tool = /* values here */ ``` -### `models.WebSearchTool` - -```python -value: models.WebSearchTool = /* values here */ -``` - -### `models.WebSearchPremiumTool` - -```python -value: models.WebSearchPremiumTool = /* values here */ -``` - -### `models.CodeInterpreterTool` - -```python -value: models.CodeInterpreterTool = /* values here */ -``` - ### `models.ImageGenerationTool` ```python diff --git a/packages/azure/docs/models/chatcompletionresponsechoicelogprobs.md b/packages/azure/docs/models/chatcompletionresponsechoicelogprobs.md new file mode 100644 index 000000000..5059edbd2 --- /dev/null +++ b/packages/azure/docs/models/chatcompletionresponsechoicelogprobs.md @@ -0,0 +1,8 @@ +# ChatCompletionResponseChoiceLogprobs + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `content` | List[[models.ChatCompletionResponseTokenLogprobsTopK](../models/chatcompletionresponsetokenlogprobstopk.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/chatcompletionresponsetokenlogprobs.md b/packages/azure/docs/models/chatcompletionresponsetokenlogprobs.md new file mode 100644 index 000000000..4efd44dca --- /dev/null +++ b/packages/azure/docs/models/chatcompletionresponsetokenlogprobs.md @@ -0,0 +1,11 @@ +# ChatCompletionResponseTokenLogprobs + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `token` | *str* | :heavy_check_mark: | N/A | +| `logprob` | *float* | :heavy_check_mark: | N/A | +| `bytes_` | List[*int*] | :heavy_check_mark: | N/A | +| `token_id` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/chatcompletionresponsetokenlogprobstopk.md b/packages/azure/docs/models/chatcompletionresponsetokenlogprobstopk.md new file mode 100644 index 000000000..7c7b26cd6 --- /dev/null +++ b/packages/azure/docs/models/chatcompletionresponsetokenlogprobstopk.md @@ -0,0 +1,12 @@ +# ChatCompletionResponseTokenLogprobsTopK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `token` | *str* | :heavy_check_mark: | N/A | +| `logprob` | *float* | :heavy_check_mark: | N/A | +| `bytes_` | List[*int*] | :heavy_check_mark: | N/A | +| `token_id` | *int* | :heavy_check_mark: | N/A | +| `top_logprobs` | List[[models.ChatCompletionResponseTokenLogprobs](../models/chatcompletionresponsetokenlogprobs.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/chatcompletionstreamrequest.md b/packages/azure/docs/models/chatcompletionstreamrequest.md index c3d90e133..b3b572b45 100644 --- a/packages/azure/docs/models/chatcompletionstreamrequest.md +++ b/packages/azure/docs/models/chatcompletionstreamrequest.md @@ -19,6 +19,13 @@ | `tool_choice` | [Optional[models.ChatCompletionStreamRequestToolChoice]](../models/chatcompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. | | | `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | +| `min_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `repetition_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | +| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | +| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `prompt_logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | +| `top_prompt_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | | `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | | `prediction` | [Optional[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | | diff --git a/packages/azure/docs/models/chatcompletionstreamrequesttool.md b/packages/azure/docs/models/chatcompletionstreamrequesttool.md index 48998fcbb..446b7712a 100644 --- a/packages/azure/docs/models/chatcompletionstreamrequesttool.md +++ b/packages/azure/docs/models/chatcompletionstreamrequesttool.md @@ -9,24 +9,6 @@ value: models.Tool = /* values here */ ``` -### `models.WebSearchTool` - -```python -value: models.WebSearchTool = /* values here */ -``` - -### `models.WebSearchPremiumTool` - -```python -value: models.WebSearchPremiumTool = /* values here */ -``` - -### `models.CodeInterpreterTool` - -```python -value: models.CodeInterpreterTool = /* values here */ -``` - ### `models.ImageGenerationTool` ```python diff --git a/packages/azure/docs/models/codeinterpretertool.md b/packages/azure/docs/models/codeinterpretertool.md deleted file mode 100644 index 6302fc627..000000000 --- a/packages/azure/docs/models/codeinterpretertool.md +++ /dev/null @@ -1,9 +0,0 @@ -# CodeInterpreterTool - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | -| `type` | *Literal["code_interpreter"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/completionresponsestreamchoice.md b/packages/azure/docs/models/completionresponsestreamchoice.md index 1532c25b8..a7f65dd96 100644 --- a/packages/azure/docs/models/completionresponsestreamchoice.md +++ b/packages/azure/docs/models/completionresponsestreamchoice.md @@ -7,4 +7,6 @@ | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | | `index` | *int* | :heavy_check_mark: | N/A | | `delta` | [models.DeltaMessage](../models/deltamessage.md) | :heavy_check_mark: | N/A | -| `finish_reason` | [Nullable[models.CompletionResponseStreamChoiceFinishReason]](../models/completionresponsestreamchoicefinishreason.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `finish_reason` | [Nullable[models.CompletionResponseStreamChoiceFinishReason]](../models/completionresponsestreamchoicefinishreason.md) | :heavy_check_mark: | N/A | +| `logprobs` | [OptionalNullable[models.ChatCompletionResponseChoiceLogprobs]](../models/chatcompletionresponsechoicelogprobs.md) | :heavy_minus_sign: | N/A | +| `prompt_logprobs` | [OptionalNullable[models.ChatCompletionResponseChoiceLogprobs]](../models/chatcompletionresponsechoicelogprobs.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/confidencescoresgranularity.md b/packages/azure/docs/models/confidencescoresgranularity.md index 32161eeed..cd17d5037 100644 --- a/packages/azure/docs/models/confidencescoresgranularity.md +++ b/packages/azure/docs/models/confidencescoresgranularity.md @@ -12,3 +12,4 @@ value: ConfidenceScoresGranularity = "word" - `"word"` - `"page"` +- `"block"` diff --git a/packages/azure/docs/models/customconnector.md b/packages/azure/docs/models/customconnector.md index 0a0b69217..742add3f6 100644 --- a/packages/azure/docs/models/customconnector.md +++ b/packages/azure/docs/models/customconnector.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `type` | *Literal["connector"]* | :heavy_check_mark: | N/A | -| `connector_id` | *str* | :heavy_check_mark: | N/A | -| `authorization` | [OptionalNullable[models.Authorization]](../models/authorization.md) | :heavy_minus_sign: | N/A | -| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `type` | *Literal["connector"]* | :heavy_check_mark: | N/A | +| `connector_id` | *str* | :heavy_check_mark: | N/A | +| ~~`authorization`~~ | [OptionalNullable[models.Authorization]](../models/authorization.md) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated: per-request connector credentials will be removed. Authenticate the connector through the Connectors API instead. | +| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/ocrasidetextblock.md b/packages/azure/docs/models/ocrasidetextblock.md new file mode 100644 index 000000000..3b63094f9 --- /dev/null +++ b/packages/azure/docs/models/ocrasidetextblock.md @@ -0,0 +1,14 @@ +# OCRAsideTextBlock + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `top_left_x` | *int* | :heavy_check_mark: | N/A | +| `top_left_y` | *int* | :heavy_check_mark: | N/A | +| `bottom_right_x` | *int* | :heavy_check_mark: | N/A | +| `bottom_right_y` | *int* | :heavy_check_mark: | N/A | +| `content` | *str* | :heavy_check_mark: | Text/markdown/html content of this block | +| `confidence_scores` | [OptionalNullable[models.OCRBlockConfidenceScores]](../models/ocrblockconfidencescores.md) | :heavy_minus_sign: | Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'. | +| `type` | *Literal["aside_text"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/ocrblockconfidencescores.md b/packages/azure/docs/models/ocrblockconfidencescores.md new file mode 100644 index 000000000..49f84a701 --- /dev/null +++ b/packages/azure/docs/models/ocrblockconfidencescores.md @@ -0,0 +1,16 @@ +# OCRBlockConfidenceScores + +Per-block confidence scores, computed per-word from model logprobs. + +All fields ``None`` when the block couldn't be scored. +Individual fields ``None`` when that signal is absent — e.g. an image-only block has +no caption, so content scores are ``None``. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| `average_content_confidence_score` | *OptionalNullable[float]* | :heavy_minus_sign: | Average confidence over the block's content (caption) tokens. None when the block has no textual content (e.g. image-only entry). | +| `minimum_content_confidence_score` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum per-word content confidence in the block. None when the block has no textual content. | +| `block_type_confidence_score` | *OptionalNullable[float]* | :heavy_minus_sign: | Confidence in the block type (e.g. 'text', 'title', 'table'). None when the entry had no block type or the block type span could not be located. | \ No newline at end of file diff --git a/packages/azure/docs/models/ocrcaptionblock.md b/packages/azure/docs/models/ocrcaptionblock.md new file mode 100644 index 000000000..612909b79 --- /dev/null +++ b/packages/azure/docs/models/ocrcaptionblock.md @@ -0,0 +1,14 @@ +# OCRCaptionBlock + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `top_left_x` | *int* | :heavy_check_mark: | N/A | +| `top_left_y` | *int* | :heavy_check_mark: | N/A | +| `bottom_right_x` | *int* | :heavy_check_mark: | N/A | +| `bottom_right_y` | *int* | :heavy_check_mark: | N/A | +| `content` | *str* | :heavy_check_mark: | Text/markdown/html content of this block | +| `confidence_scores` | [OptionalNullable[models.OCRBlockConfidenceScores]](../models/ocrblockconfidencescores.md) | :heavy_minus_sign: | Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'. | +| `type` | *Literal["caption"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/ocrcodeblock.md b/packages/azure/docs/models/ocrcodeblock.md new file mode 100644 index 000000000..f20ecd13d --- /dev/null +++ b/packages/azure/docs/models/ocrcodeblock.md @@ -0,0 +1,14 @@ +# OCRCodeBlock + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `top_left_x` | *int* | :heavy_check_mark: | N/A | +| `top_left_y` | *int* | :heavy_check_mark: | N/A | +| `bottom_right_x` | *int* | :heavy_check_mark: | N/A | +| `bottom_right_y` | *int* | :heavy_check_mark: | N/A | +| `content` | *str* | :heavy_check_mark: | Text/markdown/html content of this block | +| `confidence_scores` | [OptionalNullable[models.OCRBlockConfidenceScores]](../models/ocrblockconfidencescores.md) | :heavy_minus_sign: | Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'. | +| `type` | *Literal["code"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/ocrequationblock.md b/packages/azure/docs/models/ocrequationblock.md new file mode 100644 index 000000000..9e8368fa8 --- /dev/null +++ b/packages/azure/docs/models/ocrequationblock.md @@ -0,0 +1,14 @@ +# OCREquationBlock + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `top_left_x` | *int* | :heavy_check_mark: | N/A | +| `top_left_y` | *int* | :heavy_check_mark: | N/A | +| `bottom_right_x` | *int* | :heavy_check_mark: | N/A | +| `bottom_right_y` | *int* | :heavy_check_mark: | N/A | +| `content` | *str* | :heavy_check_mark: | Text/markdown/html content of this block | +| `confidence_scores` | [OptionalNullable[models.OCRBlockConfidenceScores]](../models/ocrblockconfidencescores.md) | :heavy_minus_sign: | Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'. | +| `type` | *Literal["equation"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/ocrfooterblock.md b/packages/azure/docs/models/ocrfooterblock.md new file mode 100644 index 000000000..a19ade852 --- /dev/null +++ b/packages/azure/docs/models/ocrfooterblock.md @@ -0,0 +1,14 @@ +# OCRFooterBlock + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `top_left_x` | *int* | :heavy_check_mark: | N/A | +| `top_left_y` | *int* | :heavy_check_mark: | N/A | +| `bottom_right_x` | *int* | :heavy_check_mark: | N/A | +| `bottom_right_y` | *int* | :heavy_check_mark: | N/A | +| `content` | *str* | :heavy_check_mark: | Text/markdown/html content of this block | +| `confidence_scores` | [OptionalNullable[models.OCRBlockConfidenceScores]](../models/ocrblockconfidencescores.md) | :heavy_minus_sign: | Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'. | +| `type` | *Literal["footer"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/ocrheaderblock.md b/packages/azure/docs/models/ocrheaderblock.md new file mode 100644 index 000000000..28c72ae61 --- /dev/null +++ b/packages/azure/docs/models/ocrheaderblock.md @@ -0,0 +1,14 @@ +# OCRHeaderBlock + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `top_left_x` | *int* | :heavy_check_mark: | N/A | +| `top_left_y` | *int* | :heavy_check_mark: | N/A | +| `bottom_right_x` | *int* | :heavy_check_mark: | N/A | +| `bottom_right_y` | *int* | :heavy_check_mark: | N/A | +| `content` | *str* | :heavy_check_mark: | Text/markdown/html content of this block | +| `confidence_scores` | [OptionalNullable[models.OCRBlockConfidenceScores]](../models/ocrblockconfidencescores.md) | :heavy_minus_sign: | Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'. | +| `type` | *Literal["header"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/ocrimageblock.md b/packages/azure/docs/models/ocrimageblock.md new file mode 100644 index 000000000..ef84f54ce --- /dev/null +++ b/packages/azure/docs/models/ocrimageblock.md @@ -0,0 +1,15 @@ +# OCRImageBlock + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `top_left_x` | *int* | :heavy_check_mark: | N/A | +| `top_left_y` | *int* | :heavy_check_mark: | N/A | +| `bottom_right_x` | *int* | :heavy_check_mark: | N/A | +| `bottom_right_y` | *int* | :heavy_check_mark: | N/A | +| `content` | *str* | :heavy_check_mark: | Text/markdown/html content of this block | +| `confidence_scores` | [OptionalNullable[models.OCRBlockConfidenceScores]](../models/ocrblockconfidencescores.md) | :heavy_minus_sign: | Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'. | +| `type` | *Literal["image"]* | :heavy_check_mark: | N/A | +| `image_id` | *str* | :heavy_check_mark: | References the corresponding entry in OCRPageObject.images | \ No newline at end of file diff --git a/packages/azure/docs/models/ocrlistblock.md b/packages/azure/docs/models/ocrlistblock.md new file mode 100644 index 000000000..f560d217a --- /dev/null +++ b/packages/azure/docs/models/ocrlistblock.md @@ -0,0 +1,14 @@ +# OCRListBlock + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `top_left_x` | *int* | :heavy_check_mark: | N/A | +| `top_left_y` | *int* | :heavy_check_mark: | N/A | +| `bottom_right_x` | *int* | :heavy_check_mark: | N/A | +| `bottom_right_y` | *int* | :heavy_check_mark: | N/A | +| `content` | *str* | :heavy_check_mark: | Text/markdown/html content of this block | +| `confidence_scores` | [OptionalNullable[models.OCRBlockConfidenceScores]](../models/ocrblockconfidencescores.md) | :heavy_minus_sign: | Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'. | +| `type` | *Literal["list"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/ocrpageconfidencescores.md b/packages/azure/docs/models/ocrpageconfidencescores.md index bffb21486..1c56b63e3 100644 --- a/packages/azure/docs/models/ocrpageconfidencescores.md +++ b/packages/azure/docs/models/ocrpageconfidencescores.md @@ -3,10 +3,14 @@ Confidence scores for an OCR page at various granularities. Note on page-level stats: -- For 'page' granularity: average/minimum are computed from per-token exp(logprob). -- For 'word' granularity: average/minimum are computed from per-word confidence, - where each word's confidence is exp(mean(token_logprobs)) — a geometric mean - over the word's subword tokens. +- For 'page' and 'block' granularity: average/minimum are computed from per-token + exp(logprob). Neither ``word_confidence_scores`` nor ``token_scores`` is populated. + Per-block scores are attached to response blocks separately for 'block' granularity. +- For 'word' granularity: average/minimum are computed from per-word confidence, where + each word's confidence is exp(mean(token_logprobs)) — a geometric mean over the + word's subword tokens. ``word_confidence_scores`` is populated. +- For 'token' granularity (internal): average/minimum are computed from + ``token_scores``; ``token_scores`` is populated. ## Fields diff --git a/packages/azure/docs/models/ocrpageobject.md b/packages/azure/docs/models/ocrpageobject.md index 0fc55052c..5f5c3cd5b 100644 --- a/packages/azure/docs/models/ocrpageobject.md +++ b/packages/azure/docs/models/ocrpageobject.md @@ -3,14 +3,15 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `index` | *int* | :heavy_check_mark: | The page index in a pdf document starting from 0 | -| `markdown` | *str* | :heavy_check_mark: | The markdown string response of the page | -| `images` | List[[models.OCRImageObject](../models/ocrimageobject.md)] | :heavy_check_mark: | List of all extracted images in the page | -| `tables` | List[[models.OCRTableObject](../models/ocrtableobject.md)] | :heavy_minus_sign: | List of all extracted tables in the page | -| `hyperlinks` | List[*str*] | :heavy_minus_sign: | List of all hyperlinks in the page | -| `header` | *OptionalNullable[str]* | :heavy_minus_sign: | Header of the page | -| `footer` | *OptionalNullable[str]* | :heavy_minus_sign: | Footer of the page | -| `dimensions` | [Nullable[models.OCRPageDimensions]](../models/ocrpagedimensions.md) | :heavy_check_mark: | The dimensions of the PDF Page's screenshot image | -| `confidence_scores` | [OptionalNullable[models.OCRPageConfidenceScores]](../models/ocrpageconfidencescores.md) | :heavy_minus_sign: | Confidence scores for the OCR page (populated when confidence_scores_granularity is set) | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `index` | *int* | :heavy_check_mark: | The page index in a pdf document starting from 0 | +| `markdown` | *str* | :heavy_check_mark: | The markdown string response of the page | +| `images` | List[[models.OCRImageObject](../models/ocrimageobject.md)] | :heavy_check_mark: | List of all extracted images in the page | +| `tables` | List[[models.OCRTableObject](../models/ocrtableobject.md)] | :heavy_minus_sign: | List of all extracted tables in the page | +| `hyperlinks` | List[*str*] | :heavy_minus_sign: | List of all hyperlinks in the page | +| `header` | *OptionalNullable[str]* | :heavy_minus_sign: | Header of the page | +| `footer` | *OptionalNullable[str]* | :heavy_minus_sign: | Footer of the page | +| `dimensions` | [Nullable[models.OCRPageDimensions]](../models/ocrpagedimensions.md) | :heavy_check_mark: | The dimensions of the PDF Page's screenshot image | +| `confidence_scores` | [OptionalNullable[models.OCRPageConfidenceScores]](../models/ocrpageconfidencescores.md) | :heavy_minus_sign: | Confidence scores for the OCR page (populated when confidence_scores_granularity is set) | +| `blocks` | List[[models.Block](../models/block.md)] | :heavy_minus_sign: | Paragraph-level bounding boxes for all content blocks in reading order (populated when include_blocks is True) | \ No newline at end of file diff --git a/packages/azure/docs/models/ocrreferencesblock.md b/packages/azure/docs/models/ocrreferencesblock.md new file mode 100644 index 000000000..99f93108e --- /dev/null +++ b/packages/azure/docs/models/ocrreferencesblock.md @@ -0,0 +1,14 @@ +# OCRReferencesBlock + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `top_left_x` | *int* | :heavy_check_mark: | N/A | +| `top_left_y` | *int* | :heavy_check_mark: | N/A | +| `bottom_right_x` | *int* | :heavy_check_mark: | N/A | +| `bottom_right_y` | *int* | :heavy_check_mark: | N/A | +| `content` | *str* | :heavy_check_mark: | Text/markdown/html content of this block | +| `confidence_scores` | [OptionalNullable[models.OCRBlockConfidenceScores]](../models/ocrblockconfidencescores.md) | :heavy_minus_sign: | Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'. | +| `type` | *Literal["references"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/ocrrequest.md b/packages/azure/docs/models/ocrrequest.md index 2066b9033..87902439b 100644 --- a/packages/azure/docs/models/ocrrequest.md +++ b/packages/azure/docs/models/ocrrequest.md @@ -15,6 +15,7 @@ | `document_annotation_format` | [OptionalNullable[models.ResponseFormat]](../models/responseformat.md) | :heavy_minus_sign: | Structured output class for extracting useful information from the entire document. Only json_schema is valid for this field | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | | `document_annotation_prompt` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional prompt to guide the model in extracting structured output from the entire document. A document_annotation_format must be provided. | | | `table_format` | [OptionalNullable[models.TableFormat]](../models/tableformat.md) | :heavy_minus_sign: | N/A | | -| `extract_header` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `extract_footer` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `confidence_scores_granularity` | [OptionalNullable[models.ConfidenceScoresGranularity]](../models/confidencescoresgranularity.md) | :heavy_minus_sign: | Granularity for confidence scores: 'word' (per-word scores) or 'page' (aggregate only). Defaults to None (no confidence scores) to keep response payload small. | | \ No newline at end of file +| `extract_header` | *Optional[bool]* | :heavy_minus_sign: | Extract the page header into the response's `header` field and remove it from the markdown content | | +| `extract_footer` | *Optional[bool]* | :heavy_minus_sign: | Extract the page footer into the response's `footer` field and remove it from the markdown content | | +| `include_blocks` | *Optional[bool]* | :heavy_minus_sign: | Return paragraph-level bounding boxes for all content blocks in the response | | +| `confidence_scores_granularity` | [OptionalNullable[models.ConfidenceScoresGranularity]](../models/confidencescoresgranularity.md) | :heavy_minus_sign: | Granularity for confidence scores: 'page' (aggregate only), 'word' (per-word scores), or 'block' (per-block scores). Defaults to None (no confidence scores) to keep response payload small. | | \ No newline at end of file diff --git a/packages/azure/docs/models/ocrsignatureblock.md b/packages/azure/docs/models/ocrsignatureblock.md new file mode 100644 index 000000000..62c189fee --- /dev/null +++ b/packages/azure/docs/models/ocrsignatureblock.md @@ -0,0 +1,16 @@ +# OCRSignatureBlock + +Signature region. ``content`` is the transcribed name when legible, else ``""``. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `top_left_x` | *int* | :heavy_check_mark: | N/A | +| `top_left_y` | *int* | :heavy_check_mark: | N/A | +| `bottom_right_x` | *int* | :heavy_check_mark: | N/A | +| `bottom_right_y` | *int* | :heavy_check_mark: | N/A | +| `content` | *str* | :heavy_check_mark: | Text/markdown/html content of this block | +| `confidence_scores` | [OptionalNullable[models.OCRBlockConfidenceScores]](../models/ocrblockconfidencescores.md) | :heavy_minus_sign: | Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'. | +| `type` | *Literal["signature"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/ocrtableblock.md b/packages/azure/docs/models/ocrtableblock.md new file mode 100644 index 000000000..0d5f962ab --- /dev/null +++ b/packages/azure/docs/models/ocrtableblock.md @@ -0,0 +1,15 @@ +# OCRTableBlock + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `top_left_x` | *int* | :heavy_check_mark: | N/A | +| `top_left_y` | *int* | :heavy_check_mark: | N/A | +| `bottom_right_x` | *int* | :heavy_check_mark: | N/A | +| `bottom_right_y` | *int* | :heavy_check_mark: | N/A | +| `content` | *str* | :heavy_check_mark: | Text/markdown/html content of this block | +| `confidence_scores` | [OptionalNullable[models.OCRBlockConfidenceScores]](../models/ocrblockconfidencescores.md) | :heavy_minus_sign: | Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'. | +| `type` | *Literal["table"]* | :heavy_check_mark: | N/A | +| `table_id` | *OptionalNullable[str]* | :heavy_minus_sign: | References the corresponding entry in OCRPageObject.tables, when tables are extracted | \ No newline at end of file diff --git a/packages/azure/docs/models/ocrtextblock.md b/packages/azure/docs/models/ocrtextblock.md new file mode 100644 index 000000000..718df621b --- /dev/null +++ b/packages/azure/docs/models/ocrtextblock.md @@ -0,0 +1,14 @@ +# OCRTextBlock + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `top_left_x` | *int* | :heavy_check_mark: | N/A | +| `top_left_y` | *int* | :heavy_check_mark: | N/A | +| `bottom_right_x` | *int* | :heavy_check_mark: | N/A | +| `bottom_right_y` | *int* | :heavy_check_mark: | N/A | +| `content` | *str* | :heavy_check_mark: | Text/markdown/html content of this block | +| `confidence_scores` | [OptionalNullable[models.OCRBlockConfidenceScores]](../models/ocrblockconfidencescores.md) | :heavy_minus_sign: | Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'. | +| `type` | *Literal["text"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/ocrtitleblock.md b/packages/azure/docs/models/ocrtitleblock.md new file mode 100644 index 000000000..f13cc0782 --- /dev/null +++ b/packages/azure/docs/models/ocrtitleblock.md @@ -0,0 +1,14 @@ +# OCRTitleBlock + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `top_left_x` | *int* | :heavy_check_mark: | N/A | +| `top_left_y` | *int* | :heavy_check_mark: | N/A | +| `bottom_right_x` | *int* | :heavy_check_mark: | N/A | +| `bottom_right_y` | *int* | :heavy_check_mark: | N/A | +| `content` | *str* | :heavy_check_mark: | Text/markdown/html content of this block | +| `confidence_scores` | [OptionalNullable[models.OCRBlockConfidenceScores]](../models/ocrblockconfidencescores.md) | :heavy_minus_sign: | Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'. | +| `type` | *Literal["title"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/reasoningeffort.md b/packages/azure/docs/models/reasoningeffort.md index f39e92ac9..c9676fb5d 100644 --- a/packages/azure/docs/models/reasoningeffort.md +++ b/packages/azure/docs/models/reasoningeffort.md @@ -11,4 +11,9 @@ value: ReasoningEffort = "none" ## Values - `"none"` +- `"minimal"` +- `"low"` +- `"medium"` - `"high"` +- `"xhigh"` +- `"max"` diff --git a/packages/azure/docs/models/websearchpremiumtool.md b/packages/azure/docs/models/websearchpremiumtool.md deleted file mode 100644 index 78b736cd3..000000000 --- a/packages/azure/docs/models/websearchpremiumtool.md +++ /dev/null @@ -1,9 +0,0 @@ -# WebSearchPremiumTool - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | -| `type` | *Literal["web_search_premium"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/websearchtool.md b/packages/azure/docs/models/websearchtool.md deleted file mode 100644 index 4ca7333c4..000000000 --- a/packages/azure/docs/models/websearchtool.md +++ /dev/null @@ -1,9 +0,0 @@ -# WebSearchTool - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | -| `type` | *Literal["web_search"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/azure/pyproject.toml b/packages/azure/pyproject.toml index 5ff1ec510..ce81a0253 100644 --- a/packages/azure/pyproject.toml +++ b/packages/azure/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai-azure" -version = "2.1.0" +version = "2.2.0" description = "Python Client SDK for the Mistral AI API in Azure." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/packages/azure/src/mistralai/azure/client/_version.py b/packages/azure/src/mistralai/azure/client/_version.py index d2dee30aa..a177337f6 100644 --- a/packages/azure/src/mistralai/azure/client/_version.py +++ b/packages/azure/src/mistralai/azure/client/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "mistralai-azure" -__version__: str = "2.1.0" +__version__: str = "2.2.0" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.935.1" -__user_agent__: str = "speakeasy-sdk/python 2.1.0 2.935.1 1.0.0 mistralai-azure" +__user_agent__: str = "speakeasy-sdk/python 2.2.0 2.935.1 1.0.0 mistralai-azure" try: if __package__ is not None: diff --git a/packages/azure/src/mistralai/azure/client/chat.py b/packages/azure/src/mistralai/azure/client/chat.py index 608ec88c2..4bf3cfd59 100644 --- a/packages/azure/src/mistralai/azure/client/chat.py +++ b/packages/azure/src/mistralai/azure/client/chat.py @@ -49,6 +49,13 @@ def stream( ] = None, presence_penalty: OptionalNullable[float] = UNSET, frequency_penalty: OptionalNullable[float] = UNSET, + min_tokens: OptionalNullable[int] = UNSET, + repetition_penalty: OptionalNullable[float] = UNSET, + top_k: OptionalNullable[int] = UNSET, + logprobs: OptionalNullable[bool] = UNSET, + top_logprobs: OptionalNullable[int] = UNSET, + prompt_logprobs: OptionalNullable[bool] = UNSET, + top_prompt_logprobs: OptionalNullable[int] = UNSET, n: OptionalNullable[int] = UNSET, prediction: Optional[ Union[models.Prediction, models.PredictionTypedDict] @@ -86,6 +93,13 @@ def stream( :param tool_choice: Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool. :param presence_penalty: The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. :param frequency_penalty: The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. + :param min_tokens: + :param repetition_penalty: + :param top_k: + :param logprobs: + :param top_logprobs: + :param prompt_logprobs: + :param top_prompt_logprobs: :param n: Number of completions to return for each request, input tokens are only billed once. :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. @@ -104,7 +118,7 @@ def stream( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 60000 + timeout_ms = 300000 if server_url is not None: base_url = server_url @@ -136,6 +150,13 @@ def stream( ), presence_penalty=presence_penalty, frequency_penalty=frequency_penalty, + min_tokens=min_tokens, + repetition_penalty=repetition_penalty, + top_k=top_k, + logprobs=logprobs, + top_logprobs=top_logprobs, + prompt_logprobs=prompt_logprobs, + top_prompt_logprobs=top_prompt_logprobs, n=n, prediction=utils.get_pydantic_model( prediction, Optional[models.Prediction] @@ -256,6 +277,13 @@ async def stream_async( ] = None, presence_penalty: OptionalNullable[float] = UNSET, frequency_penalty: OptionalNullable[float] = UNSET, + min_tokens: OptionalNullable[int] = UNSET, + repetition_penalty: OptionalNullable[float] = UNSET, + top_k: OptionalNullable[int] = UNSET, + logprobs: OptionalNullable[bool] = UNSET, + top_logprobs: OptionalNullable[int] = UNSET, + prompt_logprobs: OptionalNullable[bool] = UNSET, + top_prompt_logprobs: OptionalNullable[int] = UNSET, n: OptionalNullable[int] = UNSET, prediction: Optional[ Union[models.Prediction, models.PredictionTypedDict] @@ -293,6 +321,13 @@ async def stream_async( :param tool_choice: Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool. :param presence_penalty: The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. :param frequency_penalty: The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. + :param min_tokens: + :param repetition_penalty: + :param top_k: + :param logprobs: + :param top_logprobs: + :param prompt_logprobs: + :param top_prompt_logprobs: :param n: Number of completions to return for each request, input tokens are only billed once. :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. @@ -311,7 +346,7 @@ async def stream_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 60000 + timeout_ms = 300000 if server_url is not None: base_url = server_url @@ -343,6 +378,13 @@ async def stream_async( ), presence_penalty=presence_penalty, frequency_penalty=frequency_penalty, + min_tokens=min_tokens, + repetition_penalty=repetition_penalty, + top_k=top_k, + logprobs=logprobs, + top_logprobs=top_logprobs, + prompt_logprobs=prompt_logprobs, + top_prompt_logprobs=top_prompt_logprobs, n=n, prediction=utils.get_pydantic_model( prediction, Optional[models.Prediction] @@ -463,6 +505,13 @@ def complete( ] = None, presence_penalty: OptionalNullable[float] = UNSET, frequency_penalty: OptionalNullable[float] = UNSET, + min_tokens: OptionalNullable[int] = UNSET, + repetition_penalty: OptionalNullable[float] = UNSET, + top_k: OptionalNullable[int] = UNSET, + logprobs: OptionalNullable[bool] = UNSET, + top_logprobs: OptionalNullable[int] = UNSET, + prompt_logprobs: OptionalNullable[bool] = UNSET, + top_prompt_logprobs: OptionalNullable[int] = UNSET, n: OptionalNullable[int] = UNSET, prediction: Optional[ Union[models.Prediction, models.PredictionTypedDict] @@ -498,6 +547,13 @@ def complete( :param tool_choice: Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool. :param presence_penalty: The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. :param frequency_penalty: The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. + :param min_tokens: + :param repetition_penalty: + :param top_k: + :param logprobs: + :param top_logprobs: + :param prompt_logprobs: + :param top_prompt_logprobs: :param n: Number of completions to return for each request, input tokens are only billed once. :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. @@ -516,7 +572,7 @@ def complete( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 60000 + timeout_ms = 300000 if server_url is not None: base_url = server_url @@ -548,6 +604,13 @@ def complete( ), presence_penalty=presence_penalty, frequency_penalty=frequency_penalty, + min_tokens=min_tokens, + repetition_penalty=repetition_penalty, + top_k=top_k, + logprobs=logprobs, + top_logprobs=top_logprobs, + prompt_logprobs=prompt_logprobs, + top_prompt_logprobs=top_prompt_logprobs, n=n, prediction=utils.get_pydantic_model( prediction, Optional[models.Prediction] @@ -658,6 +721,13 @@ async def complete_async( ] = None, presence_penalty: OptionalNullable[float] = UNSET, frequency_penalty: OptionalNullable[float] = UNSET, + min_tokens: OptionalNullable[int] = UNSET, + repetition_penalty: OptionalNullable[float] = UNSET, + top_k: OptionalNullable[int] = UNSET, + logprobs: OptionalNullable[bool] = UNSET, + top_logprobs: OptionalNullable[int] = UNSET, + prompt_logprobs: OptionalNullable[bool] = UNSET, + top_prompt_logprobs: OptionalNullable[int] = UNSET, n: OptionalNullable[int] = UNSET, prediction: Optional[ Union[models.Prediction, models.PredictionTypedDict] @@ -693,6 +763,13 @@ async def complete_async( :param tool_choice: Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool. :param presence_penalty: The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. :param frequency_penalty: The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. + :param min_tokens: + :param repetition_penalty: + :param top_k: + :param logprobs: + :param top_logprobs: + :param prompt_logprobs: + :param top_prompt_logprobs: :param n: Number of completions to return for each request, input tokens are only billed once. :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. @@ -711,7 +788,7 @@ async def complete_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 60000 + timeout_ms = 300000 if server_url is not None: base_url = server_url @@ -743,6 +820,13 @@ async def complete_async( ), presence_penalty=presence_penalty, frequency_penalty=frequency_penalty, + min_tokens=min_tokens, + repetition_penalty=repetition_penalty, + top_k=top_k, + logprobs=logprobs, + top_logprobs=top_logprobs, + prompt_logprobs=prompt_logprobs, + top_prompt_logprobs=top_prompt_logprobs, n=n, prediction=utils.get_pydantic_model( prediction, Optional[models.Prediction] diff --git a/packages/azure/src/mistralai/azure/client/models/__init__.py b/packages/azure/src/mistralai/azure/client/models/__init__.py index d9c28adc6..4620e8553 100644 --- a/packages/azure/src/mistralai/azure/client/models/__init__.py +++ b/packages/azure/src/mistralai/azure/client/models/__init__.py @@ -34,6 +34,18 @@ ChatCompletionResponse, ChatCompletionResponseTypedDict, ) + from .chatcompletionresponsechoicelogprobs import ( + ChatCompletionResponseChoiceLogprobs, + ChatCompletionResponseChoiceLogprobsTypedDict, + ) + from .chatcompletionresponsetokenlogprobs import ( + ChatCompletionResponseTokenLogprobs, + ChatCompletionResponseTokenLogprobsTypedDict, + ) + from .chatcompletionresponsetokenlogprobstopk import ( + ChatCompletionResponseTokenLogprobsTopK, + ChatCompletionResponseTokenLogprobsTopKTypedDict, + ) from .chatcompletionstreamrequest import ( ChatCompletionStreamRequest, ChatCompletionStreamRequestMessage, @@ -46,7 +58,6 @@ ChatCompletionStreamRequestToolTypedDict, ChatCompletionStreamRequestTypedDict, ) - from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict from .completionchunk import CompletionChunk, CompletionChunkTypedDict from .completionevent import CompletionEvent, CompletionEventTypedDict from .completionresponsestreamchoice import ( @@ -108,14 +119,33 @@ ModerationLlmv2ConfigTypedDict, ) from .oauth2tokenauth import OAuth2TokenAuth, OAuth2TokenAuthTypedDict + from .ocrasidetextblock import OCRAsideTextBlock, OCRAsideTextBlockTypedDict + from .ocrblockconfidencescores import ( + OCRBlockConfidenceScores, + OCRBlockConfidenceScoresTypedDict, + ) + from .ocrcaptionblock import OCRCaptionBlock, OCRCaptionBlockTypedDict + from .ocrcodeblock import OCRCodeBlock, OCRCodeBlockTypedDict from .ocrconfidencescore import OCRConfidenceScore, OCRConfidenceScoreTypedDict + from .ocrequationblock import OCREquationBlock, OCREquationBlockTypedDict + from .ocrfooterblock import OCRFooterBlock, OCRFooterBlockTypedDict + from .ocrheaderblock import OCRHeaderBlock, OCRHeaderBlockTypedDict + from .ocrimageblock import OCRImageBlock, OCRImageBlockTypedDict from .ocrimageobject import OCRImageObject, OCRImageObjectTypedDict + from .ocrlistblock import OCRListBlock, OCRListBlockTypedDict from .ocrpageconfidencescores import ( OCRPageConfidenceScores, OCRPageConfidenceScoresTypedDict, ) from .ocrpagedimensions import OCRPageDimensions, OCRPageDimensionsTypedDict - from .ocrpageobject import OCRPageObject, OCRPageObjectTypedDict + from .ocrpageobject import ( + Block, + BlockTypedDict, + OCRPageObject, + OCRPageObjectTypedDict, + UnknownBlock, + ) + from .ocrreferencesblock import OCRReferencesBlock, OCRReferencesBlockTypedDict from .ocrrequest import ( ConfidenceScoresGranularity, Document, @@ -127,7 +157,11 @@ TableFormat, ) from .ocrresponse import OCRResponse, OCRResponseTypedDict + from .ocrsignatureblock import OCRSignatureBlock, OCRSignatureBlockTypedDict + from .ocrtableblock import OCRTableBlock, OCRTableBlockTypedDict from .ocrtableobject import Format, OCRTableObject, OCRTableObjectTypedDict + from .ocrtextblock import OCRTextBlock, OCRTextBlockTypedDict + from .ocrtitleblock import OCRTitleBlock, OCRTitleBlockTypedDict from .ocrusageinfo import OCRUsageInfo, OCRUsageInfoTypedDict from .prediction import Prediction, PredictionTypedDict from .reasoningeffort import ReasoningEffort @@ -184,11 +218,6 @@ ValidationError, ValidationErrorTypedDict, ) - from .websearchpremiumtool import ( - WebSearchPremiumTool, - WebSearchPremiumToolTypedDict, - ) - from .websearchtool import WebSearchTool, WebSearchToolTypedDict __all__ = [ "APIKeyAuth", @@ -201,6 +230,8 @@ "AssistantMessageTypedDict", "Authorization", "AuthorizationTypedDict", + "Block", + "BlockTypedDict", "BuiltInConnectors", "ChatCompletionChoice", "ChatCompletionChoiceFinishReason", @@ -216,6 +247,12 @@ "ChatCompletionRequestToolTypedDict", "ChatCompletionRequestTypedDict", "ChatCompletionResponse", + "ChatCompletionResponseChoiceLogprobs", + "ChatCompletionResponseChoiceLogprobsTypedDict", + "ChatCompletionResponseTokenLogprobs", + "ChatCompletionResponseTokenLogprobsTopK", + "ChatCompletionResponseTokenLogprobsTopKTypedDict", + "ChatCompletionResponseTokenLogprobsTypedDict", "ChatCompletionResponseTypedDict", "ChatCompletionStreamRequest", "ChatCompletionStreamRequestMessage", @@ -227,8 +264,6 @@ "ChatCompletionStreamRequestToolChoiceTypedDict", "ChatCompletionStreamRequestToolTypedDict", "ChatCompletionStreamRequestTypedDict", - "CodeInterpreterTool", - "CodeInterpreterToolTypedDict", "CompletionChunk", "CompletionChunkTypedDict", "CompletionEvent", @@ -289,22 +324,50 @@ "ModerationLlmv2ConfigTypedDict", "OAuth2TokenAuth", "OAuth2TokenAuthTypedDict", + "OCRAsideTextBlock", + "OCRAsideTextBlockTypedDict", + "OCRBlockConfidenceScores", + "OCRBlockConfidenceScoresTypedDict", + "OCRCaptionBlock", + "OCRCaptionBlockTypedDict", + "OCRCodeBlock", + "OCRCodeBlockTypedDict", "OCRConfidenceScore", "OCRConfidenceScoreTypedDict", + "OCREquationBlock", + "OCREquationBlockTypedDict", + "OCRFooterBlock", + "OCRFooterBlockTypedDict", + "OCRHeaderBlock", + "OCRHeaderBlockTypedDict", + "OCRImageBlock", + "OCRImageBlockTypedDict", "OCRImageObject", "OCRImageObjectTypedDict", + "OCRListBlock", + "OCRListBlockTypedDict", "OCRPageConfidenceScores", "OCRPageConfidenceScoresTypedDict", "OCRPageDimensions", "OCRPageDimensionsTypedDict", "OCRPageObject", "OCRPageObjectTypedDict", + "OCRReferencesBlock", + "OCRReferencesBlockTypedDict", "OCRRequest", "OCRRequestTypedDict", "OCRResponse", "OCRResponseTypedDict", + "OCRSignatureBlock", + "OCRSignatureBlockTypedDict", + "OCRTableBlock", + "OCRTableBlockTypedDict", "OCRTableObject", "OCRTableObjectTypedDict", + "OCRTextBlock", + "OCRTextBlockTypedDict", + "OCRTitleBlock", + "OCRTitleBlockTypedDict", "OCRUsageInfo", "OCRUsageInfoTypedDict", "Pages", @@ -351,6 +414,7 @@ "ToolReferenceChunkToolTypedDict", "ToolReferenceChunkTypedDict", "ToolTypedDict", + "UnknownBlock", "UnknownContentChunk", "UsageInfo", "UsageInfoTypedDict", @@ -360,10 +424,6 @@ "UserMessageTypedDict", "ValidationError", "ValidationErrorTypedDict", - "WebSearchPremiumTool", - "WebSearchPremiumToolTypedDict", - "WebSearchTool", - "WebSearchToolTypedDict", ] _dynamic_imports: dict[str, str] = { @@ -389,6 +449,12 @@ "ChatCompletionRequestTypedDict": ".chatcompletionrequest", "ChatCompletionResponse": ".chatcompletionresponse", "ChatCompletionResponseTypedDict": ".chatcompletionresponse", + "ChatCompletionResponseChoiceLogprobs": ".chatcompletionresponsechoicelogprobs", + "ChatCompletionResponseChoiceLogprobsTypedDict": ".chatcompletionresponsechoicelogprobs", + "ChatCompletionResponseTokenLogprobs": ".chatcompletionresponsetokenlogprobs", + "ChatCompletionResponseTokenLogprobsTypedDict": ".chatcompletionresponsetokenlogprobs", + "ChatCompletionResponseTokenLogprobsTopK": ".chatcompletionresponsetokenlogprobstopk", + "ChatCompletionResponseTokenLogprobsTopKTypedDict": ".chatcompletionresponsetokenlogprobstopk", "ChatCompletionStreamRequest": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestMessage": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestMessageTypedDict": ".chatcompletionstreamrequest", @@ -399,8 +465,6 @@ "ChatCompletionStreamRequestToolChoiceTypedDict": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestToolTypedDict": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestTypedDict": ".chatcompletionstreamrequest", - "CodeInterpreterTool": ".codeinterpretertool", - "CodeInterpreterToolTypedDict": ".codeinterpretertool", "CompletionChunk": ".completionchunk", "CompletionChunkTypedDict": ".completionchunk", "CompletionEvent": ".completionevent", @@ -458,16 +522,39 @@ "ModerationLlmv2ConfigTypedDict": ".moderationllmv2config", "OAuth2TokenAuth": ".oauth2tokenauth", "OAuth2TokenAuthTypedDict": ".oauth2tokenauth", + "OCRAsideTextBlock": ".ocrasidetextblock", + "OCRAsideTextBlockTypedDict": ".ocrasidetextblock", + "OCRBlockConfidenceScores": ".ocrblockconfidencescores", + "OCRBlockConfidenceScoresTypedDict": ".ocrblockconfidencescores", + "OCRCaptionBlock": ".ocrcaptionblock", + "OCRCaptionBlockTypedDict": ".ocrcaptionblock", + "OCRCodeBlock": ".ocrcodeblock", + "OCRCodeBlockTypedDict": ".ocrcodeblock", "OCRConfidenceScore": ".ocrconfidencescore", "OCRConfidenceScoreTypedDict": ".ocrconfidencescore", + "OCREquationBlock": ".ocrequationblock", + "OCREquationBlockTypedDict": ".ocrequationblock", + "OCRFooterBlock": ".ocrfooterblock", + "OCRFooterBlockTypedDict": ".ocrfooterblock", + "OCRHeaderBlock": ".ocrheaderblock", + "OCRHeaderBlockTypedDict": ".ocrheaderblock", + "OCRImageBlock": ".ocrimageblock", + "OCRImageBlockTypedDict": ".ocrimageblock", "OCRImageObject": ".ocrimageobject", "OCRImageObjectTypedDict": ".ocrimageobject", + "OCRListBlock": ".ocrlistblock", + "OCRListBlockTypedDict": ".ocrlistblock", "OCRPageConfidenceScores": ".ocrpageconfidencescores", "OCRPageConfidenceScoresTypedDict": ".ocrpageconfidencescores", "OCRPageDimensions": ".ocrpagedimensions", "OCRPageDimensionsTypedDict": ".ocrpagedimensions", + "Block": ".ocrpageobject", + "BlockTypedDict": ".ocrpageobject", "OCRPageObject": ".ocrpageobject", "OCRPageObjectTypedDict": ".ocrpageobject", + "UnknownBlock": ".ocrpageobject", + "OCRReferencesBlock": ".ocrreferencesblock", + "OCRReferencesBlockTypedDict": ".ocrreferencesblock", "ConfidenceScoresGranularity": ".ocrrequest", "Document": ".ocrrequest", "DocumentTypedDict": ".ocrrequest", @@ -478,9 +565,17 @@ "TableFormat": ".ocrrequest", "OCRResponse": ".ocrresponse", "OCRResponseTypedDict": ".ocrresponse", + "OCRSignatureBlock": ".ocrsignatureblock", + "OCRSignatureBlockTypedDict": ".ocrsignatureblock", + "OCRTableBlock": ".ocrtableblock", + "OCRTableBlockTypedDict": ".ocrtableblock", "Format": ".ocrtableobject", "OCRTableObject": ".ocrtableobject", "OCRTableObjectTypedDict": ".ocrtableobject", + "OCRTextBlock": ".ocrtextblock", + "OCRTextBlockTypedDict": ".ocrtextblock", + "OCRTitleBlock": ".ocrtitleblock", + "OCRTitleBlockTypedDict": ".ocrtitleblock", "OCRUsageInfo": ".ocrusageinfo", "OCRUsageInfoTypedDict": ".ocrusageinfo", "Prediction": ".prediction", @@ -536,10 +631,6 @@ "LocTypedDict": ".validationerror", "ValidationError": ".validationerror", "ValidationErrorTypedDict": ".validationerror", - "WebSearchPremiumTool": ".websearchpremiumtool", - "WebSearchPremiumToolTypedDict": ".websearchpremiumtool", - "WebSearchTool": ".websearchtool", - "WebSearchToolTypedDict": ".websearchtool", } diff --git a/packages/azure/src/mistralai/azure/client/models/builtinconnectors.py b/packages/azure/src/mistralai/azure/client/models/builtinconnectors.py index 6a3b2476d..4907807f7 100644 --- a/packages/azure/src/mistralai/azure/client/models/builtinconnectors.py +++ b/packages/azure/src/mistralai/azure/client/models/builtinconnectors.py @@ -10,4 +10,5 @@ "code_interpreter", "image_generation", "document_library", + "mistral_mcp", ] diff --git a/packages/azure/src/mistralai/azure/client/models/chatcompletionchoice.py b/packages/azure/src/mistralai/azure/client/models/chatcompletionchoice.py index 7ab8832c8..b741e0333 100644 --- a/packages/azure/src/mistralai/azure/client/models/chatcompletionchoice.py +++ b/packages/azure/src/mistralai/azure/client/models/chatcompletionchoice.py @@ -2,8 +2,19 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict +from .chatcompletionresponsechoicelogprobs import ( + ChatCompletionResponseChoiceLogprobs, + ChatCompletionResponseChoiceLogprobsTypedDict, +) from .deltamessage import DeltaMessage, DeltaMessageTypedDict -from mistralai.azure.client.types import BaseModel, UNSET_SENTINEL, UnrecognizedStr +from mistralai.azure.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) from pydantic import model_serializer from typing import List, Literal, Optional, Union from typing_extensions import NotRequired, TypedDict @@ -26,6 +37,10 @@ class ChatCompletionChoiceTypedDict(TypedDict): finish_reason: ChatCompletionChoiceFinishReason message: NotRequired[AssistantMessageTypedDict] messages: NotRequired[List[DeltaMessageTypedDict]] + logprobs: NotRequired[Nullable[ChatCompletionResponseChoiceLogprobsTypedDict]] + prompt_logprobs: NotRequired[ + Nullable[ChatCompletionResponseChoiceLogprobsTypedDict] + ] class ChatCompletionChoice(BaseModel): @@ -37,18 +52,31 @@ class ChatCompletionChoice(BaseModel): messages: Optional[List[DeltaMessage]] = None + logprobs: OptionalNullable[ChatCompletionResponseChoiceLogprobs] = UNSET + + prompt_logprobs: OptionalNullable[ChatCompletionResponseChoiceLogprobs] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["message", "messages"]) + optional_fields = set(["message", "messages", "logprobs", "prompt_logprobs"]) + nullable_fields = set(["logprobs", "prompt_logprobs"]) serialized = handler(self) m = {} for n, f in type(self).model_fields.items(): k = f.alias or n 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: + 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/packages/azure/src/mistralai/azure/client/models/chatcompletionrequest.py b/packages/azure/src/mistralai/azure/client/models/chatcompletionrequest.py index 90dc0101c..36807d44a 100644 --- a/packages/azure/src/mistralai/azure/client/models/chatcompletionrequest.py +++ b/packages/azure/src/mistralai/azure/client/models/chatcompletionrequest.py @@ -2,7 +2,6 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict -from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict from .customconnector import CustomConnector, CustomConnectorTypedDict from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict @@ -17,8 +16,6 @@ from .toolchoiceenum import ToolChoiceEnum from .toolmessage import ToolMessage, ToolMessageTypedDict from .usermessage import UserMessage, UserMessageTypedDict -from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict -from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.azure.client.types import ( BaseModel, Nullable, @@ -70,9 +67,6 @@ "ChatCompletionRequestToolTypedDict", Union[ ToolTypedDict, - WebSearchToolTypedDict, - WebSearchPremiumToolTypedDict, - CodeInterpreterToolTypedDict, ImageGenerationToolTypedDict, DocumentLibraryToolTypedDict, CustomConnectorTypedDict, @@ -81,13 +75,7 @@ ChatCompletionRequestTool = Union[ - Tool, - WebSearchTool, - WebSearchPremiumTool, - CodeInterpreterTool, - ImageGenerationTool, - DocumentLibraryTool, - CustomConnector, + Tool, ImageGenerationTool, DocumentLibraryTool, CustomConnector ] @@ -132,6 +120,13 @@ class ChatCompletionRequestTypedDict(TypedDict): r"""The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.""" frequency_penalty: NotRequired[Nullable[float]] r"""The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition.""" + min_tokens: NotRequired[Nullable[int]] + repetition_penalty: NotRequired[Nullable[float]] + top_k: NotRequired[Nullable[int]] + logprobs: NotRequired[Nullable[bool]] + top_logprobs: NotRequired[Nullable[int]] + prompt_logprobs: NotRequired[Nullable[bool]] + top_prompt_logprobs: NotRequired[Nullable[int]] n: NotRequired[Nullable[int]] r"""Number of completions to return for each request, input tokens are only billed once.""" prediction: NotRequired[PredictionTypedDict] @@ -188,6 +183,20 @@ class ChatCompletionRequest(BaseModel): frequency_penalty: OptionalNullable[float] = UNSET r"""The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition.""" + min_tokens: OptionalNullable[int] = UNSET + + repetition_penalty: OptionalNullable[float] = UNSET + + top_k: OptionalNullable[int] = UNSET + + logprobs: OptionalNullable[bool] = UNSET + + top_logprobs: OptionalNullable[int] = UNSET + + prompt_logprobs: OptionalNullable[bool] = UNSET + + top_prompt_logprobs: OptionalNullable[int] = UNSET + n: OptionalNullable[int] = UNSET r"""Number of completions to return for each request, input tokens are only billed once.""" @@ -224,6 +233,13 @@ def serialize_model(self, handler): "tool_choice", "presence_penalty", "frequency_penalty", + "min_tokens", + "repetition_penalty", + "top_k", + "logprobs", + "top_logprobs", + "prompt_logprobs", + "top_prompt_logprobs", "n", "prediction", "parallel_tool_calls", @@ -244,6 +260,13 @@ def serialize_model(self, handler): "tools", "presence_penalty", "frequency_penalty", + "min_tokens", + "repetition_penalty", + "top_k", + "logprobs", + "top_logprobs", + "prompt_logprobs", + "top_prompt_logprobs", "n", "reasoning_effort", "prompt_mode", diff --git a/packages/azure/src/mistralai/azure/client/models/chatcompletionresponsechoicelogprobs.py b/packages/azure/src/mistralai/azure/client/models/chatcompletionresponsechoicelogprobs.py new file mode 100644 index 000000000..63d7f7076 --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/chatcompletionresponsechoicelogprobs.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .chatcompletionresponsetokenlogprobstopk import ( + ChatCompletionResponseTokenLogprobsTopK, + ChatCompletionResponseTokenLogprobsTopKTypedDict, +) +from mistralai.azure.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class ChatCompletionResponseChoiceLogprobsTypedDict(TypedDict): + content: List[ChatCompletionResponseTokenLogprobsTopKTypedDict] + + +class ChatCompletionResponseChoiceLogprobs(BaseModel): + content: List[ChatCompletionResponseTokenLogprobsTopK] diff --git a/packages/azure/src/mistralai/azure/client/models/chatcompletionresponsetokenlogprobs.py b/packages/azure/src/mistralai/azure/client/models/chatcompletionresponsetokenlogprobs.py new file mode 100644 index 000000000..f6bee1b79 --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/chatcompletionresponsetokenlogprobs.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.azure.client.types import BaseModel +import pydantic +from typing import List +from typing_extensions import Annotated, TypedDict + + +class ChatCompletionResponseTokenLogprobsTypedDict(TypedDict): + token: str + logprob: float + bytes_: List[int] + token_id: int + + +class ChatCompletionResponseTokenLogprobs(BaseModel): + token: str + + logprob: float + + bytes_: Annotated[List[int], pydantic.Field(alias="bytes")] + + token_id: int + + +try: + ChatCompletionResponseTokenLogprobs.model_rebuild() +except NameError: + pass diff --git a/packages/azure/src/mistralai/azure/client/models/websearchtool.py b/packages/azure/src/mistralai/azure/client/models/chatcompletionresponsetokenlogprobstopk.py similarity index 57% rename from packages/azure/src/mistralai/azure/client/models/websearchtool.py rename to packages/azure/src/mistralai/azure/client/models/chatcompletionresponsetokenlogprobstopk.py index 363e03312..957a6ab97 100644 --- a/packages/azure/src/mistralai/azure/client/models/websearchtool.py +++ b/packages/azure/src/mistralai/azure/client/models/chatcompletionresponsetokenlogprobstopk.py @@ -1,7 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .toolconfiguration import ToolConfiguration, ToolConfigurationTypedDict +from .chatcompletionresponsetokenlogprobs import ( + ChatCompletionResponseTokenLogprobs, + ChatCompletionResponseTokenLogprobsTypedDict, +) from mistralai.azure.client.types import ( BaseModel, Nullable, @@ -9,31 +12,37 @@ UNSET, UNSET_SENTINEL, ) -from mistralai.azure.client.utils import validate_const import pydantic from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import Literal +from typing import List from typing_extensions import Annotated, NotRequired, TypedDict -class WebSearchToolTypedDict(TypedDict): - tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] - type: Literal["web_search"] +class ChatCompletionResponseTokenLogprobsTopKTypedDict(TypedDict): + token: str + logprob: float + bytes_: List[int] + token_id: int + top_logprobs: NotRequired[ + Nullable[List[ChatCompletionResponseTokenLogprobsTypedDict]] + ] + + +class ChatCompletionResponseTokenLogprobsTopK(BaseModel): + token: str + + logprob: float + bytes_: Annotated[List[int], pydantic.Field(alias="bytes")] -class WebSearchTool(BaseModel): - tool_configuration: OptionalNullable[ToolConfiguration] = UNSET + token_id: int - type: Annotated[ - Annotated[Literal["web_search"], AfterValidator(validate_const("web_search"))], - pydantic.Field(alias="type"), - ] = "web_search" + top_logprobs: OptionalNullable[List[ChatCompletionResponseTokenLogprobs]] = UNSET @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["tool_configuration"]) - nullable_fields = set(["tool_configuration"]) + optional_fields = set(["top_logprobs"]) + nullable_fields = set(["top_logprobs"]) serialized = handler(self) m = {} @@ -57,6 +66,6 @@ def serialize_model(self, handler): try: - WebSearchTool.model_rebuild() + ChatCompletionResponseTokenLogprobsTopK.model_rebuild() except NameError: pass diff --git a/packages/azure/src/mistralai/azure/client/models/chatcompletionstreamrequest.py b/packages/azure/src/mistralai/azure/client/models/chatcompletionstreamrequest.py index 757d62315..7023771dc 100644 --- a/packages/azure/src/mistralai/azure/client/models/chatcompletionstreamrequest.py +++ b/packages/azure/src/mistralai/azure/client/models/chatcompletionstreamrequest.py @@ -2,7 +2,6 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict -from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict from .customconnector import CustomConnector, CustomConnectorTypedDict from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict @@ -17,8 +16,6 @@ from .toolchoiceenum import ToolChoiceEnum from .toolmessage import ToolMessage, ToolMessageTypedDict from .usermessage import UserMessage, UserMessageTypedDict -from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict -from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.azure.client.types import ( BaseModel, Nullable, @@ -70,9 +67,6 @@ "ChatCompletionStreamRequestToolTypedDict", Union[ ToolTypedDict, - WebSearchToolTypedDict, - WebSearchPremiumToolTypedDict, - CodeInterpreterToolTypedDict, ImageGenerationToolTypedDict, DocumentLibraryToolTypedDict, CustomConnectorTypedDict, @@ -81,13 +75,7 @@ ChatCompletionStreamRequestTool = Union[ - Tool, - WebSearchTool, - WebSearchPremiumTool, - CodeInterpreterTool, - ImageGenerationTool, - DocumentLibraryTool, - CustomConnector, + Tool, ImageGenerationTool, DocumentLibraryTool, CustomConnector ] @@ -131,6 +119,13 @@ class ChatCompletionStreamRequestTypedDict(TypedDict): r"""The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.""" frequency_penalty: NotRequired[Nullable[float]] r"""The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition.""" + min_tokens: NotRequired[Nullable[int]] + repetition_penalty: NotRequired[Nullable[float]] + top_k: NotRequired[Nullable[int]] + logprobs: NotRequired[Nullable[bool]] + top_logprobs: NotRequired[Nullable[int]] + prompt_logprobs: NotRequired[Nullable[bool]] + top_prompt_logprobs: NotRequired[Nullable[int]] n: NotRequired[Nullable[int]] r"""Number of completions to return for each request, input tokens are only billed once.""" prediction: NotRequired[PredictionTypedDict] @@ -186,6 +181,20 @@ class ChatCompletionStreamRequest(BaseModel): frequency_penalty: OptionalNullable[float] = UNSET r"""The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition.""" + min_tokens: OptionalNullable[int] = UNSET + + repetition_penalty: OptionalNullable[float] = UNSET + + top_k: OptionalNullable[int] = UNSET + + logprobs: OptionalNullable[bool] = UNSET + + top_logprobs: OptionalNullable[int] = UNSET + + prompt_logprobs: OptionalNullable[bool] = UNSET + + top_prompt_logprobs: OptionalNullable[int] = UNSET + n: OptionalNullable[int] = UNSET r"""Number of completions to return for each request, input tokens are only billed once.""" @@ -222,6 +231,13 @@ def serialize_model(self, handler): "tool_choice", "presence_penalty", "frequency_penalty", + "min_tokens", + "repetition_penalty", + "top_k", + "logprobs", + "top_logprobs", + "prompt_logprobs", + "top_prompt_logprobs", "n", "prediction", "parallel_tool_calls", @@ -242,6 +258,13 @@ def serialize_model(self, handler): "tools", "presence_penalty", "frequency_penalty", + "min_tokens", + "repetition_penalty", + "top_k", + "logprobs", + "top_logprobs", + "prompt_logprobs", + "top_prompt_logprobs", "n", "reasoning_effort", "prompt_mode", diff --git a/packages/azure/src/mistralai/azure/client/models/completionresponsestreamchoice.py b/packages/azure/src/mistralai/azure/client/models/completionresponsestreamchoice.py index 36be83026..b87d60265 100644 --- a/packages/azure/src/mistralai/azure/client/models/completionresponsestreamchoice.py +++ b/packages/azure/src/mistralai/azure/client/models/completionresponsestreamchoice.py @@ -1,16 +1,22 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .chatcompletionresponsechoicelogprobs import ( + ChatCompletionResponseChoiceLogprobs, + ChatCompletionResponseChoiceLogprobsTypedDict, +) from .deltamessage import DeltaMessage, DeltaMessageTypedDict from mistralai.azure.client.types import ( BaseModel, Nullable, + OptionalNullable, + UNSET, UNSET_SENTINEL, UnrecognizedStr, ) from pydantic import model_serializer from typing import Literal, Union -from typing_extensions import TypedDict +from typing_extensions import NotRequired, TypedDict CompletionResponseStreamChoiceFinishReason = Union[ @@ -28,6 +34,10 @@ class CompletionResponseStreamChoiceTypedDict(TypedDict): index: int delta: DeltaMessageTypedDict finish_reason: Nullable[CompletionResponseStreamChoiceFinishReason] + logprobs: NotRequired[Nullable[ChatCompletionResponseChoiceLogprobsTypedDict]] + prompt_logprobs: NotRequired[ + Nullable[ChatCompletionResponseChoiceLogprobsTypedDict] + ] class CompletionResponseStreamChoice(BaseModel): @@ -37,16 +47,31 @@ class CompletionResponseStreamChoice(BaseModel): finish_reason: Nullable[CompletionResponseStreamChoiceFinishReason] + logprobs: OptionalNullable[ChatCompletionResponseChoiceLogprobs] = UNSET + + prompt_logprobs: OptionalNullable[ChatCompletionResponseChoiceLogprobs] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): + optional_fields = set(["logprobs", "prompt_logprobs"]) + nullable_fields = set(["finish_reason", "logprobs", "prompt_logprobs"]) serialized = handler(self) m = {} for n, f in type(self).model_fields.items(): k = f.alias or n 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: - m[k] = val + 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/packages/azure/src/mistralai/azure/client/models/customconnector.py b/packages/azure/src/mistralai/azure/client/models/customconnector.py index c9b871c7c..0fb0dfc5d 100644 --- a/packages/azure/src/mistralai/azure/client/models/customconnector.py +++ b/packages/azure/src/mistralai/azure/client/models/customconnector.py @@ -33,6 +33,7 @@ class CustomConnectorTypedDict(TypedDict): connector_id: str type: Literal["connector"] authorization: NotRequired[Nullable[AuthorizationTypedDict]] + r"""Deprecated: per-request connector credentials will be removed. Authenticate the connector through the Connectors API instead.""" tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] @@ -44,7 +45,13 @@ class CustomConnector(BaseModel): pydantic.Field(alias="type"), ] = "connector" - authorization: SerializeAsAny[OptionalNullable[Authorization]] = UNSET + authorization: Annotated[ + SerializeAsAny[OptionalNullable[Authorization]], + 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: per-request connector credentials will be removed. Authenticate the connector through the Connectors API instead.""" tool_configuration: OptionalNullable[ToolConfiguration] = UNSET diff --git a/packages/azure/src/mistralai/azure/client/models/ocrasidetextblock.py b/packages/azure/src/mistralai/azure/client/models/ocrasidetextblock.py new file mode 100644 index 000000000..0aa4902f6 --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/ocrasidetextblock.py @@ -0,0 +1,84 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .ocrblockconfidencescores import ( + OCRBlockConfidenceScores, + OCRBlockConfidenceScoresTypedDict, +) +from mistralai.azure.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.azure.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, NotRequired, TypedDict + + +class OCRAsideTextBlockTypedDict(TypedDict): + top_left_x: int + top_left_y: int + bottom_right_x: int + bottom_right_y: int + content: str + r"""Text/markdown/html content of this block""" + confidence_scores: NotRequired[Nullable[OCRBlockConfidenceScoresTypedDict]] + r"""Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'.""" + type: Literal["aside_text"] + + +class OCRAsideTextBlock(BaseModel): + top_left_x: int + + top_left_y: int + + bottom_right_x: int + + bottom_right_y: int + + content: str + r"""Text/markdown/html content of this block""" + + confidence_scores: OptionalNullable[OCRBlockConfidenceScores] = UNSET + r"""Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'.""" + + type: Annotated[ + Annotated[Literal["aside_text"], AfterValidator(validate_const("aside_text"))], + pydantic.Field(alias="type"), + ] = "aside_text" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["confidence_scores"]) + nullable_fields = set(["confidence_scores"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + 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: + OCRAsideTextBlock.model_rebuild() +except NameError: + pass diff --git a/packages/azure/src/mistralai/azure/client/models/ocrblockconfidencescores.py b/packages/azure/src/mistralai/azure/client/models/ocrblockconfidencescores.py new file mode 100644 index 000000000..3def7cd66 --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/ocrblockconfidencescores.py @@ -0,0 +1,83 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.azure.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class OCRBlockConfidenceScoresTypedDict(TypedDict): + r"""Per-block confidence scores, computed per-word from model logprobs. + + All fields ``None`` when the block couldn't be scored. + Individual fields ``None`` when that signal is absent — e.g. an image-only block has + no caption, so content scores are ``None``. + """ + + average_content_confidence_score: NotRequired[Nullable[float]] + r"""Average confidence over the block's content (caption) tokens. None when the block has no textual content (e.g. image-only entry).""" + minimum_content_confidence_score: NotRequired[Nullable[float]] + r"""Minimum per-word content confidence in the block. None when the block has no textual content.""" + block_type_confidence_score: NotRequired[Nullable[float]] + r"""Confidence in the block type (e.g. 'text', 'title', 'table'). None when the entry had no block type or the block type span could not be located.""" + + +class OCRBlockConfidenceScores(BaseModel): + r"""Per-block confidence scores, computed per-word from model logprobs. + + All fields ``None`` when the block couldn't be scored. + Individual fields ``None`` when that signal is absent — e.g. an image-only block has + no caption, so content scores are ``None``. + """ + + average_content_confidence_score: OptionalNullable[float] = UNSET + r"""Average confidence over the block's content (caption) tokens. None when the block has no textual content (e.g. image-only entry).""" + + minimum_content_confidence_score: OptionalNullable[float] = UNSET + r"""Minimum per-word content confidence in the block. None when the block has no textual content.""" + + block_type_confidence_score: OptionalNullable[float] = UNSET + r"""Confidence in the block type (e.g. 'text', 'title', 'table'). None when the entry had no block type or the block type span could not be located.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "average_content_confidence_score", + "minimum_content_confidence_score", + "block_type_confidence_score", + ] + ) + nullable_fields = set( + [ + "average_content_confidence_score", + "minimum_content_confidence_score", + "block_type_confidence_score", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + 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/packages/azure/src/mistralai/azure/client/models/ocrcaptionblock.py b/packages/azure/src/mistralai/azure/client/models/ocrcaptionblock.py new file mode 100644 index 000000000..c542a2742 --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/ocrcaptionblock.py @@ -0,0 +1,84 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .ocrblockconfidencescores import ( + OCRBlockConfidenceScores, + OCRBlockConfidenceScoresTypedDict, +) +from mistralai.azure.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.azure.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, NotRequired, TypedDict + + +class OCRCaptionBlockTypedDict(TypedDict): + top_left_x: int + top_left_y: int + bottom_right_x: int + bottom_right_y: int + content: str + r"""Text/markdown/html content of this block""" + confidence_scores: NotRequired[Nullable[OCRBlockConfidenceScoresTypedDict]] + r"""Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'.""" + type: Literal["caption"] + + +class OCRCaptionBlock(BaseModel): + top_left_x: int + + top_left_y: int + + bottom_right_x: int + + bottom_right_y: int + + content: str + r"""Text/markdown/html content of this block""" + + confidence_scores: OptionalNullable[OCRBlockConfidenceScores] = UNSET + r"""Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'.""" + + type: Annotated[ + Annotated[Literal["caption"], AfterValidator(validate_const("caption"))], + pydantic.Field(alias="type"), + ] = "caption" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["confidence_scores"]) + nullable_fields = set(["confidence_scores"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + 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: + OCRCaptionBlock.model_rebuild() +except NameError: + pass diff --git a/packages/azure/src/mistralai/azure/client/models/codeinterpretertool.py b/packages/azure/src/mistralai/azure/client/models/ocrcodeblock.py similarity index 53% rename from packages/azure/src/mistralai/azure/client/models/codeinterpretertool.py rename to packages/azure/src/mistralai/azure/client/models/ocrcodeblock.py index 0f588be32..4e79fb4bb 100644 --- a/packages/azure/src/mistralai/azure/client/models/codeinterpretertool.py +++ b/packages/azure/src/mistralai/azure/client/models/ocrcodeblock.py @@ -1,7 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .toolconfiguration import ToolConfiguration, ToolConfigurationTypedDict +from .ocrblockconfidencescores import ( + OCRBlockConfidenceScores, + OCRBlockConfidenceScoresTypedDict, +) from mistralai.azure.client.types import ( BaseModel, Nullable, @@ -17,26 +20,42 @@ from typing_extensions import Annotated, NotRequired, TypedDict -class CodeInterpreterToolTypedDict(TypedDict): - tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] - type: Literal["code_interpreter"] +class OCRCodeBlockTypedDict(TypedDict): + top_left_x: int + top_left_y: int + bottom_right_x: int + bottom_right_y: int + content: str + r"""Text/markdown/html content of this block""" + confidence_scores: NotRequired[Nullable[OCRBlockConfidenceScoresTypedDict]] + r"""Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'.""" + type: Literal["code"] + + +class OCRCodeBlock(BaseModel): + top_left_x: int + + top_left_y: int + + bottom_right_x: int + + bottom_right_y: int + content: str + r"""Text/markdown/html content of this block""" -class CodeInterpreterTool(BaseModel): - tool_configuration: OptionalNullable[ToolConfiguration] = UNSET + confidence_scores: OptionalNullable[OCRBlockConfidenceScores] = UNSET + r"""Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'.""" type: Annotated[ - Annotated[ - Literal["code_interpreter"], - AfterValidator(validate_const("code_interpreter")), - ], + Annotated[Literal["code"], AfterValidator(validate_const("code"))], pydantic.Field(alias="type"), - ] = "code_interpreter" + ] = "code" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["tool_configuration"]) - nullable_fields = set(["tool_configuration"]) + optional_fields = set(["confidence_scores"]) + nullable_fields = set(["confidence_scores"]) serialized = handler(self) m = {} @@ -60,6 +79,6 @@ def serialize_model(self, handler): try: - CodeInterpreterTool.model_rebuild() + OCRCodeBlock.model_rebuild() except NameError: pass diff --git a/packages/azure/src/mistralai/azure/client/models/ocrequationblock.py b/packages/azure/src/mistralai/azure/client/models/ocrequationblock.py new file mode 100644 index 000000000..eea629f6e --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/ocrequationblock.py @@ -0,0 +1,84 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .ocrblockconfidencescores import ( + OCRBlockConfidenceScores, + OCRBlockConfidenceScoresTypedDict, +) +from mistralai.azure.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.azure.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, NotRequired, TypedDict + + +class OCREquationBlockTypedDict(TypedDict): + top_left_x: int + top_left_y: int + bottom_right_x: int + bottom_right_y: int + content: str + r"""Text/markdown/html content of this block""" + confidence_scores: NotRequired[Nullable[OCRBlockConfidenceScoresTypedDict]] + r"""Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'.""" + type: Literal["equation"] + + +class OCREquationBlock(BaseModel): + top_left_x: int + + top_left_y: int + + bottom_right_x: int + + bottom_right_y: int + + content: str + r"""Text/markdown/html content of this block""" + + confidence_scores: OptionalNullable[OCRBlockConfidenceScores] = UNSET + r"""Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'.""" + + type: Annotated[ + Annotated[Literal["equation"], AfterValidator(validate_const("equation"))], + pydantic.Field(alias="type"), + ] = "equation" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["confidence_scores"]) + nullable_fields = set(["confidence_scores"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + 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: + OCREquationBlock.model_rebuild() +except NameError: + pass diff --git a/packages/azure/src/mistralai/azure/client/models/ocrfooterblock.py b/packages/azure/src/mistralai/azure/client/models/ocrfooterblock.py new file mode 100644 index 000000000..1ddb57f9a --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/ocrfooterblock.py @@ -0,0 +1,84 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .ocrblockconfidencescores import ( + OCRBlockConfidenceScores, + OCRBlockConfidenceScoresTypedDict, +) +from mistralai.azure.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.azure.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, NotRequired, TypedDict + + +class OCRFooterBlockTypedDict(TypedDict): + top_left_x: int + top_left_y: int + bottom_right_x: int + bottom_right_y: int + content: str + r"""Text/markdown/html content of this block""" + confidence_scores: NotRequired[Nullable[OCRBlockConfidenceScoresTypedDict]] + r"""Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'.""" + type: Literal["footer"] + + +class OCRFooterBlock(BaseModel): + top_left_x: int + + top_left_y: int + + bottom_right_x: int + + bottom_right_y: int + + content: str + r"""Text/markdown/html content of this block""" + + confidence_scores: OptionalNullable[OCRBlockConfidenceScores] = UNSET + r"""Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'.""" + + type: Annotated[ + Annotated[Literal["footer"], AfterValidator(validate_const("footer"))], + pydantic.Field(alias="type"), + ] = "footer" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["confidence_scores"]) + nullable_fields = set(["confidence_scores"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + 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: + OCRFooterBlock.model_rebuild() +except NameError: + pass diff --git a/packages/azure/src/mistralai/azure/client/models/ocrheaderblock.py b/packages/azure/src/mistralai/azure/client/models/ocrheaderblock.py new file mode 100644 index 000000000..5b43731b2 --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/ocrheaderblock.py @@ -0,0 +1,84 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .ocrblockconfidencescores import ( + OCRBlockConfidenceScores, + OCRBlockConfidenceScoresTypedDict, +) +from mistralai.azure.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.azure.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, NotRequired, TypedDict + + +class OCRHeaderBlockTypedDict(TypedDict): + top_left_x: int + top_left_y: int + bottom_right_x: int + bottom_right_y: int + content: str + r"""Text/markdown/html content of this block""" + confidence_scores: NotRequired[Nullable[OCRBlockConfidenceScoresTypedDict]] + r"""Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'.""" + type: Literal["header"] + + +class OCRHeaderBlock(BaseModel): + top_left_x: int + + top_left_y: int + + bottom_right_x: int + + bottom_right_y: int + + content: str + r"""Text/markdown/html content of this block""" + + confidence_scores: OptionalNullable[OCRBlockConfidenceScores] = UNSET + r"""Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'.""" + + type: Annotated[ + Annotated[Literal["header"], AfterValidator(validate_const("header"))], + pydantic.Field(alias="type"), + ] = "header" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["confidence_scores"]) + nullable_fields = set(["confidence_scores"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + 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: + OCRHeaderBlock.model_rebuild() +except NameError: + pass diff --git a/packages/azure/src/mistralai/azure/client/models/ocrimageblock.py b/packages/azure/src/mistralai/azure/client/models/ocrimageblock.py new file mode 100644 index 000000000..69a243653 --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/ocrimageblock.py @@ -0,0 +1,89 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .ocrblockconfidencescores import ( + OCRBlockConfidenceScores, + OCRBlockConfidenceScoresTypedDict, +) +from mistralai.azure.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.azure.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, NotRequired, TypedDict + + +class OCRImageBlockTypedDict(TypedDict): + top_left_x: int + top_left_y: int + bottom_right_x: int + bottom_right_y: int + content: str + r"""Text/markdown/html content of this block""" + image_id: str + r"""References the corresponding entry in OCRPageObject.images""" + confidence_scores: NotRequired[Nullable[OCRBlockConfidenceScoresTypedDict]] + r"""Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'.""" + type: Literal["image"] + + +class OCRImageBlock(BaseModel): + top_left_x: int + + top_left_y: int + + bottom_right_x: int + + bottom_right_y: int + + content: str + r"""Text/markdown/html content of this block""" + + image_id: str + r"""References the corresponding entry in OCRPageObject.images""" + + confidence_scores: OptionalNullable[OCRBlockConfidenceScores] = UNSET + r"""Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'.""" + + type: Annotated[ + Annotated[Literal["image"], AfterValidator(validate_const("image"))], + pydantic.Field(alias="type"), + ] = "image" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["confidence_scores"]) + nullable_fields = set(["confidence_scores"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + 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: + OCRImageBlock.model_rebuild() +except NameError: + pass diff --git a/packages/azure/src/mistralai/azure/client/models/websearchpremiumtool.py b/packages/azure/src/mistralai/azure/client/models/ocrlistblock.py similarity index 53% rename from packages/azure/src/mistralai/azure/client/models/websearchpremiumtool.py rename to packages/azure/src/mistralai/azure/client/models/ocrlistblock.py index 252d8803e..b466b669b 100644 --- a/packages/azure/src/mistralai/azure/client/models/websearchpremiumtool.py +++ b/packages/azure/src/mistralai/azure/client/models/ocrlistblock.py @@ -1,7 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .toolconfiguration import ToolConfiguration, ToolConfigurationTypedDict +from .ocrblockconfidencescores import ( + OCRBlockConfidenceScores, + OCRBlockConfidenceScoresTypedDict, +) from mistralai.azure.client.types import ( BaseModel, Nullable, @@ -17,26 +20,42 @@ from typing_extensions import Annotated, NotRequired, TypedDict -class WebSearchPremiumToolTypedDict(TypedDict): - tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] - type: Literal["web_search_premium"] +class OCRListBlockTypedDict(TypedDict): + top_left_x: int + top_left_y: int + bottom_right_x: int + bottom_right_y: int + content: str + r"""Text/markdown/html content of this block""" + confidence_scores: NotRequired[Nullable[OCRBlockConfidenceScoresTypedDict]] + r"""Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'.""" + type: Literal["list"] + + +class OCRListBlock(BaseModel): + top_left_x: int + + top_left_y: int + + bottom_right_x: int + + bottom_right_y: int + content: str + r"""Text/markdown/html content of this block""" -class WebSearchPremiumTool(BaseModel): - tool_configuration: OptionalNullable[ToolConfiguration] = UNSET + confidence_scores: OptionalNullable[OCRBlockConfidenceScores] = UNSET + r"""Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'.""" type: Annotated[ - Annotated[ - Literal["web_search_premium"], - AfterValidator(validate_const("web_search_premium")), - ], + Annotated[Literal["list"], AfterValidator(validate_const("list"))], pydantic.Field(alias="type"), - ] = "web_search_premium" + ] = "list" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["tool_configuration"]) - nullable_fields = set(["tool_configuration"]) + optional_fields = set(["confidence_scores"]) + nullable_fields = set(["confidence_scores"]) serialized = handler(self) m = {} @@ -60,6 +79,6 @@ def serialize_model(self, handler): try: - WebSearchPremiumTool.model_rebuild() + OCRListBlock.model_rebuild() except NameError: pass diff --git a/packages/azure/src/mistralai/azure/client/models/ocrpageconfidencescores.py b/packages/azure/src/mistralai/azure/client/models/ocrpageconfidencescores.py index 2d5d7a1ac..d3b06ea6c 100644 --- a/packages/azure/src/mistralai/azure/client/models/ocrpageconfidencescores.py +++ b/packages/azure/src/mistralai/azure/client/models/ocrpageconfidencescores.py @@ -12,10 +12,14 @@ class OCRPageConfidenceScoresTypedDict(TypedDict): r"""Confidence scores for an OCR page at various granularities. Note on page-level stats: - - For 'page' granularity: average/minimum are computed from per-token exp(logprob). - - For 'word' granularity: average/minimum are computed from per-word confidence, - where each word's confidence is exp(mean(token_logprobs)) — a geometric mean - over the word's subword tokens. + - For 'page' and 'block' granularity: average/minimum are computed from per-token + exp(logprob). Neither ``word_confidence_scores`` nor ``token_scores`` is populated. + Per-block scores are attached to response blocks separately for 'block' granularity. + - For 'word' granularity: average/minimum are computed from per-word confidence, where + each word's confidence is exp(mean(token_logprobs)) — a geometric mean over the + word's subword tokens. ``word_confidence_scores`` is populated. + - For 'token' granularity (internal): average/minimum are computed from + ``token_scores``; ``token_scores`` is populated. """ average_page_confidence_score: float @@ -30,10 +34,14 @@ class OCRPageConfidenceScores(BaseModel): r"""Confidence scores for an OCR page at various granularities. Note on page-level stats: - - For 'page' granularity: average/minimum are computed from per-token exp(logprob). - - For 'word' granularity: average/minimum are computed from per-word confidence, - where each word's confidence is exp(mean(token_logprobs)) — a geometric mean - over the word's subword tokens. + - For 'page' and 'block' granularity: average/minimum are computed from per-token + exp(logprob). Neither ``word_confidence_scores`` nor ``token_scores`` is populated. + Per-block scores are attached to response blocks separately for 'block' granularity. + - For 'word' granularity: average/minimum are computed from per-word confidence, where + each word's confidence is exp(mean(token_logprobs)) — a geometric mean over the + word's subword tokens. ``word_confidence_scores`` is populated. + - For 'token' granularity (internal): average/minimum are computed from + ``token_scores``; ``token_scores`` is populated. """ average_page_confidence_score: float diff --git a/packages/azure/src/mistralai/azure/client/models/ocrpageobject.py b/packages/azure/src/mistralai/azure/client/models/ocrpageobject.py index 08b5dbcb3..2e7a04728 100644 --- a/packages/azure/src/mistralai/azure/client/models/ocrpageobject.py +++ b/packages/azure/src/mistralai/azure/client/models/ocrpageobject.py @@ -1,13 +1,27 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .ocrasidetextblock import OCRAsideTextBlock, OCRAsideTextBlockTypedDict +from .ocrcaptionblock import OCRCaptionBlock, OCRCaptionBlockTypedDict +from .ocrcodeblock import OCRCodeBlock, OCRCodeBlockTypedDict +from .ocrequationblock import OCREquationBlock, OCREquationBlockTypedDict +from .ocrfooterblock import OCRFooterBlock, OCRFooterBlockTypedDict +from .ocrheaderblock import OCRHeaderBlock, OCRHeaderBlockTypedDict +from .ocrimageblock import OCRImageBlock, OCRImageBlockTypedDict from .ocrimageobject import OCRImageObject, OCRImageObjectTypedDict +from .ocrlistblock import OCRListBlock, OCRListBlockTypedDict from .ocrpageconfidencescores import ( OCRPageConfidenceScores, OCRPageConfidenceScoresTypedDict, ) from .ocrpagedimensions import OCRPageDimensions, OCRPageDimensionsTypedDict +from .ocrreferencesblock import OCRReferencesBlock, OCRReferencesBlockTypedDict +from .ocrsignatureblock import OCRSignatureBlock, OCRSignatureBlockTypedDict +from .ocrtableblock import OCRTableBlock, OCRTableBlockTypedDict from .ocrtableobject import OCRTableObject, OCRTableObjectTypedDict +from .ocrtextblock import OCRTextBlock, OCRTextBlockTypedDict +from .ocrtitleblock import OCRTitleBlock, OCRTitleBlockTypedDict +from functools import partial from mistralai.azure.client.types import ( BaseModel, Nullable, @@ -15,9 +29,87 @@ UNSET, UNSET_SENTINEL, ) -from pydantic import model_serializer -from typing import List, Optional -from typing_extensions import NotRequired, TypedDict +from mistralai.azure.client.utils.unions import parse_open_union +from pydantic import ConfigDict, model_serializer +from pydantic.functional_validators import BeforeValidator +from typing import Any, List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +BlockTypedDict = TypeAliasType( + "BlockTypedDict", + Union[ + OCRAsideTextBlockTypedDict, + OCRListBlockTypedDict, + OCRTitleBlockTypedDict, + OCREquationBlockTypedDict, + OCRCaptionBlockTypedDict, + OCRCodeBlockTypedDict, + OCRReferencesBlockTypedDict, + OCRTextBlockTypedDict, + OCRHeaderBlockTypedDict, + OCRFooterBlockTypedDict, + OCRSignatureBlockTypedDict, + OCRImageBlockTypedDict, + OCRTableBlockTypedDict, + ], +) + + +class UnknownBlock(BaseModel): + r"""A Block variant the SDK doesn't recognize. Preserves the raw payload.""" + + type: Literal["UNKNOWN"] = "UNKNOWN" + raw: Any + is_unknown: Literal[True] = True + + model_config = ConfigDict(frozen=True) + + +_BLOCK_VARIANTS: dict[str, Any] = { + "aside_text": OCRAsideTextBlock, + "caption": OCRCaptionBlock, + "code": OCRCodeBlock, + "equation": OCREquationBlock, + "footer": OCRFooterBlock, + "header": OCRHeaderBlock, + "image": OCRImageBlock, + "list": OCRListBlock, + "references": OCRReferencesBlock, + "signature": OCRSignatureBlock, + "table": OCRTableBlock, + "text": OCRTextBlock, + "title": OCRTitleBlock, +} + + +Block = Annotated[ + Union[ + OCRAsideTextBlock, + OCRCaptionBlock, + OCRCodeBlock, + OCREquationBlock, + OCRFooterBlock, + OCRHeaderBlock, + OCRImageBlock, + OCRListBlock, + OCRReferencesBlock, + OCRSignatureBlock, + OCRTableBlock, + OCRTextBlock, + OCRTitleBlock, + UnknownBlock, + ], + BeforeValidator( + partial( + parse_open_union, + disc_key="type", + variants=_BLOCK_VARIANTS, + unknown_cls=UnknownBlock, + union_name="Block", + ) + ), +] class OCRPageObjectTypedDict(TypedDict): @@ -39,6 +131,8 @@ class OCRPageObjectTypedDict(TypedDict): r"""Footer of the page""" confidence_scores: NotRequired[Nullable[OCRPageConfidenceScoresTypedDict]] r"""Confidence scores for the OCR page (populated when confidence_scores_granularity is set)""" + blocks: NotRequired[Nullable[List[BlockTypedDict]]] + r"""Paragraph-level bounding boxes for all content blocks in reading order (populated when include_blocks is True)""" class OCRPageObject(BaseModel): @@ -69,12 +163,17 @@ class OCRPageObject(BaseModel): confidence_scores: OptionalNullable[OCRPageConfidenceScores] = UNSET r"""Confidence scores for the OCR page (populated when confidence_scores_granularity is set)""" + blocks: OptionalNullable[List[Block]] = UNSET + r"""Paragraph-level bounding boxes for all content blocks in reading order (populated when include_blocks is True)""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( - ["tables", "hyperlinks", "header", "footer", "confidence_scores"] + ["tables", "hyperlinks", "header", "footer", "confidence_scores", "blocks"] + ) + nullable_fields = set( + ["header", "footer", "dimensions", "confidence_scores", "blocks"] ) - nullable_fields = set(["header", "footer", "dimensions", "confidence_scores"]) serialized = handler(self) m = {} diff --git a/packages/azure/src/mistralai/azure/client/models/ocrreferencesblock.py b/packages/azure/src/mistralai/azure/client/models/ocrreferencesblock.py new file mode 100644 index 000000000..9527b55ac --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/ocrreferencesblock.py @@ -0,0 +1,84 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .ocrblockconfidencescores import ( + OCRBlockConfidenceScores, + OCRBlockConfidenceScoresTypedDict, +) +from mistralai.azure.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.azure.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, NotRequired, TypedDict + + +class OCRReferencesBlockTypedDict(TypedDict): + top_left_x: int + top_left_y: int + bottom_right_x: int + bottom_right_y: int + content: str + r"""Text/markdown/html content of this block""" + confidence_scores: NotRequired[Nullable[OCRBlockConfidenceScoresTypedDict]] + r"""Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'.""" + type: Literal["references"] + + +class OCRReferencesBlock(BaseModel): + top_left_x: int + + top_left_y: int + + bottom_right_x: int + + bottom_right_y: int + + content: str + r"""Text/markdown/html content of this block""" + + confidence_scores: OptionalNullable[OCRBlockConfidenceScores] = UNSET + r"""Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'.""" + + type: Annotated[ + Annotated[Literal["references"], AfterValidator(validate_const("references"))], + pydantic.Field(alias="type"), + ] = "references" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["confidence_scores"]) + nullable_fields = set(["confidence_scores"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + 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: + OCRReferencesBlock.model_rebuild() +except NameError: + pass diff --git a/packages/azure/src/mistralai/azure/client/models/ocrrequest.py b/packages/azure/src/mistralai/azure/client/models/ocrrequest.py index 731c0cf82..02dca6e2e 100644 --- a/packages/azure/src/mistralai/azure/client/models/ocrrequest.py +++ b/packages/azure/src/mistralai/azure/client/models/ocrrequest.py @@ -45,6 +45,7 @@ ConfidenceScoresGranularity = Literal[ "word", "page", + "block", ] @@ -68,9 +69,13 @@ class OCRRequestTypedDict(TypedDict): r"""Optional prompt to guide the model in extracting structured output from the entire document. A document_annotation_format must be provided.""" table_format: NotRequired[Nullable[TableFormat]] extract_header: NotRequired[bool] + r"""Extract the page header into the response's `header` field and remove it from the markdown content""" extract_footer: NotRequired[bool] + r"""Extract the page footer into the response's `footer` field and remove it from the markdown content""" + include_blocks: NotRequired[bool] + r"""Return paragraph-level bounding boxes for all content blocks in the response""" confidence_scores_granularity: NotRequired[Nullable[ConfidenceScoresGranularity]] - r"""Granularity for confidence scores: 'word' (per-word scores) or 'page' (aggregate only). Defaults to None (no confidence scores) to keep response payload small.""" + r"""Granularity for confidence scores: 'page' (aggregate only), 'word' (per-word scores), or 'block' (per-block scores). Defaults to None (no confidence scores) to keep response payload small.""" class OCRRequest(BaseModel): @@ -103,11 +108,16 @@ class OCRRequest(BaseModel): table_format: OptionalNullable[TableFormat] = UNSET extract_header: Optional[bool] = None + r"""Extract the page header into the response's `header` field and remove it from the markdown content""" extract_footer: Optional[bool] = None + r"""Extract the page footer into the response's `footer` field and remove it from the markdown content""" + + include_blocks: Optional[bool] = True + r"""Return paragraph-level bounding boxes for all content blocks in the response""" confidence_scores_granularity: OptionalNullable[ConfidenceScoresGranularity] = UNSET - r"""Granularity for confidence scores: 'word' (per-word scores) or 'page' (aggregate only). Defaults to None (no confidence scores) to keep response payload small.""" + r"""Granularity for confidence scores: 'page' (aggregate only), 'word' (per-word scores), or 'block' (per-block scores). Defaults to None (no confidence scores) to keep response payload small.""" @model_serializer(mode="wrap") def serialize_model(self, handler): @@ -123,6 +133,7 @@ def serialize_model(self, handler): "table_format", "extract_header", "extract_footer", + "include_blocks", "confidence_scores_granularity", ] ) diff --git a/packages/azure/src/mistralai/azure/client/models/ocrsignatureblock.py b/packages/azure/src/mistralai/azure/client/models/ocrsignatureblock.py new file mode 100644 index 000000000..fc97ca280 --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/ocrsignatureblock.py @@ -0,0 +1,88 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .ocrblockconfidencescores import ( + OCRBlockConfidenceScores, + OCRBlockConfidenceScoresTypedDict, +) +from mistralai.azure.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.azure.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, NotRequired, TypedDict + + +class OCRSignatureBlockTypedDict(TypedDict): + r"""Signature region. ``content`` is the transcribed name when legible, else ``\"\"``.""" + + top_left_x: int + top_left_y: int + bottom_right_x: int + bottom_right_y: int + content: str + r"""Text/markdown/html content of this block""" + confidence_scores: NotRequired[Nullable[OCRBlockConfidenceScoresTypedDict]] + r"""Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'.""" + type: Literal["signature"] + + +class OCRSignatureBlock(BaseModel): + r"""Signature region. ``content`` is the transcribed name when legible, else ``\"\"``.""" + + top_left_x: int + + top_left_y: int + + bottom_right_x: int + + bottom_right_y: int + + content: str + r"""Text/markdown/html content of this block""" + + confidence_scores: OptionalNullable[OCRBlockConfidenceScores] = UNSET + r"""Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'.""" + + type: Annotated[ + Annotated[Literal["signature"], AfterValidator(validate_const("signature"))], + pydantic.Field(alias="type"), + ] = "signature" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["confidence_scores"]) + nullable_fields = set(["confidence_scores"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + 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: + OCRSignatureBlock.model_rebuild() +except NameError: + pass diff --git a/packages/azure/src/mistralai/azure/client/models/ocrtableblock.py b/packages/azure/src/mistralai/azure/client/models/ocrtableblock.py new file mode 100644 index 000000000..435f3bc2d --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/ocrtableblock.py @@ -0,0 +1,89 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .ocrblockconfidencescores import ( + OCRBlockConfidenceScores, + OCRBlockConfidenceScoresTypedDict, +) +from mistralai.azure.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.azure.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, NotRequired, TypedDict + + +class OCRTableBlockTypedDict(TypedDict): + top_left_x: int + top_left_y: int + bottom_right_x: int + bottom_right_y: int + content: str + r"""Text/markdown/html content of this block""" + confidence_scores: NotRequired[Nullable[OCRBlockConfidenceScoresTypedDict]] + r"""Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'.""" + type: Literal["table"] + table_id: NotRequired[Nullable[str]] + r"""References the corresponding entry in OCRPageObject.tables, when tables are extracted""" + + +class OCRTableBlock(BaseModel): + top_left_x: int + + top_left_y: int + + bottom_right_x: int + + bottom_right_y: int + + content: str + r"""Text/markdown/html content of this block""" + + confidence_scores: OptionalNullable[OCRBlockConfidenceScores] = UNSET + r"""Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'.""" + + type: Annotated[ + Annotated[Literal["table"], AfterValidator(validate_const("table"))], + pydantic.Field(alias="type"), + ] = "table" + + table_id: OptionalNullable[str] = UNSET + r"""References the corresponding entry in OCRPageObject.tables, when tables are extracted""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["confidence_scores", "table_id"]) + nullable_fields = set(["confidence_scores", "table_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + 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: + OCRTableBlock.model_rebuild() +except NameError: + pass diff --git a/packages/azure/src/mistralai/azure/client/models/ocrtextblock.py b/packages/azure/src/mistralai/azure/client/models/ocrtextblock.py new file mode 100644 index 000000000..5126cbf8c --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/ocrtextblock.py @@ -0,0 +1,84 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .ocrblockconfidencescores import ( + OCRBlockConfidenceScores, + OCRBlockConfidenceScoresTypedDict, +) +from mistralai.azure.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.azure.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, NotRequired, TypedDict + + +class OCRTextBlockTypedDict(TypedDict): + top_left_x: int + top_left_y: int + bottom_right_x: int + bottom_right_y: int + content: str + r"""Text/markdown/html content of this block""" + confidence_scores: NotRequired[Nullable[OCRBlockConfidenceScoresTypedDict]] + r"""Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'.""" + type: Literal["text"] + + +class OCRTextBlock(BaseModel): + top_left_x: int + + top_left_y: int + + bottom_right_x: int + + bottom_right_y: int + + content: str + r"""Text/markdown/html content of this block""" + + confidence_scores: OptionalNullable[OCRBlockConfidenceScores] = UNSET + r"""Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'.""" + + type: Annotated[ + Annotated[Literal["text"], AfterValidator(validate_const("text"))], + pydantic.Field(alias="type"), + ] = "text" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["confidence_scores"]) + nullable_fields = set(["confidence_scores"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + 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: + OCRTextBlock.model_rebuild() +except NameError: + pass diff --git a/packages/azure/src/mistralai/azure/client/models/ocrtitleblock.py b/packages/azure/src/mistralai/azure/client/models/ocrtitleblock.py new file mode 100644 index 000000000..ec31a74c9 --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/ocrtitleblock.py @@ -0,0 +1,84 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .ocrblockconfidencescores import ( + OCRBlockConfidenceScores, + OCRBlockConfidenceScoresTypedDict, +) +from mistralai.azure.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.azure.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, NotRequired, TypedDict + + +class OCRTitleBlockTypedDict(TypedDict): + top_left_x: int + top_left_y: int + bottom_right_x: int + bottom_right_y: int + content: str + r"""Text/markdown/html content of this block""" + confidence_scores: NotRequired[Nullable[OCRBlockConfidenceScoresTypedDict]] + r"""Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'.""" + type: Literal["title"] + + +class OCRTitleBlock(BaseModel): + top_left_x: int + + top_left_y: int + + bottom_right_x: int + + bottom_right_y: int + + content: str + r"""Text/markdown/html content of this block""" + + confidence_scores: OptionalNullable[OCRBlockConfidenceScores] = UNSET + r"""Confidence scores for this block. Populated when confidence_scores_granularity is set to 'block'.""" + + type: Annotated[ + Annotated[Literal["title"], AfterValidator(validate_const("title"))], + pydantic.Field(alias="type"), + ] = "title" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["confidence_scores"]) + nullable_fields = set(["confidence_scores"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + 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: + OCRTitleBlock.model_rebuild() +except NameError: + pass diff --git a/packages/azure/src/mistralai/azure/client/models/reasoningeffort.py b/packages/azure/src/mistralai/azure/client/models/reasoningeffort.py index 43ffa02b8..f0dbb8722 100644 --- a/packages/azure/src/mistralai/azure/client/models/reasoningeffort.py +++ b/packages/azure/src/mistralai/azure/client/models/reasoningeffort.py @@ -6,5 +6,10 @@ ReasoningEffort = Literal[ "none", + "minimal", + "low", + "medium", "high", + "xhigh", + "max", ] diff --git a/packages/azure/src/mistralai/azure/client/models/toolcall.py b/packages/azure/src/mistralai/azure/client/models/toolcall.py index 87ccd030b..4046cb21d 100644 --- a/packages/azure/src/mistralai/azure/client/models/toolcall.py +++ b/packages/azure/src/mistralai/azure/client/models/toolcall.py @@ -20,7 +20,7 @@ class ToolCall(BaseModel): id: Optional[str] = "null" - type: Optional[str] = None + type: Optional[str] = "function" index: Optional[int] = 0 diff --git a/packages/azure/src/mistralai/azure/client/models/toolchoice.py b/packages/azure/src/mistralai/azure/client/models/toolchoice.py index 15d1da1ce..cbfb7de2d 100644 --- a/packages/azure/src/mistralai/azure/client/models/toolchoice.py +++ b/packages/azure/src/mistralai/azure/client/models/toolchoice.py @@ -22,7 +22,7 @@ class ToolChoice(BaseModel): function: FunctionName r"""this restriction of `Function` is used to select a specific function to call""" - type: Optional[str] = None + type: Optional[str] = "function" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/packages/azure/src/mistralai/azure/client/ocr.py b/packages/azure/src/mistralai/azure/client/ocr.py index 3b909306d..5ddfa9377 100644 --- a/packages/azure/src/mistralai/azure/client/ocr.py +++ b/packages/azure/src/mistralai/azure/client/ocr.py @@ -28,6 +28,7 @@ def process( table_format: OptionalNullable[models.TableFormat] = UNSET, extract_header: Optional[bool] = None, extract_footer: Optional[bool] = None, + include_blocks: Optional[bool] = True, confidence_scores_granularity: OptionalNullable[ models.ConfidenceScoresGranularity ] = UNSET, @@ -48,9 +49,10 @@ def process( :param document_annotation_format: Structured output class for extracting useful information from the entire document. Only json_schema is valid for this field :param document_annotation_prompt: Optional prompt to guide the model in extracting structured output from the entire document. A document_annotation_format must be provided. :param table_format: - :param extract_header: - :param extract_footer: - :param confidence_scores_granularity: Granularity for confidence scores: 'word' (per-word scores) or 'page' (aggregate only). Defaults to None (no confidence scores) to keep response payload small. + :param extract_header: Extract the page header into the response's `header` field and remove it from the markdown content + :param extract_footer: Extract the page footer into the response's `footer` field and remove it from the markdown content + :param include_blocks: Return paragraph-level bounding boxes for all content blocks in the response + :param confidence_scores_granularity: Granularity for confidence scores: 'page' (aggregate only), 'word' (per-word scores), or 'block' (per-block scores). Defaults to None (no confidence scores) to keep response payload small. :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 @@ -62,7 +64,7 @@ def process( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 60000 + timeout_ms = 300000 if server_url is not None: base_url = server_url @@ -86,6 +88,7 @@ def process( table_format=table_format, extract_header=extract_header, extract_footer=extract_footer, + include_blocks=include_blocks, confidence_scores_granularity=confidence_scores_granularity, ) @@ -168,6 +171,7 @@ async def process_async( table_format: OptionalNullable[models.TableFormat] = UNSET, extract_header: Optional[bool] = None, extract_footer: Optional[bool] = None, + include_blocks: Optional[bool] = True, confidence_scores_granularity: OptionalNullable[ models.ConfidenceScoresGranularity ] = UNSET, @@ -188,9 +192,10 @@ async def process_async( :param document_annotation_format: Structured output class for extracting useful information from the entire document. Only json_schema is valid for this field :param document_annotation_prompt: Optional prompt to guide the model in extracting structured output from the entire document. A document_annotation_format must be provided. :param table_format: - :param extract_header: - :param extract_footer: - :param confidence_scores_granularity: Granularity for confidence scores: 'word' (per-word scores) or 'page' (aggregate only). Defaults to None (no confidence scores) to keep response payload small. + :param extract_header: Extract the page header into the response's `header` field and remove it from the markdown content + :param extract_footer: Extract the page footer into the response's `footer` field and remove it from the markdown content + :param include_blocks: Return paragraph-level bounding boxes for all content blocks in the response + :param confidence_scores_granularity: Granularity for confidence scores: 'page' (aggregate only), 'word' (per-word scores), or 'block' (per-block scores). Defaults to None (no confidence scores) to keep response payload small. :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 @@ -202,7 +207,7 @@ async def process_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 60000 + timeout_ms = 300000 if server_url is not None: base_url = server_url @@ -226,6 +231,7 @@ async def process_async( table_format=table_format, extract_header=extract_header, extract_footer=extract_footer, + include_blocks=include_blocks, confidence_scores_granularity=confidence_scores_granularity, ) diff --git a/packages/azure/src/mistralai/azure/client/sdkconfiguration.py b/packages/azure/src/mistralai/azure/client/sdkconfiguration.py index 919225f9b..aa1ac7c62 100644 --- a/packages/azure/src/mistralai/azure/client/sdkconfiguration.py +++ b/packages/azure/src/mistralai/azure/client/sdkconfiguration.py @@ -15,10 +15,10 @@ from typing import Callable, Dict, Optional, Tuple, Union -SERVER_EU = "eu" -r"""EU Production server""" +SERVER_GLOBAL = "global" +r"""Global Production server""" SERVERS = { - SERVER_EU: "https://api.mistral.ai", + SERVER_GLOBAL: "https://api.mistral.ai", } """Contains the list of servers available to the SDK""" @@ -45,7 +45,7 @@ def get_server_details(self) -> Tuple[str, Dict[str, str]]: if self.server_url is not None and self.server_url: return remove_suffix(self.server_url, "/"), {} if not self.server: - self.server = SERVER_EU + self.server = SERVER_GLOBAL if self.server not in SERVERS: raise ValueError(f'Invalid server "{self.server}"') diff --git a/packages/azure/uv.lock b/packages/azure/uv.lock index 275596e65..c05e18f36 100644 --- a/packages/azure/uv.lock +++ b/packages/azure/uv.lock @@ -171,7 +171,7 @@ wheels = [ [[package]] name = "mistralai-azure" -version = "2.1.0" +version = "2.2.0" source = { editable = "." } dependencies = [ { name = "httpx2" }, diff --git a/packages/gcp/.speakeasy/gen.lock b/packages/gcp/.speakeasy/gen.lock index 69e030499..455e13ab4 100644 --- a/packages/gcp/.speakeasy/gen.lock +++ b/packages/gcp/.speakeasy/gen.lock @@ -1,20 +1,20 @@ lockVersion: 2.0.0 id: ec60f2d8-7869-45c1-918e-773d41a8cf74 management: - docChecksum: 77634408b308396940276ab2a5724949 + docChecksum: d19cafa6c35eb5358541febe0d4fabd1 docVersion: 1.0.0 speakeasyVersion: 1.796.4 generationVersion: 2.935.1 - releaseVersion: 2.1.0 - configChecksum: ef5b1a1ff7ea57863de114fbc5e9d0b6 + releaseVersion: 2.2.0 + configChecksum: c678419489f6e54f0b848d7fa17c2e97 repoURL: https://github.com/mistralai/client-python.git repoSubDirectory: packages/gcp installationURL: https://github.com/mistralai/client-python.git#subdirectory=packages/gcp published: true persistentEdits: - generation_id: 30572d02-d3c8-43c6-b747-7b835fb9ab63 - pristine_commit_hash: 3e52de68baf11facb9f1b1d0f7b41bce6b7f3a9a - pristine_tree_hash: 07ceab95a39cff98f3ebbc2cd20a4f66fe686a2f + generation_id: b29ae693-5cd9-4106-ac83-b0ffb28f6738 + pristine_commit_hash: c7e142219c3ffe8040037731dedc672e539f07f2 + pristine_tree_hash: 32e1657d7fce28e10d53238d6e0e659e57eb9192 features: python: additionalDependencies: 1.1.0 @@ -75,20 +75,20 @@ trackedFiles: pristine_git_object: 11ea5c6a700e7b92f5cbd29e88e41b834f8b8ef4 docs/models/builtinconnectors.md: id: 9d14e972f08a - last_write_checksum: sha1:83b573a69c86ab00e8660c7b6c02c14fdb8e1459 - pristine_git_object: ad9b9823d7e76bb827524701e9995a40dfa83147 + last_write_checksum: sha1:3017a390380e6441b22ca0b9e283e0de140a9ebf + pristine_git_object: c6b0c3bca4962a3137695e191747db7c49bbc3ce docs/models/chatcompletionchoice.md: id: 0d15c59ab501 - last_write_checksum: sha1:f3c9fa3cc092674a36bf28552b6900d62871b789 - pristine_git_object: 79d24a335c7ca1acb1469213d60ced2ec4987461 + last_write_checksum: sha1:ad872d121000209fca2c236dada4ff942c638bb4 + pristine_git_object: ad33d4d2fa90b8234671ed980aedf4848d6fea4f docs/models/chatcompletionchoicefinishreason.md: id: 225764da91d3 last_write_checksum: sha1:9a0715ecc16437ce4411743e852d8438a313cd41 pristine_git_object: 53290d8eab975e171c02064fc34097f598633e17 docs/models/chatcompletionrequest.md: id: adffe90369d0 - last_write_checksum: sha1:195c1c434fefe7a6d684622bdd55acc716bef7b5 - pristine_git_object: db61b5c0deafb18c5133e07b9ba69d2b1e8adfe1 + last_write_checksum: sha1:942c5a94a41ee6d545e7a2b124103d74e07871d7 + pristine_git_object: dcb209e4a4e877011fec1cb42fb4197faf8d0b80 docs/models/chatcompletionrequestmessage.md: id: 3f5e170d418c last_write_checksum: sha1:7921c5a508a9f88adc01caab34e26182b8035607 @@ -99,8 +99,8 @@ trackedFiles: pristine_git_object: 749296d420c0671d2a1d6d22483b51f577a86485 docs/models/chatcompletionrequesttool.md: id: 01554a1b158a - last_write_checksum: sha1:e7259e65ba3c614e5e70d0d55c88db03e90097d0 - pristine_git_object: 572d12ca006caead244387a5e91000ac33b0aa0e + last_write_checksum: sha1:d682d551e7a2398cfaf907335b9f084f20c1f2cb + pristine_git_object: 52d4935542f9adac9ba43e868a31f09b20226022 docs/models/chatcompletionrequesttoolchoice.md: id: b97041b2f15b last_write_checksum: sha1:7ad7eb133f70e07d0d6a9def36aadd08b35cf861 @@ -109,10 +109,22 @@ trackedFiles: id: 7c53b24681b9 last_write_checksum: sha1:a56581c0846638cfe6df26d3045fb4f874ccd931 pristine_git_object: a0465ffbfc5558628953e03fbc53b80bbdc8649b + docs/models/chatcompletionresponsechoicelogprobs.md: + id: dc3e83fa645a + last_write_checksum: sha1:a78d8b0881106c4c83f44ea854c65707ac10267d + pristine_git_object: 5059edbd28cfdd50b1bceffaa7de93fc61078c4f + docs/models/chatcompletionresponsetokenlogprobs.md: + id: df8c5d05277e + last_write_checksum: sha1:913b3c8e252ec3210c9acd3873ee386582b3731f + pristine_git_object: 4efd44dcafc6375c4d0d25c1c8462adfb3e41065 + docs/models/chatcompletionresponsetokenlogprobstopk.md: + id: 53553dd720d7 + last_write_checksum: sha1:e4e5a380aae119bb40203369371873caa3ab42b3 + pristine_git_object: 7c7b26cd6c469a82bc16aa4b7a794cf3e506efc7 docs/models/chatcompletionstreamrequest.md: id: cf8f29558a68 - last_write_checksum: sha1:3901c8c3e8b2cba3d2510f61e18f47edfda86f7e - pristine_git_object: bd19d37b64d30b110596e438c425c36372faf6e9 + last_write_checksum: sha1:670e13ce4328a82aebfb61cc946b9274e600fa07 + pristine_git_object: c7b78652947a05b395a6686ac8188e5f1ad63514 docs/models/chatcompletionstreamrequestmessage.md: id: 053a98476cd2 last_write_checksum: sha1:8270692463fab1243d9de4bbef7162daa64e52c5 @@ -123,16 +135,12 @@ trackedFiles: pristine_git_object: a48460a92ac47fec1de2188ba46b238229736d32 docs/models/chatcompletionstreamrequesttool.md: id: cbfb16fb3b03 - last_write_checksum: sha1:163ad1e31d7ba4eaef7797b399d1323465e97110 - pristine_git_object: 48998fcbb16a8ce5f5a4fd8b2794125d97e935ac + last_write_checksum: sha1:dc03dcf2779444a15d820fe73b06e2c3df025a91 + pristine_git_object: 446b7712a2ae9deb8a628206a126064e7aba646e docs/models/chatcompletionstreamrequesttoolchoice.md: id: 210d5e5b1413 last_write_checksum: sha1:0543164caf3f4fb2bef3061dbd1a5e6b34b17ae9 pristine_git_object: 43f3ca3809bf1a2a040e2ad7c19a2b22db0b73f8 - docs/models/codeinterpretertool.md: - id: f009740c6e54 - last_write_checksum: sha1:a2114d61a98a48b4365a77c0c75c06ca834367ad - pristine_git_object: 6302fc627d7c49442b6c9aec19c70fdceaf7c519 docs/models/completionchunk.md: id: 60cb30423c60 last_write_checksum: sha1:61b976fe2e71236cf7941ee1635decc31bd304b2 @@ -143,8 +151,8 @@ trackedFiles: pristine_git_object: 7a66e8fee2bb0f1c58166177653893bb05b98f1d docs/models/completionresponsestreamchoice.md: id: d56824d615a6 - last_write_checksum: sha1:0296a490df009dbfd04893fdebcc88dd6102a872 - pristine_git_object: 1532c25b8fc065d486f52d4610a7f757e5340875 + last_write_checksum: sha1:c4c83ae4fdec894a744f55ec080b27552f2e815b + pristine_git_object: a7f65dd9648512ed69c55fbc9bc80948d9e67121 docs/models/completionresponsestreamchoicefinishreason.md: id: 5f1fbfc90b8e last_write_checksum: sha1:0d6278fdfec974d1e8782c5bfca0fad5300a2125 @@ -271,8 +279,8 @@ trackedFiles: pristine_git_object: fae3c1ca4ba2c2ddb3b7de401ecdc8d56dcc7740 docs/models/reasoningeffort.md: id: c8fd630d3f07 - last_write_checksum: sha1:b0933ea955ebeacb7fcbdf59be935216d2ab999b - pristine_git_object: 87e0ae7696172b508326028224b10de557057ad7 + last_write_checksum: sha1:dbf7a2c150958348eb3a2227f5ee3475731cb4e8 + pristine_git_object: 029002d1975e5b185b066efc3570d1b3a1734697 docs/models/referencechunk.md: id: 07895f9debfd last_write_checksum: sha1:3d35227a4f7612301fd5f17a445c4c2b712f0bf1 @@ -373,14 +381,6 @@ trackedFiles: id: 304bdf06ef8b last_write_checksum: sha1:1f297f34069668f6107f2c0389606efe413ff5a8 pristine_git_object: 5bcea5b5d12e72222720af2c014d64ec4bdfee4a - docs/models/websearchpremiumtool.md: - id: 267988aa8c3f - last_write_checksum: sha1:38f80a43f73a13ddedc7730f853c092a48b665f9 - pristine_git_object: 78b736cd314617caa0d77f3c42015212e37ab539 - docs/models/websearchtool.md: - id: fc4df52fb9b5 - last_write_checksum: sha1:72636dc7ae74264bb5158d284ef6f83da5290b27 - pristine_git_object: 4ca7333c412ad819e3e02c61debe402e3f9b0af9 py.typed: id: 258c3ed47ae4 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 @@ -411,16 +411,16 @@ trackedFiles: pristine_git_object: c4f38b3e36690a5a60bbc84619eddd9ebd538501 src/mistralai/gcp/client/_version.py: id: f87319e32c7b - last_write_checksum: sha1:d40d0ff80c55c64a102ba58e1bd6d16042cdd85c - pristine_git_object: f0b3670264f4a4b7e82179b4e8f8e2b28213772d + last_write_checksum: sha1:d106b679edeb8620492356d372de271758dfdc14 + pristine_git_object: 21f1e68eb168e2798d54bc5a8b3e0ed5bfc55081 src/mistralai/gcp/client/basesdk.py: id: 4d594572857b last_write_checksum: sha1:8e86c827a9487ffc7d57578d29e2ffa0db57dc4c pristine_git_object: ad8d4d52ec326df5455e7df6da72bd46c6eb10db src/mistralai/gcp/client/chat.py: id: 4c41f05f786e - last_write_checksum: sha1:19781b4f108cdc0b76a1d599f9a91c2705e056b2 - pristine_git_object: e306c5a12125a2e4a20988a46cd4f8a980d0b60e + last_write_checksum: sha1:2e97926770dd61ea2a302daa68c42a4ba8d0006b + pristine_git_object: fdcd73eee18323f74bb21470df7abd50cb51df73 src/mistralai/gcp/client/errors/__init__.py: id: c51c8ed21629 last_write_checksum: sha1:29f08ad600a712ff572843a250839ef92efac19b @@ -447,16 +447,16 @@ trackedFiles: pristine_git_object: b850a68339957bef9f3ecd3233de062be67d79fa src/mistralai/gcp/client/fim.py: id: 13d2d208e0ef - last_write_checksum: sha1:6024ebfc34002bf6d6922834fb238bb1f451fc6d - pristine_git_object: 8f4c537b9e9f4673bcf33cd57c95c2ff8b259855 + last_write_checksum: sha1:d12b32e42f75e5e3c56833ebe7f65ab467a995c4 + pristine_git_object: 74277c331df850401d1cf40732d0566536c99d2c src/mistralai/gcp/client/httpclient.py: id: a53dd7be6a4c last_write_checksum: sha1:82dd0803e52747313b216da8900313279ecde8b0 pristine_git_object: 2b2e342b3ec61d354edd6e48b45c02da132b30b1 src/mistralai/gcp/client/models/__init__.py: id: d9e976d01972 - last_write_checksum: sha1:f4b9b23318c8e44f32d4becc4ad1afd0faee3715 - pristine_git_object: f7a311a2f7cd41b491e0b5cd4203c711b31873f6 + last_write_checksum: sha1:26c12127056b46de46eff762a86cce658aa0843f + pristine_git_object: 96f598e0874164b64b2e19d9acf2ca87a07ab978 src/mistralai/gcp/client/models/apikeyauth.py: id: 6b9f6832e632 last_write_checksum: sha1:6ec18425d5aa90f6c131763d39a8bf4d74944b7d @@ -467,28 +467,36 @@ trackedFiles: pristine_git_object: 63f3b0dd9b7348e06c63d8ac2bdcc2d7faa59853 src/mistralai/gcp/client/models/builtinconnectors.py: id: 7bbec8f3c9c7 - last_write_checksum: sha1:4e94744e3854d4cdc9d1272e4f1d9371f9829a5f - pristine_git_object: 6a3b2476d54096722eb3e7a271629d108028bd35 + last_write_checksum: sha1:ec06c6f641c60aafd20022dde8d6788cec14b170 + pristine_git_object: 4907807f730fb93a2777e848023d17b9c248386b src/mistralai/gcp/client/models/chatcompletionchoice.py: id: 8e65b56f3e6d - last_write_checksum: sha1:022f638fc4c28e3983c804e4b24b7f7a9f6542ea - pristine_git_object: 89f4868b1262e1aac6d0898409b5d2e27ffc209a + last_write_checksum: sha1:6e9c525ccb79078975f0527890f1f56958efee76 + pristine_git_object: 2cb2451599ae12acaf02f50f44d69195952106d1 src/mistralai/gcp/client/models/chatcompletionrequest.py: id: 4694a31c0003 - last_write_checksum: sha1:298b0d06dec99a85d086b19314c3361622451bd0 - pristine_git_object: 0e3de41307489a6ee395c535ebbd42303c971c63 + last_write_checksum: sha1:286edbc4d0e9a2bd1870b0086e7a319dfc40dfaf + pristine_git_object: 5f96425786a47b8b0782f32cb46dae6adafb5e0e src/mistralai/gcp/client/models/chatcompletionresponse.py: id: dd9e4796fca9 last_write_checksum: sha1:76d7257583389ff5021e320a8f9a45a6deb07c7c pristine_git_object: 317c4d84e378c14294d58c5aefd8c55ffe28754a + src/mistralai/gcp/client/models/chatcompletionresponsechoicelogprobs.py: + id: 8463ab001e30 + last_write_checksum: sha1:2f7f0500e4fdd5f6465a5a358a5a9726a3f71091 + pristine_git_object: f4902c4840e57b9bd6d281126e7d923b0ed2819d + src/mistralai/gcp/client/models/chatcompletionresponsetokenlogprobs.py: + id: 8e6aefe228bd + last_write_checksum: sha1:5bb9c1091ce02a2fde40491cc70923ac3649fa39 + pristine_git_object: f0d6d18561726a1ccf1fac10475fae866141acba + src/mistralai/gcp/client/models/chatcompletionresponsetokenlogprobstopk.py: + id: 7c5dd05e379f + last_write_checksum: sha1:811d4b87db9a2b09c26370d0cb4f2b1c8e38ee45 + pristine_git_object: 9f0b417cc0b3ffc9884afa996299e7004a8d61c6 src/mistralai/gcp/client/models/chatcompletionstreamrequest.py: id: 7294862af8ea - last_write_checksum: sha1:6dbe04dd7c8b3f509e0ada777aac7e77c1ad4cb8 - pristine_git_object: 2adc781281387122f81527547624ac6a68a08787 - src/mistralai/gcp/client/models/codeinterpretertool.py: - id: dae8864ee549 - last_write_checksum: sha1:25508d287514c3b28f5902a84e09461e8eef595f - pristine_git_object: 9fdedce7f27cfe6fc8981cdb9fb6df8235c6da9c + last_write_checksum: sha1:e2f3980b8f9d42903535540caa1360693033b37a + pristine_git_object: 28b6f0c6ca2682d73cae5d7f182286613f529ffb src/mistralai/gcp/client/models/completionchunk.py: id: 6b9ed8c30877 last_write_checksum: sha1:c19d80a18060082a73b7e7fcc6af6fccac0cf5d6 @@ -499,8 +507,8 @@ trackedFiles: pristine_git_object: bb1550093ce9adcb9bcd0548b69796e82f4f260b src/mistralai/gcp/client/models/completionresponsestreamchoice.py: id: ad9b98ca7e1c - last_write_checksum: sha1:03cf7a80e925662eff06a16e55206f0f1f9f09dd - pristine_git_object: 0f189b553a81308dca9e4a96831bbd4a8910962e + last_write_checksum: sha1:1d4284414d5c1bb12d15fbea9000c60ee5e1f41a + pristine_git_object: 4a0fbdca4146a184dd39a6982928a0399ae9814c src/mistralai/gcp/client/models/contentchunk.py: id: 8714d3bf2698 last_write_checksum: sha1:acab1b53b1d324544c6aa6c4126a3fb5265278d2 @@ -599,8 +607,8 @@ trackedFiles: pristine_git_object: 1e290f334a502cc643e33f53d30695b75c93c2ec src/mistralai/gcp/client/models/reasoningeffort.py: id: 9e62d78449a6 - last_write_checksum: sha1:703d87ae8c89b9fa9284833c45daa77752c3a8e8 - pristine_git_object: 43ffa02b8407ab64d41f23c3a56c02fe275e38de + last_write_checksum: sha1:0a3e500595d5f3c4d35e93523fbd89ef4d6fcafa + pristine_git_object: f0dbb8722fa6b914bc77f059582a5e4ef5a836d2 src/mistralai/gcp/client/models/referencechunk.py: id: 523e477f8725 last_write_checksum: sha1:5da5e54980082fec24a7f0700d7f4fa32793d342 @@ -639,12 +647,12 @@ trackedFiles: pristine_git_object: e95b303696e3881c58a9df16e059d22ba2e2b11b src/mistralai/gcp/client/models/toolcall.py: id: e6c25869a579 - last_write_checksum: sha1:49733947b95332a77156893623bb58845518cdb8 - pristine_git_object: 4e4c2581af45686e0e4fe3c5cce9670f7f07d0c5 + last_write_checksum: sha1:efff9447ab1398293e9c4bc246c2cd0f0f37864d + pristine_git_object: f6b09244e320877f51a46ffd64db20d7da489a96 src/mistralai/gcp/client/models/toolchoice.py: id: cb13a9f64c92 - last_write_checksum: sha1:613b18868534759b45e26e00e5a83c8f8b14b006 - pristine_git_object: 528cc801e876cd978be94027f36b83449136800b + last_write_checksum: sha1:50074d0a34d8d38ffac25638292a3b2f9c88ddad + pristine_git_object: 08467568fd48869204362085f55f1dfec3f6d798 src/mistralai/gcp/client/models/toolchoiceenum.py: id: d62e9c92d93c last_write_checksum: sha1:3dbba9a58c5569aafe115f3f7713a52b01ad8620 @@ -673,22 +681,14 @@ trackedFiles: id: 6b4f4910ea9c last_write_checksum: sha1:e595fb93b91fd9d1d1b48cb551c277be9c0a9dbd pristine_git_object: 653b63e906c0a341e4fef6e7d7a253314e545f8c - src/mistralai/gcp/client/models/websearchpremiumtool.py: - id: 0f6734458e65 - last_write_checksum: sha1:64842c599d3ff0161c4b9fbca2dde21b75ab1ac2 - pristine_git_object: e416f96472bc8956d5ff44c061f725e10fa0a317 - src/mistralai/gcp/client/models/websearchtool.py: - id: 40ee5a5ac881 - last_write_checksum: sha1:36287a70e58b48968effec4feb9bc9dbfbb9cd94 - pristine_git_object: 69d6e04373c665012103489006f4e39bd85cd565 src/mistralai/gcp/client/py.typed: id: 98b8ab80ab0d last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 src/mistralai/gcp/client/sdkconfiguration.py: id: 57be0f79ea1e - last_write_checksum: sha1:0c5905e7c6092f57c15ee4318a85c0985bcc1ccf - pristine_git_object: d56a634f688f6697ba84962381084dc2d0836ac9 + last_write_checksum: sha1:40704b4bb653eea8ea547032137ec0a1c058d2eb + pristine_git_object: 2e0d80464b38df4b1ecb9b919dc69660e5b6c519 src/mistralai/gcp/client/types/__init__.py: id: f7ef15ac2ba1 last_write_checksum: sha1:f9ad14217f832e74f594285960125add50324be9 diff --git a/packages/gcp/.speakeasy/gen.yaml b/packages/gcp/.speakeasy/gen.yaml index 6bf37486c..12856d63d 100644 --- a/packages/gcp/.speakeasy/gen.yaml +++ b/packages/gcp/.speakeasy/gen.yaml @@ -30,7 +30,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.1.0 + version: 2.2.0 additionalDependencies: dev: pytest: ^8.2.2 @@ -45,12 +45,18 @@ python: authors: - Mistral baseErrorName: MistralGCPError + bodyVariantOverloads: false clientServerStatusCodesAsErrors: true constFieldCasing: normal defaultErrorName: SDKError description: Python Client SDK for the Mistral AI API in GCP. + durationFormat: false enableCustomCodeRegions: false enumFormat: union + errorSchemaValidation: true + eventStreamClassNames: + async: EventStreamAsync + sync: EventStream fixFlags: asyncPaginationSep2025: true conflictResistantModelImportsFeb2026: true @@ -72,18 +78,25 @@ python: webhooks: "" inferUnionDiscriminators: true inputModelSuffix: input + inputTypedDictSuffix: TypedDict license: "" maxMethodParams: 999 methodArguments: infer-optional-args + methodTimeoutArgument: timeout-ms + methodTimeoutUnits: milliseconds moduleName: mistralai.gcp.client multipartArrayFormat: standard + optionalDependencies: {} outputModelSuffix: output packageManager: uv packageName: mistralai-gcp preApplyUnionDiscriminators: true pytestFilterWarnings: [] pytestTimeout: 0 + rawResponseHelpers: false responseFormat: flat + responseSchemaValidation: true sseFlatResponse: false templateVersion: v2 useAsyncHooks: false + uuidFormat: false diff --git a/packages/gcp/docs/models/builtinconnectors.md b/packages/gcp/docs/models/builtinconnectors.md index ad9b9823d..c6b0c3bca 100644 --- a/packages/gcp/docs/models/builtinconnectors.md +++ b/packages/gcp/docs/models/builtinconnectors.md @@ -15,3 +15,4 @@ value: BuiltInConnectors = "web_search" - `"code_interpreter"` - `"image_generation"` - `"document_library"` +- `"mistral_mcp"` diff --git a/packages/gcp/docs/models/chatcompletionchoice.md b/packages/gcp/docs/models/chatcompletionchoice.md index 79d24a335..ad33d4d2f 100644 --- a/packages/gcp/docs/models/chatcompletionchoice.md +++ b/packages/gcp/docs/models/chatcompletionchoice.md @@ -3,9 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `index` | *int* | :heavy_check_mark: | N/A | 0 | -| `message` | [Optional[models.AssistantMessage]](../models/assistantmessage.md) | :heavy_minus_sign: | N/A | | -| `messages` | List[[models.DeltaMessage](../models/deltamessage.md)] | :heavy_minus_sign: | N/A | | -| `finish_reason` | [models.ChatCompletionChoiceFinishReason](../models/chatcompletionchoicefinishreason.md) | :heavy_check_mark: | N/A | stop | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `index` | *int* | :heavy_check_mark: | N/A | 0 | +| `message` | [Optional[models.AssistantMessage]](../models/assistantmessage.md) | :heavy_minus_sign: | N/A | | +| `messages` | List[[models.DeltaMessage](../models/deltamessage.md)] | :heavy_minus_sign: | N/A | | +| `finish_reason` | [models.ChatCompletionChoiceFinishReason](../models/chatcompletionchoicefinishreason.md) | :heavy_check_mark: | N/A | stop | +| `logprobs` | [OptionalNullable[models.ChatCompletionResponseChoiceLogprobs]](../models/chatcompletionresponsechoicelogprobs.md) | :heavy_minus_sign: | N/A | | +| `prompt_logprobs` | [OptionalNullable[models.ChatCompletionResponseChoiceLogprobs]](../models/chatcompletionresponsechoicelogprobs.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/packages/gcp/docs/models/chatcompletionrequest.md b/packages/gcp/docs/models/chatcompletionrequest.md index db61b5c0d..dcb209e4a 100644 --- a/packages/gcp/docs/models/chatcompletionrequest.md +++ b/packages/gcp/docs/models/chatcompletionrequest.md @@ -19,6 +19,13 @@ | `tool_choice` | [Optional[models.ChatCompletionRequestToolChoice]](../models/chatcompletionrequesttoolchoice.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. | | | `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | +| `min_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `repetition_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | +| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | +| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `prompt_logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | +| `top_prompt_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | | `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | | `prediction` | [Optional[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | | diff --git a/packages/gcp/docs/models/chatcompletionrequesttool.md b/packages/gcp/docs/models/chatcompletionrequesttool.md index 572d12ca0..52d493554 100644 --- a/packages/gcp/docs/models/chatcompletionrequesttool.md +++ b/packages/gcp/docs/models/chatcompletionrequesttool.md @@ -9,24 +9,6 @@ value: models.Tool = /* values here */ ``` -### `models.WebSearchTool` - -```python -value: models.WebSearchTool = /* values here */ -``` - -### `models.WebSearchPremiumTool` - -```python -value: models.WebSearchPremiumTool = /* values here */ -``` - -### `models.CodeInterpreterTool` - -```python -value: models.CodeInterpreterTool = /* values here */ -``` - ### `models.ImageGenerationTool` ```python diff --git a/packages/gcp/docs/models/chatcompletionresponsechoicelogprobs.md b/packages/gcp/docs/models/chatcompletionresponsechoicelogprobs.md new file mode 100644 index 000000000..5059edbd2 --- /dev/null +++ b/packages/gcp/docs/models/chatcompletionresponsechoicelogprobs.md @@ -0,0 +1,8 @@ +# ChatCompletionResponseChoiceLogprobs + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `content` | List[[models.ChatCompletionResponseTokenLogprobsTopK](../models/chatcompletionresponsetokenlogprobstopk.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/gcp/docs/models/chatcompletionresponsetokenlogprobs.md b/packages/gcp/docs/models/chatcompletionresponsetokenlogprobs.md new file mode 100644 index 000000000..4efd44dca --- /dev/null +++ b/packages/gcp/docs/models/chatcompletionresponsetokenlogprobs.md @@ -0,0 +1,11 @@ +# ChatCompletionResponseTokenLogprobs + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `token` | *str* | :heavy_check_mark: | N/A | +| `logprob` | *float* | :heavy_check_mark: | N/A | +| `bytes_` | List[*int*] | :heavy_check_mark: | N/A | +| `token_id` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/gcp/docs/models/chatcompletionresponsetokenlogprobstopk.md b/packages/gcp/docs/models/chatcompletionresponsetokenlogprobstopk.md new file mode 100644 index 000000000..7c7b26cd6 --- /dev/null +++ b/packages/gcp/docs/models/chatcompletionresponsetokenlogprobstopk.md @@ -0,0 +1,12 @@ +# ChatCompletionResponseTokenLogprobsTopK + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `token` | *str* | :heavy_check_mark: | N/A | +| `logprob` | *float* | :heavy_check_mark: | N/A | +| `bytes_` | List[*int*] | :heavy_check_mark: | N/A | +| `token_id` | *int* | :heavy_check_mark: | N/A | +| `top_logprobs` | List[[models.ChatCompletionResponseTokenLogprobs](../models/chatcompletionresponsetokenlogprobs.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/gcp/docs/models/chatcompletionstreamrequest.md b/packages/gcp/docs/models/chatcompletionstreamrequest.md index bd19d37b6..c7b786529 100644 --- a/packages/gcp/docs/models/chatcompletionstreamrequest.md +++ b/packages/gcp/docs/models/chatcompletionstreamrequest.md @@ -19,6 +19,13 @@ | `tool_choice` | [Optional[models.ChatCompletionStreamRequestToolChoice]](../models/chatcompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. | | | `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | +| `min_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `repetition_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | +| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | +| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `prompt_logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | +| `top_prompt_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | | `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | | `prediction` | [Optional[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | | diff --git a/packages/gcp/docs/models/chatcompletionstreamrequesttool.md b/packages/gcp/docs/models/chatcompletionstreamrequesttool.md index 48998fcbb..446b7712a 100644 --- a/packages/gcp/docs/models/chatcompletionstreamrequesttool.md +++ b/packages/gcp/docs/models/chatcompletionstreamrequesttool.md @@ -9,24 +9,6 @@ value: models.Tool = /* values here */ ``` -### `models.WebSearchTool` - -```python -value: models.WebSearchTool = /* values here */ -``` - -### `models.WebSearchPremiumTool` - -```python -value: models.WebSearchPremiumTool = /* values here */ -``` - -### `models.CodeInterpreterTool` - -```python -value: models.CodeInterpreterTool = /* values here */ -``` - ### `models.ImageGenerationTool` ```python diff --git a/packages/gcp/docs/models/codeinterpretertool.md b/packages/gcp/docs/models/codeinterpretertool.md deleted file mode 100644 index 6302fc627..000000000 --- a/packages/gcp/docs/models/codeinterpretertool.md +++ /dev/null @@ -1,9 +0,0 @@ -# CodeInterpreterTool - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | -| `type` | *Literal["code_interpreter"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/gcp/docs/models/completionresponsestreamchoice.md b/packages/gcp/docs/models/completionresponsestreamchoice.md index 1532c25b8..a7f65dd96 100644 --- a/packages/gcp/docs/models/completionresponsestreamchoice.md +++ b/packages/gcp/docs/models/completionresponsestreamchoice.md @@ -7,4 +7,6 @@ | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | | `index` | *int* | :heavy_check_mark: | N/A | | `delta` | [models.DeltaMessage](../models/deltamessage.md) | :heavy_check_mark: | N/A | -| `finish_reason` | [Nullable[models.CompletionResponseStreamChoiceFinishReason]](../models/completionresponsestreamchoicefinishreason.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `finish_reason` | [Nullable[models.CompletionResponseStreamChoiceFinishReason]](../models/completionresponsestreamchoicefinishreason.md) | :heavy_check_mark: | N/A | +| `logprobs` | [OptionalNullable[models.ChatCompletionResponseChoiceLogprobs]](../models/chatcompletionresponsechoicelogprobs.md) | :heavy_minus_sign: | N/A | +| `prompt_logprobs` | [OptionalNullable[models.ChatCompletionResponseChoiceLogprobs]](../models/chatcompletionresponsechoicelogprobs.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/gcp/docs/models/reasoningeffort.md b/packages/gcp/docs/models/reasoningeffort.md index 87e0ae769..029002d19 100644 --- a/packages/gcp/docs/models/reasoningeffort.md +++ b/packages/gcp/docs/models/reasoningeffort.md @@ -11,4 +11,9 @@ value: ReasoningEffort = "none" ## Values - `"none"` +- `"minimal"` +- `"low"` +- `"medium"` - `"high"` +- `"xhigh"` +- `"max"` diff --git a/packages/gcp/docs/models/websearchpremiumtool.md b/packages/gcp/docs/models/websearchpremiumtool.md deleted file mode 100644 index 78b736cd3..000000000 --- a/packages/gcp/docs/models/websearchpremiumtool.md +++ /dev/null @@ -1,9 +0,0 @@ -# WebSearchPremiumTool - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | -| `type` | *Literal["web_search_premium"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/gcp/docs/models/websearchtool.md b/packages/gcp/docs/models/websearchtool.md deleted file mode 100644 index 4ca7333c4..000000000 --- a/packages/gcp/docs/models/websearchtool.md +++ /dev/null @@ -1,9 +0,0 @@ -# WebSearchTool - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | -| `type` | *Literal["web_search"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/gcp/pyproject.toml b/packages/gcp/pyproject.toml index ca737383d..1800537ee 100644 --- a/packages/gcp/pyproject.toml +++ b/packages/gcp/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai-gcp" -version = "2.1.0" +version = "2.2.0" description = "Python Client SDK for the Mistral AI API in GCP." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/packages/gcp/src/mistralai/gcp/client/_version.py b/packages/gcp/src/mistralai/gcp/client/_version.py index f0b367026..21f1e68eb 100644 --- a/packages/gcp/src/mistralai/gcp/client/_version.py +++ b/packages/gcp/src/mistralai/gcp/client/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "mistralai-gcp" -__version__: str = "2.1.0" +__version__: str = "2.2.0" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.935.1" -__user_agent__: str = "speakeasy-sdk/python 2.1.0 2.935.1 1.0.0 mistralai-gcp" +__user_agent__: str = "speakeasy-sdk/python 2.2.0 2.935.1 1.0.0 mistralai-gcp" try: if __package__ is not None: diff --git a/packages/gcp/src/mistralai/gcp/client/chat.py b/packages/gcp/src/mistralai/gcp/client/chat.py index e306c5a12..fdcd73eee 100644 --- a/packages/gcp/src/mistralai/gcp/client/chat.py +++ b/packages/gcp/src/mistralai/gcp/client/chat.py @@ -49,6 +49,13 @@ def stream( ] = None, presence_penalty: OptionalNullable[float] = UNSET, frequency_penalty: OptionalNullable[float] = UNSET, + min_tokens: OptionalNullable[int] = UNSET, + repetition_penalty: OptionalNullable[float] = UNSET, + top_k: OptionalNullable[int] = UNSET, + logprobs: OptionalNullable[bool] = UNSET, + top_logprobs: OptionalNullable[int] = UNSET, + prompt_logprobs: OptionalNullable[bool] = UNSET, + top_prompt_logprobs: OptionalNullable[int] = UNSET, n: OptionalNullable[int] = UNSET, prediction: Optional[ Union[models.Prediction, models.PredictionTypedDict] @@ -85,6 +92,13 @@ def stream( :param tool_choice: Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool. :param presence_penalty: The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. :param frequency_penalty: The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. + :param min_tokens: + :param repetition_penalty: + :param top_k: + :param logprobs: + :param top_logprobs: + :param prompt_logprobs: + :param top_prompt_logprobs: :param n: Number of completions to return for each request, input tokens are only billed once. :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. @@ -102,7 +116,7 @@ def stream( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 60000 + timeout_ms = 300000 if server_url is not None: base_url = server_url @@ -134,6 +148,13 @@ def stream( ), presence_penalty=presence_penalty, frequency_penalty=frequency_penalty, + min_tokens=min_tokens, + repetition_penalty=repetition_penalty, + top_k=top_k, + logprobs=logprobs, + top_logprobs=top_logprobs, + prompt_logprobs=prompt_logprobs, + top_prompt_logprobs=top_prompt_logprobs, n=n, prediction=utils.get_pydantic_model( prediction, Optional[models.Prediction] @@ -253,6 +274,13 @@ async def stream_async( ] = None, presence_penalty: OptionalNullable[float] = UNSET, frequency_penalty: OptionalNullable[float] = UNSET, + min_tokens: OptionalNullable[int] = UNSET, + repetition_penalty: OptionalNullable[float] = UNSET, + top_k: OptionalNullable[int] = UNSET, + logprobs: OptionalNullable[bool] = UNSET, + top_logprobs: OptionalNullable[int] = UNSET, + prompt_logprobs: OptionalNullable[bool] = UNSET, + top_prompt_logprobs: OptionalNullable[int] = UNSET, n: OptionalNullable[int] = UNSET, prediction: Optional[ Union[models.Prediction, models.PredictionTypedDict] @@ -289,6 +317,13 @@ async def stream_async( :param tool_choice: Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool. :param presence_penalty: The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. :param frequency_penalty: The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. + :param min_tokens: + :param repetition_penalty: + :param top_k: + :param logprobs: + :param top_logprobs: + :param prompt_logprobs: + :param top_prompt_logprobs: :param n: Number of completions to return for each request, input tokens are only billed once. :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. @@ -306,7 +341,7 @@ async def stream_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 60000 + timeout_ms = 300000 if server_url is not None: base_url = server_url @@ -338,6 +373,13 @@ async def stream_async( ), presence_penalty=presence_penalty, frequency_penalty=frequency_penalty, + min_tokens=min_tokens, + repetition_penalty=repetition_penalty, + top_k=top_k, + logprobs=logprobs, + top_logprobs=top_logprobs, + prompt_logprobs=prompt_logprobs, + top_prompt_logprobs=top_prompt_logprobs, n=n, prediction=utils.get_pydantic_model( prediction, Optional[models.Prediction] @@ -457,6 +499,13 @@ def complete( ] = None, presence_penalty: OptionalNullable[float] = UNSET, frequency_penalty: OptionalNullable[float] = UNSET, + min_tokens: OptionalNullable[int] = UNSET, + repetition_penalty: OptionalNullable[float] = UNSET, + top_k: OptionalNullable[int] = UNSET, + logprobs: OptionalNullable[bool] = UNSET, + top_logprobs: OptionalNullable[int] = UNSET, + prompt_logprobs: OptionalNullable[bool] = UNSET, + top_prompt_logprobs: OptionalNullable[int] = UNSET, n: OptionalNullable[int] = UNSET, prediction: Optional[ Union[models.Prediction, models.PredictionTypedDict] @@ -491,6 +540,13 @@ def complete( :param tool_choice: Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool. :param presence_penalty: The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. :param frequency_penalty: The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. + :param min_tokens: + :param repetition_penalty: + :param top_k: + :param logprobs: + :param top_logprobs: + :param prompt_logprobs: + :param top_prompt_logprobs: :param n: Number of completions to return for each request, input tokens are only billed once. :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. @@ -508,7 +564,7 @@ def complete( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 60000 + timeout_ms = 300000 if server_url is not None: base_url = server_url @@ -540,6 +596,13 @@ def complete( ), presence_penalty=presence_penalty, frequency_penalty=frequency_penalty, + min_tokens=min_tokens, + repetition_penalty=repetition_penalty, + top_k=top_k, + logprobs=logprobs, + top_logprobs=top_logprobs, + prompt_logprobs=prompt_logprobs, + top_prompt_logprobs=top_prompt_logprobs, n=n, prediction=utils.get_pydantic_model( prediction, Optional[models.Prediction] @@ -649,6 +712,13 @@ async def complete_async( ] = None, presence_penalty: OptionalNullable[float] = UNSET, frequency_penalty: OptionalNullable[float] = UNSET, + min_tokens: OptionalNullable[int] = UNSET, + repetition_penalty: OptionalNullable[float] = UNSET, + top_k: OptionalNullable[int] = UNSET, + logprobs: OptionalNullable[bool] = UNSET, + top_logprobs: OptionalNullable[int] = UNSET, + prompt_logprobs: OptionalNullable[bool] = UNSET, + top_prompt_logprobs: OptionalNullable[int] = UNSET, n: OptionalNullable[int] = UNSET, prediction: Optional[ Union[models.Prediction, models.PredictionTypedDict] @@ -683,6 +753,13 @@ async def complete_async( :param tool_choice: Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool. :param presence_penalty: The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. :param frequency_penalty: The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. + :param min_tokens: + :param repetition_penalty: + :param top_k: + :param logprobs: + :param top_logprobs: + :param prompt_logprobs: + :param top_prompt_logprobs: :param n: Number of completions to return for each request, input tokens are only billed once. :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. @@ -700,7 +777,7 @@ async def complete_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 60000 + timeout_ms = 300000 if server_url is not None: base_url = server_url @@ -732,6 +809,13 @@ async def complete_async( ), presence_penalty=presence_penalty, frequency_penalty=frequency_penalty, + min_tokens=min_tokens, + repetition_penalty=repetition_penalty, + top_k=top_k, + logprobs=logprobs, + top_logprobs=top_logprobs, + prompt_logprobs=prompt_logprobs, + top_prompt_logprobs=top_prompt_logprobs, n=n, prediction=utils.get_pydantic_model( prediction, Optional[models.Prediction] diff --git a/packages/gcp/src/mistralai/gcp/client/fim.py b/packages/gcp/src/mistralai/gcp/client/fim.py index 8f4c537b9..74277c331 100644 --- a/packages/gcp/src/mistralai/gcp/client/fim.py +++ b/packages/gcp/src/mistralai/gcp/client/fim.py @@ -62,7 +62,7 @@ def stream( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 60000 + timeout_ms = 300000 if server_url is not None: base_url = server_url @@ -205,7 +205,7 @@ async def stream_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 60000 + timeout_ms = 300000 if server_url is not None: base_url = server_url @@ -348,7 +348,7 @@ def complete( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 60000 + timeout_ms = 300000 if server_url is not None: base_url = server_url @@ -481,7 +481,7 @@ async def complete_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 60000 + timeout_ms = 300000 if server_url is not None: base_url = server_url diff --git a/packages/gcp/src/mistralai/gcp/client/models/__init__.py b/packages/gcp/src/mistralai/gcp/client/models/__init__.py index f7a311a2f..96f598e08 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/__init__.py +++ b/packages/gcp/src/mistralai/gcp/client/models/__init__.py @@ -34,6 +34,18 @@ ChatCompletionResponse, ChatCompletionResponseTypedDict, ) + from .chatcompletionresponsechoicelogprobs import ( + ChatCompletionResponseChoiceLogprobs, + ChatCompletionResponseChoiceLogprobsTypedDict, + ) + from .chatcompletionresponsetokenlogprobs import ( + ChatCompletionResponseTokenLogprobs, + ChatCompletionResponseTokenLogprobsTypedDict, + ) + from .chatcompletionresponsetokenlogprobstopk import ( + ChatCompletionResponseTokenLogprobsTopK, + ChatCompletionResponseTokenLogprobsTopKTypedDict, + ) from .chatcompletionstreamrequest import ( ChatCompletionStreamRequest, ChatCompletionStreamRequestMessage, @@ -46,7 +58,6 @@ ChatCompletionStreamRequestToolTypedDict, ChatCompletionStreamRequestTypedDict, ) - from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict from .completionchunk import CompletionChunk, CompletionChunkTypedDict from .completionevent import CompletionEvent, CompletionEventTypedDict from .completionresponsestreamchoice import ( @@ -177,11 +188,6 @@ ValidationError, ValidationErrorTypedDict, ) - from .websearchpremiumtool import ( - WebSearchPremiumTool, - WebSearchPremiumToolTypedDict, - ) - from .websearchtool import WebSearchTool, WebSearchToolTypedDict __all__ = [ "APIKeyAuth", @@ -209,6 +215,12 @@ "ChatCompletionRequestToolTypedDict", "ChatCompletionRequestTypedDict", "ChatCompletionResponse", + "ChatCompletionResponseChoiceLogprobs", + "ChatCompletionResponseChoiceLogprobsTypedDict", + "ChatCompletionResponseTokenLogprobs", + "ChatCompletionResponseTokenLogprobsTopK", + "ChatCompletionResponseTokenLogprobsTopKTypedDict", + "ChatCompletionResponseTokenLogprobsTypedDict", "ChatCompletionResponseTypedDict", "ChatCompletionStreamRequest", "ChatCompletionStreamRequestMessage", @@ -220,8 +232,6 @@ "ChatCompletionStreamRequestToolChoiceTypedDict", "ChatCompletionStreamRequestToolTypedDict", "ChatCompletionStreamRequestTypedDict", - "CodeInterpreterTool", - "CodeInterpreterToolTypedDict", "CompletionChunk", "CompletionChunkTypedDict", "CompletionEvent", @@ -334,10 +344,6 @@ "UserMessageTypedDict", "ValidationError", "ValidationErrorTypedDict", - "WebSearchPremiumTool", - "WebSearchPremiumToolTypedDict", - "WebSearchTool", - "WebSearchToolTypedDict", ] _dynamic_imports: dict[str, str] = { @@ -363,6 +369,12 @@ "ChatCompletionRequestTypedDict": ".chatcompletionrequest", "ChatCompletionResponse": ".chatcompletionresponse", "ChatCompletionResponseTypedDict": ".chatcompletionresponse", + "ChatCompletionResponseChoiceLogprobs": ".chatcompletionresponsechoicelogprobs", + "ChatCompletionResponseChoiceLogprobsTypedDict": ".chatcompletionresponsechoicelogprobs", + "ChatCompletionResponseTokenLogprobs": ".chatcompletionresponsetokenlogprobs", + "ChatCompletionResponseTokenLogprobsTypedDict": ".chatcompletionresponsetokenlogprobs", + "ChatCompletionResponseTokenLogprobsTopK": ".chatcompletionresponsetokenlogprobstopk", + "ChatCompletionResponseTokenLogprobsTopKTypedDict": ".chatcompletionresponsetokenlogprobstopk", "ChatCompletionStreamRequest": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestMessage": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestMessageTypedDict": ".chatcompletionstreamrequest", @@ -373,8 +385,6 @@ "ChatCompletionStreamRequestToolChoiceTypedDict": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestToolTypedDict": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestTypedDict": ".chatcompletionstreamrequest", - "CodeInterpreterTool": ".codeinterpretertool", - "CodeInterpreterToolTypedDict": ".codeinterpretertool", "CompletionChunk": ".completionchunk", "CompletionChunkTypedDict": ".completionchunk", "CompletionEvent": ".completionevent", @@ -491,10 +501,6 @@ "LocTypedDict": ".validationerror", "ValidationError": ".validationerror", "ValidationErrorTypedDict": ".validationerror", - "WebSearchPremiumTool": ".websearchpremiumtool", - "WebSearchPremiumToolTypedDict": ".websearchpremiumtool", - "WebSearchTool": ".websearchtool", - "WebSearchToolTypedDict": ".websearchtool", } diff --git a/packages/gcp/src/mistralai/gcp/client/models/builtinconnectors.py b/packages/gcp/src/mistralai/gcp/client/models/builtinconnectors.py index 6a3b2476d..4907807f7 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/builtinconnectors.py +++ b/packages/gcp/src/mistralai/gcp/client/models/builtinconnectors.py @@ -10,4 +10,5 @@ "code_interpreter", "image_generation", "document_library", + "mistral_mcp", ] diff --git a/packages/gcp/src/mistralai/gcp/client/models/chatcompletionchoice.py b/packages/gcp/src/mistralai/gcp/client/models/chatcompletionchoice.py index 89f4868b1..2cb245159 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/chatcompletionchoice.py +++ b/packages/gcp/src/mistralai/gcp/client/models/chatcompletionchoice.py @@ -2,8 +2,19 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict +from .chatcompletionresponsechoicelogprobs import ( + ChatCompletionResponseChoiceLogprobs, + ChatCompletionResponseChoiceLogprobsTypedDict, +) from .deltamessage import DeltaMessage, DeltaMessageTypedDict -from mistralai.gcp.client.types import BaseModel, UNSET_SENTINEL, UnrecognizedStr +from mistralai.gcp.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) from pydantic import model_serializer from typing import List, Literal, Optional, Union from typing_extensions import NotRequired, TypedDict @@ -26,6 +37,10 @@ class ChatCompletionChoiceTypedDict(TypedDict): finish_reason: ChatCompletionChoiceFinishReason message: NotRequired[AssistantMessageTypedDict] messages: NotRequired[List[DeltaMessageTypedDict]] + logprobs: NotRequired[Nullable[ChatCompletionResponseChoiceLogprobsTypedDict]] + prompt_logprobs: NotRequired[ + Nullable[ChatCompletionResponseChoiceLogprobsTypedDict] + ] class ChatCompletionChoice(BaseModel): @@ -37,18 +52,31 @@ class ChatCompletionChoice(BaseModel): messages: Optional[List[DeltaMessage]] = None + logprobs: OptionalNullable[ChatCompletionResponseChoiceLogprobs] = UNSET + + prompt_logprobs: OptionalNullable[ChatCompletionResponseChoiceLogprobs] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["message", "messages"]) + optional_fields = set(["message", "messages", "logprobs", "prompt_logprobs"]) + nullable_fields = set(["logprobs", "prompt_logprobs"]) serialized = handler(self) m = {} for n, f in type(self).model_fields.items(): k = f.alias or n 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: + 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/packages/gcp/src/mistralai/gcp/client/models/chatcompletionrequest.py b/packages/gcp/src/mistralai/gcp/client/models/chatcompletionrequest.py index 0e3de4130..5f9642578 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/chatcompletionrequest.py +++ b/packages/gcp/src/mistralai/gcp/client/models/chatcompletionrequest.py @@ -2,7 +2,6 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict -from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict from .customconnector import CustomConnector, CustomConnectorTypedDict from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict @@ -17,8 +16,6 @@ from .toolchoiceenum import ToolChoiceEnum from .toolmessage import ToolMessage, ToolMessageTypedDict from .usermessage import UserMessage, UserMessageTypedDict -from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict -from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.gcp.client.types import ( BaseModel, Nullable, @@ -70,9 +67,6 @@ "ChatCompletionRequestToolTypedDict", Union[ ToolTypedDict, - WebSearchToolTypedDict, - WebSearchPremiumToolTypedDict, - CodeInterpreterToolTypedDict, ImageGenerationToolTypedDict, DocumentLibraryToolTypedDict, CustomConnectorTypedDict, @@ -81,13 +75,7 @@ ChatCompletionRequestTool = Union[ - Tool, - WebSearchTool, - WebSearchPremiumTool, - CodeInterpreterTool, - ImageGenerationTool, - DocumentLibraryTool, - CustomConnector, + Tool, ImageGenerationTool, DocumentLibraryTool, CustomConnector ] @@ -132,6 +120,13 @@ class ChatCompletionRequestTypedDict(TypedDict): r"""The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.""" frequency_penalty: NotRequired[Nullable[float]] r"""The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition.""" + min_tokens: NotRequired[Nullable[int]] + repetition_penalty: NotRequired[Nullable[float]] + top_k: NotRequired[Nullable[int]] + logprobs: NotRequired[Nullable[bool]] + top_logprobs: NotRequired[Nullable[int]] + prompt_logprobs: NotRequired[Nullable[bool]] + top_prompt_logprobs: NotRequired[Nullable[int]] n: NotRequired[Nullable[int]] r"""Number of completions to return for each request, input tokens are only billed once.""" prediction: NotRequired[PredictionTypedDict] @@ -186,6 +181,20 @@ class ChatCompletionRequest(BaseModel): frequency_penalty: OptionalNullable[float] = UNSET r"""The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition.""" + min_tokens: OptionalNullable[int] = UNSET + + repetition_penalty: OptionalNullable[float] = UNSET + + top_k: OptionalNullable[int] = UNSET + + logprobs: OptionalNullable[bool] = UNSET + + top_logprobs: OptionalNullable[int] = UNSET + + prompt_logprobs: OptionalNullable[bool] = UNSET + + top_prompt_logprobs: OptionalNullable[int] = UNSET + n: OptionalNullable[int] = UNSET r"""Number of completions to return for each request, input tokens are only billed once.""" @@ -218,6 +227,13 @@ def serialize_model(self, handler): "tool_choice", "presence_penalty", "frequency_penalty", + "min_tokens", + "repetition_penalty", + "top_k", + "logprobs", + "top_logprobs", + "prompt_logprobs", + "top_prompt_logprobs", "n", "prediction", "parallel_tool_calls", @@ -237,6 +253,13 @@ def serialize_model(self, handler): "tools", "presence_penalty", "frequency_penalty", + "min_tokens", + "repetition_penalty", + "top_k", + "logprobs", + "top_logprobs", + "prompt_logprobs", + "top_prompt_logprobs", "n", "reasoning_effort", "prompt_mode", diff --git a/packages/gcp/src/mistralai/gcp/client/models/chatcompletionresponsechoicelogprobs.py b/packages/gcp/src/mistralai/gcp/client/models/chatcompletionresponsechoicelogprobs.py new file mode 100644 index 000000000..f4902c484 --- /dev/null +++ b/packages/gcp/src/mistralai/gcp/client/models/chatcompletionresponsechoicelogprobs.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .chatcompletionresponsetokenlogprobstopk import ( + ChatCompletionResponseTokenLogprobsTopK, + ChatCompletionResponseTokenLogprobsTopKTypedDict, +) +from mistralai.gcp.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class ChatCompletionResponseChoiceLogprobsTypedDict(TypedDict): + content: List[ChatCompletionResponseTokenLogprobsTopKTypedDict] + + +class ChatCompletionResponseChoiceLogprobs(BaseModel): + content: List[ChatCompletionResponseTokenLogprobsTopK] diff --git a/packages/gcp/src/mistralai/gcp/client/models/chatcompletionresponsetokenlogprobs.py b/packages/gcp/src/mistralai/gcp/client/models/chatcompletionresponsetokenlogprobs.py new file mode 100644 index 000000000..f0d6d1856 --- /dev/null +++ b/packages/gcp/src/mistralai/gcp/client/models/chatcompletionresponsetokenlogprobs.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.gcp.client.types import BaseModel +import pydantic +from typing import List +from typing_extensions import Annotated, TypedDict + + +class ChatCompletionResponseTokenLogprobsTypedDict(TypedDict): + token: str + logprob: float + bytes_: List[int] + token_id: int + + +class ChatCompletionResponseTokenLogprobs(BaseModel): + token: str + + logprob: float + + bytes_: Annotated[List[int], pydantic.Field(alias="bytes")] + + token_id: int + + +try: + ChatCompletionResponseTokenLogprobs.model_rebuild() +except NameError: + pass diff --git a/packages/gcp/src/mistralai/gcp/client/models/websearchtool.py b/packages/gcp/src/mistralai/gcp/client/models/chatcompletionresponsetokenlogprobstopk.py similarity index 57% rename from packages/gcp/src/mistralai/gcp/client/models/websearchtool.py rename to packages/gcp/src/mistralai/gcp/client/models/chatcompletionresponsetokenlogprobstopk.py index 69d6e0437..9f0b417cc 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/websearchtool.py +++ b/packages/gcp/src/mistralai/gcp/client/models/chatcompletionresponsetokenlogprobstopk.py @@ -1,7 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .toolconfiguration import ToolConfiguration, ToolConfigurationTypedDict +from .chatcompletionresponsetokenlogprobs import ( + ChatCompletionResponseTokenLogprobs, + ChatCompletionResponseTokenLogprobsTypedDict, +) from mistralai.gcp.client.types import ( BaseModel, Nullable, @@ -9,31 +12,37 @@ UNSET, UNSET_SENTINEL, ) -from mistralai.gcp.client.utils import validate_const import pydantic from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import Literal +from typing import List from typing_extensions import Annotated, NotRequired, TypedDict -class WebSearchToolTypedDict(TypedDict): - tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] - type: Literal["web_search"] +class ChatCompletionResponseTokenLogprobsTopKTypedDict(TypedDict): + token: str + logprob: float + bytes_: List[int] + token_id: int + top_logprobs: NotRequired[ + Nullable[List[ChatCompletionResponseTokenLogprobsTypedDict]] + ] + + +class ChatCompletionResponseTokenLogprobsTopK(BaseModel): + token: str + + logprob: float + bytes_: Annotated[List[int], pydantic.Field(alias="bytes")] -class WebSearchTool(BaseModel): - tool_configuration: OptionalNullable[ToolConfiguration] = UNSET + token_id: int - type: Annotated[ - Annotated[Literal["web_search"], AfterValidator(validate_const("web_search"))], - pydantic.Field(alias="type"), - ] = "web_search" + top_logprobs: OptionalNullable[List[ChatCompletionResponseTokenLogprobs]] = UNSET @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["tool_configuration"]) - nullable_fields = set(["tool_configuration"]) + optional_fields = set(["top_logprobs"]) + nullable_fields = set(["top_logprobs"]) serialized = handler(self) m = {} @@ -57,6 +66,6 @@ def serialize_model(self, handler): try: - WebSearchTool.model_rebuild() + ChatCompletionResponseTokenLogprobsTopK.model_rebuild() except NameError: pass diff --git a/packages/gcp/src/mistralai/gcp/client/models/chatcompletionstreamrequest.py b/packages/gcp/src/mistralai/gcp/client/models/chatcompletionstreamrequest.py index 2adc78128..28b6f0c6c 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/chatcompletionstreamrequest.py +++ b/packages/gcp/src/mistralai/gcp/client/models/chatcompletionstreamrequest.py @@ -2,7 +2,6 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict -from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict from .customconnector import CustomConnector, CustomConnectorTypedDict from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict @@ -17,8 +16,6 @@ from .toolchoiceenum import ToolChoiceEnum from .toolmessage import ToolMessage, ToolMessageTypedDict from .usermessage import UserMessage, UserMessageTypedDict -from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict -from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.gcp.client.types import ( BaseModel, Nullable, @@ -70,9 +67,6 @@ "ChatCompletionStreamRequestToolTypedDict", Union[ ToolTypedDict, - WebSearchToolTypedDict, - WebSearchPremiumToolTypedDict, - CodeInterpreterToolTypedDict, ImageGenerationToolTypedDict, DocumentLibraryToolTypedDict, CustomConnectorTypedDict, @@ -81,13 +75,7 @@ ChatCompletionStreamRequestTool = Union[ - Tool, - WebSearchTool, - WebSearchPremiumTool, - CodeInterpreterTool, - ImageGenerationTool, - DocumentLibraryTool, - CustomConnector, + Tool, ImageGenerationTool, DocumentLibraryTool, CustomConnector ] @@ -131,6 +119,13 @@ class ChatCompletionStreamRequestTypedDict(TypedDict): r"""The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.""" frequency_penalty: NotRequired[Nullable[float]] r"""The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition.""" + min_tokens: NotRequired[Nullable[int]] + repetition_penalty: NotRequired[Nullable[float]] + top_k: NotRequired[Nullable[int]] + logprobs: NotRequired[Nullable[bool]] + top_logprobs: NotRequired[Nullable[int]] + prompt_logprobs: NotRequired[Nullable[bool]] + top_prompt_logprobs: NotRequired[Nullable[int]] n: NotRequired[Nullable[int]] r"""Number of completions to return for each request, input tokens are only billed once.""" prediction: NotRequired[PredictionTypedDict] @@ -184,6 +179,20 @@ class ChatCompletionStreamRequest(BaseModel): frequency_penalty: OptionalNullable[float] = UNSET r"""The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition.""" + min_tokens: OptionalNullable[int] = UNSET + + repetition_penalty: OptionalNullable[float] = UNSET + + top_k: OptionalNullable[int] = UNSET + + logprobs: OptionalNullable[bool] = UNSET + + top_logprobs: OptionalNullable[int] = UNSET + + prompt_logprobs: OptionalNullable[bool] = UNSET + + top_prompt_logprobs: OptionalNullable[int] = UNSET + n: OptionalNullable[int] = UNSET r"""Number of completions to return for each request, input tokens are only billed once.""" @@ -216,6 +225,13 @@ def serialize_model(self, handler): "tool_choice", "presence_penalty", "frequency_penalty", + "min_tokens", + "repetition_penalty", + "top_k", + "logprobs", + "top_logprobs", + "prompt_logprobs", + "top_prompt_logprobs", "n", "prediction", "parallel_tool_calls", @@ -235,6 +251,13 @@ def serialize_model(self, handler): "tools", "presence_penalty", "frequency_penalty", + "min_tokens", + "repetition_penalty", + "top_k", + "logprobs", + "top_logprobs", + "prompt_logprobs", + "top_prompt_logprobs", "n", "reasoning_effort", "prompt_mode", diff --git a/packages/gcp/src/mistralai/gcp/client/models/codeinterpretertool.py b/packages/gcp/src/mistralai/gcp/client/models/codeinterpretertool.py deleted file mode 100644 index 9fdedce7f..000000000 --- a/packages/gcp/src/mistralai/gcp/client/models/codeinterpretertool.py +++ /dev/null @@ -1,65 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .toolconfiguration import ToolConfiguration, ToolConfigurationTypedDict -from mistralai.gcp.client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from mistralai.gcp.client.utils import validate_const -import pydantic -from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import Literal -from typing_extensions import Annotated, NotRequired, TypedDict - - -class CodeInterpreterToolTypedDict(TypedDict): - tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] - type: Literal["code_interpreter"] - - -class CodeInterpreterTool(BaseModel): - tool_configuration: OptionalNullable[ToolConfiguration] = UNSET - - type: Annotated[ - Annotated[ - Literal["code_interpreter"], - AfterValidator(validate_const("code_interpreter")), - ], - pydantic.Field(alias="type"), - ] = "code_interpreter" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set(["tool_configuration"]) - nullable_fields = set(["tool_configuration"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - 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: - CodeInterpreterTool.model_rebuild() -except NameError: - pass diff --git a/packages/gcp/src/mistralai/gcp/client/models/completionresponsestreamchoice.py b/packages/gcp/src/mistralai/gcp/client/models/completionresponsestreamchoice.py index 0f189b553..4a0fbdca4 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/completionresponsestreamchoice.py +++ b/packages/gcp/src/mistralai/gcp/client/models/completionresponsestreamchoice.py @@ -1,16 +1,22 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .chatcompletionresponsechoicelogprobs import ( + ChatCompletionResponseChoiceLogprobs, + ChatCompletionResponseChoiceLogprobsTypedDict, +) from .deltamessage import DeltaMessage, DeltaMessageTypedDict from mistralai.gcp.client.types import ( BaseModel, Nullable, + OptionalNullable, + UNSET, UNSET_SENTINEL, UnrecognizedStr, ) from pydantic import model_serializer from typing import Literal, Union -from typing_extensions import TypedDict +from typing_extensions import NotRequired, TypedDict CompletionResponseStreamChoiceFinishReason = Union[ @@ -28,6 +34,10 @@ class CompletionResponseStreamChoiceTypedDict(TypedDict): index: int delta: DeltaMessageTypedDict finish_reason: Nullable[CompletionResponseStreamChoiceFinishReason] + logprobs: NotRequired[Nullable[ChatCompletionResponseChoiceLogprobsTypedDict]] + prompt_logprobs: NotRequired[ + Nullable[ChatCompletionResponseChoiceLogprobsTypedDict] + ] class CompletionResponseStreamChoice(BaseModel): @@ -37,16 +47,31 @@ class CompletionResponseStreamChoice(BaseModel): finish_reason: Nullable[CompletionResponseStreamChoiceFinishReason] + logprobs: OptionalNullable[ChatCompletionResponseChoiceLogprobs] = UNSET + + prompt_logprobs: OptionalNullable[ChatCompletionResponseChoiceLogprobs] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): + optional_fields = set(["logprobs", "prompt_logprobs"]) + nullable_fields = set(["finish_reason", "logprobs", "prompt_logprobs"]) serialized = handler(self) m = {} for n, f in type(self).model_fields.items(): k = f.alias or n 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: - m[k] = val + 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/packages/gcp/src/mistralai/gcp/client/models/reasoningeffort.py b/packages/gcp/src/mistralai/gcp/client/models/reasoningeffort.py index 43ffa02b8..f0dbb8722 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/reasoningeffort.py +++ b/packages/gcp/src/mistralai/gcp/client/models/reasoningeffort.py @@ -6,5 +6,10 @@ ReasoningEffort = Literal[ "none", + "minimal", + "low", + "medium", "high", + "xhigh", + "max", ] diff --git a/packages/gcp/src/mistralai/gcp/client/models/toolcall.py b/packages/gcp/src/mistralai/gcp/client/models/toolcall.py index 4e4c2581a..f6b09244e 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/toolcall.py +++ b/packages/gcp/src/mistralai/gcp/client/models/toolcall.py @@ -20,7 +20,7 @@ class ToolCall(BaseModel): id: Optional[str] = "null" - type: Optional[str] = None + type: Optional[str] = "function" index: Optional[int] = 0 diff --git a/packages/gcp/src/mistralai/gcp/client/models/toolchoice.py b/packages/gcp/src/mistralai/gcp/client/models/toolchoice.py index 528cc801e..08467568f 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/toolchoice.py +++ b/packages/gcp/src/mistralai/gcp/client/models/toolchoice.py @@ -22,7 +22,7 @@ class ToolChoice(BaseModel): function: FunctionName r"""this restriction of `Function` is used to select a specific function to call""" - type: Optional[str] = None + type: Optional[str] = "function" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/packages/gcp/src/mistralai/gcp/client/models/websearchpremiumtool.py b/packages/gcp/src/mistralai/gcp/client/models/websearchpremiumtool.py deleted file mode 100644 index e416f9647..000000000 --- a/packages/gcp/src/mistralai/gcp/client/models/websearchpremiumtool.py +++ /dev/null @@ -1,65 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .toolconfiguration import ToolConfiguration, ToolConfigurationTypedDict -from mistralai.gcp.client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from mistralai.gcp.client.utils import validate_const -import pydantic -from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import Literal -from typing_extensions import Annotated, NotRequired, TypedDict - - -class WebSearchPremiumToolTypedDict(TypedDict): - tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] - type: Literal["web_search_premium"] - - -class WebSearchPremiumTool(BaseModel): - tool_configuration: OptionalNullable[ToolConfiguration] = UNSET - - type: Annotated[ - Annotated[ - Literal["web_search_premium"], - AfterValidator(validate_const("web_search_premium")), - ], - pydantic.Field(alias="type"), - ] = "web_search_premium" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set(["tool_configuration"]) - nullable_fields = set(["tool_configuration"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - 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: - WebSearchPremiumTool.model_rebuild() -except NameError: - pass diff --git a/packages/gcp/src/mistralai/gcp/client/sdkconfiguration.py b/packages/gcp/src/mistralai/gcp/client/sdkconfiguration.py index d56a634f6..2e0d80464 100644 --- a/packages/gcp/src/mistralai/gcp/client/sdkconfiguration.py +++ b/packages/gcp/src/mistralai/gcp/client/sdkconfiguration.py @@ -15,10 +15,10 @@ from typing import Callable, Dict, Optional, Tuple, Union -SERVER_EU = "eu" -r"""EU Production server""" +SERVER_GLOBAL = "global" +r"""Global Production server""" SERVERS = { - SERVER_EU: "https://api.mistral.ai", + SERVER_GLOBAL: "https://api.mistral.ai", } """Contains the list of servers available to the SDK""" @@ -45,7 +45,7 @@ def get_server_details(self) -> Tuple[str, Dict[str, str]]: if self.server_url is not None and self.server_url: return remove_suffix(self.server_url, "/"), {} if not self.server: - self.server = SERVER_EU + self.server = SERVER_GLOBAL if self.server not in SERVERS: raise ValueError(f'Invalid server "{self.server}"') diff --git a/packages/gcp/uv.lock b/packages/gcp/uv.lock index ee864356d..3bf4fb46f 100644 --- a/packages/gcp/uv.lock +++ b/packages/gcp/uv.lock @@ -533,7 +533,7 @@ wheels = [ [[package]] name = "mistralai-gcp" -version = "2.1.0" +version = "2.2.0" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, diff --git a/pyproject.toml b/pyproject.toml index 5296829e5..964632792 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "3.6.0" +version = "3.7.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 729425f91..ccdd84d58 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.6.0" +__version__: str = "3.7.0" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.935.1" -__user_agent__: str = "speakeasy-sdk/python 3.6.0 2.935.1 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 3.7.0 2.935.1 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/beta.py b/src/mistralai/client/beta.py index 37297dc8a..a0eb7813f 100644 --- a/src/mistralai/client/beta.py +++ b/src/mistralai/client/beta.py @@ -3,6 +3,7 @@ from .basesdk import BaseSDK from .sdkconfiguration import SDKConfiguration from mistralai.client.beta_agents import BetaAgents +from mistralai.client.beta_context import BetaContext from mistralai.client.beta_prompts import BetaPrompts from mistralai.client.connectors import Connectors from mistralai.client.conversations import Conversations @@ -11,7 +12,9 @@ from mistralai.client.rag import Rag from mistralai.client.service_accounts import ServiceAccounts from mistralai.client.skills import Skills +from mistralai.client.triggers import Triggers from mistralai.client.users import Users +from mistralai.client.webhooks import Webhooks from typing import Optional @@ -29,6 +32,9 @@ class Beta(BaseSDK): connectors: Connectors r"""(beta) Connectors API - manage your connectors""" rag: Rag + context: BetaContext + triggers: Triggers + webhooks: Webhooks users: Users def __init__( @@ -54,4 +60,7 @@ def _init_sdks(self): ) self.connectors = Connectors(self.sdk_configuration, parent_ref=self.parent_ref) self.rag = Rag(self.sdk_configuration, parent_ref=self.parent_ref) + self.context = BetaContext(self.sdk_configuration, parent_ref=self.parent_ref) + self.triggers = Triggers(self.sdk_configuration, parent_ref=self.parent_ref) + self.webhooks = Webhooks(self.sdk_configuration, parent_ref=self.parent_ref) self.users = Users(self.sdk_configuration, parent_ref=self.parent_ref) diff --git a/src/mistralai/client/beta_context.py b/src/mistralai/client/beta_context.py new file mode 100644 index 000000000..d3776b531 --- /dev/null +++ b/src/mistralai/client/beta_context.py @@ -0,0 +1,22 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from .sdkconfiguration import SDKConfiguration +from mistralai.client.context_search_indexes import ContextSearchIndexes +from typing import Optional + + +class BetaContext(BaseSDK): + search_indexes: ContextSearchIndexes + + def __init__( + self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None + ) -> None: + BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref) + self.sdk_configuration = sdk_config + self._init_sdks() + + def _init_sdks(self): + self.search_indexes = ContextSearchIndexes( + self.sdk_configuration, parent_ref=self.parent_ref + ) diff --git a/src/mistralai/client/managed_indexes.py b/src/mistralai/client/context_search_indexes.py similarity index 98% rename from src/mistralai/client/managed_indexes.py rename to src/mistralai/client/context_search_indexes.py index 0e5b80e29..74f86ccc3 100644 --- a/src/mistralai/client/managed_indexes.py +++ b/src/mistralai/client/context_search_indexes.py @@ -10,7 +10,7 @@ from typing import Any, Awaitable, Dict, Iterable, List, Mapping, Optional, Union -class ManagedIndexes(BaseSDK): +class ContextSearchIndexes(BaseSDK): def create( self, *, @@ -94,7 +94,7 @@ def create( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -205,7 +205,7 @@ async def create_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -315,7 +315,7 @@ def list( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -459,7 +459,7 @@ async def list_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -594,7 +594,7 @@ def get( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -689,7 +689,7 @@ async def get_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -796,7 +796,7 @@ def update( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -897,7 +897,7 @@ async def update_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -986,7 +986,7 @@ def delete( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -1081,7 +1081,7 @@ async def delete_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -1190,7 +1190,7 @@ def ingest_documents( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -1299,7 +1299,7 @@ async def ingest_documents_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -1408,7 +1408,7 @@ def delete_documents( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -1517,7 +1517,7 @@ async def delete_documents_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -1624,7 +1624,7 @@ def search( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -1731,7 +1731,7 @@ async def search_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -1851,7 +1851,7 @@ def navigate( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -1971,7 +1971,7 @@ async def navigate_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -2086,7 +2086,7 @@ def read( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -2201,7 +2201,7 @@ async def read_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -2316,7 +2316,7 @@ def grep( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -2431,7 +2431,7 @@ async def grep_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -2531,7 +2531,7 @@ def get_chunk( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -2631,7 +2631,7 @@ async def get_chunk_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -2729,7 +2729,7 @@ def get_index_summary( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -2827,7 +2827,7 @@ async def get_index_summary_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -2934,7 +2934,7 @@ def generate_index_summary( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -3048,7 +3048,7 @@ async def generate_index_summary_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -3171,7 +3171,7 @@ def set_index_summary( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, @@ -3287,7 +3287,7 @@ async def set_index_summary_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), - tags=["beta.rag.managed_indexes"], + tags=["beta.context.search_indexes"], extensions=None, ), request=req, diff --git a/src/mistralai/client/deployments.py b/src/mistralai/client/deployments.py index 310cc260d..0d0f4fa61 100644 --- a/src/mistralai/client/deployments.py +++ b/src/mistralai/client/deployments.py @@ -2083,6 +2083,206 @@ async def list_deployment_workers_async( raise errors.SDKError("Unexpected response received", http_res) + def get_deployment_archive( + self, + *, + name: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DeploymentArchiveResponse: + r"""Get Deployment Archive + + Get the archive a managed deployment builds from, with a signed URL to download it. + + `download_url` expires within 24 hours, and is null once Mistral Cloud has deleted the archive. + A deployment that builds from a repository answers 404. + + :param name: + :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.GetDeploymentArchiveV1WorkflowsDeploymentsNameArchiveGetRequest( + name=name, + ) + ) + + req = self._build_request( + method="GET", + path="/v1/workflows/deployments/{name}/archive", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + 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, + 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="get_deployment_archive_v1_workflows_deployments__name__archive_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["workflows.deployments"], + 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.DeploymentArchiveResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(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 get_deployment_archive_async( + self, + *, + name: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DeploymentArchiveResponse: + r"""Get Deployment Archive + + Get the archive a managed deployment builds from, with a signed URL to download it. + + `download_url` expires within 24 hours, and is null once Mistral Cloud has deleted the archive. + A deployment that builds from a repository answers 404. + + :param name: + :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.GetDeploymentArchiveV1WorkflowsDeploymentsNameArchiveGetRequest( + name=name, + ) + ) + + req = self._build_request_async( + method="GET", + path="/v1/workflows/deployments/{name}/archive", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + 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, + 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="get_deployment_archive_v1_workflows_deployments__name__archive_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["workflows.deployments"], + 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.DeploymentArchiveResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(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 get_deployment_logs( self, *, diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index 4c21494c5..4cc0d5397 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -51,6 +51,10 @@ ActivityTaskStartedResponse, ActivityTaskStartedResponseTypedDict, ) + from .add_workflow_tags_v1_workflows_workflow_identifier_tags_postop import ( + AddWorkflowTagsV1WorkflowsWorkflowIdentifierTagsPostRequest, + AddWorkflowTagsV1WorkflowsWorkflowIdentifierTagsPostRequestTypedDict, + ) from .agent import ( Agent, AgentTool, @@ -642,6 +646,10 @@ ConnectorMCPPublicUpdateAuthMethod2TypedDict, ConnectorMCPPublicUpdateTypedDict, ) + from .connectoropenapispec import ( + ConnectorOpenAPISpec, + ConnectorOpenAPISpecTypedDict, + ) from .connectorsqueryfilters import ( ConnectorsQueryFilters, ConnectorsQueryFiltersTypedDict, @@ -934,6 +942,9 @@ CreateSkillVersionResponse, CreateSkillVersionResponseTypedDict, ) + from .createtrigger import CreateTrigger, CreateTriggerTypedDict + from .createtriggeraction import CreateTriggerAction, CreateTriggerActionTypedDict + from .createwebhook import CreateWebhook, CreateWebhookTypedDict from .credentialscreateorupdate import ( CredentialsCreateOrUpdate, CredentialsCreateOrUpdateTypedDict, @@ -1053,10 +1064,18 @@ DeleteSessionV1AudioSessionsSessionIDDeleteRequest, DeleteSessionV1AudioSessionsSessionIDDeleteRequestTypedDict, ) + from .delete_trigger_v1_triggers_trigger_id_deleteop import ( + DeleteTriggerV1TriggersTriggerIDDeleteRequest, + DeleteTriggerV1TriggersTriggerIDDeleteRequestTypedDict, + ) from .delete_voice_v1_audio_voices_voice_id_deleteop import ( DeleteVoiceV1AudioVoicesVoiceIDDeleteRequest, DeleteVoiceV1AudioVoicesVoiceIDDeleteRequestTypedDict, ) + from .delete_webhook_v1_webhooks_webhook_id_deleteop import ( + DeleteWebhookV1WebhooksWebhookIDDeleteRequest, + DeleteWebhookV1WebhooksWebhookIDDeleteRequestTypedDict, + ) from .deletebatchjobresponse import ( DeleteBatchJobResponse, DeleteBatchJobResponseTypedDict, @@ -1094,6 +1113,10 @@ DenseVectorFieldDefinition, DenseVectorFieldDefinitionTypedDict, ) + from .deploymentarchiveresponse import ( + DeploymentArchiveResponse, + DeploymentArchiveResponseTypedDict, + ) from .deploymentbuildstate import ( DeploymentBuildState, DeploymentBuildStateTypedDict, @@ -1443,6 +1466,10 @@ GetDatasetsV1ObservabilityDatasetsGetRequest, GetDatasetsV1ObservabilityDatasetsGetRequestTypedDict, ) + from .get_deployment_archive_v1_workflows_deployments_name_archive_getop import ( + GetDeploymentArchiveV1WorkflowsDeploymentsNameArchiveGetRequest, + GetDeploymentArchiveV1WorkflowsDeploymentsNameArchiveGetRequestTypedDict, + ) from .get_deployment_logsop import ( GetDeploymentLogsOrder, GetDeploymentLogsRequest, @@ -1569,6 +1596,10 @@ GetTraceSpansV1ObservabilityTracesTraceIDSpansGetRequest, GetTraceSpansV1ObservabilityTracesTraceIDSpansGetRequestTypedDict, ) + from .get_trigger_v1_triggers_trigger_id_getop import ( + GetTriggerV1TriggersTriggerIDGetRequest, + GetTriggerV1TriggersTriggerIDGetRequestTypedDict, + ) from .get_voice_sample_audio_v1_audio_voices_voice_id_sample_getop import ( GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequest, GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequestTypedDict, @@ -1577,6 +1608,14 @@ GetVoiceV1AudioVoicesVoiceIDGetRequest, GetVoiceV1AudioVoicesVoiceIDGetRequestTypedDict, ) + from .get_webhook_signing_secret_v1_webhooks_webhook_id_signing_secret_getop import ( + GetWebhookSigningSecretV1WebhooksWebhookIDSigningSecretGetRequest, + GetWebhookSigningSecretV1WebhooksWebhookIDSigningSecretGetRequestTypedDict, + ) + from .get_webhook_v1_webhooks_webhook_id_getop import ( + GetWebhookV1WebhooksWebhookIDGetRequest, + GetWebhookV1WebhooksWebhookIDGetRequestTypedDict, + ) from .get_workflow_events_v1_workflows_events_list_getop import ( GetWorkflowEventsV1WorkflowsEventsListGetRequest, GetWorkflowEventsV1WorkflowsEventsListGetRequestTypedDict, @@ -2042,6 +2081,14 @@ ListServiceAccountsV1ServiceAccountsGetResponse, ListServiceAccountsV1ServiceAccountsGetResponseTypedDict, ) + from .list_trigger_events_v1_triggers_trigger_id_events_getop import ( + ListTriggerEventsV1TriggersTriggerIDEventsGetRequest, + ListTriggerEventsV1TriggersTriggerIDEventsGetRequestTypedDict, + ) + from .list_triggers_v1_triggers_getop import ( + ListTriggersV1TriggersGetRequest, + ListTriggersV1TriggersGetRequestTypedDict, + ) from .list_voices_v1_audio_voices_getop import ( ListVoicesV1AudioVoicesGetRequest, ListVoicesV1AudioVoicesGetRequestTypedDict, @@ -2372,6 +2419,13 @@ from .ocrtextblock import OCRTextBlock, OCRTextBlockTypedDict from .ocrtitleblock import OCRTitleBlock, OCRTitleBlockTypedDict from .ocrusageinfo import OCRUsageInfo, OCRUsageInfoTypedDict + from .openapifilesource import OpenAPIFileSource, OpenAPIFileSourceTypedDict + from .openapispecsource import ( + OpenAPISpecSource, + OpenAPISpecSourceTypedDict, + UnknownOpenAPISpecSource, + ) + from .openapiurlsource import OpenAPIURLSource, OpenAPIURLSourceTypedDict from .optimization import Optimization, OptimizationTypedDict from .optimizationdetail import OptimizationDetail, OptimizationDetailTypedDict from .optimizationreference import ( @@ -3601,10 +3655,18 @@ TransferTargetTypedDict, UnknownDestination, ) + from .trigger import Trigger, TriggerTypedDict from .trigger_schedule_v1_workflows_schedules_schedule_id_trigger_postop import ( TriggerScheduleV1WorkflowsSchedulesScheduleIDTriggerPostRequest, TriggerScheduleV1WorkflowsSchedulesScheduleIDTriggerPostRequestTypedDict, ) + from .triggeraction import TriggerAction, TriggerActionTypedDict + from .triggeractiontype import TriggerActionType + from .triggerevent import TriggerEvent, TriggerEventTypedDict + from .triggereventlist import TriggerEventList, TriggerEventListTypedDict + from .triggerhandler import TriggerHandler + from .triggersownertype import TriggersOwnerType + from .triggerstatusvalue import TriggerStatusValue from .turbinemeta import TurbineMeta, TurbineMetaTypedDict from .turbinetoollocale import TurbineToolLocale, TurbineToolLocaleTypedDict from .turbinetoolmeta import TurbineToolMeta, TurbineToolMetaTypedDict @@ -3917,6 +3979,14 @@ from .voicelistresponse import VoiceListResponse, VoiceListResponseTypedDict from .voiceresponse import VoiceResponse, VoiceResponseType, VoiceResponseTypedDict from .voiceupdaterequest import VoiceUpdateRequest, VoiceUpdateRequestTypedDict + from .webhook import Webhook, WebhookTypedDict + from .webhookprovider import WebhookProvider + from .webhooksignatureencoding import WebhookSignatureEncoding + from .webhooksignaturehashalgorithm import WebhookSignatureHashAlgorithm + from .webhooksigningsecret import ( + WebhookSigningSecret, + WebhookSigningSecretTypedDict, + ) from .websearchpremiumtool import ( WebSearchPremiumTool, WebSearchPremiumToolTypedDict, @@ -4109,6 +4179,10 @@ WorkflowsWorkerSpecUpdate, WorkflowsWorkerSpecUpdateTypedDict, ) + from .workflowtagsaddrequest import ( + WorkflowTagsAddRequest, + WorkflowTagsAddRequestTypedDict, + ) from .workflowtaskfailedattributes import ( WorkflowTaskFailedAttributes, WorkflowTaskFailedAttributesTypedDict, @@ -4170,6 +4244,8 @@ "ActivityTaskStartedAttributesResponseTypedDict", "ActivityTaskStartedResponse", "ActivityTaskStartedResponseTypedDict", + "AddWorkflowTagsV1WorkflowsWorkflowIdentifierTagsPostRequest", + "AddWorkflowTagsV1WorkflowsWorkflowIdentifierTagsPostRequestTypedDict", "Agent", "AgentAliasResponse", "AgentAliasResponseTypedDict", @@ -4565,6 +4641,8 @@ "ConnectorMCPPublicUpdateAuthMethod2", "ConnectorMCPPublicUpdateAuthMethod2TypedDict", "ConnectorMCPPublicUpdateTypedDict", + "ConnectorOpenAPISpec", + "ConnectorOpenAPISpecTypedDict", "ConnectorShareToOrganizationV1Request", "ConnectorShareToOrganizationV1RequestTypedDict", "ConnectorShareV1Request", @@ -4782,6 +4860,12 @@ "CreateSkillVersionRequestTypedDict", "CreateSkillVersionResponse", "CreateSkillVersionResponseTypedDict", + "CreateTrigger", + "CreateTriggerAction", + "CreateTriggerActionTypedDict", + "CreateTriggerTypedDict", + "CreateWebhook", + "CreateWebhookTypedDict", "CredentialsCreateOrUpdate", "CredentialsCreateOrUpdateTypedDict", "CredentialsResponse", @@ -4870,14 +4954,20 @@ "DeleteSessionV1AudioSessionsSessionIDDeleteRequestTypedDict", "DeleteSkillResponse", "DeleteSkillResponseTypedDict", + "DeleteTriggerV1TriggersTriggerIDDeleteRequest", + "DeleteTriggerV1TriggersTriggerIDDeleteRequestTypedDict", "DeleteVoiceV1AudioVoicesVoiceIDDeleteRequest", "DeleteVoiceV1AudioVoicesVoiceIDDeleteRequestTypedDict", + "DeleteWebhookV1WebhooksWebhookIDDeleteRequest", + "DeleteWebhookV1WebhooksWebhookIDDeleteRequestTypedDict", "DeltaMessage", "DeltaMessageContent", "DeltaMessageContentTypedDict", "DeltaMessageTypedDict", "DenseVectorFieldDefinition", "DenseVectorFieldDefinitionTypedDict", + "DeploymentArchiveResponse", + "DeploymentArchiveResponseTypedDict", "DeploymentBuildState", "DeploymentBuildStateTypedDict", "DeploymentDetailResponse", @@ -5117,6 +5207,8 @@ "GetDatasetRecordsV1ObservabilityDatasetsDatasetIDRecordsGetRequestTypedDict", "GetDatasetsV1ObservabilityDatasetsGetRequest", "GetDatasetsV1ObservabilityDatasetsGetRequestTypedDict", + "GetDeploymentArchiveV1WorkflowsDeploymentsNameArchiveGetRequest", + "GetDeploymentArchiveV1WorkflowsDeploymentsNameArchiveGetRequestTypedDict", "GetDeploymentLogsOrder", "GetDeploymentLogsRequest", "GetDeploymentLogsRequestTypedDict", @@ -5237,10 +5329,16 @@ "GetTraceTypedDict", "GetTraces", "GetTracesTypedDict", + "GetTriggerV1TriggersTriggerIDGetRequest", + "GetTriggerV1TriggersTriggerIDGetRequestTypedDict", "GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequest", "GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequestTypedDict", "GetVoiceV1AudioVoicesVoiceIDGetRequest", "GetVoiceV1AudioVoicesVoiceIDGetRequestTypedDict", + "GetWebhookSigningSecretV1WebhooksWebhookIDSigningSecretGetRequest", + "GetWebhookSigningSecretV1WebhooksWebhookIDSigningSecretGetRequestTypedDict", + "GetWebhookV1WebhooksWebhookIDGetRequest", + "GetWebhookV1WebhooksWebhookIDGetRequestTypedDict", "GetWorkflowEventsV1WorkflowsEventsListGetRequest", "GetWorkflowEventsV1WorkflowsEventsListGetRequestTypedDict", "GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIDHistoryGetRequest", @@ -5555,6 +5653,10 @@ "ListSkillsResponseTypedDict", "ListSortDirection", "ListSortField", + "ListTriggerEventsV1TriggersTriggerIDEventsGetRequest", + "ListTriggerEventsV1TriggersTriggerIDEventsGetRequestTypedDict", + "ListTriggersV1TriggersGetRequest", + "ListTriggersV1TriggersGetRequestTypedDict", "ListVoicesV1AudioVoicesGetRequest", "ListVoicesV1AudioVoicesGetRequestTypedDict", "ListVoicesV1AudioVoicesGetType", @@ -5781,6 +5883,12 @@ "ObservabilityErrorDetail", "ObservabilityErrorDetailTypedDict", "OldState", + "OpenAPIFileSource", + "OpenAPIFileSourceTypedDict", + "OpenAPISpecSource", + "OpenAPISpecSourceTypedDict", + "OpenAPIURLSource", + "OpenAPIURLSourceTypedDict", "Operator", "Optimization", "OptimizationDetail", @@ -6702,8 +6810,20 @@ "TransferCallToolTypedDict", "TransferTarget", "TransferTargetTypedDict", + "Trigger", + "TriggerAction", + "TriggerActionType", + "TriggerActionTypedDict", + "TriggerEvent", + "TriggerEventList", + "TriggerEventListTypedDict", + "TriggerEventTypedDict", + "TriggerHandler", "TriggerScheduleV1WorkflowsSchedulesScheduleIDTriggerPostRequest", "TriggerScheduleV1WorkflowsSchedulesScheduleIDTriggerPostRequestTypedDict", + "TriggerStatusValue", + "TriggerTypedDict", + "TriggersOwnerType", "Truncation", "TurbineMeta", "TurbineMetaTypedDict", @@ -6750,6 +6870,7 @@ "UnknownJudgeOutputUnion", "UnknownModelConversationTool", "UnknownModelListData", + "UnknownOpenAPISpecSource", "UnknownPayload", "UnknownPipelineConfigSampling", "UnknownPrincipal", @@ -6943,6 +7064,13 @@ "WebSearchPremiumToolTypedDict", "WebSearchTool", "WebSearchToolTypedDict", + "Webhook", + "WebhookProvider", + "WebhookSignatureEncoding", + "WebhookSignatureHashAlgorithm", + "WebhookSigningSecret", + "WebhookSigningSecretTypedDict", + "WebhookTypedDict", "WhoamiOrganization", "WhoamiOrganizationTypedDict", "WhoamiResponse", @@ -7047,6 +7175,8 @@ "WorkflowScheduleUpdateRequestTypedDict", "WorkflowStreamError", "WorkflowStreamErrorTypedDict", + "WorkflowTagsAddRequest", + "WorkflowTagsAddRequestTypedDict", "WorkflowTaskFailedAttributes", "WorkflowTaskFailedAttributesTypedDict", "WorkflowTaskFailedResponse", @@ -7088,6 +7218,8 @@ "ActivityTaskStartedAttributesResponseTypedDict": ".activitytaskstartedattributesresponse", "ActivityTaskStartedResponse": ".activitytaskstartedresponse", "ActivityTaskStartedResponseTypedDict": ".activitytaskstartedresponse", + "AddWorkflowTagsV1WorkflowsWorkflowIdentifierTagsPostRequest": ".add_workflow_tags_v1_workflows_workflow_identifier_tags_postop", + "AddWorkflowTagsV1WorkflowsWorkflowIdentifierTagsPostRequestTypedDict": ".add_workflow_tags_v1_workflows_workflow_identifier_tags_postop", "Agent": ".agent", "AgentTool": ".agent", "AgentToolTypedDict": ".agent", @@ -7491,6 +7623,8 @@ "ConnectorMCPPublicUpdateAuthMethod2": ".connectormcppublicupdate", "ConnectorMCPPublicUpdateAuthMethod2TypedDict": ".connectormcppublicupdate", "ConnectorMCPPublicUpdateTypedDict": ".connectormcppublicupdate", + "ConnectorOpenAPISpec": ".connectoropenapispec", + "ConnectorOpenAPISpecTypedDict": ".connectoropenapispec", "ConnectorsQueryFilters": ".connectorsqueryfilters", "ConnectorsQueryFiltersTypedDict": ".connectorsqueryfilters", "ConnectorTool": ".connectortool", @@ -7713,6 +7847,12 @@ "CreateSkillRequestTypedDict": ".createskillrequest", "CreateSkillVersionResponse": ".createskillversionresponse", "CreateSkillVersionResponseTypedDict": ".createskillversionresponse", + "CreateTrigger": ".createtrigger", + "CreateTriggerTypedDict": ".createtrigger", + "CreateTriggerAction": ".createtriggeraction", + "CreateTriggerActionTypedDict": ".createtriggeraction", + "CreateWebhook": ".createwebhook", + "CreateWebhookTypedDict": ".createwebhook", "CredentialsCreateOrUpdate": ".credentialscreateorupdate", "CredentialsCreateOrUpdateTypedDict": ".credentialscreateorupdate", "CredentialsResponse": ".credentialsresponse", @@ -7787,8 +7927,12 @@ "DeleteServiceAccountV1ServiceAccountsServiceAccountIDDeleteRequestTypedDict": ".delete_service_account_v1_service_accounts_service_account_id_deleteop", "DeleteSessionV1AudioSessionsSessionIDDeleteRequest": ".delete_session_v1_audio_sessions_session_id_deleteop", "DeleteSessionV1AudioSessionsSessionIDDeleteRequestTypedDict": ".delete_session_v1_audio_sessions_session_id_deleteop", + "DeleteTriggerV1TriggersTriggerIDDeleteRequest": ".delete_trigger_v1_triggers_trigger_id_deleteop", + "DeleteTriggerV1TriggersTriggerIDDeleteRequestTypedDict": ".delete_trigger_v1_triggers_trigger_id_deleteop", "DeleteVoiceV1AudioVoicesVoiceIDDeleteRequest": ".delete_voice_v1_audio_voices_voice_id_deleteop", "DeleteVoiceV1AudioVoicesVoiceIDDeleteRequestTypedDict": ".delete_voice_v1_audio_voices_voice_id_deleteop", + "DeleteWebhookV1WebhooksWebhookIDDeleteRequest": ".delete_webhook_v1_webhooks_webhook_id_deleteop", + "DeleteWebhookV1WebhooksWebhookIDDeleteRequestTypedDict": ".delete_webhook_v1_webhooks_webhook_id_deleteop", "DeleteBatchJobResponse": ".deletebatchjobresponse", "DeleteBatchJobResponseTypedDict": ".deletebatchjobresponse", "DeleteDatasetRecordsRequest": ".deletedatasetrecordsrequest", @@ -7813,6 +7957,8 @@ "DeltaMessageTypedDict": ".deltamessage", "DenseVectorFieldDefinition": ".densevectorfielddefinition", "DenseVectorFieldDefinitionTypedDict": ".densevectorfielddefinition", + "DeploymentArchiveResponse": ".deploymentarchiveresponse", + "DeploymentArchiveResponseTypedDict": ".deploymentarchiveresponse", "DeploymentBuildState": ".deploymentbuildstate", "DeploymentBuildStateTypedDict": ".deploymentbuildstate", "DeploymentDetailResponse": ".deploymentdetailresponse", @@ -8059,6 +8205,8 @@ "GetDatasetRecordsV1ObservabilityDatasetsDatasetIDRecordsGetRequestTypedDict": ".get_dataset_records_v1_observability_datasets_dataset_id_records_getop", "GetDatasetsV1ObservabilityDatasetsGetRequest": ".get_datasets_v1_observability_datasets_getop", "GetDatasetsV1ObservabilityDatasetsGetRequestTypedDict": ".get_datasets_v1_observability_datasets_getop", + "GetDeploymentArchiveV1WorkflowsDeploymentsNameArchiveGetRequest": ".get_deployment_archive_v1_workflows_deployments_name_archive_getop", + "GetDeploymentArchiveV1WorkflowsDeploymentsNameArchiveGetRequestTypedDict": ".get_deployment_archive_v1_workflows_deployments_name_archive_getop", "GetDeploymentLogsOrder": ".get_deployment_logsop", "GetDeploymentLogsRequest": ".get_deployment_logsop", "GetDeploymentLogsRequestTypedDict": ".get_deployment_logsop", @@ -8127,10 +8275,16 @@ "GetTraceFieldOptionsV1ObservabilityTracesFieldsFieldNameOptionsGetRequestTypedDict": ".get_trace_field_options_v1_observability_traces_fields_field_name_options_getop", "GetTraceSpansV1ObservabilityTracesTraceIDSpansGetRequest": ".get_trace_spans_v1_observability_traces_trace_id_spans_getop", "GetTraceSpansV1ObservabilityTracesTraceIDSpansGetRequestTypedDict": ".get_trace_spans_v1_observability_traces_trace_id_spans_getop", + "GetTriggerV1TriggersTriggerIDGetRequest": ".get_trigger_v1_triggers_trigger_id_getop", + "GetTriggerV1TriggersTriggerIDGetRequestTypedDict": ".get_trigger_v1_triggers_trigger_id_getop", "GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequest": ".get_voice_sample_audio_v1_audio_voices_voice_id_sample_getop", "GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequestTypedDict": ".get_voice_sample_audio_v1_audio_voices_voice_id_sample_getop", "GetVoiceV1AudioVoicesVoiceIDGetRequest": ".get_voice_v1_audio_voices_voice_id_getop", "GetVoiceV1AudioVoicesVoiceIDGetRequestTypedDict": ".get_voice_v1_audio_voices_voice_id_getop", + "GetWebhookSigningSecretV1WebhooksWebhookIDSigningSecretGetRequest": ".get_webhook_signing_secret_v1_webhooks_webhook_id_signing_secret_getop", + "GetWebhookSigningSecretV1WebhooksWebhookIDSigningSecretGetRequestTypedDict": ".get_webhook_signing_secret_v1_webhooks_webhook_id_signing_secret_getop", + "GetWebhookV1WebhooksWebhookIDGetRequest": ".get_webhook_v1_webhooks_webhook_id_getop", + "GetWebhookV1WebhooksWebhookIDGetRequestTypedDict": ".get_webhook_v1_webhooks_webhook_id_getop", "GetWorkflowEventsV1WorkflowsEventsListGetRequest": ".get_workflow_events_v1_workflows_events_list_getop", "GetWorkflowEventsV1WorkflowsEventsListGetRequestTypedDict": ".get_workflow_events_v1_workflows_events_list_getop", "GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIDHistoryGetRequest": ".get_workflow_execution_history_v1_workflows_executions_execution_id_history_getop", @@ -8463,6 +8617,10 @@ "ListServiceAccountsV1ServiceAccountsGetRequestTypedDict": ".list_service_accounts_v1_service_accounts_getop", "ListServiceAccountsV1ServiceAccountsGetResponse": ".list_service_accounts_v1_service_accounts_getop", "ListServiceAccountsV1ServiceAccountsGetResponseTypedDict": ".list_service_accounts_v1_service_accounts_getop", + "ListTriggerEventsV1TriggersTriggerIDEventsGetRequest": ".list_trigger_events_v1_triggers_trigger_id_events_getop", + "ListTriggerEventsV1TriggersTriggerIDEventsGetRequestTypedDict": ".list_trigger_events_v1_triggers_trigger_id_events_getop", + "ListTriggersV1TriggersGetRequest": ".list_triggers_v1_triggers_getop", + "ListTriggersV1TriggersGetRequestTypedDict": ".list_triggers_v1_triggers_getop", "ListVoicesV1AudioVoicesGetRequest": ".list_voices_v1_audio_voices_getop", "ListVoicesV1AudioVoicesGetRequestTypedDict": ".list_voices_v1_audio_voices_getop", "ListVoicesV1AudioVoicesGetType": ".list_voices_v1_audio_voices_getop", @@ -8739,6 +8897,13 @@ "OCRTitleBlockTypedDict": ".ocrtitleblock", "OCRUsageInfo": ".ocrusageinfo", "OCRUsageInfoTypedDict": ".ocrusageinfo", + "OpenAPIFileSource": ".openapifilesource", + "OpenAPIFileSourceTypedDict": ".openapifilesource", + "OpenAPISpecSource": ".openapispecsource", + "OpenAPISpecSourceTypedDict": ".openapispecsource", + "UnknownOpenAPISpecSource": ".openapispecsource", + "OpenAPIURLSource": ".openapiurlsource", + "OpenAPIURLSourceTypedDict": ".openapiurlsource", "Optimization": ".optimization", "OptimizationTypedDict": ".optimization", "OptimizationDetail": ".optimizationdetail", @@ -9634,8 +9799,20 @@ "TransferTarget": ".transfertarget", "TransferTargetTypedDict": ".transfertarget", "UnknownDestination": ".transfertarget", + "Trigger": ".trigger", + "TriggerTypedDict": ".trigger", "TriggerScheduleV1WorkflowsSchedulesScheduleIDTriggerPostRequest": ".trigger_schedule_v1_workflows_schedules_schedule_id_trigger_postop", "TriggerScheduleV1WorkflowsSchedulesScheduleIDTriggerPostRequestTypedDict": ".trigger_schedule_v1_workflows_schedules_schedule_id_trigger_postop", + "TriggerAction": ".triggeraction", + "TriggerActionTypedDict": ".triggeraction", + "TriggerActionType": ".triggeractiontype", + "TriggerEvent": ".triggerevent", + "TriggerEventTypedDict": ".triggerevent", + "TriggerEventList": ".triggereventlist", + "TriggerEventListTypedDict": ".triggereventlist", + "TriggerHandler": ".triggerhandler", + "TriggersOwnerType": ".triggersownertype", + "TriggerStatusValue": ".triggerstatusvalue", "TurbineMeta": ".turbinemeta", "TurbineMetaTypedDict": ".turbinemeta", "TurbineToolLocale": ".turbinetoollocale", @@ -9841,6 +10018,13 @@ "VoiceResponseTypedDict": ".voiceresponse", "VoiceUpdateRequest": ".voiceupdaterequest", "VoiceUpdateRequestTypedDict": ".voiceupdaterequest", + "Webhook": ".webhook", + "WebhookTypedDict": ".webhook", + "WebhookProvider": ".webhookprovider", + "WebhookSignatureEncoding": ".webhooksignatureencoding", + "WebhookSignatureHashAlgorithm": ".webhooksignaturehashalgorithm", + "WebhookSigningSecret": ".webhooksigningsecret", + "WebhookSigningSecretTypedDict": ".webhooksigningsecret", "WebSearchPremiumTool": ".websearchpremiumtool", "WebSearchPremiumToolTypedDict": ".websearchpremiumtool", "WebSearchTool": ".websearchtool", @@ -9954,6 +10138,8 @@ "WorkflowStreamErrorTypedDict": ".workflowstreamerror", "WorkflowsWorkerSpecUpdate": ".workflowsworkerspecupdate", "WorkflowsWorkerSpecUpdateTypedDict": ".workflowsworkerspecupdate", + "WorkflowTagsAddRequest": ".workflowtagsaddrequest", + "WorkflowTagsAddRequestTypedDict": ".workflowtagsaddrequest", "WorkflowTaskFailedAttributes": ".workflowtaskfailedattributes", "WorkflowTaskFailedAttributesTypedDict": ".workflowtaskfailedattributes", "WorkflowTaskFailedResponse": ".workflowtaskfailedresponse", diff --git a/src/mistralai/client/models/add_workflow_tags_v1_workflows_workflow_identifier_tags_postop.py b/src/mistralai/client/models/add_workflow_tags_v1_workflows_workflow_identifier_tags_postop.py new file mode 100644 index 000000000..8237d21da --- /dev/null +++ b/src/mistralai/client/models/add_workflow_tags_v1_workflows_workflow_identifier_tags_postop.py @@ -0,0 +1,26 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .workflowtagsaddrequest import ( + WorkflowTagsAddRequest, + WorkflowTagsAddRequestTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class AddWorkflowTagsV1WorkflowsWorkflowIdentifierTagsPostRequestTypedDict(TypedDict): + workflow_identifier: str + workflow_tags_add_request: WorkflowTagsAddRequestTypedDict + + +class AddWorkflowTagsV1WorkflowsWorkflowIdentifierTagsPostRequest(BaseModel): + workflow_identifier: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + workflow_tags_add_request: Annotated[ + WorkflowTagsAddRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/connectoropenapispec.py b/src/mistralai/client/models/connectoropenapispec.py new file mode 100644 index 000000000..072d3918a --- /dev/null +++ b/src/mistralai/client/models/connectoropenapispec.py @@ -0,0 +1,31 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .openapispecsource import OpenAPISpecSource, OpenAPISpecSourceTypedDict +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing_extensions import TypedDict + + +class ConnectorOpenAPISpecTypedDict(TypedDict): + source: Nullable[OpenAPISpecSourceTypedDict] + r"""Where the spec came from. Null when unknown, e.g. a file uploaded without a name, or hidden, e.g. on Mistral connectors.""" + + +class ConnectorOpenAPISpec(BaseModel): + source: Nullable[OpenAPISpecSource] + r"""Where the spec came from. Null when unknown, e.g. a file uploaded without a name, or hidden, e.g. on Mistral connectors.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/createtrigger.py b/src/mistralai/client/models/createtrigger.py new file mode 100644 index 000000000..1d7d8fcfe --- /dev/null +++ b/src/mistralai/client/models/createtrigger.py @@ -0,0 +1,69 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .createtriggeraction import CreateTriggerAction, CreateTriggerActionTypedDict +from .triggerhandler import TriggerHandler +from .triggersownertype import TriggersOwnerType +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class CreateTriggerTypedDict(TypedDict): + event_source_id: str + r"""ID of the event source that fires this trigger""" + handler: TriggerHandler + action: CreateTriggerActionTypedDict + owner_type: TriggersOwnerType + title: str + r"""Human-readable title of the trigger""" + filters: NotRequired[Nullable[str]] + r"""jmespath expression to filter events, e.g. event_type == 'push' && repository.name == 'dashboard'""" + + +class CreateTrigger(BaseModel): + event_source_id: str + r"""ID of the event source that fires this trigger""" + + handler: TriggerHandler + + action: CreateTriggerAction + + owner_type: TriggersOwnerType + + title: str + r"""Human-readable title of the trigger""" + + filters: OptionalNullable[str] = UNSET + r"""jmespath expression to filter events, e.g. event_type == 'push' && repository.name == 'dashboard'""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["filters"]) + nullable_fields = set(["filters"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + 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/createtriggeraction.py b/src/mistralai/client/models/createtriggeraction.py new file mode 100644 index 000000000..357297ea9 --- /dev/null +++ b/src/mistralai/client/models/createtriggeraction.py @@ -0,0 +1,19 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .triggeractiontype import TriggerActionType +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class CreateTriggerActionTypedDict(TypedDict): + primitive_id: str + r"""ID of the target primitive (workflow, agent, or app)""" + type: TriggerActionType + + +class CreateTriggerAction(BaseModel): + primitive_id: str + r"""ID of the target primitive (workflow, agent, or app)""" + + type: TriggerActionType diff --git a/src/mistralai/client/models/createwebhook.py b/src/mistralai/client/models/createwebhook.py new file mode 100644 index 000000000..ef808bf9e --- /dev/null +++ b/src/mistralai/client/models/createwebhook.py @@ -0,0 +1,136 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .triggersownertype import TriggersOwnerType +from .webhookprovider import WebhookProvider +from .webhooksignatureencoding import WebhookSignatureEncoding +from .webhooksignaturehashalgorithm import WebhookSignatureHashAlgorithm +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class CreateWebhookTypedDict(TypedDict): + provider: WebhookProvider + name: str + r"""Human-readable name for this webhook""" + owner_type: NotRequired[TriggersOwnerType] + secret: NotRequired[Nullable[str]] + r"""Signing secret provided by the third-party provider""" + encryption_key: NotRequired[Nullable[str]] + r"""Encryption key used to decrypt webhook payloads""" + expires_at: NotRequired[Nullable[datetime]] + signature_hash_algorithm: NotRequired[Nullable[WebhookSignatureHashAlgorithm]] + signature_header_name: NotRequired[Nullable[str]] + validity_period_second: NotRequired[Nullable[int]] + signature_extractor_regex: NotRequired[Nullable[str]] + r"""Regex to extract signature, eg sha256=(.*)""" + timestamp_extractor_regex: NotRequired[Nullable[str]] + signature_payload_pattern: NotRequired[Nullable[str]] + r"""Pattern for signature payload, eg {body} or {timestamp}.{body}""" + signature_encoding: NotRequired[Nullable[WebhookSignatureEncoding]] + success_status_code: NotRequired[Nullable[int]] + event_type_path: NotRequired[Nullable[str]] + r"""Path to extract event type, eg body.type or headers.X-GitHub-Event""" + + +class CreateWebhook(BaseModel): + provider: WebhookProvider + + name: str + r"""Human-readable name for this webhook""" + + owner_type: Optional[TriggersOwnerType] = None + + secret: OptionalNullable[str] = UNSET + r"""Signing secret provided by the third-party provider""" + + encryption_key: OptionalNullable[str] = UNSET + r"""Encryption key used to decrypt webhook payloads""" + + expires_at: OptionalNullable[datetime] = UNSET + + signature_hash_algorithm: OptionalNullable[WebhookSignatureHashAlgorithm] = UNSET + + signature_header_name: OptionalNullable[str] = UNSET + + validity_period_second: OptionalNullable[int] = UNSET + + signature_extractor_regex: OptionalNullable[str] = UNSET + r"""Regex to extract signature, eg sha256=(.*)""" + + timestamp_extractor_regex: OptionalNullable[str] = UNSET + + signature_payload_pattern: OptionalNullable[str] = UNSET + r"""Pattern for signature payload, eg {body} or {timestamp}.{body}""" + + signature_encoding: OptionalNullable[WebhookSignatureEncoding] = UNSET + + success_status_code: OptionalNullable[int] = UNSET + + event_type_path: OptionalNullable[str] = UNSET + r"""Path to extract event type, eg body.type or headers.X-GitHub-Event""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "owner_type", + "secret", + "encryption_key", + "expires_at", + "signature_hash_algorithm", + "signature_header_name", + "validity_period_second", + "signature_extractor_regex", + "timestamp_extractor_regex", + "signature_payload_pattern", + "signature_encoding", + "success_status_code", + "event_type_path", + ] + ) + nullable_fields = set( + [ + "secret", + "encryption_key", + "expires_at", + "signature_hash_algorithm", + "signature_header_name", + "validity_period_second", + "signature_extractor_regex", + "timestamp_extractor_regex", + "signature_payload_pattern", + "signature_encoding", + "success_status_code", + "event_type_path", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + 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/delete_trigger_v1_triggers_trigger_id_deleteop.py b/src/mistralai/client/models/delete_trigger_v1_triggers_trigger_id_deleteop.py new file mode 100644 index 000000000..c3a033b0f --- /dev/null +++ b/src/mistralai/client/models/delete_trigger_v1_triggers_trigger_id_deleteop.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 mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class DeleteTriggerV1TriggersTriggerIDDeleteRequestTypedDict(TypedDict): + trigger_id: str + + +class DeleteTriggerV1TriggersTriggerIDDeleteRequest(BaseModel): + trigger_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/delete_webhook_v1_webhooks_webhook_id_deleteop.py b/src/mistralai/client/models/delete_webhook_v1_webhooks_webhook_id_deleteop.py new file mode 100644 index 000000000..be123a3f9 --- /dev/null +++ b/src/mistralai/client/models/delete_webhook_v1_webhooks_webhook_id_deleteop.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 mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class DeleteWebhookV1WebhooksWebhookIDDeleteRequestTypedDict(TypedDict): + webhook_id: str + + +class DeleteWebhookV1WebhooksWebhookIDDeleteRequest(BaseModel): + webhook_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/deploymentarchiveresponse.py b/src/mistralai/client/models/deploymentarchiveresponse.py new file mode 100644 index 000000000..e09759af8 --- /dev/null +++ b/src/mistralai/client/models/deploymentarchiveresponse.py @@ -0,0 +1,56 @@ +"""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, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class DeploymentArchiveResponseTypedDict(TypedDict): + r"""The archive a managed deployment builds from, with a signed URL to download it.""" + + archive_id: str + r"""Mistral Cloud archive the worker builds from""" + download_url: NotRequired[Nullable[str]] + r"""A signed URL to download the archive, which expires within 24 hours. Null once Mistral Cloud has deleted the archive.""" + + +class DeploymentArchiveResponse(BaseModel): + r"""The archive a managed deployment builds from, with a signed URL to download it.""" + + archive_id: str + r"""Mistral Cloud archive the worker builds from""" + + download_url: OptionalNullable[str] = UNSET + r"""A signed URL to download the archive, which expires within 24 hours. Null once Mistral Cloud has deleted the archive.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["download_url"]) + nullable_fields = set(["download_url"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + 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/deploymentworkerspecinput.py b/src/mistralai/client/models/deploymentworkerspecinput.py index 44ee3db68..cd6463363 100644 --- a/src/mistralai/client/models/deploymentworkerspecinput.py +++ b/src/mistralai/client/models/deploymentworkerspecinput.py @@ -13,28 +13,45 @@ UNSET_SENTINEL, ) from pydantic import model_serializer +from typing import List from typing_extensions import NotRequired, TypedDict class DeploymentWorkerSpecInputTypedDict(TypedDict): - github_url: str + github_url: NotRequired[Nullable[str]] + r"""GitHub repository to build the worker from. Set this or 'archive_id', not both.""" revision: NotRequired[Nullable[str]] + archive_id: NotRequired[Nullable[str]] + r"""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.""" backend_spec: NotRequired[Nullable[DeploymentMistralCloudBackendSpecTypedDict]] r"""Backend-specific configuration for the Mistral Cloud backend.""" + requested_roles: NotRequired[Nullable[List[str]]] + r"""Workspace roles, by name, that the deployment's service account holds beyond `workflow_executor`. Granted only if the deploying user holds them.""" class DeploymentWorkerSpecInput(BaseModel): - github_url: str + github_url: OptionalNullable[str] = UNSET + r"""GitHub repository to build the worker from. Set this or 'archive_id', not both.""" revision: OptionalNullable[str] = UNSET + archive_id: OptionalNullable[str] = UNSET + r"""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.""" + backend_spec: OptionalNullable[DeploymentMistralCloudBackendSpec] = UNSET r"""Backend-specific configuration for the Mistral Cloud backend.""" + requested_roles: OptionalNullable[List[str]] = UNSET + r"""Workspace roles, by name, that the deployment's service account holds beyond `workflow_executor`. Granted only if the deploying user holds them.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["revision", "backend_spec"]) - nullable_fields = set(["revision", "backend_spec"]) + optional_fields = set( + ["github_url", "revision", "archive_id", "backend_spec", "requested_roles"] + ) + nullable_fields = set( + ["github_url", "revision", "archive_id", "backend_spec", "requested_roles"] + ) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/deploymentworkerspecresponse.py b/src/mistralai/client/models/deploymentworkerspecresponse.py index 5b4453452..5eaf78443 100644 --- a/src/mistralai/client/models/deploymentworkerspecresponse.py +++ b/src/mistralai/client/models/deploymentworkerspecresponse.py @@ -21,7 +21,7 @@ from mistralai.client.utils.unions import parse_open_union from pydantic import ConfigDict, model_serializer from pydantic.functional_validators import BeforeValidator -from typing import Any, Literal, Optional, Union +from typing import Any, List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -73,16 +73,21 @@ class UnknownBackendSpec(BaseModel): class DeploymentWorkerSpecResponseTypedDict(TypedDict): github_url: str + r"""GitHub repository the worker builds from. Empty for a worker built from an archive.""" backend_spec: BackendSpecTypedDict r"""Backend-specific configuration. 'mistral_cloud' is Mistral Cloud; 'kubernetes' is a deployment that already runs on Kubernetes.""" type: NotRequired[str] revision: NotRequired[Nullable[str]] + archive_id: NotRequired[Nullable[str]] + r"""Archive the worker builds from, if any.""" restarted_at: NotRequired[Nullable[str]] commit: NotRequired[Nullable[GitCommitMetadataTypedDict]] + requested_roles: NotRequired[Nullable[List[str]]] class DeploymentWorkerSpecResponse(BaseModel): github_url: str + r"""GitHub repository the worker builds from. Empty for a worker built from an archive.""" backend_spec: BackendSpec r"""Backend-specific configuration. 'mistral_cloud' is Mistral Cloud; 'kubernetes' is a deployment that already runs on Kubernetes.""" @@ -91,14 +96,30 @@ class DeploymentWorkerSpecResponse(BaseModel): revision: OptionalNullable[str] = UNSET + archive_id: OptionalNullable[str] = UNSET + r"""Archive the worker builds from, if any.""" + restarted_at: OptionalNullable[str] = UNSET commit: OptionalNullable[GitCommitMetadata] = UNSET + requested_roles: OptionalNullable[List[str]] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["type", "revision", "restarted_at", "commit"]) - nullable_fields = set(["revision", "restarted_at", "commit"]) + optional_fields = set( + [ + "type", + "revision", + "archive_id", + "restarted_at", + "commit", + "requested_roles", + ] + ) + nullable_fields = set( + ["revision", "archive_id", "restarted_at", "commit", "requested_roles"] + ) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/get_deployment_archive_v1_workflows_deployments_name_archive_getop.py b/src/mistralai/client/models/get_deployment_archive_v1_workflows_deployments_name_archive_getop.py new file mode 100644 index 000000000..bd0efc99f --- /dev/null +++ b/src/mistralai/client/models/get_deployment_archive_v1_workflows_deployments_name_archive_getop.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetDeploymentArchiveV1WorkflowsDeploymentsNameArchiveGetRequestTypedDict( + TypedDict +): + name: str + + +class GetDeploymentArchiveV1WorkflowsDeploymentsNameArchiveGetRequest(BaseModel): + name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/get_trigger_v1_triggers_trigger_id_getop.py b/src/mistralai/client/models/get_trigger_v1_triggers_trigger_id_getop.py new file mode 100644 index 000000000..11deca7fc --- /dev/null +++ b/src/mistralai/client/models/get_trigger_v1_triggers_trigger_id_getop.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 mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetTriggerV1TriggersTriggerIDGetRequestTypedDict(TypedDict): + trigger_id: str + + +class GetTriggerV1TriggersTriggerIDGetRequest(BaseModel): + trigger_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/get_webhook_signing_secret_v1_webhooks_webhook_id_signing_secret_getop.py b/src/mistralai/client/models/get_webhook_signing_secret_v1_webhooks_webhook_id_signing_secret_getop.py new file mode 100644 index 000000000..e9585702d --- /dev/null +++ b/src/mistralai/client/models/get_webhook_signing_secret_v1_webhooks_webhook_id_signing_secret_getop.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetWebhookSigningSecretV1WebhooksWebhookIDSigningSecretGetRequestTypedDict( + TypedDict +): + webhook_id: str + + +class GetWebhookSigningSecretV1WebhooksWebhookIDSigningSecretGetRequest(BaseModel): + webhook_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/get_webhook_v1_webhooks_webhook_id_getop.py b/src/mistralai/client/models/get_webhook_v1_webhooks_webhook_id_getop.py new file mode 100644 index 000000000..a9363c578 --- /dev/null +++ b/src/mistralai/client/models/get_webhook_v1_webhooks_webhook_id_getop.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 mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetWebhookV1WebhooksWebhookIDGetRequestTypedDict(TypedDict): + webhook_id: str + + +class GetWebhookV1WebhooksWebhookIDGetRequest(BaseModel): + webhook_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/getlog.py b/src/mistralai/client/models/getlog.py index c38d89acc..159e0ad3e 100644 --- a/src/mistralai/client/models/getlog.py +++ b/src/mistralai/client/models/getlog.py @@ -2,9 +2,10 @@ from __future__ import annotations from datetime import datetime -from mistralai.client.types import BaseModel -from typing import Dict -from typing_extensions import TypedDict +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Dict, Optional +from typing_extensions import NotRequired, TypedDict class GetLogTypedDict(TypedDict): @@ -28,6 +29,7 @@ class GetLogTypedDict(TypedDict): scope_version: str scope_attributes: Dict[str, str] log_attributes: Dict[str, str] + service_account_id: NotRequired[str] class GetLog(BaseModel): @@ -70,3 +72,21 @@ class GetLog(BaseModel): scope_attributes: Dict[str, str] log_attributes: Dict[str, str] + + service_account_id: Optional[str] = "" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["service_account_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + 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/getspan.py b/src/mistralai/client/models/getspan.py index a7d4330e9..cac1d3401 100644 --- a/src/mistralai/client/models/getspan.py +++ b/src/mistralai/client/models/getspan.py @@ -4,8 +4,8 @@ from datetime import datetime from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL, UnrecognizedStr from pydantic import model_serializer -from typing import Dict, List, Literal, Union -from typing_extensions import TypedDict +from typing import Dict, List, Literal, Optional, Union +from typing_extensions import NotRequired, TypedDict GetSpanStatusCode = Union[ @@ -78,6 +78,7 @@ class GetSpanTypedDict(TypedDict): span_attributes: Dict[str, str] scope_name: str scope_version: str + service_account_id: NotRequired[str] class GetSpan(BaseModel): @@ -199,16 +200,37 @@ class GetSpan(BaseModel): scope_version: str + service_account_id: Optional[str] = "" + @model_serializer(mode="wrap") def serialize_model(self, handler): + optional_fields = set(["service_account_id"]) + nullable_fields = set( + [ + "request_temperature", + "request_top_p", + "request_top_k", + "request_presence_penalty", + "request_frequency_penalty", + ] + ) serialized = handler(self) m = {} for n, f in type(self).model_fields.items(): k = f.alias or n 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: - m[k] = val + 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/getspanevaluation.py b/src/mistralai/client/models/getspanevaluation.py index 0cd5baaf9..33b913aa4 100644 --- a/src/mistralai/client/models/getspanevaluation.py +++ b/src/mistralai/client/models/getspanevaluation.py @@ -2,9 +2,10 @@ from __future__ import annotations from datetime import datetime -from mistralai.client.types import BaseModel -from typing import Dict -from typing_extensions import TypedDict +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Dict, Optional +from typing_extensions import NotRequired, TypedDict class GetSpanEvaluationTypedDict(TypedDict): @@ -22,6 +23,7 @@ class GetSpanEvaluationTypedDict(TypedDict): score_label: str explanation: str metadata: Dict[str, str] + service_account_id: NotRequired[str] class GetSpanEvaluation(BaseModel): @@ -52,3 +54,21 @@ class GetSpanEvaluation(BaseModel): explanation: str metadata: Dict[str, str] + + service_account_id: Optional[str] = "" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["service_account_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + 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/gettrace.py b/src/mistralai/client/models/gettrace.py index a39240122..a9102b2d3 100644 --- a/src/mistralai/client/models/gettrace.py +++ b/src/mistralai/client/models/gettrace.py @@ -2,9 +2,10 @@ from __future__ import annotations from datetime import datetime -from mistralai.client.types import BaseModel, UnrecognizedStr -from typing import List, Literal, Union -from typing_extensions import TypedDict +from mistralai.client.types import BaseModel, UNSET_SENTINEL, UnrecognizedStr +from pydantic import model_serializer +from typing import List, Literal, Optional, Union +from typing_extensions import NotRequired, TypedDict GetTraceStatusCode = Union[ @@ -51,6 +52,7 @@ class GetTraceTypedDict(TypedDict): first_turn_last_output_message: str last_turn_last_input_message: str last_turn_last_output_message: str + service_account_id: NotRequired[str] class GetTrace(BaseModel): @@ -121,3 +123,21 @@ class GetTrace(BaseModel): last_turn_last_input_message: str last_turn_last_output_message: str + + service_account_id: Optional[str] = "" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["service_account_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + 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/httpconnector.py b/src/mistralai/client/models/httpconnector.py index 1d0d39148..7a8047530 100644 --- a/src/mistralai/client/models/httpconnector.py +++ b/src/mistralai/client/models/httpconnector.py @@ -7,6 +7,7 @@ ) from .connectionpreference import ConnectionPreference, ConnectionPreferenceTypedDict from .connectorlocale import ConnectorLocale, ConnectorLocaleTypedDict +from .connectoropenapispec import ConnectorOpenAPISpec, ConnectorOpenAPISpecTypedDict from .connectortool import ConnectorTool, ConnectorToolTypedDict from .consumertype import ConsumerType from .mcpservercard import MCPServerCard, MCPServerCardTypedDict @@ -62,6 +63,8 @@ class HTTPConnectorTypedDict(TypedDict): is_authenticated: NotRequired[Nullable[bool]] tools: NotRequired[Nullable[List[ConnectorToolTypedDict]]] protocol: Literal["http"] + openapi_spec: NotRequired[Nullable[ConnectorOpenAPISpecTypedDict]] + r"""The OpenAPI spec the connector tools are converted from. Null when it has none.""" class HTTPConnector(BaseModel): @@ -119,6 +122,9 @@ class HTTPConnector(BaseModel): pydantic.Field(alias="protocol"), ] = "http" + openapi_spec: OptionalNullable[ConnectorOpenAPISpec] = UNSET + r"""The OpenAPI spec the connector tools are converted from. Null when it has none.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -138,6 +144,7 @@ def serialize_model(self, handler): "mistral", "is_authenticated", "tools", + "openapi_spec", ] ) nullable_fields = set( @@ -155,6 +162,7 @@ def serialize_model(self, handler): "connection_credentials", "is_authenticated", "tools", + "openapi_spec", ] ) serialized = handler(self) diff --git a/src/mistralai/client/models/list_trigger_events_v1_triggers_trigger_id_events_getop.py b/src/mistralai/client/models/list_trigger_events_v1_triggers_trigger_id_events_getop.py new file mode 100644 index 000000000..ff9b27459 --- /dev/null +++ b/src/mistralai/client/models/list_trigger_events_v1_triggers_trigger_id_events_getop.py @@ -0,0 +1,42 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ListTriggerEventsV1TriggersTriggerIDEventsGetRequestTypedDict(TypedDict): + trigger_id: str + limit: NotRequired[int] + r"""Maximum number of events to return""" + + +class ListTriggerEventsV1TriggersTriggerIDEventsGetRequest(BaseModel): + trigger_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + limit: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 10 + r"""Maximum number of events to return""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["limit"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + 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/list_triggers_v1_triggers_getop.py b/src/mistralai/client/models/list_triggers_v1_triggers_getop.py new file mode 100644 index 000000000..e2bbf7d74 --- /dev/null +++ b/src/mistralai/client/models/list_triggers_v1_triggers_getop.py @@ -0,0 +1,68 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .triggerhandler import TriggerHandler +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ListTriggersV1TriggersGetRequestTypedDict(TypedDict): + handler: NotRequired[Nullable[TriggerHandler]] + r"""Filter by handler type""" + primitive_id: NotRequired[Nullable[str]] + r"""Filter by primitive ID (workflow, agent, or app)""" + event_source_id: NotRequired[Nullable[str]] + r"""Filter by event source ID (webhook id)""" + + +class ListTriggersV1TriggersGetRequest(BaseModel): + handler: Annotated[ + OptionalNullable[TriggerHandler], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Filter by handler type""" + + primitive_id: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Filter by primitive ID (workflow, agent, or app)""" + + event_source_id: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Filter by event source ID (webhook id)""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["handler", "primitive_id", "event_source_id"]) + nullable_fields = set(["handler", "primitive_id", "event_source_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + 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/openapifilesource.py b/src/mistralai/client/models/openapifilesource.py new file mode 100644 index 000000000..0226a6650 --- /dev/null +++ b/src/mistralai/client/models/openapifilesource.py @@ -0,0 +1,31 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, TypedDict + + +class OpenAPIFileSourceTypedDict(TypedDict): + filename: str + r"""The name of the uploaded file.""" + type: Literal["file"] + + +class OpenAPIFileSource(BaseModel): + filename: str + r"""The name of the uploaded file.""" + + type: Annotated[ + Annotated[Literal["file"], AfterValidator(validate_const("file"))], + pydantic.Field(alias="type"), + ] = "file" + + +try: + OpenAPIFileSource.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/openapispecsource.py b/src/mistralai/client/models/openapispecsource.py new file mode 100644 index 000000000..d1548f197 --- /dev/null +++ b/src/mistralai/client/models/openapispecsource.py @@ -0,0 +1,48 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .openapifilesource import OpenAPIFileSource, OpenAPIFileSourceTypedDict +from .openapiurlsource import OpenAPIURLSource, OpenAPIURLSourceTypedDict +from functools import partial +from mistralai.client.types import BaseModel +from mistralai.client.utils.unions import parse_open_union +from pydantic import ConfigDict +from pydantic.functional_validators import BeforeValidator +from typing import Any, Literal, Union +from typing_extensions import Annotated, TypeAliasType + + +OpenAPISpecSourceTypedDict = TypeAliasType( + "OpenAPISpecSourceTypedDict", + Union[OpenAPIURLSourceTypedDict, OpenAPIFileSourceTypedDict], +) + + +class UnknownOpenAPISpecSource(BaseModel): + r"""A OpenAPISpecSource variant the SDK doesn't recognize. Preserves the raw payload.""" + + type: Literal["UNKNOWN"] = "UNKNOWN" + raw: Any + is_unknown: Literal[True] = True + + model_config = ConfigDict(frozen=True) + + +_OPEN_API_SPEC_SOURCE_VARIANTS: dict[str, Any] = { + "file": OpenAPIFileSource, + "url": OpenAPIURLSource, +} + + +OpenAPISpecSource = Annotated[ + Union[OpenAPIFileSource, OpenAPIURLSource, UnknownOpenAPISpecSource], + BeforeValidator( + partial( + parse_open_union, + disc_key="type", + variants=_OPEN_API_SPEC_SOURCE_VARIANTS, + unknown_cls=UnknownOpenAPISpecSource, + union_name="OpenAPISpecSource", + ) + ), +] diff --git a/src/mistralai/client/models/openapiurlsource.py b/src/mistralai/client/models/openapiurlsource.py new file mode 100644 index 000000000..0827e753f --- /dev/null +++ b/src/mistralai/client/models/openapiurlsource.py @@ -0,0 +1,31 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, TypedDict + + +class OpenAPIURLSourceTypedDict(TypedDict): + url: str + r"""The URL the spec was downloaded from, without its userinfo, query string and fragment.""" + type: Literal["url"] + + +class OpenAPIURLSource(BaseModel): + url: str + r"""The URL the spec was downloaded from, without its userinfo, query string and fragment.""" + + type: Annotated[ + Annotated[Literal["url"], AfterValidator(validate_const("url"))], + pydantic.Field(alias="type"), + ] = "url" + + +try: + OpenAPIURLSource.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/skills_listop.py b/src/mistralai/client/models/skills_listop.py index 56f9ba336..f425ee5fc 100644 --- a/src/mistralai/client/models/skills_listop.py +++ b/src/mistralai/client/models/skills_listop.py @@ -17,6 +17,7 @@ class SkillsListRequestTypedDict(TypedDict): page_token: NotRequired[str] alias: NotRequired[str] fields: NotRequired[List[str]] + r"""Projection over each listed Skill. definition.description is the only definition path a list accepts; body and assets are read one skill at a time with GetSkill.""" sort_field: NotRequired[ListSortField] r"""Defaults to created_at when omitted.""" sort_direction_query_parameter: NotRequired[ListSortDirection] @@ -49,6 +50,7 @@ class SkillsListRequest(BaseModel): Optional[List[str]], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = None + r"""Projection over each listed Skill. definition.description is the only definition path a list accepts; body and assets are read one skill at a time with GetSkill.""" sort_field: Annotated[ Optional[ListSortField], diff --git a/src/mistralai/client/models/systemv2.py b/src/mistralai/client/models/systemv2.py index 651a6562d..4f8ea848c 100644 --- a/src/mistralai/client/models/systemv2.py +++ b/src/mistralai/client/models/systemv2.py @@ -2,10 +2,16 @@ from __future__ import annotations from datetime import datetime -from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) from pydantic import model_serializer -from typing import Dict, Union -from typing_extensions import TypeAliasType, TypedDict +from typing import Any, Dict, Optional, Union +from typing_extensions import NotRequired, TypeAliasType, TypedDict ParamsTypedDict = TypeAliasType("ParamsTypedDict", Union[str, int, float, bool]) @@ -21,6 +27,8 @@ class SystemV2TypedDict(TypedDict): deleted_at: Nullable[datetime] name: str params: Dict[str, ParamsTypedDict] + kind: NotRequired[str] + spec: NotRequired[Nullable[Dict[str, Any]]] class SystemV2(BaseModel): @@ -36,16 +44,31 @@ class SystemV2(BaseModel): params: Dict[str, Params] + kind: Optional[str] = "custom" + + spec: OptionalNullable[Dict[str, Any]] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): + optional_fields = set(["kind", "spec"]) + nullable_fields = set(["deleted_at", "spec"]) serialized = handler(self) m = {} for n, f in type(self).model_fields.items(): k = f.alias or n 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: - m[k] = val + 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/trigger.py b/src/mistralai/client/models/trigger.py new file mode 100644 index 000000000..1ea6bccf2 --- /dev/null +++ b/src/mistralai/client/models/trigger.py @@ -0,0 +1,62 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .triggeraction import TriggerAction, TriggerActionTypedDict +from .triggerhandler import TriggerHandler +from .triggersownertype import TriggersOwnerType +from .webhook import Webhook, WebhookTypedDict +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing_extensions import TypedDict + + +class TriggerTypedDict(TypedDict): + id: str + creator_id: str + workspace_id: str + organization_id: str + customer_id: str + owner_type: TriggersOwnerType + event_source: WebhookTypedDict + handler: TriggerHandler + action: TriggerActionTypedDict + filters: Nullable[str] + title: str + + +class Trigger(BaseModel): + id: str + + creator_id: str + + workspace_id: str + + organization_id: str + + customer_id: str + + owner_type: TriggersOwnerType + + event_source: Webhook + + handler: TriggerHandler + + action: TriggerAction + + filters: Nullable[str] + + title: str + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/triggeraction.py b/src/mistralai/client/models/triggeraction.py new file mode 100644 index 000000000..6eb1ed007 --- /dev/null +++ b/src/mistralai/client/models/triggeraction.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .triggeractiontype import TriggerActionType +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class TriggerActionTypedDict(TypedDict): + primitive_id: str + type: TriggerActionType + + +class TriggerAction(BaseModel): + primitive_id: str + + type: TriggerActionType diff --git a/src/mistralai/client/models/triggeractiontype.py b/src/mistralai/client/models/triggeractiontype.py new file mode 100644 index 000000000..419717e16 --- /dev/null +++ b/src/mistralai/client/models/triggeractiontype.py @@ -0,0 +1,16 @@ +"""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 + + +TriggerActionType = Union[ + Literal[ + "start_workflow", + "build_app", + "deploy_app", + "start_agent_session", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/triggerevent.py b/src/mistralai/client/models/triggerevent.py new file mode 100644 index 000000000..03c043a3c --- /dev/null +++ b/src/mistralai/client/models/triggerevent.py @@ -0,0 +1,54 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .triggerstatusvalue import TriggerStatusValue +from datetime import datetime +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing_extensions import TypedDict + + +class TriggerEventTypedDict(TypedDict): + event_id: str + trigger_id: str + source_id: str + status: TriggerStatusValue + received_at: datetime + submitted_at: Nullable[datetime] + triggered_at: Nullable[datetime] + detail: Nullable[str] + url: Nullable[str] + + +class TriggerEvent(BaseModel): + event_id: str + + trigger_id: str + + source_id: str + + status: TriggerStatusValue + + received_at: datetime + + submitted_at: Nullable[datetime] + + triggered_at: Nullable[datetime] + + detail: Nullable[str] + + url: Nullable[str] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/triggereventlist.py b/src/mistralai/client/models/triggereventlist.py new file mode 100644 index 000000000..fa51bbcec --- /dev/null +++ b/src/mistralai/client/models/triggereventlist.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .triggerevent import TriggerEvent, TriggerEventTypedDict +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class TriggerEventListTypedDict(TypedDict): + data: List[TriggerEventTypedDict] + + +class TriggerEventList(BaseModel): + data: List[TriggerEvent] diff --git a/src/mistralai/client/models/triggerhandler.py b/src/mistralai/client/models/triggerhandler.py new file mode 100644 index 000000000..ddd1adde1 --- /dev/null +++ b/src/mistralai/client/models/triggerhandler.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 + + +TriggerHandler = Union[ + Literal[ + "workflows", + "agents", + "spaces", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/triggersownertype.py b/src/mistralai/client/models/triggersownertype.py new file mode 100644 index 000000000..e8d4637dc --- /dev/null +++ b/src/mistralai/client/models/triggersownertype.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 + + +TriggersOwnerType = Union[ + Literal[ + "workspace", + "user", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/triggerstatusvalue.py b/src/mistralai/client/models/triggerstatusvalue.py new file mode 100644 index 000000000..2489dffd0 --- /dev/null +++ b/src/mistralai/client/models/triggerstatusvalue.py @@ -0,0 +1,16 @@ +"""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 + + +TriggerStatusValue = Union[ + Literal[ + "SUBMITTED", + "SUBMISSION_FAILED", + "TRIGGERED", + "TRIGGER_FAILED", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/voicecreaterequest.py b/src/mistralai/client/models/voicecreaterequest.py index 9cc46db7c..114d702fc 100644 --- a/src/mistralai/client/models/voicecreaterequest.py +++ b/src/mistralai/client/models/voicecreaterequest.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .voicegender import VoiceGender from mistralai.client.types import ( BaseModel, Nullable, @@ -17,9 +18,8 @@ class VoiceCreateRequestTypedDict(TypedDict): r"""Request model for creating a new voice with base64 audio.""" name: str - slug: NotRequired[Nullable[str]] languages: NotRequired[List[str]] - gender: NotRequired[Nullable[str]] + gender: NotRequired[Nullable[VoiceGender]] age: NotRequired[Nullable[int]] tags: NotRequired[Nullable[List[str]]] color: NotRequired[Nullable[str]] @@ -36,11 +36,9 @@ class VoiceCreateRequest(BaseModel): name: str - slug: OptionalNullable[str] = UNSET - languages: Optional[List[str]] = None - gender: OptionalNullable[str] = UNSET + gender: OptionalNullable[VoiceGender] = UNSET age: OptionalNullable[int] = UNSET @@ -62,7 +60,6 @@ class VoiceCreateRequest(BaseModel): def serialize_model(self, handler): optional_fields = set( [ - "slug", "languages", "gender", "age", @@ -76,7 +73,6 @@ def serialize_model(self, handler): ) nullable_fields = set( [ - "slug", "gender", "age", "tags", diff --git a/src/mistralai/client/models/voiceupdaterequest.py b/src/mistralai/client/models/voiceupdaterequest.py index 184e27ecc..40a7cfe8b 100644 --- a/src/mistralai/client/models/voiceupdaterequest.py +++ b/src/mistralai/client/models/voiceupdaterequest.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .voicegender import VoiceGender from mistralai.client.types import ( BaseModel, Nullable, @@ -18,7 +19,7 @@ class VoiceUpdateRequestTypedDict(TypedDict): name: NotRequired[Nullable[str]] languages: NotRequired[Nullable[List[str]]] - gender: NotRequired[Nullable[str]] + gender: NotRequired[Nullable[VoiceGender]] age: NotRequired[Nullable[int]] tags: NotRequired[Nullable[List[str]]] description: NotRequired[Nullable[str]] @@ -32,7 +33,7 @@ class VoiceUpdateRequest(BaseModel): languages: OptionalNullable[List[str]] = UNSET - gender: OptionalNullable[str] = UNSET + gender: OptionalNullable[VoiceGender] = UNSET age: OptionalNullable[int] = UNSET diff --git a/src/mistralai/client/models/webhook.py b/src/mistralai/client/models/webhook.py new file mode 100644 index 000000000..8ca1139cd --- /dev/null +++ b/src/mistralai/client/models/webhook.py @@ -0,0 +1,96 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .triggersownertype import TriggersOwnerType +from .webhookprovider import WebhookProvider +from .webhooksignatureencoding import WebhookSignatureEncoding +from .webhooksignaturehashalgorithm import WebhookSignatureHashAlgorithm +from datetime import datetime +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing_extensions import TypedDict + + +class WebhookTypedDict(TypedDict): + id: str + creator_id: str + organization_id: str + workspace_id: str + owner_type: TriggersOwnerType + provider: WebhookProvider + name: str + url: str + http_method: str + url_verified: Nullable[bool] + signature_hash_algorithm: Nullable[WebhookSignatureHashAlgorithm] + signature_header_name: Nullable[str] + validity_period_second: Nullable[int] + signature_extractor_regex: Nullable[str] + timestamp_extractor_regex: Nullable[str] + signature_payload_pattern: Nullable[str] + signature_encoding: Nullable[WebhookSignatureEncoding] + success_status_code: Nullable[int] + event_type_path: Nullable[str] + expires_at: Nullable[datetime] + created_at: datetime + updated_at: datetime + + +class Webhook(BaseModel): + id: str + + creator_id: str + + organization_id: str + + workspace_id: str + + owner_type: TriggersOwnerType + + provider: WebhookProvider + + name: str + + url: str + + http_method: str + + url_verified: Nullable[bool] + + signature_hash_algorithm: Nullable[WebhookSignatureHashAlgorithm] + + signature_header_name: Nullable[str] + + validity_period_second: Nullable[int] + + signature_extractor_regex: Nullable[str] + + timestamp_extractor_regex: Nullable[str] + + signature_payload_pattern: Nullable[str] + + signature_encoding: Nullable[WebhookSignatureEncoding] + + success_status_code: Nullable[int] + + event_type_path: Nullable[str] + + expires_at: Nullable[datetime] + + created_at: datetime + + updated_at: datetime + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/webhookprovider.py b/src/mistralai/client/models/webhookprovider.py new file mode 100644 index 000000000..f839a49cb --- /dev/null +++ b/src/mistralai/client/models/webhookprovider.py @@ -0,0 +1,20 @@ +"""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 + + +WebhookProvider = Union[ + Literal[ + "slack", + "github", + "notion", + "lucca", + "linear", + "microsoft", + "ashby", + "custom", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/webhooksignatureencoding.py b/src/mistralai/client/models/webhooksignatureencoding.py new file mode 100644 index 000000000..2ed21b858 --- /dev/null +++ b/src/mistralai/client/models/webhooksignatureencoding.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 + + +WebhookSignatureEncoding = Union[ + Literal[ + "hex", + "base64", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/webhooksignaturehashalgorithm.py b/src/mistralai/client/models/webhooksignaturehashalgorithm.py new file mode 100644 index 000000000..1a851a96d --- /dev/null +++ b/src/mistralai/client/models/webhooksignaturehashalgorithm.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 + + +WebhookSignatureHashAlgorithm = Union[ + Literal[ + "sha256", + "sha1", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/webhooksigningsecret.py b/src/mistralai/client/models/webhooksigningsecret.py new file mode 100644 index 000000000..90db7f69e --- /dev/null +++ b/src/mistralai/client/models/webhooksigningsecret.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 WebhookSigningSecretTypedDict(TypedDict): + r"""Signing secret for a Notion webhook, returned to complete URL verification""" + + signing_secret: str + + +class WebhookSigningSecret(BaseModel): + r"""Signing secret for a Notion webhook, returned to complete URL verification""" + + signing_secret: str diff --git a/src/mistralai/client/models/workflowsworkerspecupdate.py b/src/mistralai/client/models/workflowsworkerspecupdate.py index 95df520bc..f4be31fb3 100644 --- a/src/mistralai/client/models/workflowsworkerspecupdate.py +++ b/src/mistralai/client/models/workflowsworkerspecupdate.py @@ -13,14 +13,19 @@ UNSET_SENTINEL, ) from pydantic import model_serializer +from typing import List from typing_extensions import NotRequired, TypedDict class WorkflowsWorkerSpecUpdateTypedDict(TypedDict): github_url: NotRequired[Nullable[str]] revision: NotRequired[Nullable[str]] + archive_id: NotRequired[Nullable[str]] + r"""Rebuild the worker from this archive, dropping 'github_url' and 'revision'. Sending 'github_url' instead moves it back to a repository.""" backend_spec: NotRequired[Nullable[DeploymentMistralCloudBackendSpecTypedDict]] r"""Backend-specific configuration for the Mistral Cloud backend.""" + requested_roles: NotRequired[Nullable[List[str]]] + r"""The complete workspace-role set after the update, beyond `workflow_executor`. Replaces the current roles; omit it to leave them unchanged, send an empty list to drop all extras. Granted only if the deploying user holds them.""" class WorkflowsWorkerSpecUpdate(BaseModel): @@ -28,13 +33,23 @@ class WorkflowsWorkerSpecUpdate(BaseModel): revision: OptionalNullable[str] = UNSET + archive_id: OptionalNullable[str] = UNSET + r"""Rebuild the worker from this archive, dropping 'github_url' and 'revision'. Sending 'github_url' instead moves it back to a repository.""" + backend_spec: OptionalNullable[DeploymentMistralCloudBackendSpec] = UNSET r"""Backend-specific configuration for the Mistral Cloud backend.""" + requested_roles: OptionalNullable[List[str]] = UNSET + r"""The complete workspace-role set after the update, beyond `workflow_executor`. Replaces the current roles; omit it to leave them unchanged, send an empty list to drop all extras. Granted only if the deploying user holds them.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["github_url", "revision", "backend_spec"]) - nullable_fields = set(["github_url", "revision", "backend_spec"]) + optional_fields = set( + ["github_url", "revision", "archive_id", "backend_spec", "requested_roles"] + ) + nullable_fields = set( + ["github_url", "revision", "archive_id", "backend_spec", "requested_roles"] + ) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/workflowtagsaddrequest.py b/src/mistralai/client/models/workflowtagsaddrequest.py new file mode 100644 index 000000000..918086fa5 --- /dev/null +++ b/src/mistralai/client/models/workflowtagsaddrequest.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 import List +from typing_extensions import TypedDict + + +class WorkflowTagsAddRequestTypedDict(TypedDict): + tags: List[str] + r"""Tags to add to the workflow. Existing tags are kept.""" + + +class WorkflowTagsAddRequest(BaseModel): + tags: List[str] + r"""Tags to add to the workflow. Existing tags are kept.""" diff --git a/src/mistralai/client/rag.py b/src/mistralai/client/rag.py index eb3346f17..6381adae8 100644 --- a/src/mistralai/client/rag.py +++ b/src/mistralai/client/rag.py @@ -5,15 +5,13 @@ from mistralai.client.ingestion_pipeline_configurations import ( IngestionPipelineConfigurations, ) -from mistralai.client.managed_indexes import ManagedIndexes -from mistralai.client.search_indexes import SearchIndexes +from mistralai.client.rag_search_indexes import RagSearchIndexes from typing import Optional class Rag(BaseSDK): ingestion_pipeline_configurations: IngestionPipelineConfigurations - search_indexes: SearchIndexes - managed_indexes: ManagedIndexes + search_indexes: RagSearchIndexes def __init__( self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None @@ -26,9 +24,6 @@ def _init_sdks(self): self.ingestion_pipeline_configurations = IngestionPipelineConfigurations( self.sdk_configuration, parent_ref=self.parent_ref ) - self.search_indexes = SearchIndexes( - self.sdk_configuration, parent_ref=self.parent_ref - ) - self.managed_indexes = ManagedIndexes( + self.search_indexes = RagSearchIndexes( self.sdk_configuration, parent_ref=self.parent_ref ) diff --git a/src/mistralai/client/search_indexes.py b/src/mistralai/client/rag_search_indexes.py similarity index 99% rename from src/mistralai/client/search_indexes.py rename to src/mistralai/client/rag_search_indexes.py index 678d56b57..513d7c2c8 100644 --- a/src/mistralai/client/search_indexes.py +++ b/src/mistralai/client/rag_search_indexes.py @@ -9,7 +9,7 @@ from typing import Any, Mapping, Optional, Union -class SearchIndexes(BaseSDK): +class RagSearchIndexes(BaseSDK): def get_deployment_summaries( self, *, diff --git a/src/mistralai/client/skills.py b/src/mistralai/client/skills.py index 8765d9bef..7300aeea1 100644 --- a/src/mistralai/client/skills.py +++ b/src/mistralai/client/skills.py @@ -32,7 +32,7 @@ def list( :param page_size: :param page_token: :param alias: - :param fields: + :param fields: Projection over each listed Skill. definition.description is the only definition path a list accepts; body and assets are read one skill at a time with GetSkill. :param sort_field: Defaults to created_at when omitted. :param sort_direction_query_parameter: Defaults to descending for timestamp fields and ascending for text fields. :param sort_by: REST-friendly alias for sort.field. Supported values: created_at, last_modified_at, name, title. @@ -176,7 +176,7 @@ async def list_async( :param page_size: :param page_token: :param alias: - :param fields: + :param fields: Projection over each listed Skill. definition.description is the only definition path a list accepts; body and assets are read one skill at a time with GetSkill. :param sort_field: Defaults to created_at when omitted. :param sort_direction_query_parameter: Defaults to descending for timestamp fields and ascending for text fields. :param sort_by: REST-friendly alias for sort.field. Supported values: created_at, last_modified_at, name, title. diff --git a/src/mistralai/client/triggers.py b/src/mistralai/client/triggers.py new file mode 100644 index 000000000..f6ca62658 --- /dev/null +++ b/src/mistralai/client/triggers.py @@ -0,0 +1,995 @@ +"""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 Any, List, Mapping, Optional, Union + + +class Triggers(BaseSDK): + def create( + self, + *, + event_source_id: str, + handler: models.TriggerHandler, + action: Union[models.CreateTriggerAction, models.CreateTriggerActionTypedDict], + owner_type: models.TriggersOwnerType, + title: str, + filters: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Trigger: + r"""Create Trigger + + :param event_source_id: ID of the event source that fires this trigger + :param handler: + :param action: + :param owner_type: + :param title: Human-readable title of the trigger + :param filters: jmespath expression to filter events, e.g. event_type == 'push' && repository.name == 'dashboard' + :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.CreateTrigger( + event_source_id=event_source_id, + handler=handler, + action=utils.get_pydantic_model(action, models.CreateTriggerAction), + filters=filters, + owner_type=owner_type, + title=title, + ) + + req = self._build_request( + method="POST", + path="/v1/triggers", + 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.CreateTrigger + ), + 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="create_trigger_v1_triggers_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["beta.triggers"], + 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, "201", "application/json"): + return unmarshal_json_response(models.Trigger, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(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 create_async( + self, + *, + event_source_id: str, + handler: models.TriggerHandler, + action: Union[models.CreateTriggerAction, models.CreateTriggerActionTypedDict], + owner_type: models.TriggersOwnerType, + title: str, + filters: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Trigger: + r"""Create Trigger + + :param event_source_id: ID of the event source that fires this trigger + :param handler: + :param action: + :param owner_type: + :param title: Human-readable title of the trigger + :param filters: jmespath expression to filter events, e.g. event_type == 'push' && repository.name == 'dashboard' + :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.CreateTrigger( + event_source_id=event_source_id, + handler=handler, + action=utils.get_pydantic_model(action, models.CreateTriggerAction), + filters=filters, + owner_type=owner_type, + title=title, + ) + + req = self._build_request_async( + method="POST", + path="/v1/triggers", + 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.CreateTrigger + ), + 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="create_trigger_v1_triggers_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["beta.triggers"], + 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, "201", "application/json"): + return unmarshal_json_response(models.Trigger, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(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 list( + self, + *, + handler: OptionalNullable[models.TriggerHandler] = UNSET, + primitive_id: OptionalNullable[str] = UNSET, + event_source_id: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.Trigger]: + r"""List Triggers + + :param handler: Filter by handler type + :param primitive_id: Filter by primitive ID (workflow, agent, or app) + :param event_source_id: Filter by event source ID (webhook id) + :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.ListTriggersV1TriggersGetRequest( + handler=handler, + primitive_id=primitive_id, + event_source_id=event_source_id, + ) + + req = self._build_request( + method="GET", + path="/v1/triggers", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + 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, + 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="list_triggers_v1_triggers_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["beta.triggers"], + 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(List[models.Trigger], http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(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 list_async( + self, + *, + handler: OptionalNullable[models.TriggerHandler] = UNSET, + primitive_id: OptionalNullable[str] = UNSET, + event_source_id: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.Trigger]: + r"""List Triggers + + :param handler: Filter by handler type + :param primitive_id: Filter by primitive ID (workflow, agent, or app) + :param event_source_id: Filter by event source ID (webhook id) + :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.ListTriggersV1TriggersGetRequest( + handler=handler, + primitive_id=primitive_id, + event_source_id=event_source_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/triggers", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + 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, + 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="list_triggers_v1_triggers_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["beta.triggers"], + 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(List[models.Trigger], http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(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 get( + self, + *, + trigger_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Trigger: + r"""Get Trigger + + :param trigger_id: + :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.GetTriggerV1TriggersTriggerIDGetRequest( + trigger_id=trigger_id, + ) + + req = self._build_request( + method="GET", + path="/v1/triggers/{trigger_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + 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, + 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="get_trigger_v1_triggers__trigger_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["beta.triggers"], + 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.Trigger, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(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 get_async( + self, + *, + trigger_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Trigger: + r"""Get Trigger + + :param trigger_id: + :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.GetTriggerV1TriggersTriggerIDGetRequest( + trigger_id=trigger_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/triggers/{trigger_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + 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, + 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="get_trigger_v1_triggers__trigger_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["beta.triggers"], + 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.Trigger, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(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 delete( + self, + *, + trigger_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Delete Trigger + + :param trigger_id: + :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.DeleteTriggerV1TriggersTriggerIDDeleteRequest( + trigger_id=trigger_id, + ) + + req = self._build_request( + method="DELETE", + path="/v1/triggers/{trigger_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + 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, + 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="delete_trigger_v1_triggers__trigger_id__delete", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["beta.triggers"], + 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, "204", "*"): + return + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(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 delete_async( + self, + *, + trigger_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Delete Trigger + + :param trigger_id: + :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.DeleteTriggerV1TriggersTriggerIDDeleteRequest( + trigger_id=trigger_id, + ) + + req = self._build_request_async( + method="DELETE", + path="/v1/triggers/{trigger_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + 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, + 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="delete_trigger_v1_triggers__trigger_id__delete", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["beta.triggers"], + 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, "204", "*"): + return + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(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 list_events( + self, + *, + trigger_id: str, + limit: Optional[int] = 10, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.TriggerEventList: + r"""List Trigger Events + + :param trigger_id: + :param limit: Maximum number of events to return + :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.ListTriggerEventsV1TriggersTriggerIDEventsGetRequest( + trigger_id=trigger_id, + limit=limit, + ) + + req = self._build_request( + method="GET", + path="/v1/triggers/{trigger_id}/events", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + 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, + 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="list_trigger_events_v1_triggers__trigger_id__events_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["beta.triggers"], + 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.TriggerEventList, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(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 list_events_async( + self, + *, + trigger_id: str, + limit: Optional[int] = 10, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.TriggerEventList: + r"""List Trigger Events + + :param trigger_id: + :param limit: Maximum number of events to return + :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.ListTriggerEventsV1TriggersTriggerIDEventsGetRequest( + trigger_id=trigger_id, + limit=limit, + ) + + req = self._build_request_async( + method="GET", + path="/v1/triggers/{trigger_id}/events", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + 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, + 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="list_trigger_events_v1_triggers__trigger_id__events_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["beta.triggers"], + 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.TriggerEventList, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(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) diff --git a/src/mistralai/client/voices.py b/src/mistralai/client/voices.py index d024e3a2f..39c02925f 100644 --- a/src/mistralai/client/voices.py +++ b/src/mistralai/client/voices.py @@ -233,9 +233,8 @@ def create( self, *, name: str, - slug: OptionalNullable[str] = UNSET, languages: Optional[Iterable[str]] = None, - gender: OptionalNullable[str] = UNSET, + gender: OptionalNullable[models.VoiceGender] = UNSET, age: OptionalNullable[int] = UNSET, tags: OptionalNullable[Iterable[str]] = UNSET, color: OptionalNullable[str] = UNSET, @@ -253,7 +252,6 @@ def create( Create a new voice with a base64-encoded audio sample :param name: - :param slug: :param languages: :param gender: :param age: @@ -283,7 +281,6 @@ def create( request = models.VoiceCreateRequest( name=name, - slug=slug, languages=utils.unmarshal(languages, Optional[List[str]]), gender=gender, age=age, @@ -361,9 +358,8 @@ async def create_async( self, *, name: str, - slug: OptionalNullable[str] = UNSET, languages: Optional[Iterable[str]] = None, - gender: OptionalNullable[str] = UNSET, + gender: OptionalNullable[models.VoiceGender] = UNSET, age: OptionalNullable[int] = UNSET, tags: OptionalNullable[Iterable[str]] = UNSET, color: OptionalNullable[str] = UNSET, @@ -381,7 +377,6 @@ async def create_async( Create a new voice with a base64-encoded audio sample :param name: - :param slug: :param languages: :param gender: :param age: @@ -411,7 +406,6 @@ async def create_async( request = models.VoiceCreateRequest( name=name, - slug=slug, languages=utils.unmarshal(languages, Optional[List[str]]), gender=gender, age=age, @@ -681,7 +675,7 @@ def update( voice_id: str, name: OptionalNullable[str] = UNSET, languages: OptionalNullable[Iterable[str]] = UNSET, - gender: OptionalNullable[str] = UNSET, + gender: OptionalNullable[models.VoiceGender] = UNSET, age: OptionalNullable[int] = UNSET, tags: OptionalNullable[Iterable[str]] = UNSET, description: OptionalNullable[str] = UNSET, @@ -806,7 +800,7 @@ async def update_async( voice_id: str, name: OptionalNullable[str] = UNSET, languages: OptionalNullable[Iterable[str]] = UNSET, - gender: OptionalNullable[str] = UNSET, + gender: OptionalNullable[models.VoiceGender] = UNSET, age: OptionalNullable[int] = UNSET, tags: OptionalNullable[Iterable[str]] = UNSET, description: OptionalNullable[str] = UNSET, diff --git a/src/mistralai/client/webhooks.py b/src/mistralai/client/webhooks.py new file mode 100644 index 000000000..4b32347d9 --- /dev/null +++ b/src/mistralai/client/webhooks.py @@ -0,0 +1,1014 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from datetime import datetime +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 Any, List, Mapping, Optional + + +class Webhooks(BaseSDK): + def list( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.Webhook]: + r"""List Webhooks + + :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) + req = self._build_request( + method="GET", + path="/v1/webhooks", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + 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, + 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="list_webhooks_v1_webhooks_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["beta.webhooks"], + 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(List[models.Webhook], 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 list_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.Webhook]: + r"""List Webhooks + + :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) + req = self._build_request_async( + method="GET", + path="/v1/webhooks", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + 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, + 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="list_webhooks_v1_webhooks_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["beta.webhooks"], + 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(List[models.Webhook], 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 create( + self, + *, + provider: models.WebhookProvider, + name: str, + owner_type: Optional[models.TriggersOwnerType] = None, + secret: OptionalNullable[str] = UNSET, + encryption_key: OptionalNullable[str] = UNSET, + expires_at: OptionalNullable[datetime] = UNSET, + signature_hash_algorithm: OptionalNullable[ + models.WebhookSignatureHashAlgorithm + ] = UNSET, + signature_header_name: OptionalNullable[str] = UNSET, + validity_period_second: OptionalNullable[int] = UNSET, + signature_extractor_regex: OptionalNullable[str] = UNSET, + timestamp_extractor_regex: OptionalNullable[str] = UNSET, + signature_payload_pattern: OptionalNullable[str] = UNSET, + signature_encoding: OptionalNullable[models.WebhookSignatureEncoding] = UNSET, + success_status_code: OptionalNullable[int] = UNSET, + event_type_path: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Webhook: + r"""Create Webhook + + :param provider: + :param name: Human-readable name for this webhook + :param owner_type: + :param secret: Signing secret provided by the third-party provider + :param encryption_key: Encryption key used to decrypt webhook payloads + :param expires_at: + :param signature_hash_algorithm: + :param signature_header_name: + :param validity_period_second: + :param signature_extractor_regex: Regex to extract signature, eg sha256=(.*) + :param timestamp_extractor_regex: + :param signature_payload_pattern: Pattern for signature payload, eg {body} or {timestamp}.{body} + :param signature_encoding: + :param success_status_code: + :param event_type_path: Path to extract event type, eg body.type or headers.X-GitHub-Event + :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.CreateWebhook( + provider=provider, + owner_type=owner_type, + name=name, + secret=secret, + encryption_key=encryption_key, + expires_at=expires_at, + signature_hash_algorithm=signature_hash_algorithm, + signature_header_name=signature_header_name, + validity_period_second=validity_period_second, + signature_extractor_regex=signature_extractor_regex, + timestamp_extractor_regex=timestamp_extractor_regex, + signature_payload_pattern=signature_payload_pattern, + signature_encoding=signature_encoding, + success_status_code=success_status_code, + event_type_path=event_type_path, + ) + + req = self._build_request( + method="POST", + path="/v1/webhooks", + 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.CreateWebhook + ), + 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="create_webhook_v1_webhooks_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["beta.webhooks"], + 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, "201", "application/json"): + return unmarshal_json_response(models.Webhook, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(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 create_async( + self, + *, + provider: models.WebhookProvider, + name: str, + owner_type: Optional[models.TriggersOwnerType] = None, + secret: OptionalNullable[str] = UNSET, + encryption_key: OptionalNullable[str] = UNSET, + expires_at: OptionalNullable[datetime] = UNSET, + signature_hash_algorithm: OptionalNullable[ + models.WebhookSignatureHashAlgorithm + ] = UNSET, + signature_header_name: OptionalNullable[str] = UNSET, + validity_period_second: OptionalNullable[int] = UNSET, + signature_extractor_regex: OptionalNullable[str] = UNSET, + timestamp_extractor_regex: OptionalNullable[str] = UNSET, + signature_payload_pattern: OptionalNullable[str] = UNSET, + signature_encoding: OptionalNullable[models.WebhookSignatureEncoding] = UNSET, + success_status_code: OptionalNullable[int] = UNSET, + event_type_path: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Webhook: + r"""Create Webhook + + :param provider: + :param name: Human-readable name for this webhook + :param owner_type: + :param secret: Signing secret provided by the third-party provider + :param encryption_key: Encryption key used to decrypt webhook payloads + :param expires_at: + :param signature_hash_algorithm: + :param signature_header_name: + :param validity_period_second: + :param signature_extractor_regex: Regex to extract signature, eg sha256=(.*) + :param timestamp_extractor_regex: + :param signature_payload_pattern: Pattern for signature payload, eg {body} or {timestamp}.{body} + :param signature_encoding: + :param success_status_code: + :param event_type_path: Path to extract event type, eg body.type or headers.X-GitHub-Event + :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.CreateWebhook( + provider=provider, + owner_type=owner_type, + name=name, + secret=secret, + encryption_key=encryption_key, + expires_at=expires_at, + signature_hash_algorithm=signature_hash_algorithm, + signature_header_name=signature_header_name, + validity_period_second=validity_period_second, + signature_extractor_regex=signature_extractor_regex, + timestamp_extractor_regex=timestamp_extractor_regex, + signature_payload_pattern=signature_payload_pattern, + signature_encoding=signature_encoding, + success_status_code=success_status_code, + event_type_path=event_type_path, + ) + + req = self._build_request_async( + method="POST", + path="/v1/webhooks", + 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.CreateWebhook + ), + 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="create_webhook_v1_webhooks_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["beta.webhooks"], + 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, "201", "application/json"): + return unmarshal_json_response(models.Webhook, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(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 get( + self, + *, + webhook_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Webhook: + r"""Get Webhook + + :param webhook_id: + :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.GetWebhookV1WebhooksWebhookIDGetRequest( + webhook_id=webhook_id, + ) + + req = self._build_request( + method="GET", + path="/v1/webhooks/{webhook_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + 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, + 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="get_webhook_v1_webhooks__webhook_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["beta.webhooks"], + 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.Webhook, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(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 get_async( + self, + *, + webhook_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Webhook: + r"""Get Webhook + + :param webhook_id: + :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.GetWebhookV1WebhooksWebhookIDGetRequest( + webhook_id=webhook_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/webhooks/{webhook_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + 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, + 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="get_webhook_v1_webhooks__webhook_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["beta.webhooks"], + 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.Webhook, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(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 delete( + self, + *, + webhook_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Delete Webhook + + :param webhook_id: + :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.DeleteWebhookV1WebhooksWebhookIDDeleteRequest( + webhook_id=webhook_id, + ) + + req = self._build_request( + method="DELETE", + path="/v1/webhooks/{webhook_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + 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, + 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="delete_webhook_v1_webhooks__webhook_id__delete", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["beta.webhooks"], + 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, "204", "*"): + return + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(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 delete_async( + self, + *, + webhook_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Delete Webhook + + :param webhook_id: + :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.DeleteWebhookV1WebhooksWebhookIDDeleteRequest( + webhook_id=webhook_id, + ) + + req = self._build_request_async( + method="DELETE", + path="/v1/webhooks/{webhook_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + 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, + 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="delete_webhook_v1_webhooks__webhook_id__delete", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["beta.webhooks"], + 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, "204", "*"): + return + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(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 get_signing_secret( + self, + *, + webhook_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WebhookSigningSecret: + r"""Get Webhook Signing Secret + + :param webhook_id: + :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.GetWebhookSigningSecretV1WebhooksWebhookIDSigningSecretGetRequest( + webhook_id=webhook_id, + ) + ) + + req = self._build_request( + method="GET", + path="/v1/webhooks/{webhook_id}/signing-secret", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + 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, + 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="get_webhook_signing_secret_v1_webhooks__webhook_id__signing_secret_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["beta.webhooks"], + 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.WebhookSigningSecret, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(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 get_signing_secret_async( + self, + *, + webhook_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WebhookSigningSecret: + r"""Get Webhook Signing Secret + + :param webhook_id: + :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.GetWebhookSigningSecretV1WebhooksWebhookIDSigningSecretGetRequest( + webhook_id=webhook_id, + ) + ) + + req = self._build_request_async( + method="GET", + path="/v1/webhooks/{webhook_id}/signing-secret", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + 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, + 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="get_webhook_signing_secret_v1_webhooks__webhook_id__signing_secret_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["beta.webhooks"], + 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.WebhookSigningSecret, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(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) diff --git a/src/mistralai/client/workflows.py b/src/mistralai/client/workflows.py index 6e2b94dc7..d22c76cc2 100644 --- a/src/mistralai/client/workflows.py +++ b/src/mistralai/client/workflows.py @@ -2462,6 +2462,216 @@ async def bulk_unarchive_workflows_async( raise errors.SDKError("Unexpected response received", http_res) + def add_workflow_tags( + self, + *, + workflow_identifier: str, + tags: Iterable[str], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Add Workflow Tags + + :param workflow_identifier: + :param tags: Tags to add to the workflow. Existing tags are kept. + :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.AddWorkflowTagsV1WorkflowsWorkflowIdentifierTagsPostRequest( + workflow_identifier=workflow_identifier, + workflow_tags_add_request=models.WorkflowTagsAddRequest( + tags=utils.unmarshal(tags, List[str]), + ), + ) + + req = self._build_request( + method="POST", + path="/v1/workflows/{workflow_identifier}/tags", + 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.workflow_tags_add_request, + False, + False, + "json", + models.WorkflowTagsAddRequest, + ), + 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="add_workflow_tags_v1_workflows__workflow_identifier__tags_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["workflows"], + 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, "204", "*"): + return + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(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 add_workflow_tags_async( + self, + *, + workflow_identifier: str, + tags: Iterable[str], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Add Workflow Tags + + :param workflow_identifier: + :param tags: Tags to add to the workflow. Existing tags are kept. + :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.AddWorkflowTagsV1WorkflowsWorkflowIdentifierTagsPostRequest( + workflow_identifier=workflow_identifier, + workflow_tags_add_request=models.WorkflowTagsAddRequest( + tags=utils.unmarshal(tags, List[str]), + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/workflows/{workflow_identifier}/tags", + 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.workflow_tags_add_request, + False, + False, + "json", + models.WorkflowTagsAddRequest, + ), + 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="add_workflow_tags_v1_workflows__workflow_identifier__tags_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["workflows"], + 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, "204", "*"): + return + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(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 archive_workflow( self, *, diff --git a/src/mistralai/extra/observability/telemetry.py b/src/mistralai/extra/observability/telemetry.py index 159c0ffeb..a568d546b 100644 --- a/src/mistralai/extra/observability/telemetry.py +++ b/src/mistralai/extra/observability/telemetry.py @@ -9,7 +9,6 @@ from opentelemetry import trace as otel_trace -from mistralai.client.sdkconfiguration import SERVER_GLOBAL, SERVERS from mistralai.client.utils import get_security_from_env from .otel import MISTRAL_SDK_OTEL_TRACER_NAME, OTEL_SERVICE_NAME @@ -28,8 +27,7 @@ MISTRAL_SDK_TELEMETRY_ENV = "MISTRAL_SDK_TELEMETRY" -MISTRAL_TELEMETRY_PATH = "/telemetry/v1/traces" -MISTRAL_TELEMETRY_ENDPOINT = f"{SERVERS[SERVER_GLOBAL]}{MISTRAL_TELEMETRY_PATH}" +MISTRAL_TELEMETRY_ENDPOINT = "https://api.mistral.ai/telemetry/v1/traces" MISTRAL_OTLP_TRACES_ENDPOINT_ENV = "MISTRAL_OTLP_TRACES_ENDPOINT" TELEMETRY_PROVIDER_DEDICATED: Final[Literal["dedicated"]] = "dedicated" TELEMETRY_PROVIDER_GLOBAL: Final[Literal["global"]] = "global" @@ -116,10 +114,7 @@ def configure_telemetry( ) -> bool: """Configure telemetry provider mode for a Mistral client. - By default, this creates an SDK-owned telemetry provider/exporter that sends - traces to /telemetry/v1/traces on the client's explicit server_url if set, - otherwise to https://api.mistral.ai (also for the named eu/us servers). - MISTRAL_OTLP_TRACES_ENDPOINT overrides that endpoint. Passing + By default, this creates an SDK-owned telemetry provider/exporter. Passing provider="global" clears the per-client provider so SDK spans use the global OpenTelemetry provider. Passing a TracerProvider attaches it to this client without taking ownership of its lifecycle. @@ -277,7 +272,6 @@ def configure_telemetry_for_hook( api_key = _resolve_api_key_from_security(getattr(sdk_config, "security", None)) provider = _create_telemetry_tracer_provider( api_key=api_key, - server_url=getattr(sdk_config, "server_url", None), redaction=redaction, ) _attach_telemetry_provider(hook, provider, finalizer_owner or sdk_config) @@ -319,7 +313,6 @@ def _resolve_api_key_from_security(security: Any) -> str: def _create_telemetry_tracer_provider( *, api_key: str | None, - server_url: str | None = None, redaction: RedactionPolicyLike | bool = True, ) -> "SDKTracerProvider": ( @@ -335,11 +328,7 @@ def _create_telemetry_tracer_provider( "client or set MISTRAL_API_KEY." ) exporter = otlp_span_exporter_cls( - # Only follow an explicit server_url (e.g. another deployment); the named - # regional servers don't serve the telemetry endpoint. - endpoint=_resolve_mistral_telemetry_endpoint( - server_url or SERVERS[SERVER_GLOBAL] - ), + endpoint=_resolve_mistral_telemetry_endpoint(), headers={"Authorization": _as_bearer_token(api_key)}, ) policy = _resolve_redaction(redaction) @@ -370,9 +359,11 @@ def _load_otel_sdk(): return BatchSpanProcessor, OTLPSpanExporter, Resource, TracerProvider -def _resolve_mistral_telemetry_endpoint(server_url: str) -> str: - override = os.getenv(MISTRAL_OTLP_TRACES_ENDPOINT_ENV, "").strip() - return override or f"{server_url.rstrip('/')}{MISTRAL_TELEMETRY_PATH}" +def _resolve_mistral_telemetry_endpoint() -> str: + return os.getenv( + MISTRAL_OTLP_TRACES_ENDPOINT_ENV, + MISTRAL_TELEMETRY_ENDPOINT, + ).strip() or MISTRAL_TELEMETRY_ENDPOINT def _has_real_global_tracer_provider() -> bool: diff --git a/src/mistralai/extra/tests/test_telemetry.py b/src/mistralai/extra/tests/test_telemetry.py index 1f86ba783..a0f2fdad7 100644 --- a/src/mistralai/extra/tests/test_telemetry.py +++ b/src/mistralai/extra/tests/test_telemetry.py @@ -3,10 +3,8 @@ from typing import TYPE_CHECKING, cast from unittest.mock import MagicMock, patch -import httpx2 as httpx import pytest from opentelemetry.sdk.trace import TracerProvider -from opentelemetry.sdk.trace.export import SpanExportResult from mistralai.client._hooks import SDKHooks from mistralai.client._hooks.tracing import TracingHook @@ -153,7 +151,6 @@ def test_env_dedicated_values_attach_provider(self): self.assertTrue(configured) create_provider.assert_called_once_with( api_key="test-key", - server_url="", redaction=True, ) self.assertIs(_get_tracing_hook(client).tracer_provider, provider) @@ -218,7 +215,6 @@ def test_configure_telemetry_attaches_per_client_provider(self): self.assertTrue(configured) create_provider.assert_called_once_with( api_key="test-key", - server_url="", redaction=True, ) self.assertIs(_get_tracing_hook(client).tracer_provider, provider) @@ -237,7 +233,6 @@ def test_configure_telemetry_accepts_explicit_dedicated_provider_mode(self): self.assertTrue(configured) create_provider.assert_called_once_with( api_key="test-key", - server_url="", redaction=True, ) self.assertIs(_get_tracing_hook(client).tracer_provider, provider) @@ -321,9 +316,7 @@ def test_configure_telemetry_dedicated_reconfigure_applies_new_redaction(self): hook = _get_tracing_hook(client) self.assertTrue(configured) self.assertEqual(create_provider.call_count, 2) - create_provider.assert_any_call( - api_key="test-key", server_url="", redaction=False - ) + create_provider.assert_any_call(api_key="test-key", redaction=False) self.assertTrue(first_provider.shutdown_called) self.assertIs(hook.tracer_provider, second_provider) self.assertIs(hook._auto_telemetry_provider, second_provider) @@ -469,7 +462,6 @@ def test_env_dedicated_uses_mistral_api_key_fallback(self): self.assertTrue(configured) create_provider.assert_called_once_with( api_key="env-key", - server_url="", redaction=True, ) self.assertIs(_get_tracing_hook(client).tracer_provider, provider) @@ -510,7 +502,6 @@ def test_env_dedicated_ignores_standard_otel_endpoint_env(self): self.assertTrue(configured) create_provider.assert_called_once_with( api_key="test-key", - server_url="", redaction=True, ) @@ -688,142 +679,6 @@ def test_mistral_endpoint_env_overrides_default_endpoint(self): ) -class TestTelemetryEndpoint(unittest.TestCase): - @staticmethod - def _export_for_client( - client_options: dict[str, str], - auto_enable: bool, - endpoint_override: str | None = None, - ) -> tuple[dict, str]: - from mistralai.client.sdk import Mistral - - env = {MISTRAL_SDK_TELEMETRY_ENV: "dedicated"} if auto_enable else {} - if endpoint_override is not None: - env[MISTRAL_OTLP_TRACES_ENDPOINT_ENV] = endpoint_override - request_urls: list[str] = [] - - def handle_request(request: httpx.Request) -> httpx.Response: - request_urls.append(str(request.url)) - return httpx.Response(200, json={"object": "list", "data": []}) - - with ( - patch.dict(os.environ, env, clear=True), - patch( - "mistralai.extra.observability.telemetry._has_real_global_tracer_provider", - return_value=False, - ), - patch( - "opentelemetry.exporter.otlp.proto.http.trace_exporter.OTLPSpanExporter" - ) as exporter_class, - httpx.Client(transport=httpx.MockTransport(handle_request)) as http_client, - Mistral( - api_key="test-key", - client=http_client, - server=client_options.get("server"), - server_url=client_options.get("server_url"), - ) as client, - ): - exporter_class.return_value.export.return_value = SpanExportResult.SUCCESS - if not auto_enable: - configure_telemetry(client) - try: - client.models.list() - provider = _get_tracing_hook(client)._auto_telemetry_provider - assert provider is not None - assert provider.force_flush() - exporter_class.return_value.export.assert_called_once() - finally: - configure_telemetry(client, provider="global", redaction=False) - - exporter_class.assert_called_once() - assert len(request_urls) == 1 - return dict(exporter_class.call_args.kwargs), request_urls[0] - - def test_telemetry_follows_explicit_server_url(self): - # (client options, expected API base URL, expected telemetry base URL) - cases: list[tuple[dict[str, str], str, str]] = [ - ({}, "https://api.mistral.ai", "https://api.mistral.ai"), - ({"server": "global"}, "https://api.mistral.ai", "https://api.mistral.ai"), - # Named regional servers don't serve the telemetry endpoint. - ({"server": "eu"}, "https://api.eu.mistral.ai", "https://api.mistral.ai"), - ({"server": "us"}, "https://api.us.mistral.ai", "https://api.mistral.ai"), - ( - {"server_url": "https://mistral.example.com"}, - "https://mistral.example.com", - "https://mistral.example.com", - ), - ( - {"server_url": "https://llm.acme-corp.io/"}, - "https://llm.acme-corp.io", - "https://llm.acme-corp.io", - ), - ( - {"server_url": "https://gateway.internal.net/mistral/"}, - "https://gateway.internal.net/mistral", - "https://gateway.internal.net/mistral", - ), - ( - {"server_url": "http://localhost:8080"}, - "http://localhost:8080", - "http://localhost:8080", - ), - ( - {"server": "eu", "server_url": "https://mistral.contoso.dev"}, - "https://mistral.contoso.dev", - "https://mistral.contoso.dev", - ), - ] - for client_options, api_base_url, telemetry_base_url in cases: - for auto_enable in (False, True): - with self.subTest( - client_options=client_options, auto_enable=auto_enable - ): - exporter_options, request_url = self._export_for_client( - client_options, auto_enable - ) - self.assertEqual(request_url, f"{api_base_url}/v1/models") - self.assertEqual( - exporter_options, - { - "endpoint": f"{telemetry_base_url}/telemetry/v1/traces", - "headers": {"Authorization": "Bearer test-key"}, - }, - ) - - def test_blank_endpoint_override_uses_api_server(self): - for endpoint_override in (None, "", " "): - for auto_enable in (False, True): - with self.subTest( - endpoint_override=endpoint_override, auto_enable=auto_enable - ): - exporter_options, _ = self._export_for_client( - {"server_url": "https://inference.foobar.ai"}, - auto_enable, - endpoint_override, - ) - self.assertEqual( - exporter_options["endpoint"], - "https://inference.foobar.ai/telemetry/v1/traces", - ) - - def test_endpoint_override_takes_precedence(self): - for auto_enable in (False, True): - with self.subTest(auto_enable=auto_enable): - exporter_options, request_url = self._export_for_client( - {"server_url": "https://proxy.widgets.org"}, - auto_enable, - " https://collector.example.com/v1/traces ", - ) - self.assertEqual(request_url, "https://proxy.widgets.org/v1/models") - self.assertEqual( - exporter_options, - { - "endpoint": "https://collector.example.com/v1/traces", - "headers": {"Authorization": "Bearer test-key"}, - }, - ) - - _TELEMETRY_LOGGER = "mistralai.extra.observability.telemetry" @@ -896,9 +751,7 @@ def test_dedicated_mode_forwards_custom_redaction_to_provider(self): policy = RegexRedactionPolicy() configure_telemetry(client, provider="dedicated", redaction=policy) - create_provider.assert_called_once_with( - api_key="test-key", server_url="", redaction=policy - ) + create_provider.assert_called_once_with(api_key="test-key", redaction=policy) def test_dedicated_mode_forwards_default_redaction_to_provider(self): # Wiring test @@ -909,9 +762,7 @@ def test_dedicated_mode_forwards_default_redaction_to_provider(self): client = _make_client(api_key="test-key") configure_telemetry(client, provider="dedicated") - create_provider.assert_called_once_with( - api_key="test-key", server_url="", redaction=True - ) + create_provider.assert_called_once_with(api_key="test-key", redaction=True) def test_global_mode_warns_by_default(self, caplog): client = _make_client(api_key="test-key") diff --git a/uv.lock b/uv.lock index 49ed4b80f..b3158b009 100644 --- a/uv.lock +++ b/uv.lock @@ -1275,7 +1275,7 @@ wheels = [ [[package]] name = "mistralai" -version = "3.6.0" +version = "3.7.0" source = { editable = "." } dependencies = [ { name = "eval-type-backport" },