diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index c12833b0..204cd3b8 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: d5791997c15cca6410562da5b597723d + docChecksum: e2c676b5752d903b0da2586d41fc5829 docVersion: 1.0.0 speakeasyVersion: 1.763.6 generationVersion: 2.884.13 - releaseVersion: 2.4.11 - configChecksum: 175c9b11f6d4d6cba89612ae2a225a20 + releaseVersion: 2.4.12 + configChecksum: 72676f3b262807af6fb2cfcdecbd6262 repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: 09ee89d7-3cfe-4fef-9240-8f01cd3522d5 - pristine_commit_hash: 2b48d40e6ebf565c366667f32fb95c05c292ab12 - pristine_tree_hash: 6b10c83b35450c48327653b3f28ad5c17e714166 + generation_id: c882a85e-5055-477f-9d3e-5d0b272dc71e + pristine_commit_hash: cff40098dc0014174cf97ab38171f9d8cf3ad49d + pristine_tree_hash: 40927d5ba4ce1f6c03101ca51d8922178ca6bac1 features: python: acceptHeaders: 3.0.0 @@ -1006,26 +1006,6 @@ trackedFiles: id: 8935b2ed9d13 last_write_checksum: sha1:1bc8b8f3827425b63bf25b6662d959274f266679 pristine_git_object: fd94c1caf6dbe31da9b0494879027cba9dbbb6c3 - docs/models/createsearchindexinforequest.md: - id: 886f7c48f467 - last_write_checksum: sha1:b36cd8692b7b93f54560de1bc1cb323e466365b1 - pristine_git_object: 64b22aa43173f98dd98cafb7e26c6b63b12a117c - docs/models/createsearchindexinforequestindex.md: - id: 846e92f3d7f2 - last_write_checksum: sha1:abb7ce51a4a6f86ab5b5e7e6cf484b4061fa7022 - pristine_git_object: 42d99fcb5ef07be40f6d7f34dd08dd56165a69ca - docs/models/createsearchindexinforequeststatus.md: - id: 79a895401c56 - last_write_checksum: sha1:8388b45338b7744a8da74f019c0552eb1172cdaa - pristine_git_object: 1e477acc2610b127f09ced4748e72d5886812b3e - docs/models/createvespaschemarequest.md: - id: 5d582f9abac3 - last_write_checksum: sha1:f760192840beb2436d5505ea2d095501956a08be - pristine_git_object: 3098a2b9dc2ca9c592fce287daae7e5b6a6ed974 - docs/models/createvespasearchindexinforequest.md: - id: a34bf5ca3f0b - last_write_checksum: sha1:562b8ae886bafa4ae587b724007ff3a6205dd20b - pristine_git_object: 0bd47c383aa7df413c1a63dfaeec09582b7bd8d6 docs/models/credentialscreateorupdate.md: id: b2a0e87b0a91 last_write_checksum: sha1:6b778120a84c08601b4f2fbba368d3454204d939 @@ -1350,6 +1330,10 @@ trackedFiles: id: "945553556487" last_write_checksum: sha1:b18c6c530c025bebd9fa0ecb121cf34c3f2b714d pristine_git_object: 92bc971fc5a0244482ca6107e3751dd75f923ea7 + docs/models/fieldt.md: + id: b45bd96c7b1d + last_write_checksum: sha1:ff7d0a7cd0f90c024d806a80ac98e46beb4e05dc + pristine_git_object: 00891dd317684e55458737be8465242550f220f8 docs/models/file.md: id: 4ad31355bd1c last_write_checksum: sha1:ade4d3c908c664a07a3c333cc24bc1bfb43ab88b @@ -1554,6 +1538,18 @@ trackedFiles: id: a983b3c8acd6 last_write_checksum: sha1:643a3c92ce26f21a915bd485fc4af7817e79f864 pristine_git_object: 38ad49438c06b48ed8eeecf773d4bed51cdb1c9d + docs/models/getindexdetailsv1ragindexesindexindexiddetailgetrequest.md: + id: b2f23ca79a04 + last_write_checksum: sha1:8101e32fd7be07c03820d0e5df9fa4e8c41cf624 + pristine_git_object: 9f6896f85f4a2eca2ad6873698b8cd8a1aef82b7 + docs/models/getindexschemadetailv1ragindexesindexindexidschemasschemaschemaiddetailgetrequest.md: + id: fae50c1770f9 + last_write_checksum: sha1:01610264fa080dba76335ec1edb24ff3ff019198 + pristine_git_object: 8e5b91eab7f95eb74607927c4400d8e2fcd1e7fc + docs/models/getindexschemafilev1ragindexesindexindexidschemasschemaschemaidfilegetrequest.md: + id: d8dc0f08e7e0 + last_write_checksum: sha1:893656950a8f2b2154be2b37f0171e441a52c01c + pristine_git_object: a6897d21e743eed55e45ef18c512deb11e5f75cd docs/models/getjudgebyidv1observabilityjudgesjudgeidgetrequest.md: id: 06b097dd2a61 last_write_checksum: sha1:089d9b646a90f2180dbfc85271804e0857204b34 @@ -1838,6 +1834,26 @@ trackedFiles: id: 74bd521abc26 last_write_checksum: sha1:a4efe4ff8c52137af47d6ab750d1d2f7cba77e7c pristine_git_object: 72a586bc65f6219abed50105d9df9cb8b6ec8d02 + docs/models/indexinput.md: + id: daf58142859d + last_write_checksum: sha1:5bf16a5feb62c043e94b9521d6e23800b00e8522 + pristine_git_object: fd459ebc156d9edefd47e4262494d4761c3da764 + docs/models/indexinputindex.md: + id: 3b70b5c2aff5 + last_write_checksum: sha1:6183b7bed1e640730ce9fd9a39fd89b4a5f97b10 + pristine_git_object: 471200aa25d5f7998706178850a0bdfa501a7f1a + docs/models/indexinputstatus.md: + id: fbcfc092b575 + last_write_checksum: sha1:9495dae4c7d311109eff470c4f61d8b807931cbe + pristine_git_object: 43593b6e8615e7cd6bae945479f3face4f3ed7ab + docs/models/indexmetricsoffline.md: + id: 576ea08ced47 + last_write_checksum: sha1:d6556f7f9447abe198d1381d082c138e72b442eb + pristine_git_object: 2982b6ab27baa39e42a1de5dc52548421d703f72 + docs/models/indexmetricsonline.md: + id: 396f7e03dedf + last_write_checksum: sha1:85dabe0b4cb6dd06a8eebc4ba4d54841be50da06 + pristine_git_object: 8a6dd5e6d7beca76285bfe587d6b25ef1b3e89ca docs/models/ingestionpipelineconfiguration.md: id: 95a1d6bf413b last_write_checksum: sha1:ba9e052c6ab8b13b4108ff395ac0e20181326f0b @@ -2326,6 +2342,38 @@ trackedFiles: id: a812a3e37338 last_write_checksum: sha1:14016848dcfaba90014b482634ed6d5715caa860 pristine_git_object: 7f86303651650177ece51b82d867cab858e830ae + docs/models/metricsdata.md: + id: 4681c89ef9b1 + last_write_checksum: sha1:7d44a236c5b06bcc0bd0eed29666173140bd5201 + pristine_git_object: 6e7f859e5b5003ee1d8b0b987a244355678a0a1b + docs/models/mistralaisearchstudioapproutesv1indexesgetsearchindexdetailresponseindex.md: + id: 205ab21c1be2 + last_write_checksum: sha1:2143a88701126b91b644223ede014f16b1f4923e + pristine_git_object: 8d813001ea3bb7069d93c20e0ab372c52267ff1a + docs/models/mistralaisearchstudioapproutesv1indexesgetsearchindexdetailresponseschema.md: + id: 67eb4c492480 + last_write_checksum: sha1:31b28264c2834593803068038255261745c02b9c + pristine_git_object: c69161687b3265357bef8dcecfa9e1439f26eec5 + docs/models/mistralaisearchstudioapproutesv1indexesgetsearchindexschemadetailschema.md: + id: 7142fa175c98 + last_write_checksum: sha1:6649d40e31a36ba05e7b9418d4fcc463f94c1ca6 + pristine_git_object: e6c80e23c89602871e9daf7a6968e853fb68b477 + docs/models/mistralaisearchstudioapproutesv1indexesgetsearchindexsummaryresponseindex.md: + id: da12f831fcd8 + last_write_checksum: sha1:7aa74909de3abd850b079cd807d9f7ef3df71c00 + pristine_git_object: bbb6a259b0962f29a7a46bf508d5dde00be8bda4 + docs/models/mistralaisearchstudioapproutesv1indexesgetsearchindexsummaryresponseindexindex.md: + id: 56fa20e6e48b + last_write_checksum: sha1:7af74d30db046a65c64e0a1c5809342ab82b6352 + pristine_git_object: 7d824aca927320aab806224585190954b0109326 + docs/models/mistralaisearchstudioapproutesv1indexesgetsearchindexsummaryresponseindexstatus.md: + id: 0cf9dab4cc80 + last_write_checksum: sha1:23dae5669cc260b0f6cef8faa9ea8694c4161231 + pristine_git_object: fd27eac916b2b0a2b61b9c377abe2631f7892f28 + docs/models/mistralaisearchstudioapproutesv1indexesregistersearchindexresponseindex.md: + id: 16d4bbf68bac + last_write_checksum: sha1:f127df0078a2c76eec1867e29368abfe3a0daf9f + pristine_git_object: 37d3c40d28efe30d2ee05d8b3d815e1d09a86708 docs/models/mistralpromptmode.md: id: d17d5db4d3b6 last_write_checksum: sha1:d7804c45f10f2e929276d4a00bf6c2b966a78fb5 @@ -2826,10 +2874,30 @@ trackedFiles: id: c093e67b0d4d last_write_checksum: sha1:c8f57f472e2df609a23d94bf07684348bb007d04 pristine_git_object: f849e1ae2896ee6db55c7af27f575f9f6c8c9132 + docs/models/schemafieldindex.md: + id: 341817a0930d + last_write_checksum: sha1:ed3611a6071217bc928258d08e2b32a5814a965c + pristine_git_object: 5e8eb25d0b05e5a205cd6862cee0d227738a45d8 + docs/models/schemafieldstorage.md: + id: 730b7561c028 + last_write_checksum: sha1:7a960eac533bdcfd03118ccba16e77630d392add + pristine_git_object: ea5dad7527ab6a25f261af330feea3dd374cf4bb + docs/models/schemafieldtype.md: + id: e1ce847f660d + last_write_checksum: sha1:c0b0254381d2571c3844321465c61676321724c4 + pristine_git_object: 340515990b682925fa7f0848b692049da32bec25 + docs/models/schemametrics.md: + id: c1867c807e3a + last_write_checksum: sha1:50d63c3584d0a59b4f2209da22d67fbab8019d65 + pristine_git_object: 3302e5c888149e4cce3d1d7f455b08d5d1edbb33 docs/models/scope.md: id: c7d8338540ba last_write_checksum: sha1:08e688325601e4c4614cc6b7264ea4d2f631da36 pristine_git_object: 0dc29aa5d453a82d0366ea003ab6e5710e2b1e3a + docs/models/sdfile.md: + id: b7ac96b9331d + last_write_checksum: sha1:405b5c6169f943487d8317d8247ebcfa1e33ab7c + pristine_git_object: 73888654bbe66825304f278c51d4707774d95be0 docs/models/searchchatcompletioneventidsrequest.md: id: ace22de1b563 last_write_checksum: sha1:0368a82e5b6399806252670aec01714e5bb78331 @@ -2846,18 +2914,6 @@ trackedFiles: id: e7cb0de862bc last_write_checksum: sha1:d8e860c666fe6b152d3944e9182e90be539c3ce2 pristine_git_object: 9474c1109d62fc5f7ff0bae32d386d54951d7fa2 - docs/models/searchindexresponse.md: - id: 37a2b2687f02 - last_write_checksum: sha1:909f3b19d495ee5e42aa6d7863058496bc58d589 - pristine_git_object: ce6087ec22b4569314dd2d2b596d08c3a183bfd9 - docs/models/searchindexresponseindex.md: - id: 328fcf6e4d24 - last_write_checksum: sha1:2665208de61f9db51eff5018a2a987d2dcc23b9b - pristine_git_object: 3093f4d48f8e527a37a7875bf91356ebaa6cc0b3 - docs/models/searchindexresponsestatus.md: - id: 78dbf9d2a629 - last_write_checksum: sha1:794e6f89be8778c11490fa69bdca3925819e4862 - pristine_git_object: c2200101050e96907f3b4b0d4ea8128ba36328d1 docs/models/searchlatestspanevaluationsv1observabilityspansevaluationssearchlatestpostrequest.md: id: bbfacfac87f9 last_write_checksum: sha1:4edd780638d7e8857781d1ba29bd959d0fe80d8a @@ -2898,6 +2954,14 @@ trackedFiles: id: e4a1bc46b776 last_write_checksum: sha1:4b65e7809ee82055dc1fedb6885eff2469cd0092 pristine_git_object: 65c8593c38a0bf6a435223d352e848ea0f88e83a + docs/models/setindexsummaryv1ragindexesindexindexidsummaryfieldputrequest.md: + id: 814abb0b74cb + last_write_checksum: sha1:a33e2e806540ae483a9c038db8543ba4bc1b20a0 + pristine_git_object: 268c19ffc37da9ccfc5266189db8df5d6a50e24f + docs/models/setschemasummaryv1ragindexesindexindexidschemasschemaschemaidsummaryfieldputrequest.md: + id: f2f9a9d6af5f + last_write_checksum: sha1:bf160cf8d16449a52ce9ca34ee12ab804ba0ca2f + pristine_git_object: 8dcb06311395e62bf09b804bdb1493faf02adb77 docs/models/shareenum.md: id: 53a713500576 last_write_checksum: sha1:de5c59ca89596a3b28134a9f7318fed3b3e6af02 @@ -3042,6 +3106,10 @@ trackedFiles: id: 5d8ed5fe8479 last_write_checksum: sha1:27c4bce66bdb6bfd651c5b38196d0dfb18fe74a9 pristine_git_object: 529000ed47267662ba7f2bfa125e2d0cd92ee654 + docs/models/summary.md: + id: 7683f2898f85 + last_write_checksum: sha1:de0ac913c5379198e12e05859ea8e9f05dd485ec + pristine_git_object: 54e08029fe7963af4e099e7ffaae2df5ebec166f docs/models/systemmessage.md: id: fdb7963e1cdf last_write_checksum: sha1:c7603c5ce77ba2bcbda9eff65eeafdb1e9ecbec7 @@ -3354,6 +3422,10 @@ trackedFiles: id: 68ac0e7701d3 last_write_checksum: sha1:3ff86e1e4647f0787841ba5f267a16b730c60351 pristine_git_object: e25cd4bcc990fc9b6d583b8d771ce9b0c297d391 + docs/models/unregistersearchindexv1ragindexesindexindexiddeleterequest.md: + id: 14a227aad93c + last_write_checksum: sha1:bea091c8d1d41acb34b8180504ebc004c43b579f + pristine_git_object: 5db96ad3c911fd7cf29f7444ff571bc57777c37d docs/models/unscheduleworkflowv1workflowsschedulesscheduleiddeleterequest.md: id: 40615902c1fe last_write_checksum: sha1:d42a893a1c281ddfc8db957e168d832311917fe8 @@ -3402,6 +3474,10 @@ trackedFiles: id: ee4e094a6aa7 last_write_checksum: sha1:33a21ce8b03db36d05ec02f7f3fdc5d5ab95f344 pristine_git_object: 5a3c93afc4a894134e45c2b333b23d6c3a30207b + docs/models/updateindexmetricsv1ragindexesindexindexidmetricsputrequest.md: + id: 02a7f0b12d2e + last_write_checksum: sha1:6feaf4f87701fa0f3fc27470179d6538320f98ed + pristine_git_object: 50bf31c35cce8c702f1a6fd456e72a0fbaed476b docs/models/updateinvocationbody.md: id: d8b3b9cca5ae last_write_checksum: sha1:0fed6d77626ec76d3584e8d38b97ee228218a390 @@ -3482,14 +3558,26 @@ trackedFiles: id: 304bdf06ef8b last_write_checksum: sha1:1f297f34069668f6107f2c0389606efe413ff5a8 pristine_git_object: 5bcea5b5d12e72222720af2c014d64ec4bdfee4a - docs/models/vespaschemaresponse.md: - id: 989810d8633d - last_write_checksum: sha1:96ff3c52987ca630d03822936dfa792f928473c4 - pristine_git_object: 1cb7277be00681b0f1fbe6bc2e83317242d56152 - docs/models/vespasearchindexinforesponse.md: - id: 4e902564cfe0 - last_write_checksum: sha1:8744908c4282bb2be98b8eb3ac92a86d10587f7c - pristine_git_object: 16272fce2395ef0834eabb12fdb661fb72ca7d2e + docs/models/vespaindexinput.md: + id: 8bb064448fd7 + last_write_checksum: sha1:6a6bf425a5892791aa345654691635dc5b98f38f + pristine_git_object: 75f81e251264cb1d3b36bc72a73992799d503b79 + docs/models/vespaindexoutput.md: + id: e96e26559446 + last_write_checksum: sha1:6294eda537306804e91ccb06f084ef896a817e7d + pristine_git_object: 941d7575c715b641de3210db649ab41249be07ad + docs/models/vespaschemafield.md: + id: cce8fd3372fb + last_write_checksum: sha1:94d0154c35f83d0709a660de7dc77fcf645a0ef3 + pristine_git_object: 2d546957152b7cde8855a6ead16d6fd05f2e7612 + docs/models/vespaschemainput.md: + id: c8c5b85f48d3 + last_write_checksum: sha1:5c98c4cc203ee6c6dd88e508bf26a1a2640d024f + pristine_git_object: aba5ab000a81aa31defed9e7da2768687a5696bc + docs/models/vespaschemaoutput.md: + id: 51827e23c2c4 + last_write_checksum: sha1:ad38c4369cdec0a089890921269ece7c2959995b + pristine_git_object: 909d64b229238efa9090dabf335a03101a1d4a34 docs/models/visibility.md: id: 69ecc096de1e last_write_checksum: sha1:30226db515dbfeef9316552cf871cf6882f597d2 @@ -3760,8 +3848,8 @@ trackedFiles: pristine_git_object: a067eef43bb4ddf7674b17017a84de4f1d1572de docs/sdks/accesses/README.md: id: 2ea167c2eff2 - last_write_checksum: sha1:c9daf160ffc706a9be9e2e86855d97227fc25373 - pristine_git_object: 3acf0566daa202fbc8c3c182ff9405d9812a38bd + last_write_checksum: sha1:89bd44e14a5b5d53f1607adf53043942565f6f41 + pristine_git_object: a3b9532316559ac9d244cae4b623884d60b1fe62 docs/sdks/agents/README.md: id: 5965d8232fd8 last_write_checksum: sha1:2081b3728e940846431a2cc28b6090d87a786e87 @@ -3848,8 +3936,8 @@ trackedFiles: pristine_git_object: 34d167398ac81ce78d50c1498c01f4c74917ce7f docs/sdks/libraries/README.md: id: df9a982905a3 - last_write_checksum: sha1:99d5c4e9c4c2689385bedf9da1930df89649c995 - pristine_git_object: 863cb9f410ff082cd09bb04bc52b0e2628804289 + last_write_checksum: sha1:df2dc1d2bb2084427543fd1bb9a505533ba48649 + pristine_git_object: 629d37f7b2ca3b4384c7ca677bdf68a8d56867e0 docs/sdks/logs/README.md: id: 5adacd63da21 last_write_checksum: sha1:6f230ad86d99a2a916ffd42437edb02f7f71a514 @@ -3880,8 +3968,8 @@ trackedFiles: pristine_git_object: c13527752b33297648f99515c5e5fb7d706b0aed docs/sdks/searchindexes/README.md: id: b58e7a6ab4f1 - last_write_checksum: sha1:129ef4c1ef14a615ee58a2d8c313b02cc0f0993e - pristine_git_object: 471bba59a2e12f24b8bad96850b25b566cba29da + last_write_checksum: sha1:58dc92452d20b9abbde218865ca77313ae5f3120 + pristine_git_object: 54104a97f4d566cf507daa2534a8eb1bac48e006 docs/sdks/spans/README.md: id: 594028be109d last_write_checksum: sha1:6e403efcb00f0ca699242f30d8e19b11b571098f @@ -3936,12 +4024,12 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:cf9f22e59cda8d0f2f67efdc3e16cb2205eadedb - pristine_git_object: 1db1c2f35e2de3464dca1dcbac158745b7e0732f + last_write_checksum: sha1:bc004022bcbca3342b81f859bbb448e5ca11a79d + pristine_git_object: 3243517cf8dc6b174c6ee33e6ba5e09cd032987e src/mistralai/client/accesses.py: id: 76fc53bfcf59 - last_write_checksum: sha1:5f1fbb7eb973dd8bcbe33bf0b303d4df3bf2ad36 - pristine_git_object: 90aef2e7e73f5880ec4f55fa054cf6b5d3cc082b + last_write_checksum: sha1:c75804bf36a40bc67f80265051605f8e012747f7 + pristine_git_object: 6c58cff5784dc02ae37183af4311722be305e15f src/mistralai/client/agents.py: id: e946546e3eaa last_write_checksum: sha1:9f2793ced88646b66736d46e98f004cbd4c57224 @@ -4080,8 +4168,8 @@ trackedFiles: pristine_git_object: 187eed0d36bc641177fa077aa529c4ec51422e78 src/mistralai/client/libraries.py: id: d43a5f78045f - last_write_checksum: sha1:555755528cb5283aa561c7eee818102b4ef75dbe - pristine_git_object: 3076d09c7582f18d197208178a88520e4bc9220e + last_write_checksum: sha1:8c9f7f888669d1d091c9245b728dd3ac919139d1 + pristine_git_object: 19ce65b9db8e4b54703b103784e030c1a0ea2cb0 src/mistralai/client/logs.py: id: 8cf582f9ca81 last_write_checksum: sha1:4c9665d21e2277d67a6cb4c0a56b963dab68bb44 @@ -4092,8 +4180,8 @@ trackedFiles: pristine_git_object: d3814d6b3d2fd548b9ae7f97a1f4d27592ca97bf src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:85cc124377f706adfbc22525c1eac34c4c78db13 - pristine_git_object: 381c58fef0e0a82c07f0ac7640ea48757a22a96a + last_write_checksum: sha1:1a8a90b331e3c436a853e786a493394ee436b1b9 + pristine_git_object: 9f3e8054e8e96906cbfa30bfe1bb1e99244853e0 src/mistralai/client/models/activitytaskcompletedattributesresponse.py: id: 8174941767cc last_write_checksum: sha1:b5246e203765ba0532a6a65d391bdd237ab2c891 @@ -4750,18 +4838,6 @@ trackedFiles: id: 1c489bec2f53 last_write_checksum: sha1:ebee21e3ac561b490513d6ebcb79efea070e1597 pristine_git_object: 2bbb1e18c3ee495db44df95e47046b6f1285e54e - src/mistralai/client/models/createsearchindexinforequest.py: - id: 3f424a7063b0 - last_write_checksum: sha1:84c436749a4f6268ac8cbb4d52879e33f4052859 - pristine_git_object: f527f72dfeaa0e4374f64e9aad1ed4a786c68f63 - src/mistralai/client/models/createvespaschemarequest.py: - id: d44c0c466535 - last_write_checksum: sha1:048cbca6e8aad11561e9a42a5a8b0a31f50a0ca6 - pristine_git_object: cac99bc3735d8be742a5aa12a65cf40a7ba974d3 - src/mistralai/client/models/createvespasearchindexinforequest.py: - id: "866143560866" - last_write_checksum: sha1:553b15776ecaf0d3a58f0c99459429f60a51215e - pristine_git_object: 50006d38bb822c1cb5eb90ed8e8f577184dc2cc2 src/mistralai/client/models/credentialscreateorupdate.py: id: 9927546f2487 last_write_checksum: sha1:e31d3c7fc19e2a7fb49d07cb6f85c5ea73aabb98 @@ -5050,6 +5126,10 @@ trackedFiles: id: 16ce9431fc7b last_write_checksum: sha1:a633398597cb0ccf0c3e36aca8566f679b527850 pristine_git_object: 4c9f9d0f4027655c4a9e496321314241b6949296 + src/mistralai/client/models/field.py: + id: 471936c3f7e3 + last_write_checksum: sha1:2156a91de0f6814892233e86f741552bfa6d8350 + pristine_git_object: 7741bdaea81ade362e600f9849ecf052eb6bdb28 src/mistralai/client/models/fieldgroup.py: id: 201353e45f89 last_write_checksum: sha1:58c9c30558556e8b5f24f8b342d55e998d6154d9 @@ -5234,6 +5314,18 @@ trackedFiles: id: 3fae92e2573a last_write_checksum: sha1:2257627743f50ff58107762a69aae40ef5528214 pristine_git_object: 1f699bed56b6a40166274492d7b2ca4ff84a8f61 + src/mistralai/client/models/get_index_details_v1_rag_indexes_index_index_id_detail_getop.py: + id: f198b522bef3 + last_write_checksum: sha1:6bd8857d7b1ad0ef1ccfc7041754d3f52a908e80 + pristine_git_object: 20b41f59b13819ec190bcd11e2c4cb00c4738188 + src/mistralai/client/models/get_index_schema_detail_v1_rag_indexes_index_index_id_schemas_schema_schema_id_detail_getop.py: + id: 164c025cd3e0 + last_write_checksum: sha1:12fa95cb800a7797f8c93dcfc21f60e4c8b8a73c + pristine_git_object: fba44c48b006b75959b1f9083b0cfdc4f8fab001 + src/mistralai/client/models/get_index_schema_file_v1_rag_indexes_index_index_id_schemas_schema_schema_id_file_getop.py: + id: d431383a6c9a + last_write_checksum: sha1:a89de0e5434468d2570fba7f519ab2c8bbf428d6 + pristine_git_object: e28e2cbc2cd2e77c638646abc53d537c43c70a1f src/mistralai/client/models/get_judge_by_id_v1_observability_judges_judge_id_getop.py: id: 4201c3c5a891 last_write_checksum: sha1:44c9a7d21ea727e0f849cfc5dc4a02220bcf6e74 @@ -5474,6 +5566,18 @@ trackedFiles: id: 8d809b14b144 last_write_checksum: sha1:3c858d0475e826d072c96a84d868e97593a399a3 pristine_git_object: f5bd720db16c37504e1993cc6e651712551d2612 + src/mistralai/client/models/index_input.py: + id: ba87d68a0de9 + last_write_checksum: sha1:3202ca478099b9409154222d5e24c430ad6eccee + pristine_git_object: 4c98a6e7afe556fc9645bd5489c23f8beb54e325 + src/mistralai/client/models/indexmetricsoffline.py: + id: 128a08388449 + last_write_checksum: sha1:a93c3d613343851fa9550a83d0b1b4508265a26a + pristine_git_object: b18e6fb58dd1a65f0d20edc89175410428c1e1d7 + src/mistralai/client/models/indexmetricsonline.py: + id: a3c170859c5b + last_write_checksum: sha1:272c6f7e45941c4821e3c9cc41bf60c0ad399670 + pristine_git_object: 4e9fa0dea93afff9336df70a8b6272c791547c5e src/mistralai/client/models/ingestionpipelineconfiguration.py: id: b4746c0f2c1c last_write_checksum: sha1:f256b78196bde2b5bf39f15ed65b1daba784680a @@ -5882,6 +5986,26 @@ trackedFiles: id: c6a65acdd1a2 last_write_checksum: sha1:0d7e4ebbf55f8dcc52facb894589ce44abb0c2fa pristine_git_object: 8d05989420e1b8b68c90fef193bcaff4452c97fc + src/mistralai/client/models/mistralai_search_studio_app_routes_v1_indexes_getsearchindexdetailresponse_index.py: + id: b52c99f8a43c + last_write_checksum: sha1:29601b75fac469b5d08ab3b34bb5f4afda242cbc + pristine_git_object: e13b6b26771a3eb329575579435954183f1a7308 + src/mistralai/client/models/mistralai_search_studio_app_routes_v1_indexes_getsearchindexdetailresponse_schema.py: + id: baa6c39dbba2 + last_write_checksum: sha1:9fa7851f7778b2467adaf00161eb2e7f052166ee + pristine_git_object: 07ab6d90722e350b4793af579deb1175e3dd36af + src/mistralai/client/models/mistralai_search_studio_app_routes_v1_indexes_getsearchindexschemadetail_schema.py: + id: bea11ed09e3a + last_write_checksum: sha1:870067685410d17735f8bfddc74ec17cf8084a35 + pristine_git_object: 9c95aff884db72d58bd200e907d9591167547780 + src/mistralai/client/models/mistralai_search_studio_app_routes_v1_indexes_getsearchindexsummaryresponse_index.py: + id: 1af7ceb8d805 + last_write_checksum: sha1:e65e7e4332d88b6785ae8f6019cd7ef765842d5b + pristine_git_object: b6ea7329314af0e4608d9d5bee6fdb9f92b44461 + src/mistralai/client/models/mistralai_search_studio_app_routes_v1_indexes_registersearchindexresponse_index.py: + id: 770b633d0140 + last_write_checksum: sha1:863c58147bd80cc1c930421b97697b294306c79c + pristine_git_object: 7d7fe63d3f4242d5610ce55def8f95ef4e3b3593 src/mistralai/client/models/mistralpromptmode.py: id: 95abc4ec799a last_write_checksum: sha1:a1417b987bb34daeb73ca4e015c085814e6c8ad2 @@ -6266,6 +6390,26 @@ trackedFiles: id: 745d146d9413 last_write_checksum: sha1:ffa517cc252189aab02c3dd0b342475e2aa2e5a5 pristine_git_object: ad46a70d3b507aac0811d7250e5a11fb26d5b32b + src/mistralai/client/models/schemafieldindex.py: + id: 9501fc2b7fa1 + last_write_checksum: sha1:d430ab29df6adb217402f52b7b319246f804041b + pristine_git_object: 9a714b5734f1374dea792f3185057186befef64d + src/mistralai/client/models/schemafieldstorage.py: + id: 6ec367e3cfe5 + last_write_checksum: sha1:79bde3f9d9ab2e499931961f200e1b7bc9d22843 + pristine_git_object: ec2f2c00f68099e78dac8f1783c88b663b96de28 + src/mistralai/client/models/schemafieldtype.py: + id: 5cdea5242c04 + last_write_checksum: sha1:a712bcafad25bf74874211f249ced4c9c97b115a + pristine_git_object: 5365d25730a851e3a4847d0e4c09c88f1de53de6 + src/mistralai/client/models/schemametrics.py: + id: 26d64d3bc977 + last_write_checksum: sha1:04150a4980fb8c0117ad83bbc7963da62c97ed6a + pristine_git_object: 418db11889c066c76c7ebdb841ed82cacfa7ce50 + src/mistralai/client/models/sdfile.py: + id: 973f2ddd9464 + last_write_checksum: sha1:389a1514a4981d4ca001a02703e15eb7a32310f0 + pristine_git_object: 6aca01bdc5942f1f39c947209251342db6e46289 src/mistralai/client/models/search_latest_span_evaluations_v1_observability_spans_evaluations_search_latest_postop.py: id: 26821a9e16a7 last_write_checksum: sha1:670cb56fbed3d0ab3cf90f091643657a80e2db2b @@ -6302,10 +6446,6 @@ trackedFiles: id: f96acbcd45f7 last_write_checksum: sha1:539caf622ef9e7579fdc82e7986dcc3a2aedae53 pristine_git_object: 8b9b10b51fe76de43895168df11e5bbcdfc29a62 - src/mistralai/client/models/searchindexresponse.py: - id: 054688d20a3b - last_write_checksum: sha1:6da75c25bd5104344915f4a3ab62ec1eb80e2a5e - pristine_git_object: 0e62aa32470e5f4d4b7fe892a8017a0d6a573e7c src/mistralai/client/models/security.py: id: c2ca0e2a36b7 last_write_checksum: sha1:28496d4ff921e8c2186072aad170c65836a4b8f8 @@ -6326,6 +6466,14 @@ trackedFiles: id: 23cc8415f619 last_write_checksum: sha1:a57769f03d442fc70e5f448ee65876d1a2fff093 pristine_git_object: 2568507f11f1450dd4419e5dca7d38c9a6ebfcd9 + src/mistralai/client/models/set_index_summary_v1_rag_indexes_index_index_id_summary_field_putop.py: + id: 27a48c657681 + last_write_checksum: sha1:4b3b27c42d36748923cf13faa48af7e4fc9676ec + pristine_git_object: 6167adff8b8256043b8256a07b5b8f736328bc92 + src/mistralai/client/models/set_schema_summary_v1_rag_indexes_index_index_id_schemas_schema_schema_id_summary_field_putop.py: + id: 91979d9b4dc4 + last_write_checksum: sha1:b02c1716258641983daeee29561546471b93dd94 + pristine_git_object: dbead74fbe045b989237603c66c9c8578c403ff7 src/mistralai/client/models/shareenum.py: id: a0e2a7a16bf8 last_write_checksum: sha1:15a84d57ceeb74cfb37275f714954e42d8e9b3ba @@ -6418,6 +6566,10 @@ trackedFiles: id: 14c00c79de78 last_write_checksum: sha1:ea0a2d8e68a44783e47dc532307c7a2b1f717805 pristine_git_object: f24de860f5ad2ca115bac68b494caba4cd6ee800 + src/mistralai/client/models/summary.py: + id: 848b13bcf2fa + last_write_checksum: sha1:c259ec1cb569f9a28bfb5f936723df2292d3197e + pristine_git_object: 2857c8a7800c6d352978ef6520009c700bbc7367 src/mistralai/client/models/systemmessage.py: id: 500ef6e85ba1 last_write_checksum: sha1:a88de3fc70adab47943f867336659b3a1a6cdae0 @@ -6666,6 +6818,10 @@ trackedFiles: id: 22e2ccbb0c80 last_write_checksum: sha1:8ebdd49f2bef3c5934395808bf71701b46e512be pristine_git_object: 5cab4c2ef093236cacdc2a9e24b27c1a6c643ee9 + src/mistralai/client/models/unregister_search_index_v1_rag_indexes_index_index_id_deleteop.py: + id: a27016410db9 + last_write_checksum: sha1:0de3dd7c05d182522207dda5e7d15fa4ac955ef6 + pristine_git_object: 12b608b68e9a9a42707bbd06e4fe1c84b9731843 src/mistralai/client/models/unschedule_workflow_v1_workflows_schedules_schedule_id_deleteop.py: id: 114f67717003 last_write_checksum: sha1:f80651b63d89ef19a070c1ae7901b021914a0ddd @@ -6682,6 +6838,10 @@ trackedFiles: id: 7bb459765cba last_write_checksum: sha1:56ae41144cef62f4c6384994f30dbaede3d30925 pristine_git_object: 5a44056454e368ae54485532875e72750fe82e27 + src/mistralai/client/models/update_index_metrics_v1_rag_indexes_index_index_id_metrics_putop.py: + id: a57bee1ef839 + last_write_checksum: sha1:4757d77e2ae12de16d088206d539fcc1a4e75b75 + pristine_git_object: 984bf79bc025d644a7aa9f451adf60308d61819c src/mistralai/client/models/update_judge_v1_observability_judges_judge_id_putop.py: id: a1bace5342e6 last_write_checksum: sha1:2fd7c698f8fe16e5df54e49c7aba85e247d3f19b @@ -6774,14 +6934,26 @@ trackedFiles: id: 15df3c7368ab last_write_checksum: sha1:4acbbd9e47cf9b351336d552488d617270d37758 pristine_git_object: 5fe796db923badd9fb85dc4080a30496ed2b419b - src/mistralai/client/models/vespaschemaresponse.py: - id: fbab188e672e - last_write_checksum: sha1:ad669056fa9c61f0ef7f33430a643fd09a41a788 - pristine_git_object: 440967d1aa77338d7526df06a7322d07fcfaf45d - src/mistralai/client/models/vespasearchindexinforesponse.py: - id: ee7484f75a7c - last_write_checksum: sha1:08714193f3bca9099c051dc3799e04fef2a03b52 - pristine_git_object: a3cce35408346525219693f6b19ae706b20fd743 + src/mistralai/client/models/vespaindex_input.py: + id: 54af73c75908 + last_write_checksum: sha1:1a7266554c3d0debe6297e345bdabfd6f0be1361 + pristine_git_object: 8378dfe4d2cd68e20f683c8d63daf8dfebc3851b + src/mistralai/client/models/vespaindex_output.py: + id: 2687fbf6df30 + last_write_checksum: sha1:6e4012c8938ca58e06ced10b996f639fccc5a3a5 + pristine_git_object: ed392d60fbe0f7920665a51d068b86e03c16a039 + src/mistralai/client/models/vespaschema_input.py: + id: 98bbc9e3c2fa + last_write_checksum: sha1:64762a42e985281544bddd2494766ba9265e5407 + pristine_git_object: f0b1b4f8afb567eb07f7b77bb326773a10461853 + src/mistralai/client/models/vespaschema_output.py: + id: 540b24023c39 + last_write_checksum: sha1:c1295dd1693f28d538e9064c271292a0aa665007 + pristine_git_object: 91f56e9f9e1efd9a10c0d87a79cf3f833b21a9f2 + src/mistralai/client/models/vespaschemafield.py: + id: 52b6c6f46211 + last_write_checksum: sha1:ffc400c0630a2c45fe2719fca834ef6a83c25162 + pristine_git_object: 03dff3be33c5eff1c390a44edd062c85565d64b2 src/mistralai/client/models/voicecreaterequest.py: id: 9a1752117dec last_write_checksum: sha1:10df54cddb9d940c53cecc591dd959c491b7a59f @@ -7084,8 +7256,8 @@ trackedFiles: pristine_git_object: 712e92e05c7fd3016431ec62ecb7b7789c8b7071 src/mistralai/client/search_indexes.py: id: c5a0a7df993a - last_write_checksum: sha1:6e0fcf67162312f3ccba44d1e1f2983bd5635ae8 - pristine_git_object: 522ae338029948d81686f2481287d4745f9737ce + last_write_checksum: sha1:77d5f834e74f05bb36745fc711a47ea79253d77c + pristine_git_object: d0c4549878e5371012c92a39d8be46fcb38dcf4d src/mistralai/client/spans.py: id: 408477ccb9d4 last_write_checksum: sha1:db53bafe7fbc5f9900a4e4fd30816ae566ee1936 @@ -10106,6 +10278,97 @@ examples: responses: "422": application/json: {} + register_search_index_v1_rag_indexes_put: + speakeasy-default-register-search-index-v1-rag-indexes-put: + requestBody: + application/json: {"name": "", "status": "offline", "index": {"type": "vespa", "k8s_cluster": "", "k8s_namespace": "", "vespa_instance_name": "", "vespa_version": "", "schemas": [{"name": "", "fields": [], "sd": ""}], "query_url": "https://shiny-range.com/"}} + responses: + "200": + application/json: {"id": "63116ba8-891b-4021-8470-2cbf0c26d121"} + "422": + application/json: {} + get_index_summaries_v1_rag_indexes_summary_get: + speakeasy-default-get-index-summaries-v1-rag-indexes-summary-get: + responses: + "200": + application/json: [{"id": "f26367df-3476-4121-81fa-54a242c11094", "name": "", "creator_id": "", "document_count": 277336, "status": "offline", "created_at": "2024-02-02T11:19:56.083Z", "modified_at": "2026-05-29T12:57:06.942Z", "index": {"type": "vespa", "k8s_cluster": "", "k8s_namespace": "", "vespa_instance_name": "", "schemas": [{"name": "", "document_count": 398768}]}}] + unregister_search_index_v1_rag_indexes_index__index_id__delete: + speakeasy-default-unregister-search-index-v1-rag-indexes-index-index-id-delete: + parameters: + path: + index_id: "0e59f390-f2e4-428e-a81c-c9c2f2ced09e" + responses: + "200": + application/json: "" + "422": + application/json: {} + update_index_metrics_v1_rag_indexes_index__index_id__metrics_put: + speakeasy-default-update-index-metrics-v1-rag-indexes-index-index-id-metrics-put: + parameters: + path: + index_id: "cb562a81-38ce-49a7-86ec-592676de32a8" + requestBody: + application/json: {"status": "online", "document_count": 864436, "schema_metrics": [{"name": "", "document_count": 109412}]} + responses: + "200": + application/json: "" + get_index_details_v1_rag_indexes_index__index_id__detail_get: + speakeasy-default-get-index-details-v1-rag-indexes-index-index-id-detail-get: + parameters: + path: + index_id: "f6ffec01-1f00-47ec-bf94-a08bdc049edc" + responses: + "200": + application/json: {"name": "", "vespa_version": "", "summary": "", "schemas": []} + "422": + application/json: {} + set_index_summary_v1_rag_indexes_index__index_id__summary_field_put: + speakeasy-default-set-index-summary-v1-rag-indexes-index-index-id-summary-field-put: + parameters: + path: + index_id: "e77375ab-1284-42f3-9224-d42f3c120e57" + requestBody: + application/json: {"summary": ""} + responses: + "200": + application/json: "" + "422": + application/json: {} + get_index_schema_detail_v1_rag_indexes_index__index_id__schemas_schema__schema_id__detail_get: + speakeasy-default-get-index-schema-detail-v1-rag-indexes-index-index-id-schemas-schema-schema-id-detail-get: + parameters: + path: + index_id: "af850b81-3290-4f41-83af-f0d2ac1b070d" + schema_id: "fc2825a7-a8ef-4bec-9729-f7486e8327cb" + responses: + "200": + application/json: {"name": "", "summary": "", "embedding_dimensions": 185265, "fields": []} + "422": + application/json: {} + set_schema_summary_v1_rag_indexes_index__index_id__schemas_schema__schema_id__summary_field_put: + speakeasy-default-set-schema-summary-v1-rag-indexes-index-index-id-schemas-schema-schema-id-summary-field-put: + parameters: + path: + index_id: "1a7d0662-5542-453a-8120-6e22a4fa6187" + schema_id: "bb5f0528-b652-4c47-81eb-574cb5c442a5" + requestBody: + application/json: {"summary": ""} + responses: + "200": + application/json: "" + "422": + application/json: {} + get_index_schema_file_v1_rag_indexes_index__index_id__schemas_schema__schema_id__file_get: + speakeasy-default-get-index-schema-file-v1-rag-indexes-index-index-id-schemas-schema-schema-id-file-get: + parameters: + path: + index_id: "252c6de5-4c9b-43b5-8c30-54524a59cb57" + schema_id: "93166e46-2e3c-4b20-b9a5-8607304372d2" + responses: + "200": + application/json: {"content": ""} + "422": + application/json: {} examplesVersion: 1.0.2 generatedTests: {} generatedFiles: diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 83d33fdb..40105f31 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.4.11 + version: 2.4.12 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 04597567..3c4f420a 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,11 +16,11 @@ sources: - speakeasy-mistralai-gcp-sdk-26292830187-1 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:727adcde9f0715919db445c00126f4a4f206e0500a20bb25326cbefbf8e0e8b5 - sourceBlobDigest: sha256:5d2496bef5bc26a7db645742abc828ae1dd17623d91b354f1c3ff4e5879e15de + sourceRevisionDigest: sha256:f1ff6181c7e46c198d9640cfc832e69b3287eef1b8901dc1a8f4c310a16c0989 + sourceBlobDigest: sha256:b1b70c5def499002662a58f9b986a4a424f46abfc21db555c039e1cc12fc3555 tags: - latest - - speakeasy-mistralai-sdk-27618963184-2 + - speakeasy-mistralai-sdk-27689953008-1 targets: mistralai-azure-sdk: source: mistral-azure-source @@ -39,10 +39,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:727adcde9f0715919db445c00126f4a4f206e0500a20bb25326cbefbf8e0e8b5 - sourceBlobDigest: sha256:5d2496bef5bc26a7db645742abc828ae1dd17623d91b354f1c3ff4e5879e15de + sourceRevisionDigest: sha256:f1ff6181c7e46c198d9640cfc832e69b3287eef1b8901dc1a8f4c310a16c0989 + sourceBlobDigest: sha256:b1b70c5def499002662a58f9b986a4a424f46abfc21db555c039e1cc12fc3555 codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:54ee17fc7209ca61ec3ce17a2b5fa4fbdea16545ea7db811ffe6a92d9cb8cb9f + codeSamplesRevisionDigest: sha256:220f7823e9d004e00764fa0aa1b4ec0c23c03f22eb51fa78e1ee4435589b764b workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.763.6 diff --git a/README.md b/README.md index 728d5526..425dd710 100644 --- a/README.md +++ b/README.md @@ -670,8 +670,15 @@ print(res.choices[0].message.content) ### [Beta.Rag.SearchIndexes](docs/sdks/searchindexes/README.md) -* [list](docs/sdks/searchindexes/README.md#list) - Get Search Indexes -* [register](docs/sdks/searchindexes/README.md#register) - Register Search Index +* [register](docs/sdks/searchindexes/README.md#register) - Register (or re-register) a search index +* [get_index_summaries](docs/sdks/searchindexes/README.md#get_index_summaries) - Get Index Summaries +* [unregister](docs/sdks/searchindexes/README.md#unregister) - Unregister Search Index +* [update_index_metrics](docs/sdks/searchindexes/README.md#update_index_metrics) - Update Index Metrics +* [get_index_detail](docs/sdks/searchindexes/README.md#get_index_detail) - Get Index Details +* [set_index_summary](docs/sdks/searchindexes/README.md#set_index_summary) - Set Index Summary +* [get_index_schema_detail](docs/sdks/searchindexes/README.md#get_index_schema_detail) - Get Index Schema Detail +* [set_schema_summary](docs/sdks/searchindexes/README.md#set_schema_summary) - Set Schema Summary +* [get_index_schema_file](docs/sdks/searchindexes/README.md#get_index_schema_file) - Get Index Schema File ### [Chat](docs/sdks/chat/README.md) @@ -1003,8 +1010,8 @@ with Mistral( **Inherit from [`MistralError`](./src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 134 of 216 methods.* -* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 57 of 216 methods.* +* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 140 of 223 methods.* +* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 57 of 223 methods.* * [`ResponseValidationError`](./src/mistralai/client/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute. diff --git a/RELEASES.md b/RELEASES.md index 4c55cb8e..300542a9 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -688,4 +688,14 @@ Based on: ### Generated - [python v2.4.11] . ### Releases -- [PyPI v2.4.11] https://pypi.org/project/mistralai/2.4.11 - . \ No newline at end of file +- [PyPI v2.4.11] https://pypi.org/project/mistralai/2.4.11 - . + +## 2026-06-17 12:47:32 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.763.6 (2.884.13) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.4.12] . +### Releases +- [PyPI v2.4.12] https://pypi.org/project/mistralai/2.4.12 - . \ No newline at end of file diff --git a/docs/models/createsearchindexinforequest.md b/docs/models/createsearchindexinforequest.md deleted file mode 100644 index 64b22aa4..00000000 --- a/docs/models/createsearchindexinforequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateSearchIndexInfoRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `name` | *str* | :heavy_check_mark: | N/A | -| `document_count` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `status` | [Optional[models.CreateSearchIndexInfoRequestStatus]](../models/createsearchindexinforequeststatus.md) | :heavy_minus_sign: | N/A | -| `index` | [models.CreateSearchIndexInfoRequestIndex](../models/createsearchindexinforequestindex.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/createsearchindexinforequestindex.md b/docs/models/createsearchindexinforequestindex.md deleted file mode 100644 index 42d99fcb..00000000 --- a/docs/models/createsearchindexinforequestindex.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateSearchIndexInfoRequestIndex - - -## Supported Types - -### `models.CreateVespaSearchIndexInfoRequest` - -```python -value: models.CreateVespaSearchIndexInfoRequest = /* values here */ -``` - diff --git a/docs/models/createsearchindexinforequeststatus.md b/docs/models/createsearchindexinforequeststatus.md deleted file mode 100644 index 1e477acc..00000000 --- a/docs/models/createsearchindexinforequeststatus.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreateSearchIndexInfoRequestStatus - -## Example Usage - -```python -from mistralai.client.models import CreateSearchIndexInfoRequestStatus -value: CreateSearchIndexInfoRequestStatus = "online" -``` - - -## Values - -- `"online"` -- `"offline"` diff --git a/docs/models/createvespaschemarequest.md b/docs/models/createvespaschemarequest.md deleted file mode 100644 index 3098a2b9..00000000 --- a/docs/models/createvespaschemarequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# CreateVespaSchemaRequest - - -## Fields - -| Field | Type | Required | Description | -| ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `name` | *str* | :heavy_check_mark: | N/A | -| `document_count` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/createvespasearchindexinforequest.md b/docs/models/createvespasearchindexinforequest.md deleted file mode 100644 index 0bd47c38..00000000 --- a/docs/models/createvespasearchindexinforequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateVespaSearchIndexInfoRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `type` | *Literal["vespa"]* | :heavy_check_mark: | N/A | -| `k8s_cluster` | *str* | :heavy_check_mark: | N/A | -| `k8s_namespace` | *str* | :heavy_check_mark: | N/A | -| `vespa_instance_name` | *str* | :heavy_check_mark: | N/A | -| `schemas` | List[[models.CreateVespaSchemaRequest](../models/createvespaschemarequest.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/fieldt.md b/docs/models/fieldt.md new file mode 100644 index 00000000..00891dd3 --- /dev/null +++ b/docs/models/fieldt.md @@ -0,0 +1,11 @@ +# FieldT + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | +| `type` | [models.SchemaFieldType](../models/schemafieldtype.md) | :heavy_check_mark: | N/A | +| `storage` | [models.SchemaFieldStorage](../models/schemafieldstorage.md) | :heavy_check_mark: | N/A | +| `index_type` | [Nullable[models.SchemaFieldIndex]](../models/schemafieldindex.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getindexdetailsv1ragindexesindexindexiddetailgetrequest.md b/docs/models/getindexdetailsv1ragindexesindexindexiddetailgetrequest.md new file mode 100644 index 00000000..9f6896f8 --- /dev/null +++ b/docs/models/getindexdetailsv1ragindexesindexindexiddetailgetrequest.md @@ -0,0 +1,8 @@ +# GetIndexDetailsV1RagIndexesIndexIndexIDDetailGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `index_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getindexschemadetailv1ragindexesindexindexidschemasschemaschemaiddetailgetrequest.md b/docs/models/getindexschemadetailv1ragindexesindexindexidschemasschemaschemaiddetailgetrequest.md new file mode 100644 index 00000000..8e5b91ea --- /dev/null +++ b/docs/models/getindexschemadetailv1ragindexesindexindexidschemasschemaschemaiddetailgetrequest.md @@ -0,0 +1,9 @@ +# GetIndexSchemaDetailV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDDetailGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `index_id` | *str* | :heavy_check_mark: | N/A | +| `schema_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getindexschemafilev1ragindexesindexindexidschemasschemaschemaidfilegetrequest.md b/docs/models/getindexschemafilev1ragindexesindexindexidschemasschemaschemaidfilegetrequest.md new file mode 100644 index 00000000..a6897d21 --- /dev/null +++ b/docs/models/getindexschemafilev1ragindexesindexindexidschemasschemaschemaidfilegetrequest.md @@ -0,0 +1,9 @@ +# GetIndexSchemaFileV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDFileGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `index_id` | *str* | :heavy_check_mark: | N/A | +| `schema_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/indexinput.md b/docs/models/indexinput.md new file mode 100644 index 00000000..fd459ebc --- /dev/null +++ b/docs/models/indexinput.md @@ -0,0 +1,10 @@ +# IndexInput + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | +| `status` | [Optional[models.IndexInputStatus]](../models/indexinputstatus.md) | :heavy_minus_sign: | N/A | +| `index` | [models.IndexInputIndex](../models/indexinputindex.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/indexinputindex.md b/docs/models/indexinputindex.md new file mode 100644 index 00000000..471200aa --- /dev/null +++ b/docs/models/indexinputindex.md @@ -0,0 +1,11 @@ +# IndexInputIndex + + +## Supported Types + +### `models.VespaIndexInput` + +```python +value: models.VespaIndexInput = /* values here */ +``` + diff --git a/docs/models/indexinputstatus.md b/docs/models/indexinputstatus.md new file mode 100644 index 00000000..43593b6e --- /dev/null +++ b/docs/models/indexinputstatus.md @@ -0,0 +1,14 @@ +# IndexInputStatus + +## Example Usage + +```python +from mistralai.client.models import IndexInputStatus +value: IndexInputStatus = "online" +``` + + +## Values + +- `"online"` +- `"offline"` diff --git a/docs/models/indexmetricsoffline.md b/docs/models/indexmetricsoffline.md new file mode 100644 index 00000000..2982b6ab --- /dev/null +++ b/docs/models/indexmetricsoffline.md @@ -0,0 +1,9 @@ +# IndexMetricsOffline + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `status` | *Literal["offline"]* | :heavy_check_mark: | N/A | +| `clear_metrics` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/indexmetricsonline.md b/docs/models/indexmetricsonline.md new file mode 100644 index 00000000..8a6dd5e6 --- /dev/null +++ b/docs/models/indexmetricsonline.md @@ -0,0 +1,10 @@ +# IndexMetricsOnline + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `status` | *Literal["online"]* | :heavy_check_mark: | N/A | +| `document_count` | *int* | :heavy_check_mark: | N/A | +| `schema_metrics` | List[[models.SchemaMetrics](../models/schemametrics.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/metricsdata.md b/docs/models/metricsdata.md new file mode 100644 index 00000000..6e7f859e --- /dev/null +++ b/docs/models/metricsdata.md @@ -0,0 +1,17 @@ +# MetricsData + + +## Supported Types + +### `models.IndexMetricsOnline` + +```python +value: models.IndexMetricsOnline = /* values here */ +``` + +### `models.IndexMetricsOffline` + +```python +value: models.IndexMetricsOffline = /* values here */ +``` + diff --git a/docs/models/mistralaisearchstudioapproutesv1indexesgetsearchindexdetailresponseindex.md b/docs/models/mistralaisearchstudioapproutesv1indexesgetsearchindexdetailresponseindex.md new file mode 100644 index 00000000..8d813001 --- /dev/null +++ b/docs/models/mistralaisearchstudioapproutesv1indexesgetsearchindexdetailresponseindex.md @@ -0,0 +1,11 @@ +# MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexDetailResponseIndex + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `vespa_version` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `summary` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `schemas` | List[[models.MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexDetailResponseSchema](../models/mistralaisearchstudioapproutesv1indexesgetsearchindexdetailresponseschema.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/vespasearchindexinforesponse.md b/docs/models/mistralaisearchstudioapproutesv1indexesgetsearchindexdetailresponseschema.md similarity index 59% rename from docs/models/vespasearchindexinforesponse.md rename to docs/models/mistralaisearchstudioapproutesv1indexesgetsearchindexdetailresponseschema.md index 16272fce..c6916168 100644 --- a/docs/models/vespasearchindexinforesponse.md +++ b/docs/models/mistralaisearchstudioapproutesv1indexesgetsearchindexdetailresponseschema.md @@ -1,12 +1,11 @@ -# VespaSearchIndexInfoResponse +# MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexDetailResponseSchema ## Fields | Field | Type | Required | Description | | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `type` | *Literal["vespa"]* | :heavy_check_mark: | N/A | -| `k8s_cluster` | *str* | :heavy_check_mark: | N/A | -| `k8s_namespace` | *str* | :heavy_check_mark: | N/A | -| `vespa_instance_name` | *str* | :heavy_check_mark: | N/A | -| `schemas` | List[[models.VespaSchemaResponse](../models/vespaschemaresponse.md)] | :heavy_check_mark: | N/A | \ No newline at end of file +| `name` | *str* | :heavy_check_mark: | N/A | +| `document_count` | *Nullable[int]* | :heavy_check_mark: | N/A | +| `last_modified` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `latency_p95_s_threshold` | *Nullable[float]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/mistralaisearchstudioapproutesv1indexesgetsearchindexschemadetailschema.md b/docs/models/mistralaisearchstudioapproutesv1indexesgetsearchindexschemadetailschema.md new file mode 100644 index 00000000..e6c80e23 --- /dev/null +++ b/docs/models/mistralaisearchstudioapproutesv1indexesgetsearchindexschemadetailschema.md @@ -0,0 +1,11 @@ +# MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSchemaDetailSchema + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | +| `summary` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `embedding_dimensions` | *Nullable[int]* | :heavy_check_mark: | N/A | +| `fields` | List[[models.FieldT](../models/fieldt.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/mistralaisearchstudioapproutesv1indexesgetsearchindexsummaryresponseindex.md b/docs/models/mistralaisearchstudioapproutesv1indexesgetsearchindexsummaryresponseindex.md new file mode 100644 index 00000000..bbb6a259 --- /dev/null +++ b/docs/models/mistralaisearchstudioapproutesv1indexesgetsearchindexsummaryresponseindex.md @@ -0,0 +1,15 @@ +# MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndex + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `creator_id` | *str* | :heavy_check_mark: | N/A | +| `document_count` | *int* | :heavy_check_mark: | N/A | +| `status` | [models.MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexStatus](../models/mistralaisearchstudioapproutesv1indexesgetsearchindexsummaryresponseindexstatus.md) | :heavy_check_mark: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `modified_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `index` | [models.MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexIndex](../models/mistralaisearchstudioapproutesv1indexesgetsearchindexsummaryresponseindexindex.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/mistralaisearchstudioapproutesv1indexesgetsearchindexsummaryresponseindexindex.md b/docs/models/mistralaisearchstudioapproutesv1indexesgetsearchindexsummaryresponseindexindex.md new file mode 100644 index 00000000..7d824aca --- /dev/null +++ b/docs/models/mistralaisearchstudioapproutesv1indexesgetsearchindexsummaryresponseindexindex.md @@ -0,0 +1,11 @@ +# MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexIndex + + +## Supported Types + +### `models.VespaIndexOutput` + +```python +value: models.VespaIndexOutput = /* values here */ +``` + diff --git a/docs/models/mistralaisearchstudioapproutesv1indexesgetsearchindexsummaryresponseindexstatus.md b/docs/models/mistralaisearchstudioapproutesv1indexesgetsearchindexsummaryresponseindexstatus.md new file mode 100644 index 00000000..fd27eac9 --- /dev/null +++ b/docs/models/mistralaisearchstudioapproutesv1indexesgetsearchindexsummaryresponseindexstatus.md @@ -0,0 +1,18 @@ +# MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexStatus + +## Example Usage + +```python +from mistralai.client.models import MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexStatus + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexStatus = "online" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"online"` +- `"offline"` diff --git a/docs/models/mistralaisearchstudioapproutesv1indexesregistersearchindexresponseindex.md b/docs/models/mistralaisearchstudioapproutesv1indexesregistersearchindexresponseindex.md new file mode 100644 index 00000000..37d3c40d --- /dev/null +++ b/docs/models/mistralaisearchstudioapproutesv1indexesregistersearchindexresponseindex.md @@ -0,0 +1,8 @@ +# MistralaiSearchStudioAppRoutesV1IndexesRegisterSearchIndexResponseIndex + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/schemafieldindex.md b/docs/models/schemafieldindex.md new file mode 100644 index 00000000..5e8eb25d --- /dev/null +++ b/docs/models/schemafieldindex.md @@ -0,0 +1,19 @@ +# SchemaFieldIndex + +## Example Usage + +```python +from mistralai.client.models import SchemaFieldIndex + +# Open enum: unrecognized values are captured as UnrecognizedInt +value: SchemaFieldIndex = 1 +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `1` +- `2` +- `3` diff --git a/docs/models/schemafieldstorage.md b/docs/models/schemafieldstorage.md new file mode 100644 index 00000000..ea5dad75 --- /dev/null +++ b/docs/models/schemafieldstorage.md @@ -0,0 +1,18 @@ +# SchemaFieldStorage + +## Example Usage + +```python +from mistralai.client.models import SchemaFieldStorage + +# Open enum: unrecognized values are captured as UnrecognizedInt +value: SchemaFieldStorage = 1 +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `1` +- `2` diff --git a/docs/models/schemafieldtype.md b/docs/models/schemafieldtype.md new file mode 100644 index 00000000..34051599 --- /dev/null +++ b/docs/models/schemafieldtype.md @@ -0,0 +1,20 @@ +# SchemaFieldType + +## Example Usage + +```python +from mistralai.client.models import SchemaFieldType + +# Open enum: unrecognized values are captured as UnrecognizedInt +value: SchemaFieldType = 1 +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `1` +- `2` +- `3` +- `4` diff --git a/docs/models/schemametrics.md b/docs/models/schemametrics.md new file mode 100644 index 00000000..3302e5c8 --- /dev/null +++ b/docs/models/schemametrics.md @@ -0,0 +1,9 @@ +# SchemaMetrics + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | +| `document_count` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/sdfile.md b/docs/models/sdfile.md new file mode 100644 index 00000000..73888654 --- /dev/null +++ b/docs/models/sdfile.md @@ -0,0 +1,8 @@ +# SDFile + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `content` | *Nullable[str]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/searchindexresponse.md b/docs/models/searchindexresponse.md deleted file mode 100644 index ce6087ec..00000000 --- a/docs/models/searchindexresponse.md +++ /dev/null @@ -1,15 +0,0 @@ -# SearchIndexResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | N/A | -| `name` | *str* | :heavy_check_mark: | N/A | -| `creator_id` | *str* | :heavy_check_mark: | N/A | -| `document_count` | *int* | :heavy_check_mark: | N/A | -| `status` | [models.SearchIndexResponseStatus](../models/searchindexresponsestatus.md) | :heavy_check_mark: | N/A | -| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `modified_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `index` | [models.SearchIndexResponseIndex](../models/searchindexresponseindex.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/searchindexresponseindex.md b/docs/models/searchindexresponseindex.md deleted file mode 100644 index 3093f4d4..00000000 --- a/docs/models/searchindexresponseindex.md +++ /dev/null @@ -1,11 +0,0 @@ -# SearchIndexResponseIndex - - -## Supported Types - -### `models.VespaSearchIndexInfoResponse` - -```python -value: models.VespaSearchIndexInfoResponse = /* values here */ -``` - diff --git a/docs/models/searchindexresponsestatus.md b/docs/models/searchindexresponsestatus.md deleted file mode 100644 index c2200101..00000000 --- a/docs/models/searchindexresponsestatus.md +++ /dev/null @@ -1,18 +0,0 @@ -# SearchIndexResponseStatus - -## Example Usage - -```python -from mistralai.client.models import SearchIndexResponseStatus - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: SearchIndexResponseStatus = "online" -``` - - -## Values - -This is an open enum. Unrecognized values will not fail type checks. - -- `"online"` -- `"offline"` diff --git a/docs/models/setindexsummaryv1ragindexesindexindexidsummaryfieldputrequest.md b/docs/models/setindexsummaryv1ragindexesindexindexidsummaryfieldputrequest.md new file mode 100644 index 00000000..268c19ff --- /dev/null +++ b/docs/models/setindexsummaryv1ragindexesindexindexidsummaryfieldputrequest.md @@ -0,0 +1,9 @@ +# SetIndexSummaryV1RagIndexesIndexIndexIDSummaryFieldPutRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `index_id` | *str* | :heavy_check_mark: | N/A | +| `summary` | [models.Summary](../models/summary.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/setschemasummaryv1ragindexesindexindexidschemasschemaschemaidsummaryfieldputrequest.md b/docs/models/setschemasummaryv1ragindexesindexindexidschemasschemaschemaidsummaryfieldputrequest.md new file mode 100644 index 00000000..8dcb0631 --- /dev/null +++ b/docs/models/setschemasummaryv1ragindexesindexindexidschemasschemaschemaidsummaryfieldputrequest.md @@ -0,0 +1,10 @@ +# SetSchemaSummaryV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDSummaryFieldPutRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `index_id` | *str* | :heavy_check_mark: | N/A | +| `schema_id` | *str* | :heavy_check_mark: | N/A | +| `summary` | [models.Summary](../models/summary.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/summary.md b/docs/models/summary.md new file mode 100644 index 00000000..54e08029 --- /dev/null +++ b/docs/models/summary.md @@ -0,0 +1,8 @@ +# Summary + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `summary` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/unregistersearchindexv1ragindexesindexindexiddeleterequest.md b/docs/models/unregistersearchindexv1ragindexesindexindexiddeleterequest.md new file mode 100644 index 00000000..5db96ad3 --- /dev/null +++ b/docs/models/unregistersearchindexv1ragindexesindexindexiddeleterequest.md @@ -0,0 +1,8 @@ +# UnregisterSearchIndexV1RagIndexesIndexIndexIDDeleteRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `index_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/updateindexmetricsv1ragindexesindexindexidmetricsputrequest.md b/docs/models/updateindexmetricsv1ragindexesindexindexidmetricsputrequest.md new file mode 100644 index 00000000..50bf31c3 --- /dev/null +++ b/docs/models/updateindexmetricsv1ragindexesindexindexidmetricsputrequest.md @@ -0,0 +1,9 @@ +# UpdateIndexMetricsV1RagIndexesIndexIndexIDMetricsPutRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `index_id` | *str* | :heavy_check_mark: | N/A | +| `request_body` | [models.MetricsData](../models/metricsdata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/vespaindexinput.md b/docs/models/vespaindexinput.md new file mode 100644 index 00000000..75f81e25 --- /dev/null +++ b/docs/models/vespaindexinput.md @@ -0,0 +1,14 @@ +# VespaIndexInput + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `type` | *Literal["vespa"]* | :heavy_check_mark: | N/A | +| `k8s_cluster` | *str* | :heavy_check_mark: | N/A | +| `k8s_namespace` | *str* | :heavy_check_mark: | N/A | +| `vespa_instance_name` | *str* | :heavy_check_mark: | N/A | +| `vespa_version` | *str* | :heavy_check_mark: | N/A | +| `schemas` | List[[models.VespaSchemaInput](../models/vespaschemainput.md)] | :heavy_check_mark: | N/A | +| `query_url` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/vespaindexoutput.md b/docs/models/vespaindexoutput.md new file mode 100644 index 00000000..941d7575 --- /dev/null +++ b/docs/models/vespaindexoutput.md @@ -0,0 +1,12 @@ +# VespaIndexOutput + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `type` | *Literal["vespa"]* | :heavy_check_mark: | N/A | +| `k8s_cluster` | *str* | :heavy_check_mark: | N/A | +| `k8s_namespace` | *str* | :heavy_check_mark: | N/A | +| `vespa_instance_name` | *str* | :heavy_check_mark: | N/A | +| `schemas` | List[[models.VespaSchemaOutput](../models/vespaschemaoutput.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/vespaschemafield.md b/docs/models/vespaschemafield.md new file mode 100644 index 00000000..2d546957 --- /dev/null +++ b/docs/models/vespaschemafield.md @@ -0,0 +1,11 @@ +# VespaSchemaField + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | +| `type` | [models.SchemaFieldType](../models/schemafieldtype.md) | :heavy_check_mark: | N/A | +| `storage` | [models.SchemaFieldStorage](../models/schemafieldstorage.md) | :heavy_check_mark: | N/A | +| `index_type` | [Nullable[models.SchemaFieldIndex]](../models/schemafieldindex.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/vespaschemainput.md b/docs/models/vespaschemainput.md new file mode 100644 index 00000000..aba5ab00 --- /dev/null +++ b/docs/models/vespaschemainput.md @@ -0,0 +1,10 @@ +# VespaSchemaInput + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `fields` | List[[models.VespaSchemaField](../models/vespaschemafield.md)] | :heavy_check_mark: | N/A | +| `sd` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/vespaschemaresponse.md b/docs/models/vespaschemaoutput.md similarity index 94% rename from docs/models/vespaschemaresponse.md rename to docs/models/vespaschemaoutput.md index 1cb7277b..909d64b2 100644 --- a/docs/models/vespaschemaresponse.md +++ b/docs/models/vespaschemaoutput.md @@ -1,4 +1,4 @@ -# VespaSchemaResponse +# VespaSchemaOutput ## Fields diff --git a/docs/sdks/accesses/README.md b/docs/sdks/accesses/README.md index 3acf0566..a3b95323 100644 --- a/docs/sdks/accesses/README.md +++ b/docs/sdks/accesses/README.md @@ -114,6 +114,8 @@ with Mistral( res = mistral.beta.libraries.accesses.delete(library_id="709e3cad-9fb2-4f4e-bf88-143cf1808107", share_with_uuid="b843cc47-ce8f-4354-8cfc-5fcd7fb2865b", share_with_type="User") + assert res is not None + # Handle response print(res) diff --git a/docs/sdks/libraries/README.md b/docs/sdks/libraries/README.md index 42c3323e..4f878e98 100644 --- a/docs/sdks/libraries/README.md +++ b/docs/sdks/libraries/README.md @@ -160,6 +160,8 @@ with Mistral( res = mistral.beta.libraries.delete(library_id="6cad0b6e-fd2e-4d11-a48b-21d30fb7c17a") + assert res is not None + # Handle response print(res) diff --git a/docs/sdks/searchindexes/README.md b/docs/sdks/searchindexes/README.md index 471bba59..54104a97 100644 --- a/docs/sdks/searchindexes/README.md +++ b/docs/sdks/searchindexes/README.md @@ -4,16 +4,23 @@ ### Available Operations -* [list](#list) - Get Search Indexes -* [register](#register) - Register Search Index +* [register](#register) - Register (or re-register) a search index +* [get_index_summaries](#get_index_summaries) - Get Index Summaries +* [unregister](#unregister) - Unregister Search Index +* [update_index_metrics](#update_index_metrics) - Update Index Metrics +* [get_index_detail](#get_index_detail) - Get Index Details +* [set_index_summary](#set_index_summary) - Set Index Summary +* [get_index_schema_detail](#get_index_schema_detail) - Get Index Schema Detail +* [set_schema_summary](#set_schema_summary) - Set Schema Summary +* [get_index_schema_file](#get_index_schema_file) - Get Index Schema File -## list +## register -Get Search Indexes +Register (or re-register) a search index ### Example Usage - + ```python from mistralai.client import Mistral import os @@ -23,7 +30,64 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.rag.search_indexes.list() + res = mistral.beta.rag.search_indexes.register(name="", index={ + "type": "vespa", + "k8s_cluster": "", + "k8s_namespace": "", + "vespa_instance_name": "", + "vespa_version": "", + "schemas": [ + { + "name": "", + "fields": [], + "sd": "", + }, + ], + "query_url": "https://shiny-range.com/", + }, status="offline") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `index` | [models.IndexInputIndex](../../models/indexinputindex.md) | :heavy_check_mark: | N/A | +| `status` | [Optional[models.IndexInputStatus]](../../models/indexinputstatus.md) | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MistralaiSearchStudioAppRoutesV1IndexesRegisterSearchIndexResponseIndex](../../models/mistralaisearchstudioapproutesv1indexesregistersearchindexresponseindex.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get_index_summaries + +Fetch summary view of all indexes available to a user + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.rag.search_indexes.get_index_summaries() # Handle response print(res) @@ -38,7 +102,7 @@ with Mistral( ### Response -**[List[models.SearchIndexResponse]](../../models/.md)** +**[List[models.MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndex]](../../models/.md)** ### Errors @@ -46,13 +110,13 @@ with Mistral( | --------------- | --------------- | --------------- | | errors.SDKError | 4XX, 5XX | \*/\* | -## register +## unregister -Register Search Index +Delete all information about an index ### Example Usage - + ```python from mistralai.client import Mistral import os @@ -62,13 +126,223 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.rag.search_indexes.register(name="", index={ - "type": "vespa", - "k8s_cluster": "", - "k8s_namespace": "", - "vespa_instance_name": "", - "schemas": [], - }, status="offline") + res = mistral.beta.rag.search_indexes.unregister(index_id="0e59f390-f2e4-428e-a81c-c9c2f2ced09e") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `index_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[Any](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## update_index_metrics + +Update the metrics for a given index + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.rag.search_indexes.update_index_metrics(index_id="cb562a81-38ce-49a7-86ec-592676de32a8", request_body={ + "status": "online", + "document_count": 864436, + "schema_metrics": [ + { + "name": "", + "document_count": 109412, + }, + ], + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `index_id` | *str* | :heavy_check_mark: | N/A | +| `request_body` | [models.MetricsData](../../models/metricsdata.md) | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[Any](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get_index_detail + +Get a detailed view of the stored data for a single index + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.rag.search_indexes.get_index_detail(index_id="f6ffec01-1f00-47ec-bf94-a08bdc049edc") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `index_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexDetailResponseIndex](../../models/mistralaisearchstudioapproutesv1indexesgetsearchindexdetailresponseindex.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## set_index_summary + +Update the summary field for an index + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.rag.search_indexes.set_index_summary(index_id="e77375ab-1284-42f3-9224-d42f3c120e57", summary="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `index_id` | *str* | :heavy_check_mark: | N/A | +| `summary` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[Any](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get_index_schema_detail + +Get a detailed view of the stored information for a schema + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.rag.search_indexes.get_index_schema_detail(index_id="af850b81-3290-4f41-83af-f0d2ac1b070d", schema_id="fc2825a7-a8ef-4bec-9729-f7486e8327cb") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `index_id` | *str* | :heavy_check_mark: | N/A | +| `schema_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSchemaDetailSchema](../../models/mistralaisearchstudioapproutesv1indexesgetsearchindexschemadetailschema.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## set_schema_summary + +Update the summary field for an index + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.rag.search_indexes.set_schema_summary(index_id="1a7d0662-5542-453a-8120-6e22a4fa6187", schema_id="bb5f0528-b652-4c47-81eb-574cb5c442a5", summary="") # Handle response print(res) @@ -77,17 +351,58 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `name` | *str* | :heavy_check_mark: | N/A | -| `index` | [models.CreateSearchIndexInfoRequestIndex](../../models/createsearchindexinforequestindex.md) | :heavy_check_mark: | N/A | -| `document_count` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `status` | [Optional[models.CreateSearchIndexInfoRequestStatus]](../../models/createsearchindexinforequeststatus.md) | :heavy_minus_sign: | N/A | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `index_id` | *str* | :heavy_check_mark: | N/A | +| `schema_id` | *str* | :heavy_check_mark: | N/A | +| `summary` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[Any](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get_index_schema_file + +Get Index Schema File + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.rag.search_indexes.get_index_schema_file(index_id="252c6de5-4c9b-43b5-8c30-54524a59cb57", schema_id="93166e46-2e3c-4b20-b9a5-8607304372d2") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `index_id` | *str* | :heavy_check_mark: | N/A | +| `schema_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response -**[models.SearchIndexResponse](../../models/searchindexresponse.md)** +**[models.SDFile](../../models/sdfile.md)** ### Errors diff --git a/pyproject.toml b/pyproject.toml index 24e318a2..435ea7a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.4.11" +version = "2.4.12" 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 1db1c2f3..3243517c 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.4.11" +__version__: str = "2.4.12" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.884.13" -__user_agent__: str = "speakeasy-sdk/python 2.4.11 2.884.13 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.4.12 2.884.13 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/accesses.py b/src/mistralai/client/accesses.py index 90aef2e7..6c58cff5 100644 --- a/src/mistralai/client/accesses.py +++ b/src/mistralai/client/accesses.py @@ -430,7 +430,7 @@ def delete( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.Sharing: + ) -> Optional[models.Sharing]: r"""Delete an access level. Given a library id, you can delete the access level of an entity. An owner cannot delete their own access. You have to be the owner of the library to delete an access other than yours. Warning: the response will change from 200 (returning the deleted sharing) to 204 No Content in a future version. @@ -512,6 +512,8 @@ def delete( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response(models.Sharing, http_res) + if utils.match_response(http_res, "204", "*"): + return None if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( errors.HTTPValidationErrorData, http_res @@ -537,7 +539,7 @@ async def delete_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.Sharing: + ) -> Optional[models.Sharing]: r"""Delete an access level. Given a library id, you can delete the access level of an entity. An owner cannot delete their own access. You have to be the owner of the library to delete an access other than yours. Warning: the response will change from 200 (returning the deleted sharing) to 204 No Content in a future version. @@ -619,6 +621,8 @@ async def delete_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response(models.Sharing, http_res) + if utils.match_response(http_res, "204", "*"): + return None if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( errors.HTTPValidationErrorData, http_res diff --git a/src/mistralai/client/libraries.py b/src/mistralai/client/libraries.py index 3076d09c..19ce65b9 100644 --- a/src/mistralai/client/libraries.py +++ b/src/mistralai/client/libraries.py @@ -641,7 +641,7 @@ def delete( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.Library: + ) -> Optional[models.Library]: r"""Delete a library and all of it's document. Given a library id, deletes it together with all documents that have been uploaded to that library. Warning: the response will change from 200 (returning the deleted library) to 204 No Content in a future version. @@ -712,6 +712,8 @@ def delete( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response(models.Library, http_res) + if utils.match_response(http_res, "204", "*"): + return None if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( errors.HTTPValidationErrorData, http_res @@ -734,7 +736,7 @@ async def delete_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.Library: + ) -> Optional[models.Library]: r"""Delete a library and all of it's document. Given a library id, deletes it together with all documents that have been uploaded to that library. Warning: the response will change from 200 (returning the deleted library) to 204 No Content in a future version. @@ -805,6 +807,8 @@ async def delete_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response(models.Library, http_res) + if utils.match_response(http_res, "204", "*"): + return None if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( errors.HTTPValidationErrorData, http_res diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index 381c58fe..9f3e8054 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -678,21 +678,6 @@ CreateLibraryRequestTypedDict, OwnerType, ) - from .createsearchindexinforequest import ( - CreateSearchIndexInfoRequest, - CreateSearchIndexInfoRequestIndex, - CreateSearchIndexInfoRequestIndexTypedDict, - CreateSearchIndexInfoRequestStatus, - CreateSearchIndexInfoRequestTypedDict, - ) - from .createvespaschemarequest import ( - CreateVespaSchemaRequest, - CreateVespaSchemaRequestTypedDict, - ) - from .createvespasearchindexinforequest import ( - CreateVespaSearchIndexInfoRequest, - CreateVespaSearchIndexInfoRequestTypedDict, - ) from .credentialscreateorupdate import ( CredentialsCreateOrUpdate, CredentialsCreateOrUpdateTypedDict, @@ -909,6 +894,7 @@ FetchFieldOptionCountsResponse, FetchFieldOptionCountsResponseTypedDict, ) + from .field import FieldT, FieldTTypedDict from .fieldgroup import FieldGroup, FieldGroupTypedDict from .fieldoptioncountitem import ( FieldOptionCountItem, @@ -1059,6 +1045,18 @@ GetDeploymentV1WorkflowsDeploymentsNameGetRequest, GetDeploymentV1WorkflowsDeploymentsNameGetRequestTypedDict, ) + from .get_index_details_v1_rag_indexes_index_index_id_detail_getop import ( + GetIndexDetailsV1RagIndexesIndexIndexIDDetailGetRequest, + GetIndexDetailsV1RagIndexesIndexIndexIDDetailGetRequestTypedDict, + ) + from .get_index_schema_detail_v1_rag_indexes_index_index_id_schemas_schema_schema_id_detail_getop import ( + GetIndexSchemaDetailV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDDetailGetRequest, + GetIndexSchemaDetailV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDDetailGetRequestTypedDict, + ) + from .get_index_schema_file_v1_rag_indexes_index_index_id_schemas_schema_schema_id_file_getop import ( + GetIndexSchemaFileV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDFileGetRequest, + GetIndexSchemaFileV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDFileGetRequestTypedDict, + ) from .get_judge_by_id_v1_observability_judges_judge_id_getop import ( GetJudgeByIDV1ObservabilityJudgesJudgeIDGetRequest, GetJudgeByIDV1ObservabilityJudgesJudgeIDGetRequestTypedDict, @@ -1253,6 +1251,15 @@ ImportDatasetFromPlaygroundRequest, ImportDatasetFromPlaygroundRequestTypedDict, ) + from .index_input import ( + IndexInput, + IndexInputIndex, + IndexInputIndexTypedDict, + IndexInputStatus, + IndexInputTypedDict, + ) + from .indexmetricsoffline import IndexMetricsOffline, IndexMetricsOfflineTypedDict + from .indexmetricsonline import IndexMetricsOnline, IndexMetricsOnlineTypedDict from .ingestionpipelineconfiguration import ( IngestionPipelineConfiguration, IngestionPipelineConfigurationTypedDict, @@ -1616,6 +1623,30 @@ from .messageresponse import MessageResponse, MessageResponseTypedDict from .messagetokens import MessageTokens, MessageTokensTypedDict from .metric import Metric, MetricTypedDict + from .mistralai_search_studio_app_routes_v1_indexes_getsearchindexdetailresponse_index import ( + MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexDetailResponseIndex, + MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexDetailResponseIndexTypedDict, + ) + from .mistralai_search_studio_app_routes_v1_indexes_getsearchindexdetailresponse_schema import ( + MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexDetailResponseSchema, + MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexDetailResponseSchemaTypedDict, + ) + from .mistralai_search_studio_app_routes_v1_indexes_getsearchindexschemadetail_schema import ( + MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSchemaDetailSchema, + MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSchemaDetailSchemaTypedDict, + ) + from .mistralai_search_studio_app_routes_v1_indexes_getsearchindexsummaryresponse_index import ( + MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndex, + MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexIndex, + MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexIndexTypedDict, + MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexStatus, + MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexTypedDict, + UnknownMistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexIndex, + ) + from .mistralai_search_studio_app_routes_v1_indexes_registersearchindexresponse_index import ( + MistralaiSearchStudioAppRoutesV1IndexesRegisterSearchIndexResponseIndex, + MistralaiSearchStudioAppRoutesV1IndexesRegisterSearchIndexResponseIndexTypedDict, + ) from .mistralpromptmode import MistralPromptMode from .modelcapabilities import ModelCapabilities, ModelCapabilitiesTypedDict from .modelconversation import ( @@ -1878,6 +1909,11 @@ ScheduleRecentExecution, ScheduleRecentExecutionTypedDict, ) + from .schemafieldindex import SchemaFieldIndex + from .schemafieldstorage import SchemaFieldStorage + from .schemafieldtype import SchemaFieldType + from .schemametrics import SchemaMetrics, SchemaMetricsTypedDict + from .sdfile import SDFile, SDFileTypedDict from .search_latest_span_evaluations_v1_observability_spans_evaluations_search_latest_postop import ( SearchLatestSpanEvaluationsV1ObservabilitySpansEvaluationsSearchLatestPostRequest, SearchLatestSpanEvaluationsV1ObservabilitySpansEvaluationsSearchLatestPostRequestTypedDict, @@ -1914,14 +1950,6 @@ SearchChatCompletionEventsResponse, SearchChatCompletionEventsResponseTypedDict, ) - from .searchindexresponse import ( - SearchIndexResponse, - SearchIndexResponseIndex, - SearchIndexResponseIndexTypedDict, - SearchIndexResponseStatus, - SearchIndexResponseTypedDict, - UnknownSearchIndexResponseIndex, - ) from .security import Security, SecurityTypedDict from .servercapabilities import ServerCapabilities, ServerCapabilitiesTypedDict from .serverlocale import ServerLocale, ServerLocaleTypedDict @@ -1933,6 +1961,14 @@ ServerTasksRequestsCapability, ServerTasksRequestsCapabilityTypedDict, ) + from .set_index_summary_v1_rag_indexes_index_index_id_summary_field_putop import ( + SetIndexSummaryV1RagIndexesIndexIndexIDSummaryFieldPutRequest, + SetIndexSummaryV1RagIndexesIndexIndexIDSummaryFieldPutRequestTypedDict, + ) + from .set_schema_summary_v1_rag_indexes_index_index_id_schemas_schema_schema_id_summary_field_putop import ( + SetSchemaSummaryV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDSummaryFieldPutRequest, + SetSchemaSummaryV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDSummaryFieldPutRequestTypedDict, + ) from .shareenum import ShareEnum from .sharing import Sharing, SharingTypedDict from .sharingdelete import SharingDelete, SharingDeleteTypedDict @@ -2008,6 +2044,7 @@ StreamEventWorkflowContext, StreamEventWorkflowContextTypedDict, ) + from .summary import Summary, SummaryTypedDict from .systemmessage import ( SystemMessage, SystemMessageContent, @@ -2205,6 +2242,10 @@ UnarchiveModelResponse, UnarchiveModelResponseTypedDict, ) + from .unregister_search_index_v1_rag_indexes_index_index_id_deleteop import ( + UnregisterSearchIndexV1RagIndexesIndexIndexIDDeleteRequest, + UnregisterSearchIndexV1RagIndexesIndexIndexIDDeleteRequestTypedDict, + ) from .unschedule_workflow_v1_workflows_schedules_schedule_id_deleteop import ( UnscheduleWorkflowV1WorkflowsSchedulesScheduleIDDeleteRequest, UnscheduleWorkflowV1WorkflowsSchedulesScheduleIDDeleteRequestTypedDict, @@ -2221,6 +2262,12 @@ UpdateDatasetV1ObservabilityDatasetsDatasetIDPatchRequest, UpdateDatasetV1ObservabilityDatasetsDatasetIDPatchRequestTypedDict, ) + from .update_index_metrics_v1_rag_indexes_index_index_id_metrics_putop import ( + MetricsData, + MetricsDataTypedDict, + UpdateIndexMetricsV1RagIndexesIndexIndexIDMetricsPutRequest, + UpdateIndexMetricsV1RagIndexesIndexIndexIDMetricsPutRequestTypedDict, + ) from .update_judge_v1_observability_judges_judge_id_putop import ( UpdateJudgeV1ObservabilityJudgesJudgeIDPutRequest, UpdateJudgeV1ObservabilityJudgesJudgeIDPutRequestTypedDict, @@ -2312,11 +2359,11 @@ ValidationError, ValidationErrorTypedDict, ) - from .vespaschemaresponse import VespaSchemaResponse, VespaSchemaResponseTypedDict - from .vespasearchindexinforesponse import ( - VespaSearchIndexInfoResponse, - VespaSearchIndexInfoResponseTypedDict, - ) + from .vespaindex_input import VespaIndexInput, VespaIndexInputTypedDict + from .vespaindex_output import VespaIndexOutput, VespaIndexOutputTypedDict + from .vespaschema_input import VespaSchemaInput, VespaSchemaInputTypedDict + from .vespaschema_output import VespaSchemaOutput, VespaSchemaOutputTypedDict + from .vespaschemafield import VespaSchemaField, VespaSchemaFieldTypedDict from .voicecreaterequest import VoiceCreateRequest, VoiceCreateRequestTypedDict from .voicelistresponse import VoiceListResponse, VoiceListResponseTypedDict from .voiceresponse import VoiceResponse, VoiceResponseTypedDict @@ -2978,15 +3025,6 @@ "CreateJudgeRequestTypedDict", "CreateLibraryRequest", "CreateLibraryRequestTypedDict", - "CreateSearchIndexInfoRequest", - "CreateSearchIndexInfoRequestIndex", - "CreateSearchIndexInfoRequestIndexTypedDict", - "CreateSearchIndexInfoRequestStatus", - "CreateSearchIndexInfoRequestTypedDict", - "CreateVespaSchemaRequest", - "CreateVespaSchemaRequestTypedDict", - "CreateVespaSearchIndexInfoRequest", - "CreateVespaSearchIndexInfoRequestTypedDict", "CredentialsCreateOrUpdate", "CredentialsCreateOrUpdateTypedDict", "CredentialsResponse", @@ -3154,6 +3192,8 @@ "FieldGroupTypedDict", "FieldOptionCountItem", "FieldOptionCountItemTypedDict", + "FieldT", + "FieldTTypedDict", "File", "FileChunk", "FileChunkTypedDict", @@ -3235,6 +3275,12 @@ "GetDeploymentV1WorkflowsDeploymentsNameGetRequestTypedDict", "GetFileResponse", "GetFileResponseTypedDict", + "GetIndexDetailsV1RagIndexesIndexIndexIDDetailGetRequest", + "GetIndexDetailsV1RagIndexesIndexIndexIDDetailGetRequestTypedDict", + "GetIndexSchemaDetailV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDDetailGetRequest", + "GetIndexSchemaDetailV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDDetailGetRequestTypedDict", + "GetIndexSchemaFileV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDFileGetRequest", + "GetIndexSchemaFileV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDFileGetRequestTypedDict", "GetJudgeByIDV1ObservabilityJudgesJudgeIDGetRequest", "GetJudgeByIDV1ObservabilityJudgesJudgeIDGetRequestTypedDict", "GetJudgesV1ObservabilityJudgesGetRequest", @@ -3370,6 +3416,15 @@ "ImportDatasetFromFileRequestTypedDict", "ImportDatasetFromPlaygroundRequest", "ImportDatasetFromPlaygroundRequestTypedDict", + "IndexInput", + "IndexInputIndex", + "IndexInputIndexTypedDict", + "IndexInputStatus", + "IndexInputTypedDict", + "IndexMetricsOffline", + "IndexMetricsOfflineTypedDict", + "IndexMetricsOnline", + "IndexMetricsOnlineTypedDict", "IngestionPipelineConfiguration", "IngestionPipelineConfigurationTypedDict", "InputEntries", @@ -3607,7 +3662,22 @@ "MessageTokensTypedDict", "Metric", "MetricTypedDict", + "MetricsData", + "MetricsDataTypedDict", "MistralPromptMode", + "MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexDetailResponseIndex", + "MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexDetailResponseIndexTypedDict", + "MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexDetailResponseSchema", + "MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexDetailResponseSchemaTypedDict", + "MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSchemaDetailSchema", + "MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSchemaDetailSchemaTypedDict", + "MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndex", + "MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexIndex", + "MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexIndexTypedDict", + "MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexStatus", + "MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexTypedDict", + "MistralaiSearchStudioAppRoutesV1IndexesRegisterSearchIndexResponseIndex", + "MistralaiSearchStudioAppRoutesV1IndexesRegisterSearchIndexResponseIndexTypedDict", "ModelCapabilities", "ModelCapabilitiesTypedDict", "ModelConversation", @@ -3812,6 +3882,8 @@ "Roles", "RootsCapability", "RootsCapabilityTypedDict", + "SDFile", + "SDFileTypedDict", "SSETypes", "SampleType", "SamplingCapability", @@ -3837,6 +3909,11 @@ "ScheduleRangeTypedDict", "ScheduleRecentExecution", "ScheduleRecentExecutionTypedDict", + "SchemaFieldIndex", + "SchemaFieldStorage", + "SchemaFieldType", + "SchemaMetrics", + "SchemaMetricsTypedDict", "Scope", "SearchChatCompletionEventIdsRequest", "SearchChatCompletionEventIdsRequestTypedDict", @@ -3846,11 +3923,6 @@ "SearchChatCompletionEventsRequestTypedDict", "SearchChatCompletionEventsResponse", "SearchChatCompletionEventsResponseTypedDict", - "SearchIndexResponse", - "SearchIndexResponseIndex", - "SearchIndexResponseIndexTypedDict", - "SearchIndexResponseStatus", - "SearchIndexResponseTypedDict", "SearchLatestSpanEvaluationsV1ObservabilitySpansEvaluationsSearchLatestPostRequest", "SearchLatestSpanEvaluationsV1ObservabilitySpansEvaluationsSearchLatestPostRequestTypedDict", "SearchLogsV1ObservabilityLogsSearchPostRequest", @@ -3871,6 +3943,10 @@ "ServerTasksCapabilityTypedDict", "ServerTasksRequestsCapability", "ServerTasksRequestsCapabilityTypedDict", + "SetIndexSummaryV1RagIndexesIndexIndexIDSummaryFieldPutRequest", + "SetIndexSummaryV1RagIndexesIndexIndexIDSummaryFieldPutRequestTypedDict", + "SetSchemaSummaryV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDSummaryFieldPutRequest", + "SetSchemaSummaryV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDSummaryFieldPutRequestTypedDict", "ShareEnum", "Sharing", "SharingDelete", @@ -3935,6 +4011,8 @@ "StreamWorkflowExecutionLogsRequestTypedDict", "StreamWorkflowExecutionLogsResponseBody", "StreamWorkflowExecutionLogsResponseBodyTypedDict", + "Summary", + "SummaryTypedDict", "SystemMessage", "SystemMessageContent", "SystemMessageContentChunks", @@ -4102,14 +4180,16 @@ "UnknownJobsAPIRoutesFineTuningUpdateFineTunedModelResponse", "UnknownJudgeOutputUnion", "UnknownListFineTuningJobsResponseData", + "UnknownMistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexIndex", "UnknownModelConversationTool", "UnknownModelListData", "UnknownPayload", "UnknownResponse", "UnknownResponseRetrieveModelV1ModelsModelIDGet", - "UnknownSearchIndexResponseIndex", "UnknownSpeechV1AudioSpeechPostData", "UnknownTranscriptionStreamEventsData", + "UnregisterSearchIndexV1RagIndexesIndexIndexIDDeleteRequest", + "UnregisterSearchIndexV1RagIndexesIndexIndexIDDeleteRequestTypedDict", "UnscheduleWorkflowV1WorkflowsSchedulesScheduleIDDeleteRequest", "UnscheduleWorkflowV1WorkflowsSchedulesScheduleIDDeleteRequestTypedDict", "UpdateAgentRequest", @@ -4134,6 +4214,8 @@ "UpdateDefinitionTypedDict", "UpdateDocumentRequest", "UpdateDocumentRequestTypedDict", + "UpdateIndexMetricsV1RagIndexesIndexIndexIDMetricsPutRequest", + "UpdateIndexMetricsV1RagIndexesIndexIndexIDMetricsPutRequestTypedDict", "UpdateInvocationBody", "UpdateInvocationBodyInput", "UpdateInvocationBodyInputTypedDict", @@ -4172,10 +4254,16 @@ "UserMessageTypedDict", "ValidationError", "ValidationErrorTypedDict", - "VespaSchemaResponse", - "VespaSchemaResponseTypedDict", - "VespaSearchIndexInfoResponse", - "VespaSearchIndexInfoResponseTypedDict", + "VespaIndexInput", + "VespaIndexInputTypedDict", + "VespaIndexOutput", + "VespaIndexOutputTypedDict", + "VespaSchemaField", + "VespaSchemaFieldTypedDict", + "VespaSchemaInput", + "VespaSchemaInputTypedDict", + "VespaSchemaOutput", + "VespaSchemaOutputTypedDict", "Visibility", "VoiceCreateRequest", "VoiceCreateRequestTypedDict", @@ -4753,15 +4841,6 @@ "CreateLibraryRequest": ".createlibraryrequest", "CreateLibraryRequestTypedDict": ".createlibraryrequest", "OwnerType": ".createlibraryrequest", - "CreateSearchIndexInfoRequest": ".createsearchindexinforequest", - "CreateSearchIndexInfoRequestIndex": ".createsearchindexinforequest", - "CreateSearchIndexInfoRequestIndexTypedDict": ".createsearchindexinforequest", - "CreateSearchIndexInfoRequestStatus": ".createsearchindexinforequest", - "CreateSearchIndexInfoRequestTypedDict": ".createsearchindexinforequest", - "CreateVespaSchemaRequest": ".createvespaschemarequest", - "CreateVespaSchemaRequestTypedDict": ".createvespaschemarequest", - "CreateVespaSearchIndexInfoRequest": ".createvespasearchindexinforequest", - "CreateVespaSearchIndexInfoRequestTypedDict": ".createvespasearchindexinforequest", "CredentialsCreateOrUpdate": ".credentialscreateorupdate", "CredentialsCreateOrUpdateTypedDict": ".credentialscreateorupdate", "CredentialsResponse": ".credentialsresponse", @@ -4917,6 +4996,8 @@ "FetchFieldOptionCountsRequestTypedDict": ".fetchfieldoptioncountsrequest", "FetchFieldOptionCountsResponse": ".fetchfieldoptioncountsresponse", "FetchFieldOptionCountsResponseTypedDict": ".fetchfieldoptioncountsresponse", + "FieldT": ".field", + "FieldTTypedDict": ".field", "FieldGroup": ".fieldgroup", "FieldGroupTypedDict": ".fieldgroup", "FieldOptionCountItem": ".fieldoptioncountitem", @@ -5016,6 +5097,12 @@ "GetDatasetsV1ObservabilityDatasetsGetRequestTypedDict": ".get_datasets_v1_observability_datasets_getop", "GetDeploymentV1WorkflowsDeploymentsNameGetRequest": ".get_deployment_v1_workflows_deployments_name_getop", "GetDeploymentV1WorkflowsDeploymentsNameGetRequestTypedDict": ".get_deployment_v1_workflows_deployments_name_getop", + "GetIndexDetailsV1RagIndexesIndexIndexIDDetailGetRequest": ".get_index_details_v1_rag_indexes_index_index_id_detail_getop", + "GetIndexDetailsV1RagIndexesIndexIndexIDDetailGetRequestTypedDict": ".get_index_details_v1_rag_indexes_index_index_id_detail_getop", + "GetIndexSchemaDetailV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDDetailGetRequest": ".get_index_schema_detail_v1_rag_indexes_index_index_id_schemas_schema_schema_id_detail_getop", + "GetIndexSchemaDetailV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDDetailGetRequestTypedDict": ".get_index_schema_detail_v1_rag_indexes_index_index_id_schemas_schema_schema_id_detail_getop", + "GetIndexSchemaFileV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDFileGetRequest": ".get_index_schema_file_v1_rag_indexes_index_index_id_schemas_schema_schema_id_file_getop", + "GetIndexSchemaFileV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDFileGetRequestTypedDict": ".get_index_schema_file_v1_rag_indexes_index_index_id_schemas_schema_schema_id_file_getop", "GetJudgeByIDV1ObservabilityJudgesJudgeIDGetRequest": ".get_judge_by_id_v1_observability_judges_judge_id_getop", "GetJudgeByIDV1ObservabilityJudgesJudgeIDGetRequestTypedDict": ".get_judge_by_id_v1_observability_judges_judge_id_getop", "GetJudgesV1ObservabilityJudgesGetRequest": ".get_judges_v1_observability_judges_getop", @@ -5153,6 +5240,15 @@ "ImportDatasetFromFileRequestTypedDict": ".importdatasetfromfilerequest", "ImportDatasetFromPlaygroundRequest": ".importdatasetfromplaygroundrequest", "ImportDatasetFromPlaygroundRequestTypedDict": ".importdatasetfromplaygroundrequest", + "IndexInput": ".index_input", + "IndexInputIndex": ".index_input", + "IndexInputIndexTypedDict": ".index_input", + "IndexInputStatus": ".index_input", + "IndexInputTypedDict": ".index_input", + "IndexMetricsOffline": ".indexmetricsoffline", + "IndexMetricsOfflineTypedDict": ".indexmetricsoffline", + "IndexMetricsOnline": ".indexmetricsonline", + "IndexMetricsOnlineTypedDict": ".indexmetricsonline", "IngestionPipelineConfiguration": ".ingestionpipelineconfiguration", "IngestionPipelineConfigurationTypedDict": ".ingestionpipelineconfiguration", "InputEntries": ".inputentries", @@ -5410,6 +5506,20 @@ "MessageTokensTypedDict": ".messagetokens", "Metric": ".metric", "MetricTypedDict": ".metric", + "MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexDetailResponseIndex": ".mistralai_search_studio_app_routes_v1_indexes_getsearchindexdetailresponse_index", + "MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexDetailResponseIndexTypedDict": ".mistralai_search_studio_app_routes_v1_indexes_getsearchindexdetailresponse_index", + "MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexDetailResponseSchema": ".mistralai_search_studio_app_routes_v1_indexes_getsearchindexdetailresponse_schema", + "MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexDetailResponseSchemaTypedDict": ".mistralai_search_studio_app_routes_v1_indexes_getsearchindexdetailresponse_schema", + "MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSchemaDetailSchema": ".mistralai_search_studio_app_routes_v1_indexes_getsearchindexschemadetail_schema", + "MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSchemaDetailSchemaTypedDict": ".mistralai_search_studio_app_routes_v1_indexes_getsearchindexschemadetail_schema", + "MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndex": ".mistralai_search_studio_app_routes_v1_indexes_getsearchindexsummaryresponse_index", + "MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexIndex": ".mistralai_search_studio_app_routes_v1_indexes_getsearchindexsummaryresponse_index", + "MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexIndexTypedDict": ".mistralai_search_studio_app_routes_v1_indexes_getsearchindexsummaryresponse_index", + "MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexStatus": ".mistralai_search_studio_app_routes_v1_indexes_getsearchindexsummaryresponse_index", + "MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexTypedDict": ".mistralai_search_studio_app_routes_v1_indexes_getsearchindexsummaryresponse_index", + "UnknownMistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexIndex": ".mistralai_search_studio_app_routes_v1_indexes_getsearchindexsummaryresponse_index", + "MistralaiSearchStudioAppRoutesV1IndexesRegisterSearchIndexResponseIndex": ".mistralai_search_studio_app_routes_v1_indexes_registersearchindexresponse_index", + "MistralaiSearchStudioAppRoutesV1IndexesRegisterSearchIndexResponseIndexTypedDict": ".mistralai_search_studio_app_routes_v1_indexes_registersearchindexresponse_index", "MistralPromptMode": ".mistralpromptmode", "ModelCapabilities": ".modelcapabilities", "ModelCapabilitiesTypedDict": ".modelcapabilities", @@ -5615,6 +5725,13 @@ "ScheduleRangeTypedDict": ".schedulerange", "ScheduleRecentExecution": ".schedulerecentexecution", "ScheduleRecentExecutionTypedDict": ".schedulerecentexecution", + "SchemaFieldIndex": ".schemafieldindex", + "SchemaFieldStorage": ".schemafieldstorage", + "SchemaFieldType": ".schemafieldtype", + "SchemaMetrics": ".schemametrics", + "SchemaMetricsTypedDict": ".schemametrics", + "SDFile": ".sdfile", + "SDFileTypedDict": ".sdfile", "SearchLatestSpanEvaluationsV1ObservabilitySpansEvaluationsSearchLatestPostRequest": ".search_latest_span_evaluations_v1_observability_spans_evaluations_search_latest_postop", "SearchLatestSpanEvaluationsV1ObservabilitySpansEvaluationsSearchLatestPostRequestTypedDict": ".search_latest_span_evaluations_v1_observability_spans_evaluations_search_latest_postop", "SearchLogsV1ObservabilityLogsSearchPostRequest": ".search_logs_v1_observability_logs_search_postop", @@ -5633,12 +5750,6 @@ "SearchChatCompletionEventsRequestTypedDict": ".searchchatcompletioneventsrequest", "SearchChatCompletionEventsResponse": ".searchchatcompletioneventsresponse", "SearchChatCompletionEventsResponseTypedDict": ".searchchatcompletioneventsresponse", - "SearchIndexResponse": ".searchindexresponse", - "SearchIndexResponseIndex": ".searchindexresponse", - "SearchIndexResponseIndexTypedDict": ".searchindexresponse", - "SearchIndexResponseStatus": ".searchindexresponse", - "SearchIndexResponseTypedDict": ".searchindexresponse", - "UnknownSearchIndexResponseIndex": ".searchindexresponse", "Security": ".security", "SecurityTypedDict": ".security", "ServerCapabilities": ".servercapabilities", @@ -5649,6 +5760,10 @@ "ServerTasksCapabilityTypedDict": ".servertaskscapability", "ServerTasksRequestsCapability": ".servertasksrequestscapability", "ServerTasksRequestsCapabilityTypedDict": ".servertasksrequestscapability", + "SetIndexSummaryV1RagIndexesIndexIndexIDSummaryFieldPutRequest": ".set_index_summary_v1_rag_indexes_index_index_id_summary_field_putop", + "SetIndexSummaryV1RagIndexesIndexIndexIDSummaryFieldPutRequestTypedDict": ".set_index_summary_v1_rag_indexes_index_index_id_summary_field_putop", + "SetSchemaSummaryV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDSummaryFieldPutRequest": ".set_schema_summary_v1_rag_indexes_index_index_id_schemas_schema_schema_id_summary_field_putop", + "SetSchemaSummaryV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDSummaryFieldPutRequestTypedDict": ".set_schema_summary_v1_rag_indexes_index_index_id_schemas_schema_schema_id_summary_field_putop", "ShareEnum": ".shareenum", "Sharing": ".sharing", "SharingTypedDict": ".sharing", @@ -5712,6 +5827,8 @@ "StreamEventSsePayloadTypedDict": ".streameventssepayload", "StreamEventWorkflowContext": ".streameventworkflowcontext", "StreamEventWorkflowContextTypedDict": ".streameventworkflowcontext", + "Summary": ".summary", + "SummaryTypedDict": ".summary", "SystemMessage": ".systemmessage", "SystemMessageContent": ".systemmessage", "SystemMessageContentTypedDict": ".systemmessage", @@ -5864,6 +5981,8 @@ "UnarchiveWorkflowV1WorkflowsWorkflowIdentifierUnarchivePutRequestTypedDict": ".unarchive_workflow_v1_workflows_workflow_identifier_unarchive_putop", "UnarchiveModelResponse": ".unarchivemodelresponse", "UnarchiveModelResponseTypedDict": ".unarchivemodelresponse", + "UnregisterSearchIndexV1RagIndexesIndexIndexIDDeleteRequest": ".unregister_search_index_v1_rag_indexes_index_index_id_deleteop", + "UnregisterSearchIndexV1RagIndexesIndexIndexIDDeleteRequestTypedDict": ".unregister_search_index_v1_rag_indexes_index_index_id_deleteop", "UnscheduleWorkflowV1WorkflowsSchedulesScheduleIDDeleteRequest": ".unschedule_workflow_v1_workflows_schedules_schedule_id_deleteop", "UnscheduleWorkflowV1WorkflowsSchedulesScheduleIDDeleteRequestTypedDict": ".unschedule_workflow_v1_workflows_schedules_schedule_id_deleteop", "UpdateDatasetRecordPayloadV1ObservabilityDatasetRecordsDatasetRecordIDPayloadPutRequest": ".update_dataset_record_payload_v1_observability_dataset_records_dataset_record_id_payload_putop", @@ -5872,6 +5991,10 @@ "UpdateDatasetRecordPropertiesV1ObservabilityDatasetRecordsDatasetRecordIDPropertiesPutRequestTypedDict": ".update_dataset_record_properties_v1_observability_dataset_records_dataset_record_id_properties_putop", "UpdateDatasetV1ObservabilityDatasetsDatasetIDPatchRequest": ".update_dataset_v1_observability_datasets_dataset_id_patchop", "UpdateDatasetV1ObservabilityDatasetsDatasetIDPatchRequestTypedDict": ".update_dataset_v1_observability_datasets_dataset_id_patchop", + "MetricsData": ".update_index_metrics_v1_rag_indexes_index_index_id_metrics_putop", + "MetricsDataTypedDict": ".update_index_metrics_v1_rag_indexes_index_index_id_metrics_putop", + "UpdateIndexMetricsV1RagIndexesIndexIndexIDMetricsPutRequest": ".update_index_metrics_v1_rag_indexes_index_index_id_metrics_putop", + "UpdateIndexMetricsV1RagIndexesIndexIndexIDMetricsPutRequestTypedDict": ".update_index_metrics_v1_rag_indexes_index_index_id_metrics_putop", "UpdateJudgeV1ObservabilityJudgesJudgeIDPutRequest": ".update_judge_v1_observability_judges_judge_id_putop", "UpdateJudgeV1ObservabilityJudgesJudgeIDPutRequestTypedDict": ".update_judge_v1_observability_judges_judge_id_putop", "UpdateRunInfoV1RagIngestionPipelineConfigurationsIDRunInfoPutRequest": ".update_run_info_v1_rag_ingestion_pipeline_configurations_id_run_info_putop", @@ -5932,10 +6055,16 @@ "LocTypedDict": ".validationerror", "ValidationError": ".validationerror", "ValidationErrorTypedDict": ".validationerror", - "VespaSchemaResponse": ".vespaschemaresponse", - "VespaSchemaResponseTypedDict": ".vespaschemaresponse", - "VespaSearchIndexInfoResponse": ".vespasearchindexinforesponse", - "VespaSearchIndexInfoResponseTypedDict": ".vespasearchindexinforesponse", + "VespaIndexInput": ".vespaindex_input", + "VespaIndexInputTypedDict": ".vespaindex_input", + "VespaIndexOutput": ".vespaindex_output", + "VespaIndexOutputTypedDict": ".vespaindex_output", + "VespaSchemaInput": ".vespaschema_input", + "VespaSchemaInputTypedDict": ".vespaschema_input", + "VespaSchemaOutput": ".vespaschema_output", + "VespaSchemaOutputTypedDict": ".vespaschema_output", + "VespaSchemaField": ".vespaschemafield", + "VespaSchemaFieldTypedDict": ".vespaschemafield", "VoiceCreateRequest": ".voicecreaterequest", "VoiceCreateRequestTypedDict": ".voicecreaterequest", "VoiceListResponse": ".voicelistresponse", diff --git a/src/mistralai/client/models/createsearchindexinforequest.py b/src/mistralai/client/models/createsearchindexinforequest.py deleted file mode 100644 index f527f72d..00000000 --- a/src/mistralai/client/models/createsearchindexinforequest.py +++ /dev/null @@ -1,72 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 3f424a7063b0 - -from __future__ import annotations -from .createvespasearchindexinforequest import ( - CreateVespaSearchIndexInfoRequest, - CreateVespaSearchIndexInfoRequestTypedDict, -) -from mistralai.client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from pydantic import model_serializer -from typing import Literal, Optional -from typing_extensions import NotRequired, TypedDict - - -CreateSearchIndexInfoRequestStatus = Literal[ - "online", - "offline", -] - - -CreateSearchIndexInfoRequestIndexTypedDict = CreateVespaSearchIndexInfoRequestTypedDict - - -CreateSearchIndexInfoRequestIndex = CreateVespaSearchIndexInfoRequest - - -class CreateSearchIndexInfoRequestTypedDict(TypedDict): - name: str - index: CreateSearchIndexInfoRequestIndexTypedDict - document_count: NotRequired[Nullable[int]] - status: NotRequired[CreateSearchIndexInfoRequestStatus] - - -class CreateSearchIndexInfoRequest(BaseModel): - name: str - - index: CreateSearchIndexInfoRequestIndex - - document_count: OptionalNullable[int] = UNSET - - status: Optional[CreateSearchIndexInfoRequestStatus] = "offline" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set(["document_count", "status"]) - nullable_fields = set(["document_count"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - is_nullable_and_explicitly_set = ( - k in nullable_fields - and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member - ) - - if val != UNSET_SENTINEL: - if ( - val is not None - or k not in optional_fields - or is_nullable_and_explicitly_set - ): - m[k] = val - - return m diff --git a/src/mistralai/client/models/createvespaschemarequest.py b/src/mistralai/client/models/createvespaschemarequest.py deleted file mode 100644 index cac99bc3..00000000 --- a/src/mistralai/client/models/createvespaschemarequest.py +++ /dev/null @@ -1,49 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: d44c0c466535 - -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 CreateVespaSchemaRequestTypedDict(TypedDict): - name: str - document_count: NotRequired[Nullable[int]] - - -class CreateVespaSchemaRequest(BaseModel): - name: str - - document_count: OptionalNullable[int] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set(["document_count"]) - nullable_fields = set(["document_count"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - is_nullable_and_explicitly_set = ( - k in nullable_fields - and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member - ) - - if val != UNSET_SENTINEL: - if ( - val is not None - or k not in optional_fields - or is_nullable_and_explicitly_set - ): - m[k] = val - - return m diff --git a/src/mistralai/client/models/field.py b/src/mistralai/client/models/field.py new file mode 100644 index 00000000..7741bdae --- /dev/null +++ b/src/mistralai/client/models/field.py @@ -0,0 +1,41 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 471936c3f7e3 + +from __future__ import annotations +from .schemafieldindex import SchemaFieldIndex +from .schemafieldstorage import SchemaFieldStorage +from .schemafieldtype import SchemaFieldType +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing_extensions import TypedDict + + +class FieldTTypedDict(TypedDict): + name: str + type: SchemaFieldType + storage: SchemaFieldStorage + index_type: Nullable[SchemaFieldIndex] + + +class FieldT(BaseModel): + name: str + + type: SchemaFieldType + + storage: SchemaFieldStorage + + index_type: Nullable[SchemaFieldIndex] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/get_index_details_v1_rag_indexes_index_index_id_detail_getop.py b/src/mistralai/client/models/get_index_details_v1_rag_indexes_index_index_id_detail_getop.py new file mode 100644 index 00000000..20b41f59 --- /dev/null +++ b/src/mistralai/client/models/get_index_details_v1_rag_indexes_index_index_id_detail_getop.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: f198b522bef3 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetIndexDetailsV1RagIndexesIndexIndexIDDetailGetRequestTypedDict(TypedDict): + index_id: str + + +class GetIndexDetailsV1RagIndexesIndexIndexIDDetailGetRequest(BaseModel): + index_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/get_index_schema_detail_v1_rag_indexes_index_index_id_schemas_schema_schema_id_detail_getop.py b/src/mistralai/client/models/get_index_schema_detail_v1_rag_indexes_index_index_id_schemas_schema_schema_id_detail_getop.py new file mode 100644 index 00000000..fba44c48 --- /dev/null +++ b/src/mistralai/client/models/get_index_schema_detail_v1_rag_indexes_index_index_id_schemas_schema_schema_id_detail_getop.py @@ -0,0 +1,26 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 164c025cd3e0 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetIndexSchemaDetailV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDDetailGetRequestTypedDict( + TypedDict +): + index_id: str + schema_id: str + + +class GetIndexSchemaDetailV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDDetailGetRequest( + BaseModel +): + index_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + schema_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/get_index_schema_file_v1_rag_indexes_index_index_id_schemas_schema_schema_id_file_getop.py b/src/mistralai/client/models/get_index_schema_file_v1_rag_indexes_index_index_id_schemas_schema_schema_id_file_getop.py new file mode 100644 index 00000000..e28e2cbc --- /dev/null +++ b/src/mistralai/client/models/get_index_schema_file_v1_rag_indexes_index_index_id_schemas_schema_schema_id_file_getop.py @@ -0,0 +1,26 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: d431383a6c9a + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetIndexSchemaFileV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDFileGetRequestTypedDict( + TypedDict +): + index_id: str + schema_id: str + + +class GetIndexSchemaFileV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDFileGetRequest( + BaseModel +): + index_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + schema_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/index_input.py b/src/mistralai/client/models/index_input.py new file mode 100644 index 00000000..4c98a6e7 --- /dev/null +++ b/src/mistralai/client/models/index_input.py @@ -0,0 +1,51 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: ba87d68a0de9 + +from __future__ import annotations +from .vespaindex_input import VespaIndexInput, VespaIndexInputTypedDict +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Literal, Optional +from typing_extensions import NotRequired, TypedDict + + +IndexInputStatus = Literal[ + "online", + "offline", +] + + +IndexInputIndexTypedDict = VespaIndexInputTypedDict + + +IndexInputIndex = VespaIndexInput + + +class IndexInputTypedDict(TypedDict): + name: str + index: IndexInputIndexTypedDict + status: NotRequired[IndexInputStatus] + + +class IndexInput(BaseModel): + name: str + + index: IndexInputIndex + + status: Optional[IndexInputStatus] = "offline" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["status"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/indexmetricsoffline.py b/src/mistralai/client/models/indexmetricsoffline.py new file mode 100644 index 00000000..b18e6fb5 --- /dev/null +++ b/src/mistralai/client/models/indexmetricsoffline.py @@ -0,0 +1,47 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 128a08388449 + +from __future__ import annotations +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class IndexMetricsOfflineTypedDict(TypedDict): + status: Literal["offline"] + clear_metrics: NotRequired[bool] + + +class IndexMetricsOffline(BaseModel): + status: Annotated[ + Annotated[Literal["offline"], AfterValidator(validate_const("offline"))], + pydantic.Field(alias="status"), + ] = "offline" + + clear_metrics: Optional[bool] = False + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["clear_metrics"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + IndexMetricsOffline.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/indexmetricsonline.py b/src/mistralai/client/models/indexmetricsonline.py new file mode 100644 index 00000000..4e9fa0de --- /dev/null +++ b/src/mistralai/client/models/indexmetricsonline.py @@ -0,0 +1,34 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: a3c170859c5b + +from __future__ import annotations +from .schemametrics import SchemaMetrics, SchemaMetricsTypedDict +from mistralai.client.types import BaseModel +from mistralai.client.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import List, Literal +from typing_extensions import Annotated, TypedDict + + +class IndexMetricsOnlineTypedDict(TypedDict): + document_count: int + schema_metrics: List[SchemaMetricsTypedDict] + status: Literal["online"] + + +class IndexMetricsOnline(BaseModel): + document_count: int + + schema_metrics: List[SchemaMetrics] + + status: Annotated[ + Annotated[Literal["online"], AfterValidator(validate_const("online"))], + pydantic.Field(alias="status"), + ] = "online" + + +try: + IndexMetricsOnline.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/mistralai_search_studio_app_routes_v1_indexes_getsearchindexdetailresponse_index.py b/src/mistralai/client/models/mistralai_search_studio_app_routes_v1_indexes_getsearchindexdetailresponse_index.py new file mode 100644 index 00000000..e13b6b26 --- /dev/null +++ b/src/mistralai/client/models/mistralai_search_studio_app_routes_v1_indexes_getsearchindexdetailresponse_index.py @@ -0,0 +1,51 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b52c99f8a43c + +from __future__ import annotations +from .mistralai_search_studio_app_routes_v1_indexes_getsearchindexdetailresponse_schema import ( + MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexDetailResponseSchema, + MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexDetailResponseSchemaTypedDict, +) +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List +from typing_extensions import TypedDict + + +class MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexDetailResponseIndexTypedDict( + TypedDict +): + name: str + vespa_version: Nullable[str] + summary: Nullable[str] + schemas: List[ + MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexDetailResponseSchemaTypedDict + ] + + +class MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexDetailResponseIndex( + BaseModel +): + name: str + + vespa_version: Nullable[str] + + summary: Nullable[str] + + schemas: List[ + MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexDetailResponseSchema + ] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/mistralai_search_studio_app_routes_v1_indexes_getsearchindexdetailresponse_schema.py b/src/mistralai/client/models/mistralai_search_studio_app_routes_v1_indexes_getsearchindexdetailresponse_schema.py new file mode 100644 index 00000000..07ab6d90 --- /dev/null +++ b/src/mistralai/client/models/mistralai_search_studio_app_routes_v1_indexes_getsearchindexdetailresponse_schema.py @@ -0,0 +1,43 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: baa6c39dbba2 + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing_extensions import TypedDict + + +class MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexDetailResponseSchemaTypedDict( + TypedDict +): + name: str + document_count: Nullable[int] + last_modified: datetime + latency_p95_s_threshold: Nullable[float] + + +class MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexDetailResponseSchema( + BaseModel +): + name: str + + document_count: Nullable[int] + + last_modified: datetime + + latency_p95_s_threshold: Nullable[float] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/mistralai_search_studio_app_routes_v1_indexes_getsearchindexschemadetail_schema.py b/src/mistralai/client/models/mistralai_search_studio_app_routes_v1_indexes_getsearchindexschemadetail_schema.py new file mode 100644 index 00000000..9c95aff8 --- /dev/null +++ b/src/mistralai/client/models/mistralai_search_studio_app_routes_v1_indexes_getsearchindexschemadetail_schema.py @@ -0,0 +1,44 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: bea11ed09e3a + +from __future__ import annotations +from .field import FieldT, FieldTTypedDict +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List +from typing_extensions import TypedDict + + +class MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSchemaDetailSchemaTypedDict( + TypedDict +): + name: str + summary: Nullable[str] + embedding_dimensions: Nullable[int] + fields: List[FieldTTypedDict] + + +class MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSchemaDetailSchema( + BaseModel +): + name: str + + summary: Nullable[str] + + embedding_dimensions: Nullable[int] + + fields: List[FieldT] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/mistralai_search_studio_app_routes_v1_indexes_getsearchindexsummaryresponse_index.py b/src/mistralai/client/models/mistralai_search_studio_app_routes_v1_indexes_getsearchindexsummaryresponse_index.py new file mode 100644 index 00000000..b6ea7329 --- /dev/null +++ b/src/mistralai/client/models/mistralai_search_studio_app_routes_v1_indexes_getsearchindexsummaryresponse_index.py @@ -0,0 +1,85 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 1af7ceb8d805 + +from __future__ import annotations +from .vespaindex_output import VespaIndexOutput, VespaIndexOutputTypedDict +from datetime import datetime +from mistralai.client.types import BaseModel, UnrecognizedStr +from pydantic import ConfigDict +from typing import Any, Literal, Union +from typing_extensions import TypedDict + + +MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexStatus = Union[ + Literal[ + "online", + "offline", + ], + UnrecognizedStr, +] + + +MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexIndexTypedDict = VespaIndexOutputTypedDict + + +class UnknownMistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexIndex( + BaseModel +): + r"""A MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexIndex 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) + + +_MISTRALAI_SEARCH_STUDIO_APP_ROUTES_V1_INDEXES_GET_SEARCH_INDEX_SUMMARY_RESPONSE_INDEX_INDEX_VARIANTS: dict[ + str, Any +] = { + "vespa": VespaIndexOutput, +} + + +MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexIndex = ( + VespaIndexOutput +) + + +class MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexTypedDict( + TypedDict +): + id: str + name: str + creator_id: str + document_count: int + status: ( + MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexStatus + ) + created_at: datetime + modified_at: datetime + index: MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexIndexTypedDict + + +class MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndex( + BaseModel +): + id: str + + name: str + + creator_id: str + + document_count: int + + status: ( + MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexStatus + ) + + created_at: datetime + + modified_at: datetime + + index: ( + MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndexIndex + ) diff --git a/src/mistralai/client/models/mistralai_search_studio_app_routes_v1_indexes_registersearchindexresponse_index.py b/src/mistralai/client/models/mistralai_search_studio_app_routes_v1_indexes_registersearchindexresponse_index.py new file mode 100644 index 00000000..7d7fe63d --- /dev/null +++ b/src/mistralai/client/models/mistralai_search_studio_app_routes_v1_indexes_registersearchindexresponse_index.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 770b633d0140 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class MistralaiSearchStudioAppRoutesV1IndexesRegisterSearchIndexResponseIndexTypedDict( + TypedDict +): + id: str + + +class MistralaiSearchStudioAppRoutesV1IndexesRegisterSearchIndexResponseIndex( + BaseModel +): + id: str diff --git a/src/mistralai/client/models/schemafieldindex.py b/src/mistralai/client/models/schemafieldindex.py new file mode 100644 index 00000000..9a714b57 --- /dev/null +++ b/src/mistralai/client/models/schemafieldindex.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 9501fc2b7fa1 + +from __future__ import annotations +from mistralai.client.types import UnrecognizedInt +from typing import Literal, Union + + +SchemaFieldIndex = Union[ + Literal[ + 1, + 2, + 3, + ], + UnrecognizedInt, +] diff --git a/src/mistralai/client/models/schemafieldstorage.py b/src/mistralai/client/models/schemafieldstorage.py new file mode 100644 index 00000000..ec2f2c00 --- /dev/null +++ b/src/mistralai/client/models/schemafieldstorage.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 6ec367e3cfe5 + +from __future__ import annotations +from mistralai.client.types import UnrecognizedInt +from typing import Literal, Union + + +SchemaFieldStorage = Union[ + Literal[ + 1, + 2, + ], + UnrecognizedInt, +] diff --git a/src/mistralai/client/models/schemafieldtype.py b/src/mistralai/client/models/schemafieldtype.py new file mode 100644 index 00000000..5365d257 --- /dev/null +++ b/src/mistralai/client/models/schemafieldtype.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 5cdea5242c04 + +from __future__ import annotations +from mistralai.client.types import UnrecognizedInt +from typing import Literal, Union + + +SchemaFieldType = Union[ + Literal[ + 1, + 2, + 3, + 4, + ], + UnrecognizedInt, +] diff --git a/src/mistralai/client/models/schemametrics.py b/src/mistralai/client/models/schemametrics.py new file mode 100644 index 00000000..418db118 --- /dev/null +++ b/src/mistralai/client/models/schemametrics.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 26d64d3bc977 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class SchemaMetricsTypedDict(TypedDict): + name: str + document_count: int + + +class SchemaMetrics(BaseModel): + name: str + + document_count: int diff --git a/src/mistralai/client/models/sdfile.py b/src/mistralai/client/models/sdfile.py new file mode 100644 index 00000000..6aca01bd --- /dev/null +++ b/src/mistralai/client/models/sdfile.py @@ -0,0 +1,29 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 973f2ddd9464 + +from __future__ import annotations +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing_extensions import TypedDict + + +class SDFileTypedDict(TypedDict): + content: Nullable[str] + + +class SDFile(BaseModel): + content: Nullable[str] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/searchindexresponse.py b/src/mistralai/client/models/searchindexresponse.py deleted file mode 100644 index 0e62aa32..00000000 --- a/src/mistralai/client/models/searchindexresponse.py +++ /dev/null @@ -1,72 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 054688d20a3b - -from __future__ import annotations -from .vespasearchindexinforesponse import ( - VespaSearchIndexInfoResponse, - VespaSearchIndexInfoResponseTypedDict, -) -from datetime import datetime -from mistralai.client.types import BaseModel, UnrecognizedStr -from pydantic import ConfigDict -from typing import Any, Literal, Union -from typing_extensions import TypedDict - - -SearchIndexResponseStatus = Union[ - Literal[ - "online", - "offline", - ], - UnrecognizedStr, -] - - -SearchIndexResponseIndexTypedDict = VespaSearchIndexInfoResponseTypedDict - - -class UnknownSearchIndexResponseIndex(BaseModel): - r"""A SearchIndexResponseIndex 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) - - -_SEARCH_INDEX_RESPONSE_INDEX_VARIANTS: dict[str, Any] = { - "vespa": VespaSearchIndexInfoResponse, -} - - -SearchIndexResponseIndex = VespaSearchIndexInfoResponse - - -class SearchIndexResponseTypedDict(TypedDict): - id: str - name: str - creator_id: str - document_count: int - status: SearchIndexResponseStatus - created_at: datetime - modified_at: datetime - index: SearchIndexResponseIndexTypedDict - - -class SearchIndexResponse(BaseModel): - id: str - - name: str - - creator_id: str - - document_count: int - - status: SearchIndexResponseStatus - - created_at: datetime - - modified_at: datetime - - index: SearchIndexResponseIndex diff --git a/src/mistralai/client/models/set_index_summary_v1_rag_indexes_index_index_id_summary_field_putop.py b/src/mistralai/client/models/set_index_summary_v1_rag_indexes_index_index_id_summary_field_putop.py new file mode 100644 index 00000000..6167adff --- /dev/null +++ b/src/mistralai/client/models/set_index_summary_v1_rag_indexes_index_index_id_summary_field_putop.py @@ -0,0 +1,23 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 27a48c657681 + +from __future__ import annotations +from .summary import Summary, SummaryTypedDict +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class SetIndexSummaryV1RagIndexesIndexIndexIDSummaryFieldPutRequestTypedDict(TypedDict): + index_id: str + summary: SummaryTypedDict + + +class SetIndexSummaryV1RagIndexesIndexIndexIDSummaryFieldPutRequest(BaseModel): + index_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + summary: Annotated[ + Summary, FieldMetadata(request=RequestMetadata(media_type="application/json")) + ] diff --git a/src/mistralai/client/models/set_schema_summary_v1_rag_indexes_index_index_id_schemas_schema_schema_id_summary_field_putop.py b/src/mistralai/client/models/set_schema_summary_v1_rag_indexes_index_index_id_schemas_schema_schema_id_summary_field_putop.py new file mode 100644 index 00000000..dbead74f --- /dev/null +++ b/src/mistralai/client/models/set_schema_summary_v1_rag_indexes_index_index_id_schemas_schema_schema_id_summary_field_putop.py @@ -0,0 +1,32 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 91979d9b4dc4 + +from __future__ import annotations +from .summary import Summary, SummaryTypedDict +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class SetSchemaSummaryV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDSummaryFieldPutRequestTypedDict( + TypedDict +): + index_id: str + schema_id: str + summary: SummaryTypedDict + + +class SetSchemaSummaryV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDSummaryFieldPutRequest( + BaseModel +): + index_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + schema_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + summary: Annotated[ + Summary, FieldMetadata(request=RequestMetadata(media_type="application/json")) + ] diff --git a/src/mistralai/client/models/summary.py b/src/mistralai/client/models/summary.py new file mode 100644 index 00000000..2857c8a7 --- /dev/null +++ b/src/mistralai/client/models/summary.py @@ -0,0 +1,14 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 848b13bcf2fa + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class SummaryTypedDict(TypedDict): + summary: str + + +class Summary(BaseModel): + summary: str diff --git a/src/mistralai/client/models/unregister_search_index_v1_rag_indexes_index_index_id_deleteop.py b/src/mistralai/client/models/unregister_search_index_v1_rag_indexes_index_index_id_deleteop.py new file mode 100644 index 00000000..12b608b6 --- /dev/null +++ b/src/mistralai/client/models/unregister_search_index_v1_rag_indexes_index_index_id_deleteop.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: a27016410db9 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class UnregisterSearchIndexV1RagIndexesIndexIndexIDDeleteRequestTypedDict(TypedDict): + index_id: str + + +class UnregisterSearchIndexV1RagIndexesIndexIndexIDDeleteRequest(BaseModel): + index_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/update_index_metrics_v1_rag_indexes_index_index_id_metrics_putop.py b/src/mistralai/client/models/update_index_metrics_v1_rag_indexes_index_index_id_metrics_putop.py new file mode 100644 index 00000000..984bf79b --- /dev/null +++ b/src/mistralai/client/models/update_index_metrics_v1_rag_indexes_index_index_id_metrics_putop.py @@ -0,0 +1,38 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: a57bee1ef839 + +from __future__ import annotations +from .indexmetricsoffline import IndexMetricsOffline, IndexMetricsOfflineTypedDict +from .indexmetricsonline import IndexMetricsOnline, IndexMetricsOnlineTypedDict +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from pydantic import Field +from typing import Union +from typing_extensions import Annotated, TypeAliasType, TypedDict + + +MetricsDataTypedDict = TypeAliasType( + "MetricsDataTypedDict", + Union[IndexMetricsOfflineTypedDict, IndexMetricsOnlineTypedDict], +) + + +MetricsData = Annotated[ + Union[IndexMetricsOnline, IndexMetricsOffline], Field(discriminator="status") +] + + +class UpdateIndexMetricsV1RagIndexesIndexIndexIDMetricsPutRequestTypedDict(TypedDict): + index_id: str + request_body: MetricsDataTypedDict + + +class UpdateIndexMetricsV1RagIndexesIndexIndexIDMetricsPutRequest(BaseModel): + index_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + request_body: Annotated[ + MetricsData, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/createvespasearchindexinforequest.py b/src/mistralai/client/models/vespaindex_input.py similarity index 64% rename from src/mistralai/client/models/createvespasearchindexinforequest.py rename to src/mistralai/client/models/vespaindex_input.py index 50006d38..8378dfe4 100644 --- a/src/mistralai/client/models/createvespasearchindexinforequest.py +++ b/src/mistralai/client/models/vespaindex_input.py @@ -1,11 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 866143560866 +# @generated-id: 54af73c75908 from __future__ import annotations -from .createvespaschemarequest import ( - CreateVespaSchemaRequest, - CreateVespaSchemaRequestTypedDict, -) +from .vespaschema_input import VespaSchemaInput, VespaSchemaInputTypedDict from mistralai.client.types import BaseModel from mistralai.client.utils import validate_const import pydantic @@ -14,22 +11,28 @@ from typing_extensions import Annotated, TypedDict -class CreateVespaSearchIndexInfoRequestTypedDict(TypedDict): +class VespaIndexInputTypedDict(TypedDict): k8s_cluster: str k8s_namespace: str vespa_instance_name: str - schemas: List[CreateVespaSchemaRequestTypedDict] + vespa_version: str + schemas: List[VespaSchemaInputTypedDict] + query_url: str type: Literal["vespa"] -class CreateVespaSearchIndexInfoRequest(BaseModel): +class VespaIndexInput(BaseModel): k8s_cluster: str k8s_namespace: str vespa_instance_name: str - schemas: List[CreateVespaSchemaRequest] + vespa_version: str + + schemas: List[VespaSchemaInput] + + query_url: str type: Annotated[ Annotated[Literal["vespa"], AfterValidator(validate_const("vespa"))], @@ -38,6 +41,6 @@ class CreateVespaSearchIndexInfoRequest(BaseModel): try: - CreateVespaSearchIndexInfoRequest.model_rebuild() + VespaIndexInput.model_rebuild() except NameError: pass diff --git a/src/mistralai/client/models/vespasearchindexinforesponse.py b/src/mistralai/client/models/vespaindex_output.py similarity index 67% rename from src/mistralai/client/models/vespasearchindexinforesponse.py rename to src/mistralai/client/models/vespaindex_output.py index a3cce354..ed392d60 100644 --- a/src/mistralai/client/models/vespasearchindexinforesponse.py +++ b/src/mistralai/client/models/vespaindex_output.py @@ -1,8 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: ee7484f75a7c +# @generated-id: 2687fbf6df30 from __future__ import annotations -from .vespaschemaresponse import VespaSchemaResponse, VespaSchemaResponseTypedDict +from .vespaschema_output import VespaSchemaOutput, VespaSchemaOutputTypedDict from mistralai.client.types import BaseModel from mistralai.client.utils import validate_const import pydantic @@ -11,22 +11,22 @@ from typing_extensions import Annotated, TypedDict -class VespaSearchIndexInfoResponseTypedDict(TypedDict): +class VespaIndexOutputTypedDict(TypedDict): k8s_cluster: str k8s_namespace: str vespa_instance_name: str - schemas: List[VespaSchemaResponseTypedDict] + schemas: List[VespaSchemaOutputTypedDict] type: Literal["vespa"] -class VespaSearchIndexInfoResponse(BaseModel): +class VespaIndexOutput(BaseModel): k8s_cluster: str k8s_namespace: str vespa_instance_name: str - schemas: List[VespaSchemaResponse] + schemas: List[VespaSchemaOutput] type: Annotated[ Annotated[Literal["vespa"], AfterValidator(validate_const("vespa"))], @@ -35,6 +35,6 @@ class VespaSearchIndexInfoResponse(BaseModel): try: - VespaSearchIndexInfoResponse.model_rebuild() + VespaIndexOutput.model_rebuild() except NameError: pass diff --git a/src/mistralai/client/models/vespaschema_input.py b/src/mistralai/client/models/vespaschema_input.py new file mode 100644 index 00000000..f0b1b4f8 --- /dev/null +++ b/src/mistralai/client/models/vespaschema_input.py @@ -0,0 +1,22 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 98bbc9e3c2fa + +from __future__ import annotations +from .vespaschemafield import VespaSchemaField, VespaSchemaFieldTypedDict +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class VespaSchemaInputTypedDict(TypedDict): + name: str + fields: List[VespaSchemaFieldTypedDict] + sd: str + + +class VespaSchemaInput(BaseModel): + name: str + + fields: List[VespaSchemaField] + + sd: str diff --git a/src/mistralai/client/models/vespaschemaresponse.py b/src/mistralai/client/models/vespaschema_output.py similarity index 85% rename from src/mistralai/client/models/vespaschemaresponse.py rename to src/mistralai/client/models/vespaschema_output.py index 440967d1..91f56e9f 100644 --- a/src/mistralai/client/models/vespaschemaresponse.py +++ b/src/mistralai/client/models/vespaschema_output.py @@ -1,5 +1,5 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: fbab188e672e +# @generated-id: 540b24023c39 from __future__ import annotations from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL @@ -7,12 +7,12 @@ from typing_extensions import TypedDict -class VespaSchemaResponseTypedDict(TypedDict): +class VespaSchemaOutputTypedDict(TypedDict): name: str document_count: Nullable[int] -class VespaSchemaResponse(BaseModel): +class VespaSchemaOutput(BaseModel): name: str document_count: Nullable[int] diff --git a/src/mistralai/client/models/vespaschemafield.py b/src/mistralai/client/models/vespaschemafield.py new file mode 100644 index 00000000..03dff3be --- /dev/null +++ b/src/mistralai/client/models/vespaschemafield.py @@ -0,0 +1,41 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 52b6c6f46211 + +from __future__ import annotations +from .schemafieldindex import SchemaFieldIndex +from .schemafieldstorage import SchemaFieldStorage +from .schemafieldtype import SchemaFieldType +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing_extensions import TypedDict + + +class VespaSchemaFieldTypedDict(TypedDict): + name: str + type: SchemaFieldType + storage: SchemaFieldStorage + index_type: Nullable[SchemaFieldIndex] + + +class VespaSchemaField(BaseModel): + name: str + + type: SchemaFieldType + + storage: SchemaFieldStorage + + index_type: Nullable[SchemaFieldIndex] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/search_indexes.py b/src/mistralai/client/search_indexes.py index 522ae338..d0c45498 100644 --- a/src/mistralai/client/search_indexes.py +++ b/src/mistralai/client/search_indexes.py @@ -11,16 +11,1172 @@ class SearchIndexes(BaseSDK): - def list( + def register( + self, + *, + name: str, + index: Union[models.IndexInputIndex, models.IndexInputIndexTypedDict], + status: Optional[models.IndexInputStatus] = "offline", + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MistralaiSearchStudioAppRoutesV1IndexesRegisterSearchIndexResponseIndex: + r"""Register (or re-register) a search index + + :param name: + :param index: + :param status: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.IndexInput( + name=name, + status=status, + index=utils.get_pydantic_model(index, models.IndexInputIndex), + ) + + req = self._build_request( + method="PUT", + path="/v1/rag/indexes", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.IndexInput + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="register_search_index_v1_rag_indexes_put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.MistralaiSearchStudioAppRoutesV1IndexesRegisterSearchIndexResponseIndex, + http_res, + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, ["400", "403", "404", "4XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, ["500", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def register_async( + self, + *, + name: str, + index: Union[models.IndexInputIndex, models.IndexInputIndexTypedDict], + status: Optional[models.IndexInputStatus] = "offline", + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MistralaiSearchStudioAppRoutesV1IndexesRegisterSearchIndexResponseIndex: + r"""Register (or re-register) a search index + + :param name: + :param index: + :param status: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.IndexInput( + name=name, + status=status, + index=utils.get_pydantic_model(index, models.IndexInputIndex), + ) + + req = self._build_request_async( + method="PUT", + path="/v1/rag/indexes", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.IndexInput + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="register_search_index_v1_rag_indexes_put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.MistralaiSearchStudioAppRoutesV1IndexesRegisterSearchIndexResponseIndex, + http_res, + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, ["400", "403", "404", "4XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, ["500", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def get_index_summaries( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[ + models.MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndex + ]: + r"""Get Index Summaries + + Fetch summary view of all indexes available to a user + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request( + method="GET", + path="/v1/rag/indexes/summary", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_index_summaries_v1_rag_indexes_summary_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + List[ + models.MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndex + ], + http_res, + ) + if utils.match_response(http_res, ["400", "403", "404", "4XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, ["500", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_index_summaries_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[ + models.MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndex + ]: + r"""Get Index Summaries + + Fetch summary view of all indexes available to a user + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request_async( + method="GET", + path="/v1/rag/indexes/summary", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_index_summaries_v1_rag_indexes_summary_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + List[ + models.MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSummaryResponseIndex + ], + http_res, + ) + if utils.match_response(http_res, ["400", "403", "404", "4XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, ["500", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def unregister( + self, + *, + index_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Any: + r"""Unregister Search Index + + Delete all information about an index + + :param index_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.UnregisterSearchIndexV1RagIndexesIndexIndexIDDeleteRequest( + index_id=index_id, + ) + + req = self._build_request( + method="DELETE", + path="/v1/rag/indexes/index/{index_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="unregister_search_index_v1_rag_indexes_index__index_id__delete", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(Any, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, ["400", "403", "404", "4XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, ["500", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def unregister_async( + self, + *, + index_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Any: + r"""Unregister Search Index + + Delete all information about an index + + :param index_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.UnregisterSearchIndexV1RagIndexesIndexIndexIDDeleteRequest( + index_id=index_id, + ) + + req = self._build_request_async( + method="DELETE", + path="/v1/rag/indexes/index/{index_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="unregister_search_index_v1_rag_indexes_index__index_id__delete", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(Any, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, ["400", "403", "404", "4XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, ["500", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def update_index_metrics( + self, + *, + index_id: str, + request_body: Union[models.MetricsData, models.MetricsDataTypedDict], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Any: + r"""Update Index Metrics + + Update the metrics for a given index + + :param index_id: + :param request_body: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.UpdateIndexMetricsV1RagIndexesIndexIndexIDMetricsPutRequest( + index_id=index_id, + request_body=utils.get_pydantic_model(request_body, models.MetricsData), + ) + + req = self._build_request( + method="PUT", + path="/v1/rag/indexes/index/{index_id}/metrics", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, False, False, "json", models.MetricsData + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="update_index_metrics_v1_rag_indexes_index__index_id__metrics_put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(Any, http_res) + if utils.match_response(http_res, ["400", "403", "404", "422", "4XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, ["500", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def update_index_metrics_async( + self, + *, + index_id: str, + request_body: Union[models.MetricsData, models.MetricsDataTypedDict], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Any: + r"""Update Index Metrics + + Update the metrics for a given index + + :param index_id: + :param request_body: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.UpdateIndexMetricsV1RagIndexesIndexIndexIDMetricsPutRequest( + index_id=index_id, + request_body=utils.get_pydantic_model(request_body, models.MetricsData), + ) + + req = self._build_request_async( + method="PUT", + path="/v1/rag/indexes/index/{index_id}/metrics", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, False, False, "json", models.MetricsData + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="update_index_metrics_v1_rag_indexes_index__index_id__metrics_put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(Any, http_res) + if utils.match_response(http_res, ["400", "403", "404", "422", "4XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, ["500", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def get_index_detail( + self, + *, + index_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> ( + models.MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexDetailResponseIndex + ): + r"""Get Index Details + + Get a detailed view of the stored data for a single index + + :param index_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetIndexDetailsV1RagIndexesIndexIndexIDDetailGetRequest( + index_id=index_id, + ) + + req = self._build_request( + method="GET", + path="/v1/rag/indexes/index/{index_id}/detail", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_index_details_v1_rag_indexes_index__index_id__detail_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexDetailResponseIndex, + http_res, + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, ["400", "403", "404", "4XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, ["500", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_index_detail_async( + self, + *, + index_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> ( + models.MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexDetailResponseIndex + ): + r"""Get Index Details + + Get a detailed view of the stored data for a single index + + :param index_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetIndexDetailsV1RagIndexesIndexIndexIDDetailGetRequest( + index_id=index_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/rag/indexes/index/{index_id}/detail", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_index_details_v1_rag_indexes_index__index_id__detail_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexDetailResponseIndex, + http_res, + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, ["400", "403", "404", "4XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, ["500", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def set_index_summary( + self, + *, + index_id: str, + summary: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Any: + r"""Set Index Summary + + Update the summary field for an index + + :param index_id: + :param summary: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.SetIndexSummaryV1RagIndexesIndexIndexIDSummaryFieldPutRequest( + index_id=index_id, + summary=models.Summary( + summary=summary, + ), + ) + + req = self._build_request( + method="PUT", + path="/v1/rag/indexes/index/{index_id}/summary_field", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.summary, False, False, "json", models.Summary + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="set_index_summary_v1_rag_indexes_index__index_id__summary_field_put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(Any, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, ["400", "403", "404", "4XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, ["500", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def set_index_summary_async( + self, + *, + index_id: str, + summary: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Any: + r"""Set Index Summary + + Update the summary field for an index + + :param index_id: + :param summary: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.SetIndexSummaryV1RagIndexesIndexIndexIDSummaryFieldPutRequest( + index_id=index_id, + summary=models.Summary( + summary=summary, + ), + ) + + req = self._build_request_async( + method="PUT", + path="/v1/rag/indexes/index/{index_id}/summary_field", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.summary, False, False, "json", models.Summary + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="set_index_summary_v1_rag_indexes_index__index_id__summary_field_put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(Any, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, ["400", "403", "404", "4XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, ["500", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def get_index_schema_detail( self, *, + index_id: str, + schema_id: str, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> List[models.SearchIndexResponse]: - r"""Get Search Indexes + ) -> models.MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSchemaDetailSchema: + r"""Get Index Schema Detail + Get a detailed view of the stored information for a schema + + :param index_id: + :param schema_id: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -38,14 +1194,20 @@ def list( base_url = server_url else: base_url = self._get_url(base_url, url_variables) + + request = models.GetIndexSchemaDetailV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDDetailGetRequest( + index_id=index_id, + schema_id=schema_id, + ) + req = self._build_request( method="GET", - path="/v1/rag/search_index", + path="/v1/rag/indexes/index/{index_id}/schemas/schema/{schema_id}/detail", base_url=base_url, url_variables=url_variables, - request=None, + request=request, request_body_required=False, - request_has_path_params=False, + request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", @@ -67,7 +1229,7 @@ def list( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="get_search_indexes_v1_rag_search_index_get", + operation_id="get_index_schema_detail_v1_rag_indexes_index__index_id__schemas_schema__schema_id__detail_get", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security @@ -78,27 +1240,42 @@ def list( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(List[models.SearchIndexResponse], http_res) - if utils.match_response(http_res, "4XX", "*"): + return unmarshal_json_response( + models.MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSchemaDetailSchema, + http_res, + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, ["400", "403", "404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) - if utils.match_response(http_res, "5XX", "*"): + if utils.match_response(http_res, ["500", "5XX"], "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) raise errors.SDKError("Unexpected response received", http_res) - async def list_async( + async def get_index_schema_detail_async( self, *, + index_id: str, + schema_id: str, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> List[models.SearchIndexResponse]: - r"""Get Search Indexes + ) -> models.MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSchemaDetailSchema: + r"""Get Index Schema Detail + Get a detailed view of the stored information for a schema + + :param index_id: + :param schema_id: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -116,14 +1293,20 @@ async def list_async( base_url = server_url else: base_url = self._get_url(base_url, url_variables) + + request = models.GetIndexSchemaDetailV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDDetailGetRequest( + index_id=index_id, + schema_id=schema_id, + ) + req = self._build_request_async( method="GET", - path="/v1/rag/search_index", + path="/v1/rag/indexes/index/{index_id}/schemas/schema/{schema_id}/detail", base_url=base_url, url_variables=url_variables, - request=None, + request=request, request_body_required=False, - request_has_path_params=False, + request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", @@ -145,7 +1328,7 @@ async def list_async( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="get_search_indexes_v1_rag_search_index_get", + operation_id="get_index_schema_detail_v1_rag_indexes_index__index_id__schemas_schema__schema_id__detail_get", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security @@ -156,38 +1339,44 @@ async def list_async( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(List[models.SearchIndexResponse], http_res) - if utils.match_response(http_res, "4XX", "*"): + return unmarshal_json_response( + models.MistralaiSearchStudioAppRoutesV1IndexesGetSearchIndexSchemaDetailSchema, + http_res, + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, ["400", "403", "404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) - if utils.match_response(http_res, "5XX", "*"): + if utils.match_response(http_res, ["500", "5XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) raise errors.SDKError("Unexpected response received", http_res) - def register( + def set_schema_summary( self, *, - name: str, - index: Union[ - models.CreateSearchIndexInfoRequestIndex, - models.CreateSearchIndexInfoRequestIndexTypedDict, - ], - document_count: OptionalNullable[int] = UNSET, - status: Optional[models.CreateSearchIndexInfoRequestStatus] = "offline", + index_id: str, + schema_id: str, + summary: str, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.SearchIndexResponse: - r"""Register Search Index + ) -> Any: + r"""Set Schema Summary - :param name: - :param index: - :param document_count: - :param status: + Update the summary field for an index + + :param index_id: + :param schema_id: + :param summary: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -206,30 +1395,29 @@ def register( else: base_url = self._get_url(base_url, url_variables) - request = models.CreateSearchIndexInfoRequest( - name=name, - document_count=document_count, - status=status, - index=utils.get_pydantic_model( - index, models.CreateSearchIndexInfoRequestIndex + request = models.SetSchemaSummaryV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDSummaryFieldPutRequest( + index_id=index_id, + schema_id=schema_id, + summary=models.Summary( + summary=summary, ), ) req = self._build_request( method="PUT", - path="/v1/rag/search_index", + path="/v1/rag/indexes/index/{index_id}/schemas/schema/{schema_id}/summary_field", base_url=base_url, url_variables=url_variables, request=request, request_body_required=True, - request_has_path_params=False, + request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request, False, False, "json", models.CreateSearchIndexInfoRequest + request.summary, False, False, "json", models.Summary ), allow_empty_value=None, timeout_ms=timeout_ms, @@ -247,7 +1435,7 @@ def register( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="register_search_index_v1_rag_search_index_put", + operation_id="set_schema_summary_v1_rag_indexes_index__index_id__schemas_schema__schema_id__summary_field_put", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security @@ -260,42 +1448,39 @@ def register( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.SearchIndexResponse, http_res) + return unmarshal_json_response(Any, http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( errors.HTTPValidationErrorData, http_res ) raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, "4XX", "*"): + if utils.match_response(http_res, ["400", "403", "404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) - if utils.match_response(http_res, "5XX", "*"): + if utils.match_response(http_res, ["500", "5XX"], "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) raise errors.SDKError("Unexpected response received", http_res) - async def register_async( + async def set_schema_summary_async( self, *, - name: str, - index: Union[ - models.CreateSearchIndexInfoRequestIndex, - models.CreateSearchIndexInfoRequestIndexTypedDict, - ], - document_count: OptionalNullable[int] = UNSET, - status: Optional[models.CreateSearchIndexInfoRequestStatus] = "offline", + index_id: str, + schema_id: str, + summary: str, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.SearchIndexResponse: - r"""Register Search Index + ) -> Any: + r"""Set Schema Summary - :param name: - :param index: - :param document_count: - :param status: + Update the summary field for an index + + :param index_id: + :param schema_id: + :param summary: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -314,31 +1499,218 @@ async def register_async( else: base_url = self._get_url(base_url, url_variables) - request = models.CreateSearchIndexInfoRequest( - name=name, - document_count=document_count, - status=status, - index=utils.get_pydantic_model( - index, models.CreateSearchIndexInfoRequestIndex + request = models.SetSchemaSummaryV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDSummaryFieldPutRequest( + index_id=index_id, + schema_id=schema_id, + summary=models.Summary( + summary=summary, ), ) req = self._build_request_async( method="PUT", - path="/v1/rag/search_index", + path="/v1/rag/indexes/index/{index_id}/schemas/schema/{schema_id}/summary_field", base_url=base_url, url_variables=url_variables, request=request, request_body_required=True, - request_has_path_params=False, + request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request, False, False, "json", models.CreateSearchIndexInfoRequest + request.summary, False, False, "json", models.Summary + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="set_schema_summary_v1_rag_indexes_index__index_id__schemas_schema__schema_id__summary_field_put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(Any, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, ["400", "403", "404", "4XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, ["500", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def get_index_schema_file( + self, + *, + index_id: str, + schema_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.SDFile: + r"""Get Index Schema File + + :param index_id: + :param schema_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetIndexSchemaFileV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDFileGetRequest( + index_id=index_id, + schema_id=schema_id, + ) + + req = self._build_request( + method="GET", + path="/v1/rag/indexes/index/{index_id}/schemas/schema/{schema_id}/file", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_index_schema_file_v1_rag_indexes_index__index_id__schemas_schema__schema_id__file_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.SDFile, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, ["400", "403", "404", "4XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, ["500", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_index_schema_file_async( + self, + *, + index_id: str, + schema_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.SDFile: + r"""Get Index Schema File + + :param index_id: + :param schema_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetIndexSchemaFileV1RagIndexesIndexIndexIDSchemasSchemaSchemaIDFileGetRequest( + index_id=index_id, + schema_id=schema_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/rag/indexes/index/{index_id}/schemas/schema/{schema_id}/file", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -355,7 +1727,7 @@ async def register_async( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="register_search_index_v1_rag_search_index_put", + operation_id="get_index_schema_file_v1_rag_indexes_index__index_id__schemas_schema__schema_id__file_get", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security @@ -368,16 +1740,16 @@ async def register_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.SearchIndexResponse, http_res) + return unmarshal_json_response(models.SDFile, http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( errors.HTTPValidationErrorData, http_res ) raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, "4XX", "*"): + if utils.match_response(http_res, ["400", "403", "404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) - if utils.match_response(http_res, "5XX", "*"): + if utils.match_response(http_res, ["500", "5XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) diff --git a/uv.lock b/uv.lock index 442fcd39..77c48375 100644 --- a/uv.lock +++ b/uv.lock @@ -1047,7 +1047,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.4.11" +version = "2.4.12" source = { editable = "." } dependencies = [ { name = "eval-type-backport" },