diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index dd18eda6..7e03be4c 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: ae098de142fd81aa02c9a5a26a6591b8 + docChecksum: bb87a2d97f3451b49ece1f757a33f0ba docVersion: 1.0.0 speakeasyVersion: 1.729.0 generationVersion: 2.841.0 - releaseVersion: 2.0.0 - configChecksum: 60e6aae39454140823667a495d507fca + releaseVersion: 2.0.1 + configChecksum: 006abc607168111d628a422258f355ba repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: 1fa80ee6-4130-423f-9d6e-8b865b18cc7f - pristine_commit_hash: f2c5b1b11c5e7496fda888469f22e3dd22af1603 - pristine_tree_hash: 4bf96963cbd890c55a9d591243f7aea7311db58b + generation_id: 03da14ba-78d6-4fb7-b997-4bb820eedd19 + pristine_commit_hash: 81f0d1b22d32115b6bea27499be12662db3c24c1 + pristine_tree_hash: b7173449eea74b886d2cf12c4108224effd56e16 features: python: additionalDependencies: 1.0.0 @@ -216,8 +216,8 @@ trackedFiles: pristine_git_object: 4354523a7d0d21721a96e91938b89236169ccced docs/models/agenttool.md: id: 513b8b7bc0b7 - last_write_checksum: sha1:9154d0ac6b0ab8970a10a8ad7716009d62e80ce7 - pristine_git_object: 022f7e10edb22cb1b1d741c13ac586bd136d03b5 + last_write_checksum: sha1:8dedf7bcaa05492689ce0828e5644380258d5a7e + pristine_git_object: 0722e955359c8569a219f3c2c9b3d9dbb7449ee0 docs/models/and_.md: id: a4692aa4d8e7 last_write_checksum: sha1:86773c7178b6c04a7adc487d860c39a51116b0cb @@ -234,6 +234,10 @@ trackedFiles: id: be613fd9b947 last_write_checksum: sha1:4d984c11248f7da42c949164e69b53995d5942c4 pristine_git_object: 8d83a26f19241da5ce626ff9526575c50e5d27be + docs/models/apikeyauth.md: + id: 529789e1b079 + last_write_checksum: sha1:edb801076d411a5d6c1f7a3f4fdb4c3612b12ab1 + pristine_git_object: 1fbff10e21eb51df061790f0215cb4916318ebc1 docs/models/archivemodelresponse.md: id: 133f4af8058f last_write_checksum: sha1:95fa73ebd765cbd244c847218df6d31e18dc5e85 @@ -282,22 +286,14 @@ trackedFiles: id: 79b5f721b753 last_write_checksum: sha1:df6825c05b5a02dcf904ebaa40fb97e9186248cc pristine_git_object: 5d64964d1a635da912f2553c306fb8654ebfca2e - docs/models/audiourl.md: - id: 5cf317caac89 - last_write_checksum: sha1:2ab877ab65fd947d3d3833266d64167a78f83350 - pristine_git_object: 45ad74938a74eeed51440b4b62db941cac19e095 - docs/models/audiourlchunk.md: - id: dc995cbb4163 - last_write_checksum: sha1:f85ceef0dd3cf36caf7889eaf645c5fc6a329baf - pristine_git_object: 56af9df98b9d948575f733b88bfaf6c9202832b3 - docs/models/audiourlunion.md: - id: fe1a2fe0351a - last_write_checksum: sha1:9d271e3711f30e7715720e1d68b7b5d2a6a74cc1 - pristine_git_object: 9666906674288fa3e251549d6edb355eabbce1d9 docs/models/authdata.md: id: e510ac107a56 last_write_checksum: sha1:1cfbc35a6112a6eca7b4199c37959a0fef390ca8 pristine_git_object: d0784e66112b8f79036d1acff2a7fc242058e4a0 + docs/models/authorization.md: + id: dec4d9809e25 + last_write_checksum: sha1:6bf766a7b49ca2b706bb4eb88ba2d56406e06e1e + pristine_git_object: 11ea5c6a700e7b92f5cbd29e88e41b834f8b8ef4 docs/models/basefielddefinition.md: id: f9e0bbae859b last_write_checksum: sha1:28a4d2774231873af97debedcf2fba4f49e83bf2 @@ -612,8 +608,8 @@ trackedFiles: pristine_git_object: db9cc9b4c4379865ad15292c5385dce864b5935b docs/models/contentchunk.md: id: d2d3a32080cd - last_write_checksum: sha1:26f4ec3431c023af6ef3da732f753b66a52bdeac - pristine_git_object: 5a8ef58c968cd6d4e29a8c6c02fbc5e8bacd6839 + last_write_checksum: sha1:b253e4b802adb5b66d896bfc6245ac4d21a0c67c + pristine_git_object: cb7e51d3a6e05f197fceff4a4999594f3e340dac docs/models/context.md: id: e8f2f9e54b8e last_write_checksum: sha1:4c14b386f9f89d98f4dd9487ab030f10478c0e63 @@ -660,8 +656,8 @@ trackedFiles: pristine_git_object: 481f18e67f70226c928522726c73b3e07b2a7c4c docs/models/conversationrequest.md: id: dd7f4d6807f2 - last_write_checksum: sha1:093de161c340171af6f89228f7e248668e09b3a1 - pristine_git_object: 9aabc52a331b638ce4633834328fe50ffb8d09eb + last_write_checksum: sha1:bfb3664fa8011fb44786d6e5c32cd5c0eed3058d + pristine_git_object: 903d13c1d92d31aa7db836bbd796fe0875892219 docs/models/conversationrequestagentversion.md: id: 68aad87b1459 last_write_checksum: sha1:fd2e9cd7ed2499b5843c592505ec5e0596a50b33 @@ -672,8 +668,8 @@ trackedFiles: pristine_git_object: e7314f7e0080ff3f1a80afdbb229c78df5b008bb docs/models/conversationrequesttool.md: id: bd1bb6fcea8b - last_write_checksum: sha1:69d503d73f5bd044882d13cd0c7de188dd5f4831 - pristine_git_object: 2e4e8d01b5482c4e0644be52e55bf6912aeff69e + last_write_checksum: sha1:9c04dc1c7401b775671130cce7a1d85fbdf35957 + pristine_git_object: 5a58e6d139fd902bb810088221e036001d7690d2 docs/models/conversationresponse.md: id: 2eccf42d48af last_write_checksum: sha1:55493c0b639cb8bda3b5f3bca57a7eec6060b148 @@ -712,8 +708,8 @@ trackedFiles: pristine_git_object: 12bf7c1fa98223675c6b27f6010d05c9b78e7017 docs/models/conversationstreamrequest.md: id: 833f266c4f96 - last_write_checksum: sha1:19602f1f58e594960340559d57733bc11223c494 - pristine_git_object: f792c26369b64508b8aa6b5032cedcd16aa556e9 + last_write_checksum: sha1:bfa762698bd078c1a046e0f17d0316299ae11288 + pristine_git_object: 8debea1c3e036e2fa7d21e6aa5f2883173b4988a docs/models/conversationstreamrequestagentversion.md: id: e99ccc842929 last_write_checksum: sha1:0ba5fca217681cdc5e08e0d82db67884bed076a6 @@ -724,8 +720,8 @@ trackedFiles: pristine_git_object: c98e194c1d204c3a5d4234f0553712a7025d7f85 docs/models/conversationstreamrequesttool.md: id: 71df6212ff44 - last_write_checksum: sha1:f2882742a74dd2b4f74383efa444c7ab968249dc - pristine_git_object: 0f75f82b38f224340bed468ceecfe622066740ba + last_write_checksum: sha1:04f89a30daec9bad78f99d0bcf28c8a717fc7833 + pristine_git_object: 82ef640a0026772728b84abe22544f9cf7d5d03c docs/models/conversationusageinfo.md: id: 57ef89d3ab83 last_write_checksum: sha1:d92408ad37d7261b0f83588e6216871074a50225 @@ -736,8 +732,8 @@ trackedFiles: pristine_git_object: e9665545ae14415bb0c61dc0312136dd2930ee13 docs/models/createagentrequesttool.md: id: 72e5f99878c5 - last_write_checksum: sha1:a90ad01c15da321f0c8ec700ba359a5371c5dcbb - pristine_git_object: c6ed3e98566eb684932fae9d2648a85c84443493 + last_write_checksum: sha1:4b4ab1566b3c82a14ace1c141538d7ad6b7192f7 + pristine_git_object: e45d57bc9eea6f192d0cc0258e5d31e8409dd00d docs/models/createbatchjobrequest.md: id: e79afe8f495c last_write_checksum: sha1:6cedce49f3108b9d5bc80e6d11712c594f2d9e50 @@ -794,6 +790,10 @@ trackedFiles: id: 8935b2ed9d13 last_write_checksum: sha1:c00abfe1abb0f0323e434b084dafa0d451eb3e51 pristine_git_object: 71562806dbec6444dcdd0a19852a31ca00b6229a + docs/models/customconnector.md: + id: 7bcc77607afa + last_write_checksum: sha1:ce9e8ffac3f83e08269fbed5d2dffbfeb9f8649a + pristine_git_object: 0a0b69217abb0fbcbe30fad32c239aea070d3740 docs/models/dataset.md: id: 31af4d237e19 last_write_checksum: sha1:073fa9a0b7891ccd9b6ae64ba960d74eeb5c9007 @@ -1180,8 +1180,8 @@ trackedFiles: pristine_git_object: 319e1415d9396412c455056135189d817e2fc473 docs/models/guardrailconfig.md: id: f60bf2eefb45 - last_write_checksum: sha1:517e5d142f8e259795cc0083522041ec006baeb7 - pristine_git_object: 235d7204080f3aef0b7910ed32d009cae6d4247c + last_write_checksum: sha1:e8dd384d2fd18d731753ba8d45a2975379c97052 + pristine_git_object: 1276462cc43fbd940f12282b1dca05e6fc7a16f9 docs/models/hyperparameters.md: id: c167bad5b302 last_write_checksum: sha1:e391cf72690e6cd01a2878081b8d87938e1c6639 @@ -1560,8 +1560,8 @@ trackedFiles: pristine_git_object: 190a6f6eb48191b2507a4861525707f041961538 docs/models/modelconversationtool.md: id: 2dd28167bc36 - last_write_checksum: sha1:9b33f73330e5ae31de877a904954efe342e99c4f - pristine_git_object: 8723556753d077969bc665a423c057ae4ceaa0d2 + last_write_checksum: sha1:029cca1fe47df23ef858a01fd2627f0bc2ffdfd3 + pristine_git_object: 0b6a45f7ec2ca95191b228a6468c80ddbfd373ed docs/models/modellist.md: id: ce07fd9ce413 last_write_checksum: sha1:b4c22b5eff4478ffa5717bd5af92ca79f4a90b01 @@ -1570,18 +1570,26 @@ trackedFiles: id: e2eb639c646f last_write_checksum: sha1:7394ba5645f990163c4d777ebbfc71f24c5d3a74 pristine_git_object: b44e84a00d0c54f8df78650d45de0a409c901048 - docs/models/moderationllmv1action.md: - id: ebbde3bb4ffb - last_write_checksum: sha1:4b8a7001254c7c1f56bba10e4aa5445a41def160 - pristine_git_object: e24d6a2296ded90c15dffccf636c6628d0de6c4f + docs/models/moderationllmaction.md: + id: 26373b4ad9cd + last_write_checksum: sha1:da6507feedd7db7e8e0c0d5ca3428e3f5a3aee9a + pristine_git_object: 951880b61ec0e40c30c427f9c2b5f68c5a89a7e2 docs/models/moderationllmv1categorythresholds.md: id: b474ca28a6e7 last_write_checksum: sha1:9080b6f5a7a6a00ed04c1cb32a43cb997cbeb5d5 pristine_git_object: 90ae213feda5e63ad71fbd7bb0bfb07ee7b1e2c1 docs/models/moderationllmv1config.md: id: e39a45c3e458 - last_write_checksum: sha1:7bc088d2563fa4bb89175423b94908da4aaf7a54 - pristine_git_object: 0c410947c9554348a77fd02d48a1a5d7e40f0abb + last_write_checksum: sha1:63b7677d0b488d44312417d9335abd595f9b6fa9 + pristine_git_object: bdb5812b87a69af904eb9cdc0fffff6e73d96cd3 + docs/models/moderationllmv2categorythresholds.md: + id: 401d3285071c + last_write_checksum: sha1:6fbfadaba4db8bed9fc7d38ad77cd47a089dd5f0 + pristine_git_object: e95b81b0315cf77724d027dbf8ff0f524ad1d068 + docs/models/moderationllmv2config.md: + id: 64c1e213e7cc + last_write_checksum: sha1:851923395e5a4097b82d184e070a85bf648a9e8c + pristine_git_object: e928506c8d210b865e8aee9739a35433ca136872 docs/models/moderationobject.md: id: 4e84364835f5 last_write_checksum: sha1:2831033dcc3d93d32b8813498f6eb3082e2d3c4e @@ -1594,6 +1602,10 @@ trackedFiles: id: f5be2d861921 last_write_checksum: sha1:624f30759b7b7de1913b1ef3b8bb2187a95b9570 pristine_git_object: 9d7a00c44e1507edd12f16fbb6b3864f1c0bbd81 + docs/models/oauth2tokenauth.md: + id: f23959dcc4b0 + last_write_checksum: sha1:ca434f8479c3f5e868db1269e86efa5e0d9070e2 + pristine_git_object: 89f80436474e3c2293bb4fcafce11e626e2cdf79 docs/models/observabilityerrorcode.md: id: 61d16ff95b87 last_write_checksum: sha1:cba4ebf5b8b3007046c124504e1472bcd464f109 @@ -2056,8 +2068,8 @@ trackedFiles: pristine_git_object: b8aa01f66b13d050839bd0aacf1550f669bc8d13 docs/models/updateagentrequesttool.md: id: bdf961d2c886 - last_write_checksum: sha1:5355f8c97b2aef98aebff251e1f4830ddbaa7881 - pristine_git_object: e358b1edb9035667104700dde890bb0b43074543 + last_write_checksum: sha1:104218314ae55ccf111d90bdbad987a13988f7f5 + pristine_git_object: cf590a2fc7f58707855eb0bda2d4b8460bfea800 docs/models/updateconnectorrequest.md: id: 40e38d9c7c2a last_write_checksum: sha1:183567baed17e6b95628cfe17455e1861fd48758 @@ -2184,8 +2196,8 @@ trackedFiles: pristine_git_object: b8150eb85d182af6e7ed8216cc4b4a535271a53a docs/sdks/conversations/README.md: id: e22a9d2c5424 - last_write_checksum: sha1:5c75be39ef1f2a15249e363e33ebf8f3e964301c - pristine_git_object: 083b293d12fd00ba9b74a00666a9f9542cca9f4c + last_write_checksum: sha1:3bc235805eff20efdb634834e11f519a5d09dd47 + pristine_git_object: 0803b39816e5393050f383407f162446eb0d455d docs/sdks/datasets/README.md: id: deb5d90f4faf last_write_checksum: sha1:cf41aa56b5fe1296961ddb769b96cb0f451ed2f2 @@ -2264,8 +2276,8 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:9ca227af0848f7e58917b55ae2433118ff5f073d - pristine_git_object: c7251c9ce55d10a4ef89ce5ab58a05332b9b21ff + last_write_checksum: sha1:3032daf0aeb47d7e21ff355c838e9ab5c765b428 + pristine_git_object: 7c37028eac3c970d707ee16fa69ae1e7b0020cfc src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:4b1cf5d760f690d35582f9037df44c97c11e7e14 @@ -2320,8 +2332,8 @@ trackedFiles: pristine_git_object: 37e018330e85109692a83d97d62a5efe7a15ee6f src/mistralai/client/conversations.py: id: 40692a878064 - last_write_checksum: sha1:eba234effe5c649b220c370a1c9098ba9a4c686d - pristine_git_object: a4af31f3abe3ece7791a76d20de9146bb83e1fcc + last_write_checksum: sha1:c13593e5cf9c7f7d5b4c32a874a0b8e1212d1e0f + pristine_git_object: 99f3a33e211ce45d8920baa60f0e8bc915cfb50f src/mistralai/client/datasets.py: id: e5a6ae2a2d85 last_write_checksum: sha1:2483bd56b90599039573c2c152dcbffa8ba8b3b8 @@ -2396,12 +2408,12 @@ trackedFiles: pristine_git_object: b8728362b87349118ac6f163f50613dd18c43340 src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:d776a15e3fa0fd11027c50d0f3c8e77882eb29b5 - pristine_git_object: 741c80f30cdaac0f0f03c440f2436bbb453af2f6 + last_write_checksum: sha1:15c081adb2e325471e7e1a5aa47159281082abd0 + pristine_git_object: e0fd60e48c43a87566b6abbc7e87cdd695e83a55 src/mistralai/client/models/agent.py: id: 1336849c84fb - last_write_checksum: sha1:7fede9394ca174a3f0ee3d5a01d95ec265783e2c - pristine_git_object: 1fa27f08eaf0a7737a0f505aeae920f598f6968e + last_write_checksum: sha1:6bd14cd797a902679111638ede8b3f8a6389ba87 + pristine_git_object: 068b32267ff9305d6431790bccee7b79fce3c1b5 src/mistralai/client/models/agentaliasresponse.py: id: 3899a98a55dd last_write_checksum: sha1:d7e12ea05431361ad0219f5c8dee11273cd60397 @@ -2514,6 +2526,10 @@ trackedFiles: id: 00b34ce0a24d last_write_checksum: sha1:733e852bf75956acd2c72a23443627abfa090b7b pristine_git_object: a6665c1076f05c28936510c24ee7d3498d7e7a24 + src/mistralai/client/models/apikeyauth.py: + id: f55510f5ff82 + last_write_checksum: sha1:995d3fcf007b0f10eea18bb6745478e7eeb6bce2 + pristine_git_object: 10cbaf589e2a4bc1e63b3a02689e76f4d7f1e88a src/mistralai/client/models/archivemodelresponse.py: id: 2d22c644df64 last_write_checksum: sha1:d0f67fd2bc5a6e8de4f2b0a5742ceb4a1f7f5ab8 @@ -2546,14 +2562,6 @@ trackedFiles: id: 33a07317a3b3 last_write_checksum: sha1:6e648ff58a70a0a3bd63a24676122b80eba4baf7 pristine_git_object: 2d1e9269b51d84cd8b21643fe04accd00839b013 - src/mistralai/client/models/audiourl.py: - id: f62d73a27faa - last_write_checksum: sha1:25e4a2f40630d678779befb4802a70b7fea582c1 - pristine_git_object: 98fef9770865c6ead929902a16286e7e697291c0 - src/mistralai/client/models/audiourlchunk.py: - id: f582b26db67b - last_write_checksum: sha1:dbfedb012b00140bc3ea91ac3f7ebf7b2a17ed17 - pristine_git_object: 89ebce795e95ab55e59652468bf55690e980a697 src/mistralai/client/models/authdata.py: id: b4d3fb07196e last_write_checksum: sha1:70f8bbaa8d72e5684eb5cda5d95c0f17ed61a8f7 @@ -2768,8 +2776,8 @@ trackedFiles: pristine_git_object: 520fb99b6430b317c326bdd9be86b63bd3822bd1 src/mistralai/client/models/contentchunk.py: id: c007f5ee0325 - last_write_checksum: sha1:872274333d03c88665b115a2eb99c2650ac7e3bb - pristine_git_object: 6d521e1a49c4ed1cdf6a3a3b85bfb17aa631f994 + last_write_checksum: sha1:b921b03b4c1e300b0e3f51ea9eadd4d7c4b7a0ea + pristine_git_object: e3de7591a089a3739af17108cecdc2d4240f10bf src/mistralai/client/models/conversationappendrequest.py: id: 81ce529e0865 last_write_checksum: sha1:bdae860241893ec3ab3f22bd57c45dede2927da3 @@ -2800,8 +2808,8 @@ trackedFiles: pristine_git_object: 6bfc5894b329531c7845d0457209a0d5c35c0145 src/mistralai/client/models/conversationrequest.py: id: 58e3ae67f149 - last_write_checksum: sha1:56e87a8f6e4670392e10f392bec44a923f3e14f8 - pristine_git_object: cb5dc6a5f2d69331263c12870ff5603e703d6060 + last_write_checksum: sha1:3b21ed0d747df3b0917bcb1141e387b3c8eb8bd9 + pristine_git_object: 299b41fc79df3b8cd1221142aa693f77e060d757 src/mistralai/client/models/conversationresponse.py: id: ad7a8472c7bf last_write_checksum: sha1:86c11bbd5003fc1a6838636257e07404da981ca7 @@ -2820,8 +2828,8 @@ trackedFiles: pristine_git_object: a3b93b61b842002fc9fbb05815b800fb1294cb52 src/mistralai/client/models/conversationstreamrequest.py: id: 58d633507527 - last_write_checksum: sha1:c349ea248a85a9a329fbf878507b32fc761c4639 - pristine_git_object: 2559a8872df6a9bf9dd088f05259c5464df19a7c + last_write_checksum: sha1:6e503a49b1edf52b2f9ecad17c96d9607d689899 + pristine_git_object: 9404e32c3f3158d5c6d63728d8eaa07a86f69b6c src/mistralai/client/models/conversationusageinfo.py: id: 6685e3b50b50 last_write_checksum: sha1:3e0489836936a7a77fa3b41adde1eb459ecd176d @@ -2832,8 +2840,8 @@ trackedFiles: pristine_git_object: 03156fa31f51655dfd9bda21082710b1d1f42907 src/mistralai/client/models/createagentrequest.py: id: 442629bd914b - last_write_checksum: sha1:28dd507f0d965b6e4ede3fb2248681e034b2bb4a - pristine_git_object: 8acbbd1b90bce84275d5e76ca74f2a2105c65f3f + last_write_checksum: sha1:55adc884e1fa3ee169d34812516e541407648368 + pristine_git_object: 1e0cb7b6b86f791d17655aa36f38842992380a69 src/mistralai/client/models/createbatchjobrequest.py: id: 56e24cd24e98 last_write_checksum: sha1:e648017622cd6e860cb15e5dd2b29bf9f2a00572 @@ -2874,6 +2882,10 @@ trackedFiles: id: 1c489bec2f53 last_write_checksum: sha1:45fa65be82712ce99304027c88f953f0932bdae4 pristine_git_object: 58874e014275b06ce19d145aaa34a48d11ca0950 + src/mistralai/client/models/customconnector.py: + id: 14f3643f7703 + last_write_checksum: sha1:1c452564f118d0efd906b7b7b62f3cac7b1fec2d + pristine_git_object: 23cddfc119ff3c2cf2d1a270c3830ce48c568f3a src/mistralai/client/models/dataset.py: id: cbf14670ee00 last_write_checksum: sha1:4636e54c4ca7825b93d55ef1f69b640557b26467 @@ -3212,8 +3224,8 @@ trackedFiles: pristine_git_object: 84b01078c2192de5d6668a6943d416a2ff30db5f src/mistralai/client/models/guardrailconfig.py: id: c72b74412547 - last_write_checksum: sha1:0054fd2ef6b4b169d5eddd9863b893ee160a86e8 - pristine_git_object: 9af986cf73791a19aeecc6d3b9cc28326b7b45f2 + last_write_checksum: sha1:b66f91989a8aabd977bce2c8fd225e6f47dae60d + pristine_git_object: 4f8fe352e9d0abc23468ed6498ebf63c7e4df5b6 src/mistralai/client/models/imagecontent.py: id: 3abe7faee278 last_write_checksum: sha1:22229b74dd00ebe78ea3589964367e0785f8bcf0 @@ -3532,24 +3544,32 @@ trackedFiles: pristine_git_object: d9293ccc163995cfe0419d05c90fe1ae8e75cf57 src/mistralai/client/models/modelconversation.py: id: fea0a651f888 - last_write_checksum: sha1:87bcbce66e719b06fa229edd875ff952cadb4ae9 - pristine_git_object: 74e113bf84fff58b037b1140e950c251801e347b + last_write_checksum: sha1:d08fe4b4bb63e20e51fed78f1bf376babe667179 + pristine_git_object: d7f765bf9657f7637da3ab00f545d0f3ce9d2614 src/mistralai/client/models/modellist.py: id: 00693c7eec60 last_write_checksum: sha1:de62fc6787f482e5df0ff0e70415f493f177b9a1 pristine_git_object: 5fd835f24cd1098a153ebfb3e958038a183d28a7 - src/mistralai/client/models/moderationllmv1action.py: - id: c95110c21e79 - last_write_checksum: sha1:53e2b0e06df3890cf9a1822dd19551adcc2f1a22 - pristine_git_object: ae3a6ee957e7e9a7a94e56a48204367e2b776a2d + src/mistralai/client/models/moderationllmaction.py: + id: 7b18ccbd8ca9 + last_write_checksum: sha1:0067c773f68e8c9a6fa9e802b1d5a5b97efa7d5b + pristine_git_object: a2553f3041e129df165d49072a60fe31cd8b387b src/mistralai/client/models/moderationllmv1categorythresholds.py: id: 0c51d6766440 last_write_checksum: sha1:17f74a67d19a59214e93c54e5cabc4132bdbee48 pristine_git_object: 0451ba3afcbff22d1cc41b784c896419bf49e5f5 src/mistralai/client/models/moderationllmv1config.py: id: 483378b56394 - last_write_checksum: sha1:be0b266e84480aa46ca1c5048357a6afd22d1ddb - pristine_git_object: b34dbbd34b61990962b67e7d8d8dea18297bd7dc + last_write_checksum: sha1:b512a61a1513ac50731ccf154b85e8d746f965db + pristine_git_object: da7156eb30c23a89648d8cc7e674910b12a0c896 + src/mistralai/client/models/moderationllmv2categorythresholds.py: + id: 4c2a8ff4d52b + last_write_checksum: sha1:2194db15a54038f89890c7d5b56aa50a2df0603c + pristine_git_object: 1754582b849a16dbf77fd9943edcc6f2f1c55ee2 + src/mistralai/client/models/moderationllmv2config.py: + id: bb511e7c628b + last_write_checksum: sha1:853c419e237e290057a6454ab99d492311d7b67b + pristine_git_object: df2b04bdfb831a71555a849209f10a1ef06d0564 src/mistralai/client/models/moderationobject.py: id: 132faad0549a last_write_checksum: sha1:a8c1454a533e466216ef98dd198ae8959f51fa76 @@ -3558,6 +3578,10 @@ trackedFiles: id: 06bab279cb31 last_write_checksum: sha1:b9158e575276c1e0a510c129347b9a98c5a70567 pristine_git_object: a8a8ec3d8d8a58deb3c1f8358c6dce5a9734f89c + src/mistralai/client/models/oauth2tokenauth.py: + id: 167c3b8a104e + last_write_checksum: sha1:146c4ce3a29c0bedcb575cf7fa32cb97aa375c5b + pristine_git_object: 76ebfd0de6c7457bcecb1aee026ea16ffa8a7cbd src/mistralai/client/models/observabilityerrorcode.py: id: ae572b470a30 last_write_checksum: sha1:f52abcb9e8f504fd9993679611912d3b64270452 @@ -3936,8 +3960,8 @@ trackedFiles: pristine_git_object: 41c3a36574b60207207535a6930ae094c23a8fff src/mistralai/client/models/updateagentrequest.py: id: 914b4b2be67a - last_write_checksum: sha1:940fbc17f2b76bacbdc38b1ad29abeb5eda33ed9 - pristine_git_object: dbe3499ed323b995453cd06ec54b55f75d2c4241 + last_write_checksum: sha1:8f522b8d81152da1248a00073265d927c43ecae5 + pristine_git_object: 584c034c988dbc50e7889b207118eb5f4545b09e src/mistralai/client/models/updateconnectorrequest.py: id: a761cd154109 last_write_checksum: sha1:cd461734ab9df9ca0d254c69a552b74b8f63f20e @@ -6025,7 +6049,7 @@ examples: application/json: {} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Python SDK Changes:\n* `mistral.beta.conversations.start()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.beta.conversations.append()`: \n * `request.inputs.union(Array)[]` **Changed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.beta.conversations.get_history()`: \n * `response.entries[]` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.beta.conversations.get_messages()`: \n * `response.messages[]` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.beta.conversations.restart()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.agents.stream()`: \n * `request.messages[].union(tool).content.union(Array)[]` **Changed**\n * `response.[].data.choices[].delta.content.union(Array)[]` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.agents.complete()`: \n * `request.messages[]` **Changed**\n * `response.choices[].message.content.union(Array)[]` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.fim.stream()`: \n * `response.[].data.choices[].delta.content.union(Array)[]` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.fim.complete()`: \n * `response.choices[].message.content.union(Array)[]` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.chat.stream()`: \n * `request.messages[]` **Changed**\n * `response.[].data.choices[].delta.content.union(Array)[]` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.chat.complete()`: \n * `request.messages[].union(tool).content.union(Array)[]` **Changed**\n * `response.choices[].message.content.union(Array)[]` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.beta.conversations.restart_stream()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.[].data.union(message.output.delta).content.union(OutputContentChunks)` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.beta.conversations.append_stream()`: \n * `request.inputs.union(Array)[]` **Changed** (Breaking ⚠️)\n * `response.[].data.union(message.output.delta).content.union(OutputContentChunks)` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.beta.conversations.start_stream()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.[].data.union(message.output.delta).content.union(OutputContentChunks)` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.beta.connectors.delete()`: **Added**\n* `mistral.beta.conversations.delete()`: `error.detail[]` **Changed**\n* `mistral.beta.observability.judges.delete()`: **Added**\n* `mistral.beta.observability.judges.update()`: **Added**\n* `mistral.beta.observability.campaigns.create()`: **Added**\n* `mistral.beta.observability.campaigns.list()`: **Added**\n* `mistral.beta.observability.campaigns.fetch()`: **Added**\n* `mistral.beta.observability.campaigns.delete()`: **Added**\n* `mistral.beta.observability.campaigns.fetch_status()`: **Added**\n* `mistral.beta.observability.campaigns.list_events()`: **Added**\n* `mistral.beta.observability.datasets.create()`: **Added**\n* `mistral.beta.observability.datasets.list()`: **Added**\n* `mistral.beta.observability.datasets.fetch()`: **Added**\n* `mistral.beta.observability.datasets.delete()`: **Added**\n* `mistral.beta.observability.datasets.update()`: **Added**\n* `mistral.beta.observability.datasets.list_records()`: **Added**\n* `mistral.beta.observability.datasets.create_record()`: **Added**\n* `mistral.beta.observability.datasets.import_from_campaign()`: **Added**\n* `mistral.beta.observability.datasets.import_from_explorer()`: **Added**\n* `mistral.beta.observability.datasets.import_from_file()`: **Added**\n* `mistral.beta.observability.datasets.import_from_playground()`: **Added**\n* `mistral.beta.observability.datasets.import_from_dataset_records()`: **Added**\n* `mistral.beta.observability.datasets.export_to_jsonl()`: **Added**\n* `mistral.beta.observability.datasets.fetch_task()`: **Added**\n* `mistral.beta.observability.datasets.list_tasks()`: **Added**\n* `mistral.beta.observability.datasets.records.fetch()`: **Added**\n* `mistral.beta.observability.datasets.records.delete()`: **Added**\n* `mistral.beta.observability.datasets.records.bulk_delete()`: **Added**\n* `mistral.beta.observability.datasets.records.judge()`: **Added**\n* `mistral.beta.observability.datasets.records.update_payload()`: **Added**\n* `mistral.beta.observability.datasets.records.update_properties()`: **Added**\n* `mistral.beta.connectors.create()`: **Added**\n* `mistral.beta.connectors.list()`: **Added**\n* `mistral.beta.connectors.call_tool()`: **Added**\n* `mistral.beta.connectors.get()`: **Added**\n* `mistral.beta.connectors.update()`: **Added**\n* `mistral.beta.observability.judges.list()`: **Added**\n* `mistral.models.list()`: \n * `request` **Changed**\n * `error.status[422]` **Added**\n* `mistral.models.retrieve()`: `error.detail[]` **Changed**\n* `mistral.beta.observability.judges.create()`: **Added**\n* `mistral.beta.observability.chat_completion_events.fields.fetch_option_counts()`: **Added**\n* `mistral.beta.observability.chat_completion_events.fields.fetch_options()`: **Added**\n* `mistral.models.delete()`: `error.detail[]` **Changed**\n* `mistral.beta.conversations.list()`: \n * `response.[].union(ModelConversation).guardrails` **Added**\n * `error.detail[]` **Changed**\n* `mistral.beta.conversations.get()`: \n * `response.union(ModelConversation).guardrails` **Added**\n * `error.detail[]` **Changed**\n* `mistral.beta.observability.judges.fetch()`: **Added**\n* `mistral.beta.agents.create()`: \n * `request.guardrails` **Added**\n * `response.guardrails` **Added**\n * `error.detail[]` **Changed**\n* `mistral.beta.agents.list()`: \n * `response.[].guardrails` **Added**\n * `error.detail[]` **Changed**\n* `mistral.beta.agents.get()`: \n * `response.guardrails` **Added**\n * `error.detail[]` **Changed**\n* `mistral.beta.agents.update()`: \n * `request.guardrails` **Added**\n * `response.guardrails` **Added**\n * `error.detail[]` **Changed**\n* `mistral.beta.agents.delete()`: `error.detail[]` **Changed**\n* `mistral.beta.agents.update_version()`: \n * `response.guardrails` **Added**\n * `error.detail[]` **Changed**\n* `mistral.beta.agents.list_versions()`: \n * `response.[].guardrails` **Added**\n * `error.detail[]` **Changed**\n* `mistral.beta.agents.get_version()`: \n * `response.guardrails` **Added**\n * `error.detail[]` **Changed**\n* `mistral.beta.agents.create_version_alias()`: `error.detail[]` **Changed**\n* `mistral.beta.agents.list_version_aliases()`: `error.detail[]` **Changed**\n* `mistral.beta.agents.delete_version_alias()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.create()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.get()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.delete()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.update()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.list()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.upload()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.get()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.update()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.delete()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.text_content()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.status()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.get_signed_url()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.extracted_text_signed_url()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.reprocess()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.accesses.list()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.accesses.update_or_create()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.accesses.delete()`: `error.detail[]` **Changed**\n* `mistral.files.upload()`: \n * `request` **Changed**\n * `response` **Changed**\n* `mistral.files.list()`: `response.data[]` **Changed**\n* `mistral.files.retrieve()`: `response` **Changed**\n* `mistral.beta.observability.chat_completion_events.fields.list()`: **Added**\n* `mistral.beta.observability.chat_completion_events.judge()`: **Added**\n* `mistral.beta.observability.chat_completion_events.fetch_similar_events()`: **Added**\n* `mistral.beta.observability.chat_completion_events.fetch()`: **Added**\n* `mistral.beta.observability.chat_completion_events.search_ids()`: **Added**\n* `mistral.beta.observability.chat_completion_events.search()`: **Added**\n* `mistral.embeddings.create()`: `error.detail[]` **Changed**\n* `mistral.classifiers.moderate()`: `error.detail[]` **Changed**\n* `mistral.classifiers.moderate_chat()`: \n * `request.inputs.union(Array<>)[]` **Changed**\n * `error.detail[]` **Changed**\n* `mistral.classifiers.classify()`: `error.detail[]` **Changed**\n* `mistral.classifiers.classify_chat()`: \n * `request.input.union(Array)[].messages[].union(tool).content.union(Array)[]` **Changed**\n * `error.detail[]` **Changed**\n* `mistral.ocr.process()`: `error.detail[]` **Changed**\n" +releaseNotes: "## Python SDK Changes:\n* `mistral.chat.complete()`: \n * `request.messages[].union(user).content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n * `response.choices[].message.content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n* `mistral.classifiers.classify_chat()`: \n * `request.input.union(InstructRequest).messages[].union(user).content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n* `mistral.classifiers.moderate_chat()`: \n * `request.inputs.union(Array<>)[].union(user).content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n* `mistral.agents.stream()`: \n * `request.messages[].union(user).content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n * `response.[].data.choices[].delta.content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n* `mistral.agents.complete()`: \n * `request.messages[].union(user).content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n * `response.choices[].message.content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n* `mistral.fim.stream()`: `response.[].data.choices[].delta.content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n* `mistral.fim.complete()`: `response.choices[].message.content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n* `mistral.chat.stream()`: \n * `request.messages[].union(user).content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n * `response.[].data.choices[].delta.content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n* `mistral.beta.conversations.restart_stream()`: \n * `request.guardrails[]` **Changed**\n* `mistral.beta.agents.update()`: \n * `request` **Changed**\n * `response` **Changed**\n* `mistral.beta.agents.update_version()`: `response` **Changed**\n* `mistral.beta.agents.list_versions()`: `response.[]` **Changed**\n* `mistral.beta.agents.get_version()`: `response` **Changed**\n* `mistral.beta.agents.get()`: `response` **Changed**\n* `mistral.beta.agents.list()`: `response.[]` **Changed**\n* `mistral.beta.agents.create()`: \n * `request` **Changed**\n * `response` **Changed**\n* `mistral.beta.conversations.start()`: `request` **Changed**\n* `mistral.beta.conversations.start_stream()`: `request` **Changed**\n* `mistral.beta.conversations.restart()`: \n * `request.guardrails[]` **Changed**\n* `mistral.beta.conversations.get()`: `response.union(ModelConversation)` **Changed**\n* `mistral.beta.conversations.list()`: `response.[].union(ModelConversation)` **Changed**\n" generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 1205fef8..17660f7a 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -31,7 +31,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.0.0 + version: 2.0.1 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 748a2257..0e45ebb7 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,11 +16,11 @@ sources: - speakeasy-sdk-regen-1773084660 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:640293da26384ecedd813123997d7946815084924b8cbd91069aea0829d28b53 - sourceBlobDigest: sha256:940626b1345a63b95ae840bd523458ea2b418767d64b864ad06ded4d38c6ea4d + sourceRevisionDigest: sha256:4ca07ff6dd708405d376cf74c8111d260aaa3aace7250a406ffbad01f3dfee44 + sourceBlobDigest: sha256:3a9d8e056455da40ba3d6b6abb665cf65ccc5b1ba63d84fb823c3156bd385a30 tags: - latest - - speakeasy-sdk-regen-1773084143 + - speakeasy-sdk-regen-1773249358 targets: mistralai-azure-sdk: source: mistral-azure-source @@ -39,10 +39,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:640293da26384ecedd813123997d7946815084924b8cbd91069aea0829d28b53 - sourceBlobDigest: sha256:940626b1345a63b95ae840bd523458ea2b418767d64b864ad06ded4d38c6ea4d + sourceRevisionDigest: sha256:4ca07ff6dd708405d376cf74c8111d260aaa3aace7250a406ffbad01f3dfee44 + sourceBlobDigest: sha256:3a9d8e056455da40ba3d6b6abb665cf65ccc5b1ba63d84fb823c3156bd385a30 codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:57a8f791effc62a15982c2ca9560bddbf4a9d03ae9cb0171f352e73a34e7cf61 + codeSamplesRevisionDigest: sha256:b626a4c6b6a48943ae2fd215af3aa30cb923f2bad94bf4bbbb6a9c5838ad1c79 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.729.0 diff --git a/RELEASES.md b/RELEASES.md index 99c72716..3c67586a 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -398,4 +398,14 @@ Based on: ### Generated - [python v2.0.0] . ### Releases -- [PyPI v2.0.0] https://pypi.org/project/mistralai/2.0.0 - . \ No newline at end of file +- [PyPI v2.0.0] https://pypi.org/project/mistralai/2.0.0 - . + +## 2026-03-11 17:15:32 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.729.0 (2.841.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.0.1] . +### Releases +- [PyPI v2.0.1] https://pypi.org/project/mistralai/2.0.1 - . \ No newline at end of file diff --git a/docs/models/agenttool.md b/docs/models/agenttool.md index 022f7e10..0722e955 100644 --- a/docs/models/agenttool.md +++ b/docs/models/agenttool.md @@ -9,6 +9,12 @@ value: models.CodeInterpreterTool = /* values here */ ``` +### `models.CustomConnector` + +```python +value: models.CustomConnector = /* values here */ +``` + ### `models.DocumentLibraryTool` ```python diff --git a/docs/models/apikeyauth.md b/docs/models/apikeyauth.md new file mode 100644 index 00000000..1fbff10e --- /dev/null +++ b/docs/models/apikeyauth.md @@ -0,0 +1,9 @@ +# APIKeyAuth + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `type` | *Literal["api-key"]* | :heavy_check_mark: | N/A | +| `value` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/audiourl.md b/docs/models/audiourl.md deleted file mode 100644 index 45ad7493..00000000 --- a/docs/models/audiourl.md +++ /dev/null @@ -1,13 +0,0 @@ -# AudioURL - -Audio URL. - -Attributes: - url: The URL of the audio file. - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `url` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/audiourlchunk.md b/docs/models/audiourlchunk.md deleted file mode 100644 index 56af9df9..00000000 --- a/docs/models/audiourlchunk.md +++ /dev/null @@ -1,15 +0,0 @@ -# AudioURLChunk - -Audio URL chunk. - -Attributes: - type: The type of the chunk, which is always `ChunkTypes.audio_url`. - audio_url: The URL of the audio file. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `type` | *Literal["audio_url"]* | :heavy_check_mark: | N/A | -| `audio_url` | [models.AudioURLUnion](../models/audiourlunion.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/audiourlunion.md b/docs/models/audiourlunion.md deleted file mode 100644 index 96669066..00000000 --- a/docs/models/audiourlunion.md +++ /dev/null @@ -1,17 +0,0 @@ -# AudioURLUnion - - -## Supported Types - -### `str` - -```python -value: str = /* values here */ -``` - -### `models.AudioURL` - -```python -value: models.AudioURL = /* values here */ -``` - diff --git a/docs/models/authorization.md b/docs/models/authorization.md new file mode 100644 index 00000000..11ea5c6a --- /dev/null +++ b/docs/models/authorization.md @@ -0,0 +1,17 @@ +# Authorization + + +## Supported Types + +### `models.APIKeyAuth` + +```python +value: models.APIKeyAuth = /* values here */ +``` + +### `models.OAuth2TokenAuth` + +```python +value: models.OAuth2TokenAuth = /* values here */ +``` + diff --git a/docs/models/contentchunk.md b/docs/models/contentchunk.md index 5a8ef58c..cb7e51d3 100644 --- a/docs/models/contentchunk.md +++ b/docs/models/contentchunk.md @@ -45,9 +45,3 @@ value: models.ThinkChunk = /* values here */ value: models.AudioChunk = /* values here */ ``` -### `models.AudioURLChunk` - -```python -value: models.AudioURLChunk = /* values here */ -``` - diff --git a/docs/models/conversationrequest.md b/docs/models/conversationrequest.md index 9aabc52a..903d13c1 100644 --- a/docs/models/conversationrequest.md +++ b/docs/models/conversationrequest.md @@ -10,7 +10,7 @@ | `store` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | `handoff_execution` | [OptionalNullable[models.ConversationRequestHandoffExecution]](../models/conversationrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `tools` | List[[models.ConversationRequestTool](../models/conversationrequesttool.md)] | :heavy_minus_sign: | List of tools which are available to the model during the conversation. | +| `tools` | List[[models.ConversationRequestTool](../models/conversationrequesttool.md)] | :heavy_minus_sign: | N/A | | `completion_args` | [OptionalNullable[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | N/A | | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | diff --git a/docs/models/conversationrequesttool.md b/docs/models/conversationrequesttool.md index 2e4e8d01..5a58e6d1 100644 --- a/docs/models/conversationrequesttool.md +++ b/docs/models/conversationrequesttool.md @@ -9,6 +9,12 @@ value: models.CodeInterpreterTool = /* values here */ ``` +### `models.CustomConnector` + +```python +value: models.CustomConnector = /* values here */ +``` + ### `models.DocumentLibraryTool` ```python diff --git a/docs/models/conversationstreamrequest.md b/docs/models/conversationstreamrequest.md index f792c263..8debea1c 100644 --- a/docs/models/conversationstreamrequest.md +++ b/docs/models/conversationstreamrequest.md @@ -10,7 +10,7 @@ | `store` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | `handoff_execution` | [OptionalNullable[models.ConversationStreamRequestHandoffExecution]](../models/conversationstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `tools` | List[[models.ConversationStreamRequestTool](../models/conversationstreamrequesttool.md)] | :heavy_minus_sign: | List of tools which are available to the model during the conversation. | +| `tools` | List[[models.ConversationStreamRequestTool](../models/conversationstreamrequesttool.md)] | :heavy_minus_sign: | N/A | | `completion_args` | [OptionalNullable[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | N/A | | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | diff --git a/docs/models/conversationstreamrequesttool.md b/docs/models/conversationstreamrequesttool.md index 0f75f82b..82ef640a 100644 --- a/docs/models/conversationstreamrequesttool.md +++ b/docs/models/conversationstreamrequesttool.md @@ -9,6 +9,12 @@ value: models.CodeInterpreterTool = /* values here */ ``` +### `models.CustomConnector` + +```python +value: models.CustomConnector = /* values here */ +``` + ### `models.DocumentLibraryTool` ```python diff --git a/docs/models/createagentrequesttool.md b/docs/models/createagentrequesttool.md index c6ed3e98..e45d57bc 100644 --- a/docs/models/createagentrequesttool.md +++ b/docs/models/createagentrequesttool.md @@ -9,6 +9,12 @@ value: models.CodeInterpreterTool = /* values here */ ``` +### `models.CustomConnector` + +```python +value: models.CustomConnector = /* values here */ +``` + ### `models.DocumentLibraryTool` ```python diff --git a/docs/models/customconnector.md b/docs/models/customconnector.md new file mode 100644 index 00000000..0a0b6921 --- /dev/null +++ b/docs/models/customconnector.md @@ -0,0 +1,11 @@ +# CustomConnector + + +## 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 diff --git a/docs/models/guardrailconfig.md b/docs/models/guardrailconfig.md index 235d7204..1276462c 100644 --- a/docs/models/guardrailconfig.md +++ b/docs/models/guardrailconfig.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `block_on_error` | *Optional[bool]* | :heavy_minus_sign: | If true, return HTTP 403 and block request in the event of a server-side error | -| `moderation_llm_v1` | [Nullable[models.ModerationLlmv1Config]](../models/moderationllmv1config.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `block_on_error` | *Optional[bool]* | :heavy_minus_sign: | If true, return HTTP 403 and block request in the event of a server-side error | +| `moderation_llm_v1` | [OptionalNullable[models.ModerationLlmv1Config]](../models/moderationllmv1config.md) | :heavy_minus_sign: | N/A | +| `moderation_llm_v2` | [OptionalNullable[models.ModerationLlmv2Config]](../models/moderationllmv2config.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/modelconversationtool.md b/docs/models/modelconversationtool.md index 87235567..0b6a45f7 100644 --- a/docs/models/modelconversationtool.md +++ b/docs/models/modelconversationtool.md @@ -9,6 +9,12 @@ value: models.CodeInterpreterTool = /* values here */ ``` +### `models.CustomConnector` + +```python +value: models.CustomConnector = /* values here */ +``` + ### `models.DocumentLibraryTool` ```python diff --git a/docs/models/moderationllmv1action.md b/docs/models/moderationllmaction.md similarity index 80% rename from docs/models/moderationllmv1action.md rename to docs/models/moderationllmaction.md index e24d6a22..951880b6 100644 --- a/docs/models/moderationllmv1action.md +++ b/docs/models/moderationllmaction.md @@ -1,4 +1,4 @@ -# ModerationLlmv1Action +# ModerationLLMAction ## Values diff --git a/docs/models/moderationllmv1config.md b/docs/models/moderationllmv1config.md index 0c410947..bdb5812b 100644 --- a/docs/models/moderationllmv1config.md +++ b/docs/models/moderationllmv1config.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | | `model_name` | *Optional[str]* | :heavy_minus_sign: | Override model name. Should be omitted in general. | -| `custom_category_thresholds` | [OptionalNullable[models.ModerationLlmv1CategoryThresholds]](../models/moderationllmv1categorythresholds.md) | :heavy_minus_sign: | Override default thresholds for specific categories. | +| `custom_category_thresholds` | [OptionalNullable[models.ModerationLlmv1CategoryThresholds]](../models/moderationllmv1categorythresholds.md) | :heavy_minus_sign: | N/A | | `ignore_other_categories` | *Optional[bool]* | :heavy_minus_sign: | If true, only evaluate categories in custom_category_thresholds; others are ignored. | -| `action` | [Optional[models.ModerationLlmv1Action]](../models/moderationllmv1action.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `action` | [Optional[models.ModerationLLMAction]](../models/moderationllmaction.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/moderationllmv2categorythresholds.md b/docs/models/moderationllmv2categorythresholds.md new file mode 100644 index 00000000..e95b81b0 --- /dev/null +++ b/docs/models/moderationllmv2categorythresholds.md @@ -0,0 +1,18 @@ +# ModerationLlmv2CategoryThresholds + + +## Fields + +| Field | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `sexual` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `hate_and_discrimination` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `violence_and_threats` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `dangerous` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `criminal` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `selfharm` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `health` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `financial` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `law` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `pii` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `jailbreaking` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/moderationllmv2config.md b/docs/models/moderationllmv2config.md new file mode 100644 index 00000000..e928506c --- /dev/null +++ b/docs/models/moderationllmv2config.md @@ -0,0 +1,11 @@ +# ModerationLlmv2Config + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `model_name` | *Optional[str]* | :heavy_minus_sign: | Override model name. Should be omitted in general. | +| `custom_category_thresholds` | [OptionalNullable[models.ModerationLlmv2CategoryThresholds]](../models/moderationllmv2categorythresholds.md) | :heavy_minus_sign: | N/A | +| `ignore_other_categories` | *Optional[bool]* | :heavy_minus_sign: | If true, only evaluate categories in custom_category_thresholds; others are ignored. | +| `action` | [Optional[models.ModerationLLMAction]](../models/moderationllmaction.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/oauth2tokenauth.md b/docs/models/oauth2tokenauth.md new file mode 100644 index 00000000..89f80436 --- /dev/null +++ b/docs/models/oauth2tokenauth.md @@ -0,0 +1,9 @@ +# OAuth2TokenAuth + + +## Fields + +| Field | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `type` | *Literal["oauth2-token"]* | :heavy_check_mark: | N/A | +| `value` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/updateagentrequesttool.md b/docs/models/updateagentrequesttool.md index e358b1ed..cf590a2f 100644 --- a/docs/models/updateagentrequesttool.md +++ b/docs/models/updateagentrequesttool.md @@ -9,6 +9,12 @@ value: models.CodeInterpreterTool = /* values here */ ``` +### `models.CustomConnector` + +```python +value: models.CustomConnector = /* values here */ +``` + ### `models.DocumentLibraryTool` ```python diff --git a/docs/sdks/conversations/README.md b/docs/sdks/conversations/README.md index 083b293d..0803b398 100644 --- a/docs/sdks/conversations/README.md +++ b/docs/sdks/conversations/README.md @@ -54,7 +54,7 @@ with Mistral( | `store` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | `handoff_execution` | [OptionalNullable[models.ConversationRequestHandoffExecution]](../../models/conversationrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `tools` | List[[models.ConversationRequestTool](../../models/conversationrequesttool.md)] | :heavy_minus_sign: | List of tools which are available to the model during the conversation. | +| `tools` | List[[models.ConversationRequestTool](../../models/conversationrequesttool.md)] | :heavy_minus_sign: | N/A | | `completion_args` | [OptionalNullable[models.CompletionArgs]](../../models/completionargs.md) | :heavy_minus_sign: | N/A | | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | @@ -428,7 +428,7 @@ with Mistral( | `store` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | `handoff_execution` | [OptionalNullable[models.ConversationStreamRequestHandoffExecution]](../../models/conversationstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `tools` | List[[models.ConversationStreamRequestTool](../../models/conversationstreamrequesttool.md)] | :heavy_minus_sign: | List of tools which are available to the model during the conversation. | +| `tools` | List[[models.ConversationStreamRequestTool](../../models/conversationstreamrequesttool.md)] | :heavy_minus_sign: | N/A | | `completion_args` | [OptionalNullable[models.CompletionArgs]](../../models/completionargs.md) | :heavy_minus_sign: | N/A | | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | diff --git a/pyproject.toml b/pyproject.toml index a2e89ff9..52251124 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.0.0" +version = "2.0.1" 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 c7251c9c..7c37028e 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.0.0" +__version__: str = "2.0.1" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.841.0" -__user_agent__: str = "speakeasy-sdk/python 2.0.0 2.841.0 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.0.1 2.841.0 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/conversations.py b/src/mistralai/client/conversations.py index a4af31f3..99f3a33e 100644 --- a/src/mistralai/client/conversations.py +++ b/src/mistralai/client/conversations.py @@ -235,12 +235,12 @@ def start( models.ConversationRequestHandoffExecution ] = UNSET, instructions: OptionalNullable[str] = UNSET, - tools: Optional[ + tools: OptionalNullable[ Union[ List[models.ConversationRequestTool], List[models.ConversationRequestToolTypedDict], ] - ] = None, + ] = UNSET, completion_args: OptionalNullable[ Union[models.CompletionArgs, models.CompletionArgsTypedDict] ] = UNSET, @@ -272,7 +272,7 @@ def start( :param store: :param handoff_execution: :param instructions: - :param tools: List of tools which are available to the model during the conversation. + :param tools: :param completion_args: :param guardrails: :param name: @@ -303,7 +303,7 @@ def start( handoff_execution=handoff_execution, instructions=instructions, tools=utils.get_pydantic_model( - tools, Optional[List[models.ConversationRequestTool]] + tools, OptionalNullable[List[models.ConversationRequestTool]] ), completion_args=utils.get_pydantic_model( completion_args, OptionalNullable[models.CompletionArgs] @@ -389,12 +389,12 @@ async def start_async( models.ConversationRequestHandoffExecution ] = UNSET, instructions: OptionalNullable[str] = UNSET, - tools: Optional[ + tools: OptionalNullable[ Union[ List[models.ConversationRequestTool], List[models.ConversationRequestToolTypedDict], ] - ] = None, + ] = UNSET, completion_args: OptionalNullable[ Union[models.CompletionArgs, models.CompletionArgsTypedDict] ] = UNSET, @@ -426,7 +426,7 @@ async def start_async( :param store: :param handoff_execution: :param instructions: - :param tools: List of tools which are available to the model during the conversation. + :param tools: :param completion_args: :param guardrails: :param name: @@ -457,7 +457,7 @@ async def start_async( handoff_execution=handoff_execution, instructions=instructions, tools=utils.get_pydantic_model( - tools, Optional[List[models.ConversationRequestTool]] + tools, OptionalNullable[List[models.ConversationRequestTool]] ), completion_args=utils.get_pydantic_model( completion_args, OptionalNullable[models.CompletionArgs] @@ -2019,12 +2019,12 @@ def start_stream( models.ConversationStreamRequestHandoffExecution ] = UNSET, instructions: OptionalNullable[str] = UNSET, - tools: Optional[ + tools: OptionalNullable[ Union[ List[models.ConversationStreamRequestTool], List[models.ConversationStreamRequestToolTypedDict], ] - ] = None, + ] = UNSET, completion_args: OptionalNullable[ Union[models.CompletionArgs, models.CompletionArgsTypedDict] ] = UNSET, @@ -2056,7 +2056,7 @@ def start_stream( :param store: :param handoff_execution: :param instructions: - :param tools: List of tools which are available to the model during the conversation. + :param tools: :param completion_args: :param guardrails: :param name: @@ -2087,7 +2087,7 @@ def start_stream( handoff_execution=handoff_execution, instructions=instructions, tools=utils.get_pydantic_model( - tools, Optional[List[models.ConversationStreamRequestTool]] + tools, OptionalNullable[List[models.ConversationStreamRequestTool]] ), completion_args=utils.get_pydantic_model( completion_args, OptionalNullable[models.CompletionArgs] @@ -2180,12 +2180,12 @@ async def start_stream_async( models.ConversationStreamRequestHandoffExecution ] = UNSET, instructions: OptionalNullable[str] = UNSET, - tools: Optional[ + tools: OptionalNullable[ Union[ List[models.ConversationStreamRequestTool], List[models.ConversationStreamRequestToolTypedDict], ] - ] = None, + ] = UNSET, completion_args: OptionalNullable[ Union[models.CompletionArgs, models.CompletionArgsTypedDict] ] = UNSET, @@ -2217,7 +2217,7 @@ async def start_stream_async( :param store: :param handoff_execution: :param instructions: - :param tools: List of tools which are available to the model during the conversation. + :param tools: :param completion_args: :param guardrails: :param name: @@ -2248,7 +2248,7 @@ async def start_stream_async( handoff_execution=handoff_execution, instructions=instructions, tools=utils.get_pydantic_model( - tools, Optional[List[models.ConversationStreamRequestTool]] + tools, OptionalNullable[List[models.ConversationStreamRequestTool]] ), completion_args=utils.get_pydantic_model( completion_args, OptionalNullable[models.CompletionArgs] diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index 741c80f3..e0fd60e4 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -141,6 +141,7 @@ ) from .annotations import Annotations, AnnotationsTypedDict, Audience from .apiendpoint import APIEndpoint + from .apikeyauth import APIKeyAuth, APIKeyAuthTypedDict from .archivemodelresponse import ( ArchiveModelResponse, ArchiveModelResponseTypedDict, @@ -163,13 +164,6 @@ AudioTranscriptionRequestStream, AudioTranscriptionRequestStreamTypedDict, ) - from .audiourl import AudioURL, AudioURLTypedDict - from .audiourlchunk import ( - AudioURLChunk, - AudioURLChunkTypedDict, - AudioURLUnion, - AudioURLUnionTypedDict, - ) from .authdata import AuthData, AuthDataTypedDict from .basefielddefinition import ( BaseFieldDefinition, @@ -508,6 +502,13 @@ CreateLibraryRequest, CreateLibraryRequestTypedDict, ) + from .customconnector import ( + Authorization, + AuthorizationTypedDict, + CustomConnector, + CustomConnectorTypedDict, + UnknownAuthorization, + ) from .dataset import Dataset, DatasetTypedDict from .datasetimporttask import DatasetImportTask, DatasetImportTaskTypedDict from .datasetpreview import DatasetPreview, DatasetPreviewTypedDict @@ -1068,7 +1069,7 @@ ModelListTypedDict, UnknownModelListData, ) - from .moderationllmv1action import ModerationLlmv1Action + from .moderationllmaction import ModerationLLMAction from .moderationllmv1categorythresholds import ( ModerationLlmv1CategoryThresholds, ModerationLlmv1CategoryThresholdsTypedDict, @@ -1077,8 +1078,17 @@ ModerationLlmv1Config, ModerationLlmv1ConfigTypedDict, ) + from .moderationllmv2categorythresholds import ( + ModerationLlmv2CategoryThresholds, + ModerationLlmv2CategoryThresholdsTypedDict, + ) + from .moderationllmv2config import ( + ModerationLlmv2Config, + ModerationLlmv2ConfigTypedDict, + ) from .moderationobject import ModerationObject, ModerationObjectTypedDict from .moderationresponse import ModerationResponse, ModerationResponseTypedDict + from .oauth2tokenauth import OAuth2TokenAuth, OAuth2TokenAuthTypedDict from .observabilityerrorcode import ObservabilityErrorCode from .observabilityerrordetail import ( ObservabilityErrorDetail, @@ -1429,6 +1439,8 @@ __all__ = [ "APIEndpoint", + "APIKeyAuth", + "APIKeyAuthTypedDict", "Agent", "AgentAliasResponse", "AgentAliasResponseTypedDict", @@ -1531,14 +1543,10 @@ "AudioTranscriptionRequestStream", "AudioTranscriptionRequestStreamTypedDict", "AudioTranscriptionRequestTypedDict", - "AudioURL", - "AudioURLChunk", - "AudioURLChunkTypedDict", - "AudioURLTypedDict", - "AudioURLUnion", - "AudioURLUnionTypedDict", "AuthData", "AuthDataTypedDict", + "Authorization", + "AuthorizationTypedDict", "BaseFieldDefinition", "BaseFieldDefinitionTypedDict", "BaseModelCard", @@ -1770,6 +1778,8 @@ "CreateJudgeRequestTypedDict", "CreateLibraryRequest", "CreateLibraryRequestTypedDict", + "CustomConnector", + "CustomConnectorTypedDict", "Dataset", "DatasetImportTask", "DatasetImportTaskTypedDict", @@ -2143,17 +2153,23 @@ "ModelListData", "ModelListDataTypedDict", "ModelListTypedDict", - "ModerationLlmv1Action", + "ModerationLLMAction", "ModerationLlmv1CategoryThresholds", "ModerationLlmv1CategoryThresholdsTypedDict", "ModerationLlmv1Config", "ModerationLlmv1ConfigTypedDict", + "ModerationLlmv2CategoryThresholds", + "ModerationLlmv2CategoryThresholdsTypedDict", + "ModerationLlmv2Config", + "ModerationLlmv2ConfigTypedDict", "ModerationObject", "ModerationObjectTypedDict", "ModerationResponse", "ModerationResponseTypedDict", "MultiPartBodyParams", "MultiPartBodyParamsTypedDict", + "OAuth2TokenAuth", + "OAuth2TokenAuthTypedDict", "OCRImageObject", "OCRImageObjectTypedDict", "OCRPageDimensions", @@ -2363,6 +2379,7 @@ "UnarchiveModelResponse", "UnarchiveModelResponseTypedDict", "UnknownAgentTool", + "UnknownAuthorization", "UnknownClassifierFineTuningJobDetailsIntegration", "UnknownClassifierFineTuningJobIntegration", "UnknownCompletionFineTuningJobDetailsIntegration", @@ -2513,6 +2530,8 @@ "AnnotationsTypedDict": ".annotations", "Audience": ".annotations", "APIEndpoint": ".apiendpoint", + "APIKeyAuth": ".apikeyauth", + "APIKeyAuthTypedDict": ".apikeyauth", "ArchiveModelResponse": ".archivemodelresponse", "ArchiveModelResponseTypedDict": ".archivemodelresponse", "AssistantMessage": ".assistantmessage", @@ -2530,12 +2549,6 @@ "AudioTranscriptionRequestTypedDict": ".audiotranscriptionrequest", "AudioTranscriptionRequestStream": ".audiotranscriptionrequeststream", "AudioTranscriptionRequestStreamTypedDict": ".audiotranscriptionrequeststream", - "AudioURL": ".audiourl", - "AudioURLTypedDict": ".audiourl", - "AudioURLChunk": ".audiourlchunk", - "AudioURLChunkTypedDict": ".audiourlchunk", - "AudioURLUnion": ".audiourlchunk", - "AudioURLUnionTypedDict": ".audiourlchunk", "AuthData": ".authdata", "AuthDataTypedDict": ".authdata", "BaseFieldDefinition": ".basefielddefinition", @@ -2783,6 +2796,11 @@ "CreateJudgeRequestTypedDict": ".createjudgerequest", "CreateLibraryRequest": ".createlibraryrequest", "CreateLibraryRequestTypedDict": ".createlibraryrequest", + "Authorization": ".customconnector", + "AuthorizationTypedDict": ".customconnector", + "CustomConnector": ".customconnector", + "CustomConnectorTypedDict": ".customconnector", + "UnknownAuthorization": ".customconnector", "Dataset": ".dataset", "DatasetTypedDict": ".dataset", "DatasetImportTask": ".datasetimporttask", @@ -3168,15 +3186,21 @@ "ModelListDataTypedDict": ".modellist", "ModelListTypedDict": ".modellist", "UnknownModelListData": ".modellist", - "ModerationLlmv1Action": ".moderationllmv1action", + "ModerationLLMAction": ".moderationllmaction", "ModerationLlmv1CategoryThresholds": ".moderationllmv1categorythresholds", "ModerationLlmv1CategoryThresholdsTypedDict": ".moderationllmv1categorythresholds", "ModerationLlmv1Config": ".moderationllmv1config", "ModerationLlmv1ConfigTypedDict": ".moderationllmv1config", + "ModerationLlmv2CategoryThresholds": ".moderationllmv2categorythresholds", + "ModerationLlmv2CategoryThresholdsTypedDict": ".moderationllmv2categorythresholds", + "ModerationLlmv2Config": ".moderationllmv2config", + "ModerationLlmv2ConfigTypedDict": ".moderationllmv2config", "ModerationObject": ".moderationobject", "ModerationObjectTypedDict": ".moderationobject", "ModerationResponse": ".moderationresponse", "ModerationResponseTypedDict": ".moderationresponse", + "OAuth2TokenAuth": ".oauth2tokenauth", + "OAuth2TokenAuthTypedDict": ".oauth2tokenauth", "ObservabilityErrorCode": ".observabilityerrorcode", "ObservabilityErrorDetail": ".observabilityerrordetail", "ObservabilityErrorDetailTypedDict": ".observabilityerrordetail", diff --git a/src/mistralai/client/models/agent.py b/src/mistralai/client/models/agent.py index 1fa27f08..068b3226 100644 --- a/src/mistralai/client/models/agent.py +++ b/src/mistralai/client/models/agent.py @@ -4,6 +4,7 @@ from __future__ import annotations from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict from .completionargs import CompletionArgs, CompletionArgsTypedDict +from .customconnector import CustomConnector, CustomConnectorTypedDict from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .functiontool import FunctionTool, FunctionToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict @@ -37,6 +38,7 @@ CodeInterpreterToolTypedDict, ImageGenerationToolTypedDict, DocumentLibraryToolTypedDict, + CustomConnectorTypedDict, ], ) @@ -53,6 +55,7 @@ class UnknownAgentTool(BaseModel): _AGENT_TOOL_VARIANTS: dict[str, Any] = { "code_interpreter": CodeInterpreterTool, + "connector": CustomConnector, "document_library": DocumentLibraryTool, "function": FunctionTool, "image_generation": ImageGenerationTool, @@ -64,6 +67,7 @@ class UnknownAgentTool(BaseModel): AgentTool = Annotated[ Union[ CodeInterpreterTool, + CustomConnector, DocumentLibraryTool, FunctionTool, ImageGenerationTool, diff --git a/src/mistralai/client/models/apikeyauth.py b/src/mistralai/client/models/apikeyauth.py new file mode 100644 index 00000000..10cbaf58 --- /dev/null +++ b/src/mistralai/client/models/apikeyauth.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: f55510f5ff82 + +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 APIKeyAuthTypedDict(TypedDict): + value: str + type: Literal["api-key"] + + +class APIKeyAuth(BaseModel): + value: str + + type: Annotated[ + Annotated[Literal["api-key"], AfterValidator(validate_const("api-key"))], + pydantic.Field(alias="type"), + ] = "api-key" + + +try: + APIKeyAuth.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/audiourl.py b/src/mistralai/client/models/audiourl.py deleted file mode 100644 index 98fef977..00000000 --- a/src/mistralai/client/models/audiourl.py +++ /dev/null @@ -1,26 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: f62d73a27faa - -from __future__ import annotations -from mistralai.client.types import BaseModel -from typing_extensions import TypedDict - - -class AudioURLTypedDict(TypedDict): - r"""Audio URL. - - Attributes: - url: The URL of the audio file. - """ - - url: str - - -class AudioURL(BaseModel): - r"""Audio URL. - - Attributes: - url: The URL of the audio file. - """ - - url: str diff --git a/src/mistralai/client/models/audiourlchunk.py b/src/mistralai/client/models/audiourlchunk.py deleted file mode 100644 index 89ebce79..00000000 --- a/src/mistralai/client/models/audiourlchunk.py +++ /dev/null @@ -1,53 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: f582b26db67b - -from __future__ import annotations -from .audiourl import AudioURL, AudioURLTypedDict -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, Union -from typing_extensions import Annotated, TypeAliasType, TypedDict - - -AudioURLUnionTypedDict = TypeAliasType( - "AudioURLUnionTypedDict", Union[AudioURLTypedDict, str] -) - - -AudioURLUnion = TypeAliasType("AudioURLUnion", Union[AudioURL, str]) - - -class AudioURLChunkTypedDict(TypedDict): - r"""Audio URL chunk. - - Attributes: - type: The type of the chunk, which is always `ChunkTypes.audio_url`. - audio_url: The URL of the audio file. - """ - - audio_url: AudioURLUnionTypedDict - type: Literal["audio_url"] - - -class AudioURLChunk(BaseModel): - r"""Audio URL chunk. - - Attributes: - type: The type of the chunk, which is always `ChunkTypes.audio_url`. - audio_url: The URL of the audio file. - """ - - audio_url: AudioURLUnion - - type: Annotated[ - Annotated[Literal["audio_url"], AfterValidator(validate_const("audio_url"))], - pydantic.Field(alias="type"), - ] = "audio_url" - - -try: - AudioURLChunk.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/contentchunk.py b/src/mistralai/client/models/contentchunk.py index 6d521e1a..e3de7591 100644 --- a/src/mistralai/client/models/contentchunk.py +++ b/src/mistralai/client/models/contentchunk.py @@ -3,7 +3,6 @@ from __future__ import annotations from .audiochunk import AudioChunk, AudioChunkTypedDict -from .audiourlchunk import AudioURLChunk, AudioURLChunkTypedDict from .documenturlchunk import DocumentURLChunk, DocumentURLChunkTypedDict from .filechunk import FileChunk, FileChunkTypedDict from .imageurlchunk import ImageURLChunk, ImageURLChunkTypedDict @@ -27,7 +26,6 @@ ReferenceChunkTypedDict, FileChunkTypedDict, AudioChunkTypedDict, - AudioURLChunkTypedDict, DocumentURLChunkTypedDict, ThinkChunkTypedDict, ], @@ -52,7 +50,6 @@ class UnknownContentChunk(BaseModel): "file": FileChunk, "thinking": ThinkChunk, "input_audio": AudioChunk, - "audio_url": AudioURLChunk, } @@ -65,7 +62,6 @@ class UnknownContentChunk(BaseModel): FileChunk, ThinkChunk, AudioChunk, - AudioURLChunk, UnknownContentChunk, ], BeforeValidator( diff --git a/src/mistralai/client/models/conversationrequest.py b/src/mistralai/client/models/conversationrequest.py index cb5dc6a5..299b41fc 100644 --- a/src/mistralai/client/models/conversationrequest.py +++ b/src/mistralai/client/models/conversationrequest.py @@ -5,6 +5,7 @@ from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict from .completionargs import CompletionArgs, CompletionArgsTypedDict from .conversationinputs import ConversationInputs, ConversationInputsTypedDict +from .customconnector import CustomConnector, CustomConnectorTypedDict from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .functiontool import FunctionTool, FunctionToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict @@ -38,6 +39,7 @@ CodeInterpreterToolTypedDict, ImageGenerationToolTypedDict, DocumentLibraryToolTypedDict, + CustomConnectorTypedDict, ], ) @@ -45,6 +47,7 @@ ConversationRequestTool = Annotated[ Union[ CodeInterpreterTool, + CustomConnector, DocumentLibraryTool, FunctionTool, ImageGenerationTool, @@ -71,8 +74,7 @@ class ConversationRequestTypedDict(TypedDict): store: NotRequired[Nullable[bool]] handoff_execution: NotRequired[Nullable[ConversationRequestHandoffExecution]] instructions: NotRequired[Nullable[str]] - tools: NotRequired[List[ConversationRequestToolTypedDict]] - r"""List of tools which are available to the model during the conversation.""" + tools: NotRequired[Nullable[List[ConversationRequestToolTypedDict]]] completion_args: NotRequired[Nullable[CompletionArgsTypedDict]] guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] name: NotRequired[Nullable[str]] @@ -94,8 +96,7 @@ class ConversationRequest(BaseModel): instructions: OptionalNullable[str] = UNSET - tools: Optional[List[ConversationRequestTool]] = None - r"""List of tools which are available to the model during the conversation.""" + tools: OptionalNullable[List[ConversationRequestTool]] = UNSET completion_args: OptionalNullable[CompletionArgs] = UNSET @@ -137,6 +138,7 @@ def serialize_model(self, handler): "store", "handoff_execution", "instructions", + "tools", "completion_args", "guardrails", "name", diff --git a/src/mistralai/client/models/conversationstreamrequest.py b/src/mistralai/client/models/conversationstreamrequest.py index 2559a887..9404e32c 100644 --- a/src/mistralai/client/models/conversationstreamrequest.py +++ b/src/mistralai/client/models/conversationstreamrequest.py @@ -5,6 +5,7 @@ from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict from .completionargs import CompletionArgs, CompletionArgsTypedDict from .conversationinputs import ConversationInputs, ConversationInputsTypedDict +from .customconnector import CustomConnector, CustomConnectorTypedDict from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .functiontool import FunctionTool, FunctionToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict @@ -38,6 +39,7 @@ CodeInterpreterToolTypedDict, ImageGenerationToolTypedDict, DocumentLibraryToolTypedDict, + CustomConnectorTypedDict, ], ) @@ -45,6 +47,7 @@ ConversationStreamRequestTool = Annotated[ Union[ CodeInterpreterTool, + CustomConnector, DocumentLibraryTool, FunctionTool, ImageGenerationTool, @@ -71,8 +74,7 @@ class ConversationStreamRequestTypedDict(TypedDict): store: NotRequired[Nullable[bool]] handoff_execution: NotRequired[Nullable[ConversationStreamRequestHandoffExecution]] instructions: NotRequired[Nullable[str]] - tools: NotRequired[List[ConversationStreamRequestToolTypedDict]] - r"""List of tools which are available to the model during the conversation.""" + tools: NotRequired[Nullable[List[ConversationStreamRequestToolTypedDict]]] completion_args: NotRequired[Nullable[CompletionArgsTypedDict]] guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] name: NotRequired[Nullable[str]] @@ -96,8 +98,7 @@ class ConversationStreamRequest(BaseModel): instructions: OptionalNullable[str] = UNSET - tools: Optional[List[ConversationStreamRequestTool]] = None - r"""List of tools which are available to the model during the conversation.""" + tools: OptionalNullable[List[ConversationStreamRequestTool]] = UNSET completion_args: OptionalNullable[CompletionArgs] = UNSET @@ -139,6 +140,7 @@ def serialize_model(self, handler): "store", "handoff_execution", "instructions", + "tools", "completion_args", "guardrails", "name", diff --git a/src/mistralai/client/models/createagentrequest.py b/src/mistralai/client/models/createagentrequest.py index 8acbbd1b..1e0cb7b6 100644 --- a/src/mistralai/client/models/createagentrequest.py +++ b/src/mistralai/client/models/createagentrequest.py @@ -4,6 +4,7 @@ from __future__ import annotations from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict from .completionargs import CompletionArgs, CompletionArgsTypedDict +from .customconnector import CustomConnector, CustomConnectorTypedDict from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .functiontool import FunctionTool, FunctionToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict @@ -31,6 +32,7 @@ CodeInterpreterToolTypedDict, ImageGenerationToolTypedDict, DocumentLibraryToolTypedDict, + CustomConnectorTypedDict, ], ) @@ -38,6 +40,7 @@ CreateAgentRequestTool = Annotated[ Union[ CodeInterpreterTool, + CustomConnector, DocumentLibraryTool, FunctionTool, ImageGenerationTool, diff --git a/src/mistralai/client/models/customconnector.py b/src/mistralai/client/models/customconnector.py new file mode 100644 index 00000000..23cddfc1 --- /dev/null +++ b/src/mistralai/client/models/customconnector.py @@ -0,0 +1,108 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 14f3643f7703 + +from __future__ import annotations +from .apikeyauth import APIKeyAuth, APIKeyAuthTypedDict +from .oauth2tokenauth import OAuth2TokenAuth, OAuth2TokenAuthTypedDict +from .toolconfiguration import ToolConfiguration, ToolConfigurationTypedDict +from functools import partial +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import validate_const +from mistralai.client.utils.unions import parse_open_union +import pydantic +from pydantic import ConfigDict, model_serializer +from pydantic.functional_validators import AfterValidator, BeforeValidator +from typing import Any, Literal, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +AuthorizationTypedDict = TypeAliasType( + "AuthorizationTypedDict", Union[OAuth2TokenAuthTypedDict, APIKeyAuthTypedDict] +) + + +class UnknownAuthorization(BaseModel): + r"""A Authorization 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) + + +_AUTHORIZATION_VARIANTS: dict[str, Any] = { + "api-key": APIKeyAuth, + "oauth2-token": OAuth2TokenAuth, +} + + +Authorization = Annotated[ + Union[APIKeyAuth, OAuth2TokenAuth, UnknownAuthorization], + BeforeValidator( + partial( + parse_open_union, + disc_key="type", + variants=_AUTHORIZATION_VARIANTS, + unknown_cls=UnknownAuthorization, + union_name="Authorization", + ) + ), +] + + +class CustomConnectorTypedDict(TypedDict): + connector_id: str + type: Literal["connector"] + authorization: NotRequired[Nullable[AuthorizationTypedDict]] + tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] + + +class CustomConnector(BaseModel): + connector_id: str + + type: Annotated[ + Annotated[Literal["connector"], AfterValidator(validate_const("connector"))], + pydantic.Field(alias="type"), + ] = "connector" + + authorization: OptionalNullable[Authorization] = UNSET + + tool_configuration: OptionalNullable[ToolConfiguration] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["authorization", "tool_configuration"]) + nullable_fields = set(["authorization", "tool_configuration"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + 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: + CustomConnector.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/guardrailconfig.py b/src/mistralai/client/models/guardrailconfig.py index 9af986cf..4f8fe352 100644 --- a/src/mistralai/client/models/guardrailconfig.py +++ b/src/mistralai/client/models/guardrailconfig.py @@ -3,28 +3,40 @@ from __future__ import annotations from .moderationllmv1config import ModerationLlmv1Config, ModerationLlmv1ConfigTypedDict -from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from .moderationllmv2config import ModerationLlmv2Config, ModerationLlmv2ConfigTypedDict +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 GuardrailConfigTypedDict(TypedDict): - moderation_llm_v1: Nullable[ModerationLlmv1ConfigTypedDict] block_on_error: NotRequired[bool] r"""If true, return HTTP 403 and block request in the event of a server-side error""" + moderation_llm_v1: NotRequired[Nullable[ModerationLlmv1ConfigTypedDict]] + moderation_llm_v2: NotRequired[Nullable[ModerationLlmv2ConfigTypedDict]] class GuardrailConfig(BaseModel): - moderation_llm_v1: Nullable[ModerationLlmv1Config] - block_on_error: Optional[bool] = False r"""If true, return HTTP 403 and block request in the event of a server-side error""" + moderation_llm_v1: OptionalNullable[ModerationLlmv1Config] = UNSET + + moderation_llm_v2: OptionalNullable[ModerationLlmv2Config] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["block_on_error"]) - nullable_fields = set(["moderation_llm_v1"]) + optional_fields = set( + ["block_on_error", "moderation_llm_v1", "moderation_llm_v2"] + ) + nullable_fields = set(["moderation_llm_v1", "moderation_llm_v2"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/modelconversation.py b/src/mistralai/client/models/modelconversation.py index 74e113bf..d7f765bf 100644 --- a/src/mistralai/client/models/modelconversation.py +++ b/src/mistralai/client/models/modelconversation.py @@ -4,6 +4,7 @@ from __future__ import annotations from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict from .completionargs import CompletionArgs, CompletionArgsTypedDict +from .customconnector import CustomConnector, CustomConnectorTypedDict from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .functiontool import FunctionTool, FunctionToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict @@ -37,6 +38,7 @@ CodeInterpreterToolTypedDict, ImageGenerationToolTypedDict, DocumentLibraryToolTypedDict, + CustomConnectorTypedDict, ], ) @@ -53,6 +55,7 @@ class UnknownModelConversationTool(BaseModel): _MODEL_CONVERSATION_TOOL_VARIANTS: dict[str, Any] = { "code_interpreter": CodeInterpreterTool, + "connector": CustomConnector, "document_library": DocumentLibraryTool, "function": FunctionTool, "image_generation": ImageGenerationTool, @@ -64,6 +67,7 @@ class UnknownModelConversationTool(BaseModel): ModelConversationTool = Annotated[ Union[ CodeInterpreterTool, + CustomConnector, DocumentLibraryTool, FunctionTool, ImageGenerationTool, diff --git a/src/mistralai/client/models/moderationllmv1action.py b/src/mistralai/client/models/moderationllmaction.py similarity index 81% rename from src/mistralai/client/models/moderationllmv1action.py rename to src/mistralai/client/models/moderationllmaction.py index ae3a6ee9..a2553f30 100644 --- a/src/mistralai/client/models/moderationllmv1action.py +++ b/src/mistralai/client/models/moderationllmaction.py @@ -1,12 +1,12 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: c95110c21e79 +# @generated-id: 7b18ccbd8ca9 from __future__ import annotations from mistralai.client.types import UnrecognizedStr from typing import Literal, Union -ModerationLlmv1Action = Union[ +ModerationLLMAction = Union[ Literal[ "none", "block", diff --git a/src/mistralai/client/models/moderationllmv1config.py b/src/mistralai/client/models/moderationllmv1config.py index b34dbbd3..da7156eb 100644 --- a/src/mistralai/client/models/moderationllmv1config.py +++ b/src/mistralai/client/models/moderationllmv1config.py @@ -2,7 +2,7 @@ # @generated-id: 483378b56394 from __future__ import annotations -from .moderationllmv1action import ModerationLlmv1Action +from .moderationllmaction import ModerationLLMAction from .moderationllmv1categorythresholds import ( ModerationLlmv1CategoryThresholds, ModerationLlmv1CategoryThresholdsTypedDict, @@ -25,10 +25,9 @@ class ModerationLlmv1ConfigTypedDict(TypedDict): custom_category_thresholds: NotRequired[ Nullable[ModerationLlmv1CategoryThresholdsTypedDict] ] - r"""Override default thresholds for specific categories.""" ignore_other_categories: NotRequired[bool] r"""If true, only evaluate categories in custom_category_thresholds; others are ignored.""" - action: NotRequired[ModerationLlmv1Action] + action: NotRequired[ModerationLLMAction] class ModerationLlmv1Config(BaseModel): @@ -38,12 +37,11 @@ class ModerationLlmv1Config(BaseModel): custom_category_thresholds: OptionalNullable[ModerationLlmv1CategoryThresholds] = ( UNSET ) - r"""Override default thresholds for specific categories.""" ignore_other_categories: Optional[bool] = False r"""If true, only evaluate categories in custom_category_thresholds; others are ignored.""" - action: Optional[ModerationLlmv1Action] = None + action: Optional[ModerationLLMAction] = None @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/mistralai/client/models/moderationllmv2categorythresholds.py b/src/mistralai/client/models/moderationllmv2categorythresholds.py new file mode 100644 index 00000000..1754582b --- /dev/null +++ b/src/mistralai/client/models/moderationllmv2categorythresholds.py @@ -0,0 +1,104 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 4c2a8ff4d52b + +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 ModerationLlmv2CategoryThresholdsTypedDict(TypedDict): + sexual: NotRequired[Nullable[float]] + hate_and_discrimination: NotRequired[Nullable[float]] + violence_and_threats: NotRequired[Nullable[float]] + dangerous: NotRequired[Nullable[float]] + criminal: NotRequired[Nullable[float]] + selfharm: NotRequired[Nullable[float]] + health: NotRequired[Nullable[float]] + financial: NotRequired[Nullable[float]] + law: NotRequired[Nullable[float]] + pii: NotRequired[Nullable[float]] + jailbreaking: NotRequired[Nullable[float]] + + +class ModerationLlmv2CategoryThresholds(BaseModel): + sexual: OptionalNullable[float] = UNSET + + hate_and_discrimination: OptionalNullable[float] = UNSET + + violence_and_threats: OptionalNullable[float] = UNSET + + dangerous: OptionalNullable[float] = UNSET + + criminal: OptionalNullable[float] = UNSET + + selfharm: OptionalNullable[float] = UNSET + + health: OptionalNullable[float] = UNSET + + financial: OptionalNullable[float] = UNSET + + law: OptionalNullable[float] = UNSET + + pii: OptionalNullable[float] = UNSET + + jailbreaking: OptionalNullable[float] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "sexual", + "hate_and_discrimination", + "violence_and_threats", + "dangerous", + "criminal", + "selfharm", + "health", + "financial", + "law", + "pii", + "jailbreaking", + ] + ) + nullable_fields = set( + [ + "sexual", + "hate_and_discrimination", + "violence_and_threats", + "dangerous", + "criminal", + "selfharm", + "health", + "financial", + "law", + "pii", + "jailbreaking", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + 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/moderationllmv2config.py b/src/mistralai/client/models/moderationllmv2config.py new file mode 100644 index 00000000..df2b04bd --- /dev/null +++ b/src/mistralai/client/models/moderationllmv2config.py @@ -0,0 +1,76 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: bb511e7c628b + +from __future__ import annotations +from .moderationllmaction import ModerationLLMAction +from .moderationllmv2categorythresholds import ( + ModerationLlmv2CategoryThresholds, + ModerationLlmv2CategoryThresholdsTypedDict, +) +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 ModerationLlmv2ConfigTypedDict(TypedDict): + model_name: NotRequired[str] + r"""Override model name. Should be omitted in general.""" + custom_category_thresholds: NotRequired[ + Nullable[ModerationLlmv2CategoryThresholdsTypedDict] + ] + ignore_other_categories: NotRequired[bool] + r"""If true, only evaluate categories in custom_category_thresholds; others are ignored.""" + action: NotRequired[ModerationLLMAction] + + +class ModerationLlmv2Config(BaseModel): + model_name: Optional[str] = "mistral-moderation-2603" + r"""Override model name. Should be omitted in general.""" + + custom_category_thresholds: OptionalNullable[ModerationLlmv2CategoryThresholds] = ( + UNSET + ) + + ignore_other_categories: Optional[bool] = False + r"""If true, only evaluate categories in custom_category_thresholds; others are ignored.""" + + action: Optional[ModerationLLMAction] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "model_name", + "custom_category_thresholds", + "ignore_other_categories", + "action", + ] + ) + nullable_fields = set(["custom_category_thresholds"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + 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/oauth2tokenauth.py b/src/mistralai/client/models/oauth2tokenauth.py new file mode 100644 index 00000000..76ebfd0d --- /dev/null +++ b/src/mistralai/client/models/oauth2tokenauth.py @@ -0,0 +1,32 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 167c3b8a104e + +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 OAuth2TokenAuthTypedDict(TypedDict): + value: str + type: Literal["oauth2-token"] + + +class OAuth2TokenAuth(BaseModel): + value: str + + type: Annotated[ + Annotated[ + Literal["oauth2-token"], AfterValidator(validate_const("oauth2-token")) + ], + pydantic.Field(alias="type"), + ] = "oauth2-token" + + +try: + OAuth2TokenAuth.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/updateagentrequest.py b/src/mistralai/client/models/updateagentrequest.py index dbe3499e..584c034c 100644 --- a/src/mistralai/client/models/updateagentrequest.py +++ b/src/mistralai/client/models/updateagentrequest.py @@ -4,6 +4,7 @@ from __future__ import annotations from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict from .completionargs import CompletionArgs, CompletionArgsTypedDict +from .customconnector import CustomConnector, CustomConnectorTypedDict from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .functiontool import FunctionTool, FunctionToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict @@ -31,6 +32,7 @@ CodeInterpreterToolTypedDict, ImageGenerationToolTypedDict, DocumentLibraryToolTypedDict, + CustomConnectorTypedDict, ], ) @@ -38,6 +40,7 @@ UpdateAgentRequestTool = Annotated[ Union[ CodeInterpreterTool, + CustomConnector, DocumentLibraryTool, FunctionTool, ImageGenerationTool, diff --git a/uv.lock b/uv.lock index c359ba58..9a01d8e6 100644 --- a/uv.lock +++ b/uv.lock @@ -551,7 +551,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.0.0" +version = "2.0.1" source = { editable = "." } dependencies = [ { name = "eval-type-backport" },