diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 0141251..048e7d1 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,45 +1,46 @@ lockVersion: 2.0.0 id: 891d898b-5da4-4813-8dd3-fceb5b9832fe management: - docChecksum: f05bcd48705337294b49295e00dbfefb + docChecksum: ce469442eab19c9c174e5bc05a2f05de docVersion: 1.0.0 - speakeasyVersion: 1.682.0 - generationVersion: 2.791.1 - releaseVersion: 1.15.1 - configChecksum: 7e93606329a70d291e2b8f02cecfaa1e + speakeasyVersion: 1.759.0 + generationVersion: 2.869.3 + releaseVersion: 2.0.0 + configChecksum: ce43fbaf2707db14e02667996b15626d repoURL: https://github.com/ragieai/ragie-python.git installationURL: https://github.com/ragieai/ragie-python.git published: true persistentEdits: - generation_id: ca6e35b3-9ea4-41a1-a5a9-cf7d8adce5a8 - pristine_commit_hash: fcbb8568e4aac28e55fd2f89a183ca72eb32ca5e - pristine_tree_hash: a81b6c35d753c0f9dc7274af3a12d65bfbb03f64 + generation_id: c92dc9af-c9d0-4dd1-a908-cdab675f044b + pristine_commit_hash: 75b6b1dcec9c849121acb010ce60bb2d8b169fb4 + pristine_tree_hash: a4ea7a56619f9ad5034411885cb205a7735fcafe features: python: additionalDependencies: 1.0.0 - constsAndDefaults: 1.0.5 - core: 5.23.16 + constsAndDefaults: 1.0.7 + core: 6.0.19 defaultEnabledRetries: 0.2.0 devContainers: 3.0.0 downloadStreams: 1.0.1 - enumUnions: 0.1.0 + enumUnions: 0.1.1 envVarSecurityUsage: 0.3.2 - examples: 3.0.2 + examples: 3.0.3 flattening: 3.1.1 - globalSecurity: 3.0.4 + globalSecurity: 3.0.5 globalSecurityCallbacks: 1.0.0 globalSecurityFlattening: 1.0.0 - globalServerURLs: 3.2.0 + globalServerURLs: 3.2.1 groups: 3.0.1 + ignores: 3.0.1 methodArguments: 1.0.2 multipartFileContentType: 1.0.0 - nameOverrides: 3.0.1 - nullables: 1.0.1 - pagination: 3.0.7 - responseFormat: 1.0.1 - retries: 3.0.3 - sdkHooks: 1.2.0 - unions: 3.1.1 + nameOverrides: 3.0.3 + nullables: 1.0.2 + pagination: 3.0.8 + responseFormat: 1.1.0 + retries: 3.0.4 + sdkHooks: 1.2.1 + unions: 3.1.4 uploadStreams: 1.0.0 trackedFiles: .devcontainer/README.md: @@ -64,12 +65,16 @@ trackedFiles: pristine_git_object: 8d79f0abb72526f1fb34a4c03e5bba612c6ba2ae USAGE.md: id: 3aed33ce6e6f - last_write_checksum: sha1:46e7bf5f44d9e9157721fe368dfd8db74f3d4fd1 - pristine_git_object: e62e485afb60e09a644b2d9c1791a3bf46241a9e + last_write_checksum: sha1:a2c6c02f22cbf1677328c94f3442371eeefe5687 + pristine_git_object: 2f4049fd7d885fff5d641c1b7c3f33eeb96134d5 docs/models/accesstokencredentials.md: id: c6d793188011 last_write_checksum: sha1:597915880d89253442984f1ac3097af7075e415a pristine_git_object: f83241f72fb4e1e208e564d7b0f7bbea3478a192 + docs/models/address.md: + id: 308e7ce51a5c + last_write_checksum: sha1:74e23a3ab3782429b70773325c510ede6e899698 + pristine_git_object: a6e0e16abb4b7fb88988d9c396d888de2ee57e09 docs/models/agenthoppsmodelsmodelsusage.md: id: 7a24c7714955 last_write_checksum: sha1:d901206969e4b6971b1af46fdbb94ed3ec9b4100 @@ -82,6 +87,14 @@ trackedFiles: id: eb1e9e8f49f1 last_write_checksum: sha1:0e0caf7a4eb21af906f2f58e098b670049c6c40c pristine_git_object: e857cd4f201c13f603ef967c15c4cf8cd590f6fc + docs/models/apidocumentelement.md: + id: 335887e943d4 + last_write_checksum: sha1:2f82d6e19d897eb74bd793d768d6c621b2837056 + pristine_git_object: b40fd6900d159867ddfc763b7e26b24b51bdaf5d + docs/models/apielement.md: + id: ec727b9edbc9 + last_write_checksum: sha1:c23d6373e623f01677036bf064163332a65cc564 + pristine_git_object: 50d55195d2eb99c3347598c5dc70ec0022a402f0 docs/models/asyncdocumentmetadataupdate.md: id: d777fd26e953 last_write_checksum: sha1:478f95d3ac70f6b0d15fe1eaea75c2f300ed4c4c @@ -90,6 +103,10 @@ trackedFiles: id: 89b99530cabe last_write_checksum: sha1:a14f9c74eef34a0e2f3501fc43ebbabf22f01adb pristine_git_object: a9c6e93ad87162b767a3f6bbfbd7f4f4a1e2373d + docs/models/audiotranscriptionsegment.md: + id: 80f2a6be8afb + last_write_checksum: sha1:28ea7e72406f830dc3dc79f719e62bd47082a0f2 + pristine_git_object: 3098e7b596378ac0cbc2b52bca9331f6026a1f8b docs/models/authenticatorconfluenceconnection.md: id: 53cce5f65693 last_write_checksum: sha1:7090fff77d6893a54abbcf2646dc082752adcd55 @@ -138,18 +155,54 @@ trackedFiles: id: eae155424cad last_write_checksum: sha1:36e1b7b6c409b5ab68198c6ef36b6b3c10c1d91b pristine_git_object: f260ca9ef2eff694f68dadd35ee0a6167bdd6baa + docs/models/author.md: + id: b4139065dbed + last_write_checksum: sha1:10d15061f53c40df31d49814759c40db29a2b6c1 + pristine_git_object: 238e6aceb09482e1b4920fa260fe7393faa6aa13 docs/models/backblazecredentials.md: id: 82d1606bd4cf last_write_checksum: sha1:c4db029fb8cf46cec7eca27979844ea740ed211f pristine_git_object: ba1ccab1dd3c3e0d1c9ed4baec9ec5ec6c7dd690 + docs/models/barcode.md: + id: 5a7922bda2bc + last_write_checksum: sha1:4d133fd0d57a39d14a528020898d25d2499a6d87 + pristine_git_object: af995b97fa4ae6af678a89f5926e66448ae0f3c2 docs/models/basegetauthenticator.md: id: 783474b427d1 last_write_checksum: sha1:7b5a83cfe1762fa4e036abdf4b37abf3a7f38106 pristine_git_object: 1ab789a86718e97a76a05d5c5660bd465542f42b + docs/models/bibliography.md: + id: 3dda849948ae + last_write_checksum: sha1:133ac56f92440a3b8155500d8c95db6c3e40cb9c + pristine_git_object: f86c14cca404c0cdf4bc85842e1273d00a830aa2 + docs/models/boundingboxlocation.md: + id: 63382fe012f3 + last_write_checksum: sha1:4c85c87214d955e5e1b96d2a7841cbc03396adf4 + pristine_git_object: 291ceca28b8f5f116528928c53b6157d0625cec8 docs/models/bucketdata.md: id: d36edaea1370 last_write_checksum: sha1:61d6f71469a2a5d5750d38a00368219f6dde12f8 pristine_git_object: ecfc1e5d0f3225d5e02365e833a1c88730698f69 + docs/models/button.md: + id: 5d67cf083d84 + last_write_checksum: sha1:8a46cf42318bebb8c45f6c5f5b336c543c666447 + pristine_git_object: 3ba9250c02406a516dd80c7809b9a1e06947a347 + docs/models/calendardate.md: + id: b0f7b7dd9f7c + last_write_checksum: sha1:d2570b2e1b50d080d314aea749a38d76d7a229a3 + pristine_git_object: d73656ffb65f1c011deba829ebffd33e70320a7b + docs/models/caption.md: + id: c04172cfa36a + last_write_checksum: sha1:f496be877ba447935c4f05bb58f9536bd711863f + pristine_git_object: 4646ecfaaf44ddbddd4d549e02b1a0943cee6c15 + docs/models/characterindexlocation.md: + id: 91c0d8179df2 + last_write_checksum: sha1:9133450080a17083d30d38888fcbf2c10840c036 + pristine_git_object: d0139c448b931a01b40af7726d5815a025e4487c + docs/models/code.md: + id: 2fcb3964c9c0 + last_write_checksum: sha1:0533f4eeebcd840808aa234d07a150fd87c2c298 + pristine_git_object: 48213b235fb2b37b1c334c9c09b8b908c4b3e120 docs/models/codeinterpreterevidence.md: id: 1996de588381 last_write_checksum: sha1:42938c2b0e251c2387bb07b65db64350db2d3ef7 @@ -164,12 +217,16 @@ trackedFiles: pristine_git_object: a983231c147dd98ef1405996730804006bdcdc82 docs/models/codeinterpreteroutputstatus.md: id: dc196c4801c7 - last_write_checksum: sha1:70faf4ed98f9aa4ff646bb83e34d69f849ca9b72 - pristine_git_object: 7fa82851b25ba73e7555f46a5e0690aaf02d74a1 + last_write_checksum: sha1:1347cc1992b247dab3681c3678235a5c8d972793 + pristine_git_object: 09a5db5f88ed4eee215a9c5e53e57398f841d847 docs/models/codestep.md: id: 8f63c09a4607 last_write_checksum: sha1:640a6fd685206069b480fedd0168a918bf9867bf pristine_git_object: f1a7c3dc2b753eb914906e315a07f7a1db11fdd9 + docs/models/comment.md: + id: 1f0726df805d + last_write_checksum: sha1:506bb82d812b51a27748135c1915aba24f76ef14 + pristine_git_object: c64f20f0d64e52776ec9dc82e74001b64521f40b docs/models/confluencedata.md: id: 22d99be6aaf6 last_write_checksum: sha1:9664e9b8f4933e2cae07484a86e38ba325f67640 @@ -204,16 +261,16 @@ trackedFiles: pristine_git_object: af0cfd2e14397b5cb538d6721aebc423e24d0436 docs/models/connectorsource.md: id: 9d36f5a51e25 - last_write_checksum: sha1:8e298a9edd17c5a9cb25bea36844631f2fffab46 - pristine_git_object: 242656054890feb77e6a619eefd037295a6f3050 + last_write_checksum: sha1:d96dfc0efbc18dbc063c68ddc186bc2ed55f3cf3 + pristine_git_object: 1b293676852a312f0cb3401c6cc03b7c91a6d8e3 docs/models/connectorsourcetypeinfo.md: id: c367ed78bdb5 last_write_checksum: sha1:2055a473dd6a59d507e545d50956c8df672145be pristine_git_object: 5fc8e7269654345efaf30473d139cd5c48b42b02 docs/models/createauthenticatorconnection.md: id: f2bd41a94149 - last_write_checksum: sha1:e385cff3133dd42806881f32fad117245791ef02 - pristine_git_object: 1d3080629fec57332d77859914ba563a0b996f44 + last_write_checksum: sha1:313c817d9e481507ff89558bde8e2cfe821bee6e + pristine_git_object: 7070f6310a5d2b05f5454194bc8c95b0a87e15ae docs/models/createauthenticatorconnectionconnection.md: id: a79fb562b88e last_write_checksum: sha1:f519185b617abf25a131f02f4631a0fd88bb0c23 @@ -232,24 +289,28 @@ trackedFiles: pristine_git_object: a31fcaa1a0f1afdeb3e72f3c5ef6a030ad87b443 docs/models/createdocumentfromurlparams.md: id: 77da369cf5ca - last_write_checksum: sha1:73d4d74df19ab0f27e058d3ed502aa40192bb3ef - pristine_git_object: baae7c96772d7ea687a9b9ae0e6fe1829c50badf + last_write_checksum: sha1:9ee329850bc6a2c6b5fc50bea19dd60cdbb7f34b + pristine_git_object: b245468730450c4a26d2cbd9b2ac1e62d310386c docs/models/createdocumentfromurlparamsmetadata.md: id: 6ac939b708f6 last_write_checksum: sha1:3058a8f25cc8f20b52218900f8351ab9cb8863ec pristine_git_object: 2effc752787c2f05314c7afa816234ac593a967e docs/models/createdocumentfromurlparamsmode.md: id: 7729e5db148a - last_write_checksum: sha1:2464b09933b98c2d6665d41005ec6a9a2e6e71ab - pristine_git_object: 05f71089c66c13f6b34f21eea9672338d6bf144a + last_write_checksum: sha1:25b440ba0b4d32804cc3cce6864c2e15c53cf08a + pristine_git_object: 74926be69f263e185298f35e1d6680d651b9c287 docs/models/createdocumentparams.md: id: dff4da9af2e3 - last_write_checksum: sha1:374608ccfbd723c30b5a65b61c91376eb850f69b - pristine_git_object: 404a293e9dc8ac45b4e9f42c70ccccfefc7968a2 + last_write_checksum: sha1:281fd223b4dca1324ec6293880e961b4bc1b4eac + pristine_git_object: 92a9d2f1f84065f9f7594edeb65f288ae21cd169 + docs/models/createdocumentparamsmetadata.md: + id: cd85def8a738 + last_write_checksum: sha1:b40762f1a9d695d2753ce6fd26fe1f3cd08887e3 + pristine_git_object: b722636c421f1da3b021fe18d9f6a5b2525e119a docs/models/createdocumentrawparams.md: id: 1c21de0bb041 - last_write_checksum: sha1:3ca4175ac3b2fe1bc11c6bf9cd1c7b1dafaed0e7 - pristine_git_object: cf722195cb4b2b5fbff73dd0157f98b2bf78f90b + last_write_checksum: sha1:8514027ff24738eec25dd6233cb14a4ebf250f2c + pristine_git_object: bfcaa58bbe2b6b082602891db7fb1f896df549eb docs/models/createdocumentrawparamsmetadata.md: id: 89757182448e last_write_checksum: sha1:49147a17413218d79d39bbdfbccec55863d124b7 @@ -260,12 +321,12 @@ trackedFiles: pristine_git_object: 5e4c1682a08018882acb324e28e8132892b7e532 docs/models/createinstructionparams.md: id: 31ee87012333 - last_write_checksum: sha1:847f7fbbeab1bc3e3d0d68b35640b4cfd338cf6d - pristine_git_object: 5679823f191ca57d6ac6cb16aa0ec99bcdd176fa + last_write_checksum: sha1:4021cd6400ca77b28f124ed57bb3fe8c98d8a6ef + pristine_git_object: 2d30a51aa1684e0c45fed085bc091874c0a7b6b1 docs/models/createinstructionparamsscope.md: id: 4d0e6f29d302 - last_write_checksum: sha1:50f5a6888921ce80a5a4abf51bb13f3cbef7f901 - pristine_git_object: a86004eecc82a5a51df5a73d70ba049c6aa9c07a + last_write_checksum: sha1:56f3ecc6529cc369efed43ce380e80882336c382 + pristine_git_object: 08275065e9a7a2958d7e5764dfd9f48aa315804b docs/models/createpartitionparams.md: id: 15241fe88278 last_write_checksum: sha1:7b45af98eca5056afbaa24cf86e1b914a512fbc0 @@ -282,6 +343,10 @@ trackedFiles: id: 9a31987caf78 last_write_checksum: sha1:cd092ca1b0ae5b62ec963712cefc5af38f24c4ed pristine_git_object: b41662816fbaa002deb66ec053606cbdf18f9b02 + docs/models/definitionlist.md: + id: f6b5e853205d + last_write_checksum: sha1:ce64bd6e75e68ba6ad0c9dad8c2fb0c2290f44c5 + pristine_git_object: 101af382472a85e0a4afc92b8b267059b8d27006 docs/models/deleteauthenticatorconnectionrequest.md: id: c874b8e141fc last_write_checksum: sha1:83f5b1bcf8a342e82c88827a4a2b62dfd730213e @@ -304,20 +369,20 @@ trackedFiles: pristine_git_object: 5a6390a8bd58ce45958c15f9376d4984254e63a7 docs/models/deletepartitionpartitionspartitioniddeleterequest.md: id: cfc2d731d5b2 - last_write_checksum: sha1:77dbf72d6ca8ed032e1c63a597e38d0acbbd69af - pristine_git_object: e5e26c5af5c50160c110ed6d7f7d3729322fa382 + last_write_checksum: sha1:da6bb845c27cf0000e0b37f99c7fbc725ce61d98 + pristine_git_object: 8184b9f3bd0b1a491b593e93c62a71f91bbf87c8 docs/models/deletewebhookendpointrequest.md: id: d049b5a860e1 last_write_checksum: sha1:08a19e1c3d762f5cb43dfa5a5b7b93a1bdf52853 pristine_git_object: 94bfb553bcf80030d42962f1b6a6f460e99d4606 docs/models/disabledbysystemreason.md: id: d2135ef9c175 - last_write_checksum: sha1:2ae43c80efe0d7bd650600cad0ce21219ffd8673 - pristine_git_object: 4658ec766a24d4716e7f7da947bfc4fdf6a652c3 + last_write_checksum: sha1:bca5c8c8690bd711d6a4d94b1a87be0541dda315 + pristine_git_object: beec7e2763cbbb807235e995c08bae1833dbe90f docs/models/document.md: id: cd1d2a444370 - last_write_checksum: sha1:3db14946ab8f6eea650ff4867e1e9db213db5030 - pristine_git_object: 270a7e551fd3ef057783babba993e89db6b258a0 + last_write_checksum: sha1:2dba6830c013ba10cbd597c14e31c34d315eb761 + pristine_git_object: 137db66d1e61ec0f09d3ec9da7a89cbab8c1602a docs/models/documentchunk.md: id: 1bf991e72f74 last_write_checksum: sha1:7883f9149b49c23be8c5187bb27bb9e893602945 @@ -334,6 +399,10 @@ trackedFiles: id: 243c62f589ef last_write_checksum: sha1:11fd3a2e61b681a4fffed8f3e2d11c9afc40ce5e pristine_git_object: fa28a081f22926fa2720f31af914c5fddb0e3ac0 + docs/models/documentelementtype.md: + id: e54df84e2dbc + last_write_checksum: sha1:e3e3c364c4ece7454fe21dae5f58586d9f9c26a5 + pristine_git_object: 605605b87ddfbabe1b36f2ea1fcc1e394213b5b1 docs/models/documentfileupdate.md: id: c4e34154bdc1 last_write_checksum: sha1:24b933c3a81a2db4250eb60f52c042c911860f4e @@ -350,10 +419,6 @@ trackedFiles: id: 9595b025619e last_write_checksum: sha1:1fb139288752a939b41d0046ee2e4e52903a371d pristine_git_object: c0d92652966fd5f6ccd67b90e1db895ee24c7574 - docs/models/documentmetadata.md: - id: 4e38d3813c9d - last_write_checksum: sha1:6f33cf44ade8e0312242609f1648a472d416cca3 - pristine_git_object: cda6ed46a5bb98b70b480e7c577e8c551b82fed8 docs/models/documentmetadataupdate.md: id: 639bbe3a8c03 last_write_checksum: sha1:96a79692cd1ff649f4834d7981e69bf1abe4f142 @@ -382,14 +447,26 @@ trackedFiles: id: db8e710d9f40 last_write_checksum: sha1:5cd8c884bf0ec92db4f8acc65a023c30570dc6fe pristine_git_object: a014919ec1b36ac669e0e29d63ee7d7842b2bf10 + docs/models/documentworkflow.md: + id: cc0e291b5d34 + last_write_checksum: sha1:08bb2ee1c156428a41d81f7dcbcc1658f755bd71 + pristine_git_object: 4b0e4fe4b041b50007e1d24c34503883cf2ecb75 + docs/models/durationlocation.md: + id: 440cfeb463e7 + last_write_checksum: sha1:032e974d8191b4eb36a0cac31d6d10ee54d6a228 + pristine_git_object: 19d7c86a1b483aa3c10458336e79af1479bad7fc docs/models/effort.md: id: b0ec2947740c - last_write_checksum: sha1:134d965dac634f7f24840224b24c61ea6019032a - pristine_git_object: 1fed3cfe7665890129ce149740918647d2674631 + last_write_checksum: sha1:e4ec7b41cc0843996494f9ca176b1387ae7f926a + pristine_git_object: 6b65d289b672df9fb7017ee9e14c3c40b6637151 + docs/models/emailaddress.md: + id: d59acccbf5a1 + last_write_checksum: sha1:0b1a7764c1773454e5e81489b6884f98f177a87d + pristine_git_object: 710de1c508b4ea0a880cf9f27af15d67bc1e3e7c docs/models/entity.md: id: 903c73579a5c - last_write_checksum: sha1:2d9c55bddc419ae998c2b46a293b3aeafde04bf8 - pristine_git_object: ac0428d0c769192d5dfeeb2432c3e1d44168f1a4 + last_write_checksum: sha1:c3e03872137a8ec0a5cae8d7d63dad969847ab78 + pristine_git_object: 055ed8ae87ae7c08a31d34184d71bc9aef585de6 docs/models/entitylist.md: id: a34df54788d2 last_write_checksum: sha1:12094dbb41f20f8257a305ce43f0b7558566f90f @@ -410,6 +487,14 @@ trackedFiles: id: d47508085636 last_write_checksum: sha1:594d415349d6c39d31e994a1f41302e07d6fe978 pristine_git_object: 71eaef97108d153ac98b26edd5b55069ff20c9ca + docs/models/figure.md: + id: 499982830b26 + last_write_checksum: sha1:9a97e873b861aa9d338ee3306116903bfaf0f518 + pristine_git_object: a7bcedacc9c2c9b8a59450e04e2b14bc63e9184c + docs/models/figurecaption.md: + id: 53386db53b6c + last_write_checksum: sha1:836c852e9f82d2959cbc6e51c54c472e54b0c37b + pristine_git_object: eaa6d554031c8592d4dfb9d773ffc37f5c607ce4 docs/models/file.md: id: 4ad31355bd1c last_write_checksum: sha1:ade4d3c908c664a07a3c333cc24bc1bfb43ab88b @@ -420,8 +505,8 @@ trackedFiles: pristine_git_object: 1dab38ce6b137b06ee19480eaf39a3794275d10f docs/models/filesearchoutputstatus.md: id: 34ebab9911da - last_write_checksum: sha1:3296d28b8d2d56ae93882cbb0efe4026e9335198 - pristine_git_object: c8c57dd92c648081e2289ae7d826451e1db657cc + last_write_checksum: sha1:03b571d94775ed755068887be8b084ffb5813912 + pristine_git_object: 52b583749dec61427346147bbf35509d959f30a5 docs/models/filesearchresult.md: id: 1933c8e6ece8 last_write_checksum: sha1:962ed7f14b64fc2327fb9e56aa3dc1ef9568ec75 @@ -434,6 +519,26 @@ trackedFiles: id: b495e4318414 last_write_checksum: sha1:cf2a0b499ed0d02b9ebecfa92433e5dac83323d2 pristine_git_object: 176e4294964f2805969722a4423976652ac91e67 + docs/models/footer.md: + id: cb70ab125e61 + last_write_checksum: sha1:97dc50363abacaec85b4a0b67122e0d6480e0597 + pristine_git_object: 94aa2ac00971e4ee49785e5a9ae9a4f71e9ef7bf + docs/models/footnote.md: + id: c21ac95241af + last_write_checksum: sha1:7a07f1a567825142a3cceeb07b6c76e90f717a14 + pristine_git_object: 565fb6efda51a381e5ff09e02a9a83fc37b059f9 + docs/models/formfield.md: + id: 0ff01260fca5 + last_write_checksum: sha1:2bbb89fd6db2ef9fb76f7cdf6bfec96df840e9dc + pristine_git_object: 7fb6a175ba57a476c0ed28051b6e7ea41045d1fe + docs/models/formoption.md: + id: 06e1d84111ae + last_write_checksum: sha1:e95da4fd5322a483813801ba907102932952da28 + pristine_git_object: 363f8d334a2f2d1a72b6bcd7a978916e33d0c599 + docs/models/formula.md: + id: 484112b27011 + last_write_checksum: sha1:e80e35d032068fac4343e58d5aca45aa23ee871c + pristine_git_object: f6033f92b56634af728a07b5d000555755da4228 docs/models/freshdeskcredentials.md: id: df6339cab2b2 last_write_checksum: sha1:c012e636d6fbe02e3f17f32b8bbf5188662b32b5 @@ -452,8 +557,8 @@ trackedFiles: pristine_git_object: 4a5567faedbaa69da7073585b726b78604ed994c docs/models/getdocumentchunkcontentrequest.md: id: 011472bc692c - last_write_checksum: sha1:8b173851d0221c9f595faa19f4ba9db07472d229 - pristine_git_object: f59c2dc5e5d7d0515f2217a2f74a1c028a1b3aa4 + last_write_checksum: sha1:b3b51ff33e8213d0ace359dc3ab2ceeb4f7422b8 + pristine_git_object: 54bc4a00e0202f602bce4e1272f42b92ed53c128 docs/models/getdocumentchunkrequest.md: id: 82878df2bc66 last_write_checksum: sha1:26ee01127a6ccdeea544c014e0522ecb93157d75 @@ -464,8 +569,8 @@ trackedFiles: pristine_git_object: 23afd6c72991c9e059c92c759286242a9eea2c6d docs/models/getdocumentcontentrequest.md: id: cd7863ebee07 - last_write_checksum: sha1:9f327668a4dd227a0fb612cad061f4b75fdee4d1 - pristine_git_object: faa0c5fa220f402b071d4d68b7939616d1ab2718 + last_write_checksum: sha1:0df3baf82752aaad23e9e5f12f13a533189a610c + pristine_git_object: 9920931e497444bede89721cf183f635e4633146 docs/models/getdocumentrequest.md: id: 4208f9b571b3 last_write_checksum: sha1:0167571e7d82605aa8a101fb6e81dcc4e1c394c6 @@ -478,6 +583,10 @@ trackedFiles: id: 544b1a274c7f last_write_checksum: sha1:f388c36a6cfc8543cc884fbbe93b4b261f2937f0 pristine_git_object: b0900b696f48b4849d48d58d811b5a0f739f3a16 + docs/models/getelementrequest.md: + id: 3ffcf2d48046 + last_write_checksum: sha1:416e680deaf7f8dd1b0e61889038e6fc21dcec7b + pristine_git_object: 87869a1f58f13d060836d4ea8d339e4a7a1f910a docs/models/getpartitionpartitionspartitionidgetrequest.md: id: 94203f34bfeb last_write_checksum: sha1:1874457d02cfc804bee7c50494314990e018315e @@ -498,6 +607,10 @@ trackedFiles: id: 5f4fd2356423 last_write_checksum: sha1:cd93e94ccd14e00aea431b80f45ce0baf370425c pristine_git_object: a0a83b935c441f3e6876490667238e920f608df5 + docs/models/header.md: + id: ed105465749d + last_write_checksum: sha1:f930f52b55687dd7d59b25ee3817543af1c955f3 + pristine_git_object: 1998ef6fe535cce6190395e960a35182aacdbab3 docs/models/httpvalidationerror.md: id: a211c095f2ac last_write_checksum: sha1:277a46811144643262651853dc6176d21b33573e @@ -506,14 +619,34 @@ trackedFiles: id: db5105a8b6b4 last_write_checksum: sha1:a39eb4ae8bba7e72e9ea2dec574ebbe5b6466033 pristine_git_object: 5822fe11012f57cdd179b32b710c801310d6bc20 + docs/models/image.md: + id: 6f8629b533b3 + last_write_checksum: sha1:4e15a239ba68e6c779ad4c859968e982b8f40b7f + pristine_git_object: c3c0383b4369253bf41888952432aab2616a5df5 docs/models/inputtokendetails.md: id: d5481b0bfa69 last_write_checksum: sha1:b08b9778203ba12c14226710d34c990cfe8d0751 pristine_git_object: a8262c682685882b9a56c7d40660b8d93c532824 + docs/models/inputtype.md: + id: ef00db72de19 + last_write_checksum: sha1:c0cf64ec29a54268b048fe785009c953be366eec + pristine_git_object: 59a3e9e39759dc226fc764ded93c7579f6ba1a3d docs/models/instruction.md: id: 96522ca2fe3b - last_write_checksum: sha1:cf958240404b09bbd1d2db8eca799e744e04a498 - pristine_git_object: 7a968bb931d2f9d5eb40c9ee5c30ec1685e6eac1 + last_write_checksum: sha1:350bf61c212ae96eb19d243b2ee7965766110875 + pristine_git_object: ae51d8d65eb75cc4e5667c83adbf4f25764b1b72 + docs/models/instructionentityextractionlog.md: + id: 8318a3f593b1 + last_write_checksum: sha1:c8dc83aeedd0fb2f1797fb613fbf4e9039ea8d77 + pristine_git_object: 222ba26d235cd04add4ca4cd21d1ad56b057d9fa + docs/models/instructionentityextractionloglist.md: + id: ce530f75d02e + last_write_checksum: sha1:243d8e9d0bae8dd2d6a450c0501dc84075061f19 + pristine_git_object: 73ff2d708a88b543819be24e1b4471fa613032a1 + docs/models/instructionentityextractionlogscope.md: + id: 40e1acea881d + last_write_checksum: sha1:9a8fe8f98586e76cef59aa5e10798fddd35148da + pristine_git_object: bb865dd5f7c2f6c71cc5b1095e2bb6d0817180c9 docs/models/intercomcredentials.md: id: 6e031a2568ec last_write_checksum: sha1:10d6e0e948d2f3926cb03fc164435f7221a245a9 @@ -522,6 +655,14 @@ trackedFiles: id: 8b637b375ba0 last_write_checksum: sha1:686a936d0f92cd23a6f714ffac686e8ac1e76108 pristine_git_object: 8368ca3b7a254fe6df00c632ece661655d4fcc4b + docs/models/json.md: + id: 712a72a6f06e + last_write_checksum: sha1:60bda34f7c07559e85537a557765bf190abed63c + pristine_git_object: f56a7f0fadfce3a87e8b8f018b21aafba440b5d2 + docs/models/keyvalue.md: + id: b9c4bcdb3aa0 + last_write_checksum: sha1:66f9a21757742f9ebac2d6bed875702e13f9b32a + pristine_git_object: 3e3f8bf8430e2487238caffa99558660aa492173 docs/models/link.md: id: 01d6d668bcb8 last_write_checksum: sha1:d90a88aaf7cba92d2b64f1a374013da6d954fdf0 @@ -536,8 +677,8 @@ trackedFiles: pristine_git_object: 36f4c999e846978be28fb220b255897498060969 docs/models/listconnectionsconnectionsgetrequest.md: id: 9e10e4b44ca3 - last_write_checksum: sha1:9e27debb01bd7f0f8f366e5809f1c2dfbcac4bfa - pristine_git_object: 882597b51ecaf9450cf26d331c98a803c339a5ba + last_write_checksum: sha1:e2ba0cd57412747ab992189f2ead72f1d2f48e8f + pristine_git_object: 3e47b45ef36ad3ab40f348acea608129cc6158b4 docs/models/listconnectionsconnectionsgetresponse.md: id: 46f1061fa6d2 last_write_checksum: sha1:ec8a7ccf35c5e4d93857531b55437850bed97280 @@ -546,14 +687,22 @@ trackedFiles: id: 53501e073b83 last_write_checksum: sha1:1bd6f6fada68f8326e42862a73086f60a8c28d72 pristine_git_object: 16c234abd099ba8df0cd6c13a1391d05f1aca691 + docs/models/listdocumentelements.md: + id: c789c9d13e67 + last_write_checksum: sha1:1fc53eb635194308700875d88c0b1f98f44ccb90 + pristine_git_object: c5f41289b28bc727e80f16ab3ff64c8b149ad110 docs/models/listdocumentsrequest.md: id: 36c8a1116534 - last_write_checksum: sha1:4e46c9879aedaf8de7bb81dadf9736405811dd98 - pristine_git_object: 43330a124cb5c3f7562a2f8ffc3773d926b1b164 + last_write_checksum: sha1:d470f4ec735bac98c17ee8098e8e368be0c0f7d1 + pristine_git_object: a4b5a68220cc050ee2d7d38c24e1579b10e7866d docs/models/listdocumentsresponse.md: id: f2091cee0405 last_write_checksum: sha1:05ffed25cdb0ed9268dca20003e5ec20800868b4 pristine_git_object: 6c5eb0dccbafaa2aa05a51224386e44a524701ab + docs/models/listelementsrequest.md: + id: af40e67ae08f + last_write_checksum: sha1:718d7cc8fe53d29154f2aa367f785a7a938836e0 + pristine_git_object: cb8665ac9d200991028f3d4465e8225bf6774696 docs/models/listentitiesbydocumentrequest.md: id: d9acedddc497 last_write_checksum: sha1:a5bac1b95597febb2a0e2af9d425f5658fad7cc3 @@ -570,6 +719,18 @@ trackedFiles: id: 9ab0eb7a5d8d last_write_checksum: sha1:3d7a93430094e8c8c3f462ad327db8f201f81348 pristine_git_object: ab534891a78141cd1f7e3db20c85788d73bd91c0 + docs/models/listinstructionentityextractionlogsrequest.md: + id: 80a39dea8344 + last_write_checksum: sha1:b19d6c292427fa3e98d4aa500474c6273480dcc7 + pristine_git_object: 31111021156f4b484950937e1544fcfb4960bd10 + docs/models/listinstructionentityextractionlogsresponse.md: + id: e1868ffdc31c + last_write_checksum: sha1:f60da4767b7f223fd37e153c11df71e66790d943 + pristine_git_object: c4b72f82ca39a7ee1982f611f49b78e9f3f8f7b0 + docs/models/listitem.md: + id: 53c053beba3c + last_write_checksum: sha1:0189af7d28cadd599e50bc0d6f56a61b02cb9589 + pristine_git_object: f4456fac6041f9f11e5b960510ac16336cf1b8cf docs/models/listpartitionspartitionsgetrequest.md: id: 66832e51697b last_write_checksum: sha1:a0aefa2227bd4a5981fb8260efeb1010f4cc45f7 @@ -590,18 +751,30 @@ trackedFiles: id: b071d5a509cc last_write_checksum: sha1:09a04749333ab50ae806c3ac6adcaa90d54df0f1 pristine_git_object: d6094ac2c6e0326c039dad2f6b89158694ef6aa7 + docs/models/location.md: + id: d96a7d2fb391 + last_write_checksum: sha1:b1f63b55c15880491bd9c6bb025b729e12b9a2d3 + pristine_git_object: 6db799685cf06a5324018a726236631f514b7383 + docs/models/logo.md: + id: 57ce382ba7dd + last_write_checksum: sha1:0deb38df350ae45ab31053416db9ce6c622b0f2a + pristine_git_object: 46c1aa26f078ef220d2abd289f43abde37029f29 docs/models/mediamodeparam.md: id: 3d6525f78c66 - last_write_checksum: sha1:99acac35772153de10d7cf5ba433a0fed602c214 - pristine_git_object: d9127fdf0e99c3215894a4de16083e3202c35dfc + last_write_checksum: sha1:9a03bdf279107d8bac26cd7f88782d7d32a30b3c + pristine_git_object: feed1a88429a0353706d8e53f9ad9176eb560e1a + docs/models/mediamodeparamvideo.md: + id: b57f7df95d20 + last_write_checksum: sha1:009cd15d97841d74a1db9216bbfc4b0ff3a04cf9 + pristine_git_object: 4b7b4f053510e0aeb46eaa178b31011ee04428ff docs/models/mediatype.md: id: d97d24949b29 - last_write_checksum: sha1:5d48a880fde38eab31250f2a9a085ea31eff3878 - pristine_git_object: a787f86edbb4c6c30713440258139438bb4c8311 + last_write_checksum: sha1:f9d2dd0788f62bfe86e0926d3a96583d4e1989f8 + pristine_git_object: 68d4a3f770a145bff70ef9a846f7988f8758fd75 docs/models/metadata.md: id: ad63dba5a4f8 - last_write_checksum: sha1:b8b830b48b7b996334c3ff07f7deb474b8d9fcd2 - pristine_git_object: fdf0ff471a581ab7fcff08f85b4bbd74ca2f1c55 + last_write_checksum: sha1:2f81e81789ac4bd2c1f068e07580f5c7ec5a62e0 + pristine_git_object: 9aeb2ca85622def2dee0b6600535f5e549e83a1b docs/models/metadataschema.md: id: 50e9b2a6fa28 last_write_checksum: sha1:9b7f8b0bc73045ffe126991fed1243349fe58cbd @@ -612,12 +785,12 @@ trackedFiles: pristine_git_object: fa68bce55bbbc9ffca5dfca895f630d75959c137 docs/models/mode.md: id: 568581cb28bc - last_write_checksum: sha1:3c5c642d355d87f4a957e80216a4745ff2bd8f49 - pristine_git_object: 16130efb69fac54af0c2f019dd70f1d30d55c077 + last_write_checksum: sha1:6cc121e1610af353d6d6deb1dfafb47806deabb3 + pristine_git_object: 04814082686d88588fecebd8ff72a1bd194f24fa docs/models/mode1.md: id: bf45aa495964 - last_write_checksum: sha1:a3c5263df1b7b5def7503748a1c9cff05aa53295 - pristine_git_object: e1fdc0dfb3e14085a1d6efcd15fda7c76607e723 + last_write_checksum: sha1:f7f5a9209ae5842968bb31f6ae2eeadeead2ba5b + pristine_git_object: 2415e969253c503a5257c22f366399bfd07287fa docs/models/mode2.md: id: f7497670443d last_write_checksum: sha1:aa1cd624ee714bc7a1c1a4badb7f17fbc5ea1823 @@ -628,12 +801,16 @@ trackedFiles: pristine_git_object: 36232e87e29f90e560e4a2b51bddb8d56a699c28 docs/models/modestatic.md: id: 18fd3f66cef1 - last_write_checksum: sha1:11a9cab8497dc1e824293e7f2faf99e402319b9f - pristine_git_object: 798ad3179cc82796ec062678e286a113892c4f94 + last_write_checksum: sha1:17fe281dac47d8228d41d68ba7f7174d745d152d + pristine_git_object: fe671582ed7c7ad9f7179981e05eb5439ab01af4 docs/models/modevideo.md: id: 80dc85968b3d - last_write_checksum: sha1:15f3bd3fb481fd61f3d00900de1848d7119eb714 - pristine_git_object: aba18a6aad7a794bfc47c20e919b4fbb136b49ea + last_write_checksum: sha1:a5bf152c61ed3f46f150707b01439077efd34f24 + pristine_git_object: 273832fda51ccda2be9eb4499d9a3b37b118eab3 + docs/models/narrativetext.md: + id: 1be06a8c0f42 + last_write_checksum: sha1:f30148a4e59340841f5307a0e3adaf1fc89a17a3 + pristine_git_object: 8b515b5c5b42f11793270f48a967437a85805870 docs/models/oauthcredentials.md: id: 980e901be405 last_write_checksum: sha1:8e6d21fbaa19d8a8c75ffc4733014801345ee5fb @@ -644,8 +821,8 @@ trackedFiles: pristine_git_object: 8d633fa93f455e8804a85686d4e935329da83c73 docs/models/oauthurlcreate.md: id: b304bfb0c71a - last_write_checksum: sha1:dbc61afc874365827f6ba35f895958f66b21f6e7 - pristine_git_object: 88613032bf8ab627d9f2f53b3ee5b373315f8260 + last_write_checksum: sha1:11fc505ad68180cce51add1a4615a3bab036ae8c + pristine_git_object: 431789e1ad9869f04817757aeb8505d18d712300 docs/models/oauthurlcreatemetadata.md: id: eb00edc356cc last_write_checksum: sha1:56f6ee43eac176b1ec01b7ffdcce6502eb5809a8 @@ -656,8 +833,8 @@ trackedFiles: pristine_git_object: 8ad520782c5d68b84dcd99304fdd139bf659feee docs/models/oauthurlcreatemode1.md: id: 29fa2bee7e3e - last_write_checksum: sha1:c7ed251088590d1f255bd6f7c8d83f096d945273 - pristine_git_object: 33f68982eb4b3551b7198db1e49c741b419eedf0 + last_write_checksum: sha1:f12b2b0e8e3f039a9e7f1370e2dad94f19e089de + pristine_git_object: 8d7ec0c10975b1179780582aebb81cdf7433fd0a docs/models/oauthurlresponse.md: id: 52664b058029 last_write_checksum: sha1:52da026b78425ba1ce1b5f98b269a0fb8cf63577 @@ -670,6 +847,10 @@ trackedFiles: id: c57264ab32f5 last_write_checksum: sha1:edd1136212fccb568cc3507975bf76c380b49017 pristine_git_object: e1bfe4620cd92416622c5a45c39a6b9520bea708 + docs/models/orderedlist.md: + id: 03db30cedd23 + last_write_checksum: sha1:5499def79990258a03eec3d731e28e5c66fffaff + pristine_git_object: 565603c2d9c674c8f395b1c244cceaf02c7547d3 docs/models/output.md: id: 376633b966cd last_write_checksum: sha1:c8b22254022f6fce2f5def9d5ebf22d250dee493 @@ -678,6 +859,10 @@ trackedFiles: id: d6edefe59be9 last_write_checksum: sha1:f46b82c1d890ce09df4170d7b4d2cc4519ff5fb3 pristine_git_object: b5facf4f3dd4ed3a8607954cb5ba1a7baea62216 + docs/models/pagebreak.md: + id: c4ba8d9f9386 + last_write_checksum: sha1:8f06f81cdb5e2114282bcac2473cc2572897fd7e + pristine_git_object: c060051d7183b9acd60d9a115318ef09cf3341d5 docs/models/pagination.md: id: a9ff902f6a16 last_write_checksum: sha1:d84b9e2b34caa610f75f680376b7d88e7e42943a @@ -716,8 +901,8 @@ trackedFiles: pristine_git_object: f25b06261de55a9e383a4ac1bf91366d029b0377 docs/models/partitionstrategy1.md: id: 81a240836f82 - last_write_checksum: sha1:eee15b6c29abb163e33c4096376960e80e0579eb - pristine_git_object: dce0eef364f8851078e097e655a93237be3637b6 + last_write_checksum: sha1:b5bc2f672731a54742691249c2ebab0134f8a96b + pristine_git_object: 75407e1eeb5df9311600ad212faf8c6913325b08 docs/models/patchdocumentmetadataparams.md: id: 73d54312e2e5 last_write_checksum: sha1:e02c4a104cc6173e944276dee8662ad6d69f834b @@ -730,26 +915,38 @@ trackedFiles: id: 7a1d378467f8 last_write_checksum: sha1:7b8bb8d95b5f4a0ad4156b3c7c26423a3fd43b8a pristine_git_object: e00e5389d2ad10098756f27ea2b9f86dee064864 + docs/models/patchinstructionparams.md: + id: 4e43cff96adb + last_write_checksum: sha1:5f007ec0af30154d6e9cbe4252bd52cf94cf5371 + pristine_git_object: 5281fc2774180b4d1024a59e2579e66dcfd4ea10 + docs/models/patchinstructionparamsscope.md: + id: c13844ca3f8f + last_write_checksum: sha1:aa594f5c6227727f86c31bfed421bf310475bd72 + pristine_git_object: 971871180c1ef9c9f995a05d93f4540a6d773df8 + docs/models/patchinstructionrequest.md: + id: a9d1ef211091 + last_write_checksum: sha1:56933f0315ddb831e0db4e346de9af8c7f5b2a35 + pristine_git_object: 902e3a7101f254e8395658ace6813ca8f47fe0dd docs/models/planstep.md: id: 45f6285d5153 last_write_checksum: sha1:d4d5cafa03818c4ea1dd30c05f1c5f1e443b366c pristine_git_object: 4a23854c740ee76ac225c4d6953c03f167ee2606 docs/models/provider.md: id: cedb2a98f8e3 - last_write_checksum: sha1:be14ac388efc7d73a3cc3d05f1c0ef4352a268f9 - pristine_git_object: 7e08e1452dbbf3bc3b27b4d93b2074ed2025e9d1 + last_write_checksum: sha1:d892aaab2666ac1e9df5ea8566dfd0eec75c82fd + pristine_git_object: d326cdcdfd52a50b26b5043103c42a50819404eb docs/models/publicbackblazeconnection.md: id: 52134e607f11 last_write_checksum: sha1:71bf5039f22f317ff8ee25cd9a4e5b7257253d62 pristine_git_object: 97ac5ea43360a779674bb1fa3b87948d5ec6ed4c docs/models/publiccreateconnection.md: id: b6b925a6974d - last_write_checksum: sha1:46c04e5490d95cd54eb8f35b6ba5b7308340355e - pristine_git_object: efc9912b765afc6a5c9585c9881d1cc8e4c83754 + last_write_checksum: sha1:91230b2b90b2c6621a740266fbb5b24e744ab798 + pristine_git_object: 5ffd05b8183bf81c7c4a45149f28c0efafda9a18 docs/models/publiccreateconnectionconnection.md: id: b81ac45bc684 - last_write_checksum: sha1:57f1b6cdff492394bbfe05c6b3fdec17f907bbc7 - pristine_git_object: 9fd40ff27845bcad4e7f05400f3bc0f52c3f7e77 + last_write_checksum: sha1:bd3ac8b45559f8cdd2d76da1c4a04ecd122868ed + pristine_git_object: a9052c8c15c2b8fda4ffded70cd395d16263c153 docs/models/publiccreateconnectionmetadata.md: id: f82ae73ede27 last_write_checksum: sha1:113abaf11b94bb9c11beed6eaf9b9e791f2ce0bc @@ -770,22 +967,38 @@ trackedFiles: id: 675b6e808eaf last_write_checksum: sha1:d1cbaf0d4bf83c9b5397267733a91bbd5abe5dba pristine_git_object: 4479ffff2585e3d5febc6c462c63f9a082826869 + docs/models/publicwebcrawlerconnection.md: + id: b5bbf99c259a + last_write_checksum: sha1:fafaa9cf62934a8c61ca3d5b6ff3bf43b7e1f1d7 + pristine_git_object: c0644978908ca4a1fbd4d9a02c42d949fd40828b docs/models/publiczendeskconnection.md: id: 44ad24123b90 last_write_checksum: sha1:e03179447722189cfa69d354b2566c6a1d56d469 pristine_git_object: de9f6e9ea4596fff06d79339077659eaabed2628 + docs/models/qrcode.md: + id: 28fc0325b46a + last_write_checksum: sha1:b7c95f014e2e204cb7689f16669550df1a67b786 + pristine_git_object: 696f51e9bc222c999c08660d69910a5aca984599 docs/models/querydetails.md: id: 4328b19587c0 last_write_checksum: sha1:1b80d23ac3a533d9504eab34ecf970e7865027ab pristine_git_object: 802d5147b5b21e69cc63af80cba993fad6aa0237 docs/models/queryparam1.md: id: 8aba7626c531 - last_write_checksum: sha1:827cfd9123a2a74787e1b54f36da47a59ef9aad2 - pristine_git_object: afd85ba347a8d97d5c48ed921d07b893635e7c86 + last_write_checksum: sha1:598b11f0403eb3811ae10070642cfb474e817ec7 + pristine_git_object: ee9fc53df72c548ba0df1fecddd6d3689a2ebee1 docs/models/queryparammediatype.md: id: f1188a683854 last_write_checksum: sha1:ff8a663b681a3ab41e0f30eeb97ff7a9759ad487 pristine_git_object: 283530596ee3afaa23914fcc23ac74dc10ec0172 + docs/models/queryparamstatus.md: + id: 15628120923d + last_write_checksum: sha1:ebe82bc95ded0e260135e5b2fb2bceca8dced43d + pristine_git_object: 3b1d9e4b39684c18c914d362e762c60a59bd0b29 + docs/models/quote.md: + id: 57a3b9799d70 + last_write_checksum: sha1:4b62071d655f26bca2bddbb4346ff956d5f51e78 + pristine_git_object: a23b6a2565e3805b257218389de19f6835bcc886 docs/models/ragieapischemaresponseusage.md: id: 5702c875aeac last_write_checksum: sha1:7c0528ecb55d634590c84bfb17b0e49a2c48b8b8 @@ -796,8 +1009,12 @@ trackedFiles: pristine_git_object: 5bc4a62dcafc70e7dc57509d242dd16ab636f62b docs/models/reason.md: id: 087688da6fd4 - last_write_checksum: sha1:a29433b1b1ce682b70a0e36ceeb3dc21b745baba - pristine_git_object: f2195ad84ecf527e3a90eaee08d5065733b900ee + last_write_checksum: sha1:f65ebc3084df6a6f8ead17d26fc964c972650832 + pristine_git_object: 4fcba642989f12407d3140d9aa92574e202de536 + docs/models/reasoncode.md: + id: 3d41bce7a6bf + last_write_checksum: sha1:e15e4769d46849805e633e32d08ef2d8916d7a02 + pristine_git_object: 09a7159f50c312f3f6c139c233b761874be452d8 docs/models/reasoning.md: id: fb409fba3ea1 last_write_checksum: sha1:c69a03963aa0c619ad3426f953f7b268a83705cb @@ -808,8 +1025,8 @@ trackedFiles: pristine_git_object: c647b350d553cafc8ff4a3dd5ac18691d38403e6 docs/models/reasoningoutputstatus.md: id: d6ed82bb081e - last_write_checksum: sha1:5879caec1f4e1763378b48bc96608f3f4f23b587 - pristine_git_object: 0e6d9796f212e9d6c54b958f47de7345221958a7 + last_write_checksum: sha1:24591c405b86e86993910b97acb28265f83790bb + pristine_git_object: 86968915a4478aeee4580bc9f36d9a3e632f26a1 docs/models/reasoningsummary.md: id: 6d34ae130bc5 last_write_checksum: sha1:d18df7aab2d86fdf4b21111c3b658bfeccc009da @@ -824,8 +1041,8 @@ trackedFiles: pristine_git_object: 4fd9ce66a9d0ff08991851282d2260b6371e5d08 docs/models/response.md: id: 583c991c7a30 - last_write_checksum: sha1:6130763c2a58a7dabaf9cd60982d7fd736724379 - pristine_git_object: 8f3fa1f432757ed8f99a729fa936c8395e2345af + last_write_checksum: sha1:30d2d517e2c34461cc0d4e2ab75842990fe342d8 + pristine_git_object: 14ec30657c8164fa5f8f4f92cfd5f16066a3188b docs/models/responsecontent.md: id: 7c64bbeac185 last_write_checksum: sha1:ac231211cf4ecbdb3bf32231925c36efa6bd6945 @@ -838,6 +1055,10 @@ trackedFiles: id: 3633274ae9f7 last_write_checksum: sha1:e586aada8910aaab677922822638273419a9670a pristine_git_object: 6b7a9efda7dc1a216828dadaa7d55db25c1e9e8e + docs/models/responsestatus.md: + id: 8e1106e0a4e4 + last_write_checksum: sha1:67a59cfa1981280e4a5f865d1dcf8ed8ef4c7026 + pristine_git_object: e47d88ba604d8fcf081daf4982a0335c77485e39 docs/models/retrieval.md: id: 9d50ec0e7fde last_write_checksum: sha1:54c30c65564daa345e7d1793edf6c2c30cdc2aad @@ -852,8 +1073,8 @@ trackedFiles: pristine_git_object: 3ccf6bddb697827797703ed6c3a8290a32fbc2d7 docs/models/scope.md: id: c7d8338540ba - last_write_checksum: sha1:fa418b174124b10991118138fe87b1fa599b6fdd - pristine_git_object: c0326c4ae859127ae888c63a73bc9bd9fbdd1065 + last_write_checksum: sha1:62520ab2e09148e779a11abeb4897ea1d0bd6392 + pristine_git_object: 29cdf741d53d275f4599bd8e57fcc7b3622eeefd docs/models/scoredchunk.md: id: 0e6bbaaa3d49 last_write_checksum: sha1:cfbb7a03dc72ec4d8d7c76c4d36419a36961aa53 @@ -864,8 +1085,8 @@ trackedFiles: pristine_git_object: 18c37cce1e15391447e0d60b614c7f1f44ea16e2 docs/models/searcheffort.md: id: d518e1b065c1 - last_write_checksum: sha1:3038e8329a1aeb73747b404df34d84087f19645e - pristine_git_object: 7b9828b7ffa05fd28ee2902676da8904b1201967 + last_write_checksum: sha1:573b697128ef2070c4a6b353a241f202d81777c5 + pristine_git_object: ea5723f9bae7665cdffed337ee16db84dc9dd3a4 docs/models/searchresultlink.md: id: 74d745c7897f last_write_checksum: sha1:c5a258b503f8f316371237206911c8f6dc3cd806 @@ -878,6 +1099,10 @@ trackedFiles: id: 0471fda29702 last_write_checksum: sha1:f95b5c2cd0a1ee39960785b626467f21e495da19 pristine_git_object: df66ed39fd2fd0d55039003a0af1e6e84d6e0d84 + docs/models/sectionheader.md: + id: 6649c3a75606 + last_write_checksum: sha1:a1afed8fca030d38f4bd9b34b233df799c354adf + pristine_git_object: a23f07f43b904d546e4b3e2dfdb2519cc2ba90a3 docs/models/security.md: id: 452e4d4eb67a last_write_checksum: sha1:75f4d0e6aa6cb87edd302082d84cf691b50c3c05 @@ -914,6 +1139,10 @@ trackedFiles: id: 911343f63d15 last_write_checksum: sha1:7682305bd0157c7ac0f71c372cb839f369a16589 pristine_git_object: bed21aac728f8ad8eec5a66bb4ec8f0700667c20 + docs/models/signature.md: + id: ddf275b1a478 + last_write_checksum: sha1:ffc8275bb9056058033ee940b8942571b722b8a6 + pristine_git_object: 35554b193ff7d1518edb49489673a1d3569c3dbc docs/models/slackdata.md: id: 99af4b70a069 last_write_checksum: sha1:07d151416a62c39e90d242c1fe3e7f842fc80ecc @@ -922,18 +1151,30 @@ trackedFiles: id: 6541ef7b41e7 last_write_checksum: sha1:baf9336a90fa600c47a0c3bbc668b934f7f6458d pristine_git_object: 0209dba5c566cef02fd066a25212ead481e15e43 + docs/models/spreadsheetlocation.md: + id: 85ea877fd6a0 + last_write_checksum: sha1:90711c55a1d9115ebb52d0a9f8a584aef2739264 + pristine_git_object: 0ab9ad8852493a251628ca0531739ddb9bbf14b7 + docs/models/stamp.md: + id: a0c4be54b8ed + last_write_checksum: sha1:1b738b6ab241c8bf99698331741fd3da18211872 + pristine_git_object: 552ca09c56f0cdb0d30727c52093e798d9c0548f docs/models/static.md: id: b4156ebefb31 - last_write_checksum: sha1:cefcd9f5ca6d6b64f6d4d4ee07f4693a3f197bbd - pristine_git_object: 35c6320c2fbfa6e62b70295a831a563f1074d5d2 + last_write_checksum: sha1:00324676d46d007a3d1038a74571b74baf0a178d + pristine_git_object: 7ca5a3d20b5319e24dfdb209fb06cd156bef0b4b docs/models/status.md: id: 959cd204aadf - last_write_checksum: sha1:cd3294394f88b02016b0cc0ea6fcdf25ee0e9e63 - pristine_git_object: 22357d15099139d6c6f701f8257ef6f40780115a + last_write_checksum: sha1:8c616e1db102cce79a90342af753f05f4e4623f0 + pristine_git_object: 4989bb0c18b589f7cb6c7193c15febf29e5cc837 docs/models/steps.md: id: 84ba222d5131 last_write_checksum: sha1:b9d90735ee1442a8ea2bbdd2925b7a64cd5bc299 pristine_git_object: 7d4c110a60ab3be87d61e2dabfd5bd7d60186c51 + docs/models/subheader.md: + id: 15cd6c8814c7 + last_write_checksum: sha1:9e3ade44eaab4f4855e17df3b5b320276d0ff8df + pristine_git_object: 1e608f15943a3fc2da9bf3efe143015333aecdef docs/models/surrenderstep.md: id: c74052eca85e last_write_checksum: sha1:1cf405e1ccea2bb8031eafb391ba4fa6653defad @@ -942,10 +1183,30 @@ trackedFiles: id: 843c64e83bdf last_write_checksum: sha1:ad084e3ed53b705c120df4875fc5cb9815cb2d2b pristine_git_object: 80bc5c55de87c55ce5b937699a62b75e6acb5b65 + docs/models/table.md: + id: 479f906de3aa + last_write_checksum: sha1:e6687fc003af4d527ccf981fdcafb08fd78ac86b + pristine_git_object: 0c1af4b6c8adf1449b8c6fc2dfd5c70907838ade + docs/models/tableofcontents.md: + id: 9cd9bcdfd6dc + last_write_checksum: sha1:e51769adf3ce98533e4ccb47334f995dca5f057b + pristine_git_object: 3df7851deede645bba81504c0b06c407e568a363 + docs/models/text.md: + id: 27c4a3964f65 + last_write_checksum: sha1:3e560d959859f9bcf3ab871c1eb4e9f009efe398 + pristine_git_object: 95ea22dfb920701aec78f73679872ba132e708b6 docs/models/theme.md: id: b90d5f791efe - last_write_checksum: sha1:b988c6b5db1b720ca5940743324a42d09e634e20 - pristine_git_object: 5a2bff8bf17b2d084a421d295643180164739c8b + last_write_checksum: sha1:1628bd62ba6bcfeb69d5dd0933d802a0981e2ed9 + pristine_git_object: 4e68a5e520758def79c08e1f2755fd1931a8ec27 + docs/models/time.md: + id: 15f675cc3160 + last_write_checksum: sha1:42416db0c236ec625424caaeec679299bb75514a + pristine_git_object: e16842e86020e091b4225af4dd8ee29573b7b1d5 + docs/models/title.md: + id: 358188c8e71b + last_write_checksum: sha1:0e9afb909c425d842f3c8e04d7f66ce4a2eae0ce + pristine_git_object: 6a83bbcc1a8ebe44056428e0381b4459609281e9 docs/models/tool.md: id: 8966139dbeed last_write_checksum: sha1:1b0bfa77a54903a2c124e7fd5214f1f67d452dbe @@ -956,28 +1217,36 @@ trackedFiles: pristine_git_object: 8fa8c5c350ac7085a5b839a014d514b17f0ec74c docs/models/two1.md: id: be4aa26af818 - last_write_checksum: sha1:3d9254f58bb1ce04b2146a1e916fb25e2e03ca24 - pristine_git_object: 29887a5dc27336913e929d5b2d1684cc441d3e27 + last_write_checksum: sha1:77237fbd4c3734cc159245460ca642324b6a846a + pristine_git_object: 04d7c096c03ca081ed6ca12b8e4ebe747d3c3f96 docs/models/two2.md: id: c513b0facd00 last_write_checksum: sha1:af6435675c2fd1adc3aeda372bfdfbc6f10b587f pristine_git_object: c9249600b025e364fca5423fd60ba84048e11fd3 docs/models/type.md: id: 98c32f09b2c8 - last_write_checksum: sha1:2181e6afc5ab9e18e5f63a29b1f6730f2e6dc3ae - pristine_git_object: 258c6a3a03c7a82bd354d420e63ca84c45414ba7 + last_write_checksum: sha1:02e255344ea7571b5102bec9254d11cd3159d602 + pristine_git_object: fcbc910c7545bbde4ee139ebd7752361842904f4 + docs/models/uncategorizedtext.md: + id: 772c4075cb08 + last_write_checksum: sha1:84629e4964322857d8f0d305ecb5f6f878c4e1d3 + pristine_git_object: e5fdc729aea056bd39afd1606dea405a0ef38950 + docs/models/unorderedlist.md: + id: 660c05a7231a + last_write_checksum: sha1:285c84612ab51ef4a5000975d17d8fd82ae78c91 + pristine_git_object: 8704c31bc8736d104a96a579f7e52b8d1bfd83c3 docs/models/updateconnectionconnectionsconnectionidputrequest.md: id: be597f6f630f last_write_checksum: sha1:133b27371c84cc2d3b91215e2addb3287354a426 pristine_git_object: 033dde87fcff2a27f4f37df5dd8405421f5ae110 docs/models/updatedocumentfileparams.md: id: e9b24264453e - last_write_checksum: sha1:35b031f04ac933e1c550f4f714e678233e3e1c21 - pristine_git_object: acda3ad1eec94aa05cae89bebe287ec86726ba86 + last_write_checksum: sha1:256afa5d62732adfc6c7951acaf74a8a6901d7d3 + pristine_git_object: ab225ebd8bb8b6fe610cf1243a027d4312c30cba docs/models/updatedocumentfileparams21.md: id: 81d0bdae8f1d - last_write_checksum: sha1:12e98db4bae9111430bbfe982c9410be9e847b3a - pristine_git_object: 622af9ab7dba7106abb3cb614ce95f794271e652 + last_write_checksum: sha1:28e45f226e7cfe617a77d56a4ce2390e0e54a1a6 + pristine_git_object: 5919f396f82ee49019d98fbb88fae4802db9ea5d docs/models/updatedocumentfileparams22.md: id: 342dce563d3e last_write_checksum: sha1:8615487b17b01fc0aa8b8e7e27b541f6c80f46d7 @@ -988,36 +1257,36 @@ trackedFiles: pristine_git_object: 2dd5635a3b59b5ed3539c8ecb02d75b2bc14c4fe docs/models/updatedocumentfileparamsmode.md: id: e76379add9a1 - last_write_checksum: sha1:4052af916dc0f75f2662d299323c21df2e2cb797 - pristine_git_object: e40d073aa77c07954b321465e8a27fda40ac89bf + last_write_checksum: sha1:66cc622afec880b2207748ddcb6a26d40b9a43ff + pristine_git_object: da5f7d18fffb30127ac16537846520334ed4d437 docs/models/updatedocumentfileparamsmode1.md: id: 0e78ad77c821 last_write_checksum: sha1:4af6ce60d24370562bf8c2706054e89f7a6a7873 pristine_git_object: 5e4d3bb52ee63c85002c0fe807666215ee21a610 docs/models/updatedocumentfileparamsmodestatic.md: id: c69ec7018be5 - last_write_checksum: sha1:508a6923d555246c0d9bc60281dbbd5d8db00140 - pristine_git_object: ddf2ab2bf3ff6f693e7a237f6ad8711a3fa4d145 + last_write_checksum: sha1:5653440f9745ded6a7b60531c1cef067a37f6c77 + pristine_git_object: fe3e3bad92db4de9eb4291991dccc52caed412b2 docs/models/updatedocumentfileparamsmodevideo.md: id: 3e0c897157c4 - last_write_checksum: sha1:0ec5ae5edf8df0c98c7a5b548873ae2f62b2016e - pristine_git_object: 1de9669790df82693baf15f09de45307efbdb9af + last_write_checksum: sha1:1e355c7de079bb0eb5b818ed44748bf5c1ad76af + pristine_git_object: 97ebf2ce776dae60551e44b5ed4b28a52545041c docs/models/updatedocumentfilerequest.md: id: 894cd16dc0bf last_write_checksum: sha1:9a194c0603597f8482a90a4fddb99089a9f7f652 pristine_git_object: df90d9d14eb7d5f77287d12d08f191eac5ada6c3 docs/models/updatedocumentfromurlparams.md: id: 9dfff20bf7b5 - last_write_checksum: sha1:4c527e43086f7e388ffc589bbee31594a1d82836 - pristine_git_object: d48c61df1884efb9350533efa193d22c91409e23 + last_write_checksum: sha1:56432178b368e875f951f01891de1880270b5803 + pristine_git_object: 7281b260ec567a8fc118573b70ee9f1d0697c1a7 docs/models/updatedocumentfromurlparamsmode.md: id: 0cc62d4c5952 - last_write_checksum: sha1:7ed451becfcd0e80930201ec392a5c7f38bf8313 - pristine_git_object: 71e65defc2b42aff3f4a284da121637849399f8b + last_write_checksum: sha1:aa4eb074d8b8fac61c4d6da446d08a3e86fbce73 + pristine_git_object: e3d2c7b501753e4c276714ac3d6e4c0d0d85fb9d docs/models/updatedocumentfromurlparamsmode1.md: id: 5d5f1a527bcf - last_write_checksum: sha1:ecc6b6a8ce28c7ef03f517b21e30eee5f686a7f8 - pristine_git_object: 37f0e79f957385b1a4036ed8e2a9979ccb459859 + last_write_checksum: sha1:cf8490273298cc42c28094ef27420b56d164255d + pristine_git_object: 2398b39108c7c80aaebb3854d37c9b0ca6fbc84a docs/models/updatedocumentfromurlrequest.md: id: 4446fafd5901 last_write_checksum: sha1:de5d50de4ba36d99adc4403a0194d9da80f29b65 @@ -1034,14 +1303,6 @@ trackedFiles: id: 478ae18e49df last_write_checksum: sha1:6f93e474557d335e78b9a39a515d1c1ab34ccd43 pristine_git_object: 71b88361c2ae4ca98cccd84b9fd4f2ff2024b120 - docs/models/updateinstructionparams.md: - id: 834252b705af - last_write_checksum: sha1:81074f299ab51f761139a1296a0c352f941296af - pristine_git_object: c48062bcf74af1246de107c672477902987ac910 - docs/models/updateinstructionrequest.md: - id: a174c702a21c - last_write_checksum: sha1:99c5683076d35369c1e2e31c7c503812a60f9810 - pristine_git_object: 0606081d5846e40f32fc580efbe6d259f17ec36f docs/models/updatepartitionparams.md: id: 4d9d4e4676f6 last_write_checksum: sha1:c63bad9c0b7a915ee2e54bd3c393e48c7649f9d5 @@ -1072,24 +1333,44 @@ trackedFiles: pristine_git_object: 7a1654a1a5cfb3ab92360b361e8e962bf2db4582 docs/models/video.md: id: d8f13feba7dd - last_write_checksum: sha1:db250c4dedca25f72f391aff64a6536ccbc10385 - pristine_git_object: 13d55031d226d63320750e88220e4dcd82c14763 + last_write_checksum: sha1:9b4d232d4102a1ba094cfcf5d064308b37afde54 + pristine_git_object: 605b0f4c2fbefe8d4b383c4072986a1ac5b3fd09 docs/models/videomodalitydata.md: id: 0c9581012556 last_write_checksum: sha1:00b81b5a72252843c1f2f51b2039636d081d3bc1 pristine_git_object: 0b42c3988c695d84d5475899783dd37112c307cc + docs/models/videosegment.md: + id: a52a8fd33f2b + last_write_checksum: sha1:a6a12bf38d69f89caa300168f1b69a4e1a79b779 + pristine_git_object: 402cd93da4b68bfca0fae138be990f9e8c81bc0e + docs/models/watermark.md: + id: ffd5139d6ef9 + last_write_checksum: sha1:6b993a9d9bfc12556bbbc8b4b6c5e827dcfd423b + pristine_git_object: 024f15960eca91362e860623eb4c5455f9aa8e03 + docs/models/webcrawlerdata.md: + id: c5a92e042cdb + last_write_checksum: sha1:74c522207b356327b72cb05b88d397de9caf8fe7 + pristine_git_object: e44b6d9b42c8466a74befbcc2a94d9fe4c985eb4 docs/models/webhookendpoint.md: id: 48fbdb362b7e - last_write_checksum: sha1:6da79525daf7d1d41f0651055f35037a6ebff4d1 - pristine_git_object: b8b25e360221c5bc6bdc100b688608a8dbaa2735 + last_write_checksum: sha1:83faabfcb629e770ef6408d43f6e0c272403c9ea + pristine_git_object: 58291a397e24a8058f65f39d4646642110d1f70b docs/models/webhookendpointlist.md: id: ad9b87121d5f last_write_checksum: sha1:d3406c11d7e2fb89815e020d19332f8b623c9459 pristine_git_object: 116ea5a110aa2697f31f5ba1c29b27fde1917f91 + docs/models/wordmodality.md: + id: a438158a05a2 + last_write_checksum: sha1:feb372514279c0c923ee130467d3833d402a1d31 + pristine_git_object: 6691ab91c918957ca2b396072fe2328ad313312e docs/models/wordtimestamp.md: id: d086ee89e065 last_write_checksum: sha1:852076eac0b9600f6a35e60ee587708bdd89ed6e pristine_git_object: 384b552123a066d386786d32bdba727d305f8bf6 + docs/models/workflow.md: + id: a782201b7327 + last_write_checksum: sha1:8cbbb2df04bd8a9003a7bb5d5a4cb0bef6b60c75 + pristine_git_object: c5a476ba33164033579a7df7f35fc6d1c72a0804 docs/models/zendeskcredentials.md: id: 7066d465304f last_write_checksum: sha1:bb5255703c05443a45fcde467231ed33d0599c68 @@ -1100,24 +1381,28 @@ trackedFiles: pristine_git_object: 1d026b584b9cf9c31845ab232046461e78a1c581 docs/sdks/authenticators/README.md: id: 109d7cbe3056 - last_write_checksum: sha1:3a615f5d769d61bade2cb63d7e9a6f7bb4d83607 - pristine_git_object: 42f6089792ee5a816cc105ee1b3319443982985b + last_write_checksum: sha1:7aaaf76d46a86ea4bd893a5a89c8967b9ed0c800 + pristine_git_object: b7c8ae3177e7c315852103a41807cec8c2d2bebb docs/sdks/connections/README.md: id: 3ef8931411ea - last_write_checksum: sha1:ea80637c7c4a561d7761cadd4bd7d2e6122eaedf - pristine_git_object: 04363e451e20e9c4d0dad3726e11fd3e306eeaa3 + last_write_checksum: sha1:7285c498c82acb13e2a2d639f1657808c2fe6b10 + pristine_git_object: 16d2efd111835fa04a79d523e7de50a47c90e07f docs/sdks/documents/README.md: id: 9758e88a0a9d - last_write_checksum: sha1:9acc94b1d031acfd486d0a21a0cb44ea6f3c9e18 - pristine_git_object: 0cd14c9e8c97ddeab5b9d4386e5f28d1a6e75431 + last_write_checksum: sha1:d84e5197520c67b1478c64fab00b543727a5670b + pristine_git_object: be5a84a839d73404c4a71a4e9701699afd2ca065 + docs/sdks/elements/README.md: + id: 0fc58d8bcd33 + last_write_checksum: sha1:484b65f3639b3a33bb9d6e309e590fe11a12e2ea + pristine_git_object: 443cf6a4df86743bb0d30e64c77b0684060e556b docs/sdks/entities/README.md: id: a140ac5181b9 - last_write_checksum: sha1:07401eba22f08824bd44b3d214ebb5174ea6217f - pristine_git_object: c1a8d558f7f1f06f51a639d77481bef9d6cdd9fc + last_write_checksum: sha1:e018bfb029e490de2636e46b852dd69f9ff5e865 + pristine_git_object: 7520fbeb06c2fe5b533b48555bcbad5ffe76e44f docs/sdks/partitions/README.md: id: 0cc88249fd7d - last_write_checksum: sha1:83ba1797a8a7f58e2c93fe490e72543219c87258 - pristine_git_object: c2d8860536f89c36ce240624de58afa340c4d857 + last_write_checksum: sha1:ebc0d9add701f62c8849148415ff83e5f5c3799f + pristine_git_object: c4e6332cddeb7e9bea8d3625bbcaf31d3f5b9edf docs/sdks/responses/README.md: id: e717bad14f63 last_write_checksum: sha1:b265ac0a663fb5af7fc8c553c5896e6ee343754e @@ -1128,8 +1413,8 @@ trackedFiles: pristine_git_object: 54727d824c1d07d5f0f31953dfca5985d0acba61 docs/sdks/webhookendpoints/README.md: id: 31b25265ea1c - last_write_checksum: sha1:ed227d37fc14f0650d5231c27ba267d6f5bbbb53 - pristine_git_object: 31ca78b2b205c90753478dc56acf8cbf126b5170 + last_write_checksum: sha1:873d45a3af3e4c8a8de8bf3dcdaec11f08266ba9 + pristine_git_object: 39eed433bcb5ef2a1bc126632c19c867fc286a78 poetry.toml: id: a81ade82122a last_write_checksum: sha1:2242305e29dc6921bdf5b200aea5d4bf67830230 @@ -1140,12 +1425,12 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pylintrc: id: 7ce8b9f946e6 - last_write_checksum: sha1:db2aebd83e553dd59d3965e79104a3fb780c403a - pristine_git_object: e8cd3e85682cd3d489cf3c5be75a0563d0c9f4bf + last_write_checksum: sha1:405a401fef1f2af6000d945591041683832b3132 + pristine_git_object: cb9c15d314c1930557401074329ed7a737147919 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:8444deb7baebccac326764b190651df8431e77e3 - pristine_git_object: 6ac840df4972ceb0751ab7c5d13a16699ddfc6db + last_write_checksum: sha1:bc4b1a5cd4b8f3f5759404e7a7b9af076c681117 + pristine_git_object: f9e07bd2ab2aac1878b20bcfa8d3ec1e42eb7c97 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:f50e786ba097ff7a6c94a983fd4893e3b1ce9417 @@ -1172,152 +1457,212 @@ trackedFiles: pristine_git_object: 63df765976d05650ad5ac814ab731a2e8ba3ede4 src/ragie/_version.py: id: fe031cf2bf0c - last_write_checksum: sha1:bc83ee2ee31b13e73929dbe76d807c4c0e7a1890 - pristine_git_object: 6e70a67dafd2ae1bc04db34ec9b0a65462956684 + last_write_checksum: sha1:3cfc75b24d54de834d87390d182d8b6adf7a218f + pristine_git_object: d0acf54a4cd3ffb3026a842000942d80075dc000 src/ragie/authenticators.py: id: e165d9360554 - last_write_checksum: sha1:7865343cd24ca6374a7ee9eabc8d4825c19a22d9 - pristine_git_object: 9cbec1e7376c148825489de70701889f6c59d722 + last_write_checksum: sha1:d531f4117fa496c07461853ca3ce0723a3c0a80c + pristine_git_object: 837e3d4428be9ed341902f7ca9b7ea62a69fe313 src/ragie/basesdk.py: id: bd03679494af - last_write_checksum: sha1:59ff5a8f85e3b8b00ea54a2de9dc8faa42f72e4a - pristine_git_object: c9043228eb42bb9b59ac17c93a9999eb67a78c51 + last_write_checksum: sha1:711221c3f2b3f5010bbc7b7bd9fd238c0f750274 + pristine_git_object: 5e70dc4942fc7e42c974e27b8819cc2328d87c50 src/ragie/connections.py: id: 2315b5fb36f3 - last_write_checksum: sha1:13e83bd9a83aa6334b9725a0887d6a25de1c3b3d - pristine_git_object: 9340e5ffa63897aed41901a860293cbdbfd28aab + last_write_checksum: sha1:3f9c29f1b31b0f57b89ff4c51643a9a30592dc5f + pristine_git_object: cab4b1a038e1a62c2dd4be9615a7c0cbbb136276 src/ragie/documents.py: id: b71d65ed1fa7 - last_write_checksum: sha1:8c20c4aebfddd63db09e1d5ed664dc9e77410f56 - pristine_git_object: 78aa980c9539a43fd9c726b05e78e113c7cb9c9e + last_write_checksum: sha1:0571823215fe20c46e616c4e80ba21806669c5fb + pristine_git_object: 615d1e04f587da42d9668b9b05fe03bbda466c93 + src/ragie/elements.py: + id: c87605f02e16 + last_write_checksum: sha1:27edb378ee1e8ad98c583f31156263a8d15c5752 + pristine_git_object: aab5afde82ad9769712c0bb82b906e6dd3892787 src/ragie/entities.py: id: 9c5f91a5403b - last_write_checksum: sha1:3dbeb0a7479423470ed48e7213e388d111999053 - pristine_git_object: e4bba5f512231a256a89a7b46c74fd00fee19058 + last_write_checksum: sha1:c4b8db0fe5a446dd10d7f89569f22ce49f1f6755 + pristine_git_object: 0adc5d93de2c02518fc0d291872c0ebbcb8b7dc5 src/ragie/httpclient.py: id: 3b5575c0dede last_write_checksum: sha1:5e55338d6ee9f01ab648cad4380201a8a3da7dd7 pristine_git_object: 89560b566073785535643e694c112bedbd3db13d src/ragie/models/__init__.py: id: 88db13e9c3db - last_write_checksum: sha1:2d945337bca77d938c93a9eb32de6b8788d2ab18 - pristine_git_object: 7c95a6b09d0db76cce64107b2db71f85f679be70 + last_write_checksum: sha1:3ae4d93864e63a4e8c2786f1651e1b95c0ac13a5 + pristine_git_object: 8bdfaf24bc12318783a73d0a81f82d04098eded3 src/ragie/models/accesstokencredentials.py: id: ea3a972f3714 last_write_checksum: sha1:a42636c0809a79de7bbae7fe5885a14213385691 pristine_git_object: 74e8e84d3a8c4210ca80bd9a27b870edd7c8277b + src/ragie/models/address.py: + id: 047760b96c22 + last_write_checksum: sha1:8a0d6951462ac286ed9da204acc3f7245cf8c97c + pristine_git_object: 7ff5c576b799e78f5a1c6be90e700097824972e8 src/ragie/models/agent_hopps_models_models_usage.py: id: fd00a79f72ac - last_write_checksum: sha1:fb013805bcdcd6e0539ee61ab8521a6062898aa0 - pristine_git_object: bdfbcdf1e38e2c7c6e6560984d62a171217d4622 + last_write_checksum: sha1:78bbed089ba9b3fe6bd4b9514c892cc848d77025 + pristine_git_object: b3a12a67c381a01a0c34ffa42ebeabddcee0f106 src/ragie/models/answer.py: id: 8fad4a98e056 - last_write_checksum: sha1:a2724138d913c56b307d2958e5116e489021ffaa - pristine_git_object: d8954143178cbb6d7bb1d4acc342c6eb30232439 + last_write_checksum: sha1:441520ad379aa499575af04a8525e01cf83c50a8 + pristine_git_object: 2de6f779f67b8a0adc056130c8cc1d196a7e286d src/ragie/models/answerstep.py: id: b3f01342c466 - last_write_checksum: sha1:11fc1eae777f72675729561980363f8bd4c1882d - pristine_git_object: 4e823886f5294b2f16b2da770afeb411b07fd0d1 + last_write_checksum: sha1:62d1631a33daf1e3bb4a1112bd6a605df29b2283 + pristine_git_object: 9b1d1820badc1720296d2dcf000e83e380b50bb6 + src/ragie/models/apidocumentelement.py: + id: 2fae99adcd52 + last_write_checksum: sha1:c9f662f659c8d82be556602c7469237cf0beefc0 + pristine_git_object: 0377b71083a2c6725767a8d9a55f338a0f57fe44 + src/ragie/models/apielement.py: + id: 5e4254be16b1 + last_write_checksum: sha1:8d2be47e3cb785dd8dec2e3bd6d0168d2cf0ca5b + pristine_git_object: a257f96c351aca7e7171b783f784c9866f6ff768 src/ragie/models/asyncdocumentmetadataupdate.py: id: fdd449d8d6e4 last_write_checksum: sha1:dc5b191fdec1616e7d9ec858de7ccee184aa7792 pristine_git_object: f3cee2568785f1b160adba7453010370e280ef84 src/ragie/models/audiomodalitydata.py: id: 3bec528b8beb - last_write_checksum: sha1:4fa974a09ecb3a711fab8addd331ff875b9bd86e - pristine_git_object: b900305c888c6a3c4ae489390d7cf415c2a3e5c1 + last_write_checksum: sha1:e60588876b8489cf2d6f5210455cc82172d73cb0 + pristine_git_object: 16efff24e7f7724f66a347b893736bcea66a069c + src/ragie/models/audiotranscriptionsegment.py: + id: 62ee4f8b365f + last_write_checksum: sha1:f64e5c46af275626856ab1181d1d84ae59006f7d + pristine_git_object: f3dae95a8ba3e1a0999fcdd28af56ed18f867d8c src/ragie/models/authenticatorconfluenceconnection.py: id: 78e166a0f33b - last_write_checksum: sha1:843de0739e5fe2517f932ecbcad7042209c956e5 - pristine_git_object: 1b219ba4f7743c87850c88f6a518ec2e1358aa03 + last_write_checksum: sha1:e61c0bf99d10db4cd395c38bff104eab4c289c59 + pristine_git_object: 836d0c62c14cdee6d77d32e30b106b221d478e0e src/ragie/models/authenticatordropboxconnection.py: id: c42c275ce73b - last_write_checksum: sha1:c9789328193b7a050b284ac39473342ce4a1dedb - pristine_git_object: 9c3daa0da976030a6e47ba758f63ec1e6b30beb9 + last_write_checksum: sha1:282b66f8c7ee868063b225a9458b0daba886c047 + pristine_git_object: 52fb688f6c5bdd654fcb9bbdffafe67c598fd1fa src/ragie/models/authenticatorgmailconnection.py: id: 3bc33c3d21b3 - last_write_checksum: sha1:9cf4a70456f389b36d4817a7141bcc4f3835290f - pristine_git_object: a772caa9ce18afd2a22737bfd245dc47552e751a + last_write_checksum: sha1:37582920d498f670601f41a96d6c2e1675713afd + pristine_git_object: eb592038164db6a6c831dee5b6ed1aa8249a8481 src/ragie/models/authenticatorgoogledriveconnection.py: id: 07f56f2da47d - last_write_checksum: sha1:fa2dc72ea3685aef24ca769e7a2383f3e5817709 - pristine_git_object: 38d69c8c501064601b4c2fcc76b61374ef6d3e36 + last_write_checksum: sha1:bd152d179080b4cd2868bfa1c00cd825d7881ba8 + pristine_git_object: 46c960497d53ece70775fe43d86928bb6eebd140 src/ragie/models/authenticatorhubspotconnection.py: id: 96d401939ce2 - last_write_checksum: sha1:62cbf69e5bfd76f0a8b239a66a18a813f89e78f0 - pristine_git_object: edfa5324e7ee6cda404d742fc8126be4cd83eb7a + last_write_checksum: sha1:4cbfce427d01921be127b907a72fbdbb918344ed + pristine_git_object: 93c2a45f7d547749509666266700b3c5479deeb5 src/ragie/models/authenticatorjiraconnection.py: id: fd45519957a7 - last_write_checksum: sha1:0ea274bf5463d2b15541870768c4507338894e34 - pristine_git_object: dff17b70c9127411d381baac4fd9b8348d5a207e + last_write_checksum: sha1:534618b24e74b7efb9aa84597f7e1a77acac9260 + pristine_git_object: a4e0d0815d78569472da47e91dd4df04a1765010 src/ragie/models/authenticatorlist.py: id: 2d4fba376fff last_write_checksum: sha1:fc13b81c5f0faee64e72fb4e6d0af9e56890ea9b pristine_git_object: a0b7bc05484da2c94657906a62cae1758b36c1cd src/ragie/models/authenticatornotionconnection.py: id: a479a545dbd0 - last_write_checksum: sha1:f93c9c280f8e7695fea0115f6d22d5596c14aad5 - pristine_git_object: 35f471d90a1193746135fa53b8b00399f1396491 + last_write_checksum: sha1:ad112f6624cfeafcdf014fe9bdd1695df2b3b3de + pristine_git_object: 435bb8cbf69efdafa842db445ae895a3cf9b939d src/ragie/models/authenticatoronedriveconnection.py: id: 6aea5fdbfb3b - last_write_checksum: sha1:9b650610cc8949abc3a62833b9719b8d3bd9fa59 - pristine_git_object: d2cd607de3e924063efd76628b848c565fbf7574 + last_write_checksum: sha1:aae7699827a0fd462e88a9036754f6ad60ea1a1c + pristine_git_object: ac4ef18af25eebac864ae2684c8f8ad9199494bb src/ragie/models/authenticatorsalesforceconnection.py: id: 7ee81403d9d6 - last_write_checksum: sha1:2de2a4086d5e785dbeb8facca8c7dc778f288de2 - pristine_git_object: 1c906d3cd8db58abe561472f92a1ab5f5e084841 + last_write_checksum: sha1:9f893ba4088563aba8820b717e5d42aa192c0ab3 + pristine_git_object: deee21f9658fcac6ab878d716b91ed8e70fab57f src/ragie/models/authenticatorsharepointconnection.py: id: b35d2a67daf8 - last_write_checksum: sha1:dedb949e9f5619c6a1233394d97245671ac9343a - pristine_git_object: f81b6f8739093fc2110259cf5f4acf060f6a55f5 + last_write_checksum: sha1:deb95ef258b476de67015c7139dd5dd96ecb508d + pristine_git_object: d844afb1dfc33a706a7b5265434657f39d624a45 src/ragie/models/authenticatorslackconnection.py: id: fa584538ba81 - last_write_checksum: sha1:5aacc9b44d3dc808dbdc3a894ce5fd34a0ac3da7 - pristine_git_object: 63acc12fc35c6dcfc79bb2107ca5ccd50b8bbfcb + last_write_checksum: sha1:d53f9368d95ccca38d9c72d3fd6748f1ba7799e8 + pristine_git_object: 341475b11b829e9bdd013bf955924f0f067b0fd7 + src/ragie/models/author.py: + id: 64d0f879e620 + last_write_checksum: sha1:7ee0495a1a19c19e4f0c4069d15ccdc617df4050 + pristine_git_object: e8a2929be790bb612c5c2756e655b39f147efc17 src/ragie/models/backblazecredentials.py: id: 3a76e95f0532 last_write_checksum: sha1:5acafbe70d161e9b52034be2dfe65aaaea223f37 pristine_git_object: 0fa2ac8db2f0e6dd62d3947e272200bb4fd60fd7 + src/ragie/models/barcode.py: + id: a30fd553ab00 + last_write_checksum: sha1:885f2e9760631a9e44abfab28255c05c674b4a66 + pristine_git_object: 21419845eeef96de8bea90f7fe8759dfccf0f4ed src/ragie/models/basegetauthenticator.py: id: 5c064a1133af last_write_checksum: sha1:4f2497e9521081b2f8ca17c1d134a57efe7897a4 pristine_git_object: 892345ec2d2b64379f702ea02a17742b4553a327 + src/ragie/models/bibliography.py: + id: 274640cce837 + last_write_checksum: sha1:f534fe6ad29720f05d959f150cfd1589487c5f80 + pristine_git_object: 8321603811341890c1b1f71dfc76d88bcd72dfbe + src/ragie/models/boundingboxlocation.py: + id: ad60c38e9512 + last_write_checksum: sha1:57350fa3cc201fcc2d7ed5535fdd53d84cc3c535 + pristine_git_object: c94524b34851d4e84a176956949fa3e38abec2b9 src/ragie/models/bucketdata.py: id: 6e56bfa5aeba - last_write_checksum: sha1:e309b2eef5f9a233c554e071ff5118a063f8e8d4 - pristine_git_object: bebdd43313344fcb080c74358d81a52bc6207d03 + last_write_checksum: sha1:6183db4c582b71e58bd4840ce03d93c9046c3417 + pristine_git_object: 5de7986b81980c3a215f02553c2e0a7ee96361c2 + src/ragie/models/button.py: + id: e52badee1ac1 + last_write_checksum: sha1:8055b8d95dd873f96800bb40ffcfbf84a13a6868 + pristine_git_object: 4991abbd8235272afc188ca1a39d3c240b7b7881 + src/ragie/models/calendardate.py: + id: 64a72bcd6fe1 + last_write_checksum: sha1:e4ff16211378b029a95e10a55dc1b12c1a4b7273 + pristine_git_object: d9e628c152f43da76428cb006529d1a9d87134dc + src/ragie/models/caption.py: + id: c174c628f8c1 + last_write_checksum: sha1:c319e72c86ba1aa94793d35a2c806b885477fd21 + pristine_git_object: fbce5bf3c31da4b210b57ad3ef17708737a10e80 + src/ragie/models/characterindexlocation.py: + id: a4bd03032b94 + last_write_checksum: sha1:379895fd33c67564027db1a9274c5524ca1d7522 + pristine_git_object: 3dd44e7744e5427fe547c72d1bf75bc76f23e637 + src/ragie/models/code.py: + id: 7e2009f4493d + last_write_checksum: sha1:79f66d43875650eb802ed838e948026392c4eb3f + pristine_git_object: 9350a59f66bc05ae6de4bd73a2e54ec145ea807f src/ragie/models/codeinterpreterevidence.py: id: 58a8722a3875 - last_write_checksum: sha1:13380a19bf89f88e0f91f6a1a6354c9f7ecab232 - pristine_git_object: 91d279b3ae4ff81fa0e7565fd603d75bd251c8dc + last_write_checksum: sha1:40773ec5699fe350430d93e7fb3b360e7472a4a1 + pristine_git_object: e8e5231ad195400b8e387c20e9d081109d42ff23 src/ragie/models/codeinterpreteroutput.py: id: 4a6f53809c7b - last_write_checksum: sha1:97d1c0b2dbf4a95c9825e2aa1e22f9009fd2b5b2 - pristine_git_object: c7b0e963618af6c5f326b1ad659360e18410bef9 + last_write_checksum: sha1:4e792ddee37e6814f40a7b54e39b764f0f28dde7 + pristine_git_object: 8d439d505b6f941b326b024088923c9ef0c7ea4a src/ragie/models/codeinterpreteroutputlogs.py: id: 2875042f2cc3 - last_write_checksum: sha1:41bccfa984233f5f4d82bc98fd727101e9198ca4 - pristine_git_object: c1303f7f4c2bc28335105862285bbbc0de9b4d3a + last_write_checksum: sha1:3397b6de6a4c599d4ffeaf5f60ce54ac5f4a54f7 + pristine_git_object: afe9a36a73d0b1885020f68c8a95546d9e56e9d3 src/ragie/models/codestep.py: id: 10c53510018b - last_write_checksum: sha1:404fc1f6c5bedaa5d754f99ce8a2f6536698fadf - pristine_git_object: b1fcfd7933d46c79f88bcb5c31d7624e7c88f824 + last_write_checksum: sha1:b64d96dea7fad691c47377aa136c46238a450fa6 + pristine_git_object: da0e290086ded0dcf8bc4ed99da9b820be6732d7 + src/ragie/models/comment.py: + id: 81595055a67f + last_write_checksum: sha1:17be3b1df1bc58437323beef0408c277cc9f476a + pristine_git_object: 96105530c9707dd906849093049400eda671cdfd src/ragie/models/confluencedata.py: id: b80eefa18159 last_write_checksum: sha1:4cc81a0ca42f6729db54123aad2056bb523118f3 pristine_git_object: 7025893e9b24698ecd8036dfa451bf33ab009ee3 src/ragie/models/connection.py: id: a097d8b60401 - last_write_checksum: sha1:7d864bea629853ebce75d8e59108b918fba39c63 - pristine_git_object: af832a50311be6e0ec6fc42111dbbed8d7977ede + last_write_checksum: sha1:dd5cf9f2551d549a9eed3c4ab8893705bc7ceeb3 + pristine_git_object: 87667cc5b7ecee80be331a776fbbeac2380aae39 src/ragie/models/connectionbase.py: id: b9a8296b837c - last_write_checksum: sha1:2d5eec6cd7e94db92de4247e53aae0d53a68a618 - pristine_git_object: 3ff91c191b110452ddb43c374f5c1e6d53a49b9c + last_write_checksum: sha1:90de9e2b65f2d4c7302147d3543aed6dcacad979 + pristine_git_object: f1cf0433c79c0bf5d0dec5795d278682070bb282 src/ragie/models/connectionlimitparams.py: id: 693f1bf572ac - last_write_checksum: sha1:a806b3a6acbe9228f0fe86fafa50f05b4d0a9ce5 - pristine_git_object: a916e6bcc67b0f64ab5c6783a85680e96278098a + last_write_checksum: sha1:7b94f8526efdcfd7c35dd48a95919d271abe3277 + pristine_git_object: 977b95249d999043158956bcf9e088b87cfb3ad8 src/ragie/models/connectionlist.py: id: 64d40056a161 last_write_checksum: sha1:32bcb0bf6146372f242a1a0cacb1c3e657546eab @@ -1336,8 +1681,8 @@ trackedFiles: pristine_git_object: b6fa16c5c0ff8829fb3be55b22ccfce9b332e357 src/ragie/models/createauthenticatorconnection.py: id: 6e9554e28868 - last_write_checksum: sha1:db06313dac6d12c6e9ab790e05c717068f43567e - pristine_git_object: aa7f745bbf71e48185afe0ea6572550de548b996 + last_write_checksum: sha1:41b3a6d5af00f19fbdd6dc15ac8e8db1686948ee + pristine_git_object: 0b8cd643caca7e6dd5611480b1e0836ff866a6ca src/ragie/models/createauthenticatorconnectionop.py: id: b4efb1ad02f4 last_write_checksum: sha1:1b5b2e17638bab02084a9074010490fa48e0b5b1 @@ -1348,40 +1693,44 @@ trackedFiles: pristine_git_object: fa16dc2f5e0b5a768eb10828beb89a378c85da67 src/ragie/models/createdocumentfromurlparams.py: id: d19a13ac26c6 - last_write_checksum: sha1:70b380953f306c331b990bbb02ba3ca282652e83 - pristine_git_object: c573b2453667586b5927780b09ea761aef261167 + last_write_checksum: sha1:ddef63518748dd5b7f7dfff52c88c28419d17802 + pristine_git_object: 681b606a45a7a11d690fdc9e3a8d5a333d7c924d src/ragie/models/createdocumentparams.py: id: 3454d3e0a733 - last_write_checksum: sha1:9b5380032fabe1b872ea9ad62b40d8bb21715fc5 - pristine_git_object: 70387dc6cfc12944e36ef18382a89305c4cae172 + last_write_checksum: sha1:448c131c12c31f2ba1bcaba3d7208180f04391d3 + pristine_git_object: fe2a850480f5aae3d6dcb23eb50a0a1af54abeab src/ragie/models/createdocumentrawparams.py: id: 00a5811a5001 - last_write_checksum: sha1:c69a96c3e896b0eba64f6d43d091643082ec4a6e - pristine_git_object: 674b1d72794da9f9c44cbf4501fb42372f21c45d + last_write_checksum: sha1:75bbd7fd72c8f0d9acc17b9e6847569084cc09a8 + pristine_git_object: 8e5b10067ed0c8c063c8982dcd01f24df1efd4a4 src/ragie/models/creategoogleauthenticator.py: id: 40423f768adc - last_write_checksum: sha1:3fc5a3c0f336a3c5d5d8b0b14bac1b3b8600a0c2 - pristine_git_object: 916b456cb0ba378ffa037295122b449cbef04408 + last_write_checksum: sha1:532843cd9893ec3c89b34570fb67bd01785c6bc9 + pristine_git_object: e210c62243b458cd092f3253f4143b8f6501eb4e src/ragie/models/createinstructionparams.py: id: b9ad3bab8efc - last_write_checksum: sha1:2012b8b70a1c85970caaca24606396dd82ec6702 - pristine_git_object: 7b8ee41439414b4591502b30d7a54e56fcd3cd3b + last_write_checksum: sha1:a7f2909167836a500a7decf08e8eed9a8524a335 + pristine_git_object: f3988fddf4907ddaf5b6ff3efde330da48d50a10 src/ragie/models/createpartitionparams.py: id: 5bddbbf09492 - last_write_checksum: sha1:852c0a838b02083033dddd95a8b72486c8ffa5a7 - pristine_git_object: 22e5202e9d6395de3af1b1afdc186293a1ffdfea + last_write_checksum: sha1:95081b476cae3d6ff72ef5fcde9d36675cee764d + pristine_git_object: 674402bd9cb6d1c3530da66a20b83f71f73d7c13 src/ragie/models/createwebhookendpointpayload.py: id: 61c689f3279c - last_write_checksum: sha1:e4d37cda12fdac69d798374cbc851e3569fb8f62 - pristine_git_object: 0e84b70d48a06c32b7063da8e58c9d78fc20c649 + last_write_checksum: sha1:27872d892bb12508ae49cf957d1fb9cf916f00ac + pristine_git_object: b6595b450c22a59b07c4ac44ec8f3cbf8548c575 + src/ragie/models/definitionlist.py: + id: 59916d88513a + last_write_checksum: sha1:c8e2fd33d162e5d931c535a8ef443259644b9a95 + pristine_git_object: 42a92df7113639859e743391e4e6d4e72284765e src/ragie/models/delete_connection_connections_connection_id_delete_postop.py: id: 3e3d9e8dc9a2 last_write_checksum: sha1:2678ff8a1c699b3225f9c05a6f34159dae2392cc pristine_git_object: d1d52c5b5fba89656e1b58f292cb084d8338870e src/ragie/models/delete_partition_partitions_partition_id_deleteop.py: id: e9b725ed9642 - last_write_checksum: sha1:4c2415186c3abda552b60343b81ed1cab1a9b042 - pristine_git_object: c740d29bb11e76e119384ec7149da521f3cb8aa1 + last_write_checksum: sha1:aa8063c74cc133cbc15ba1965d87841e9f2b7797 + pristine_git_object: ade5c63d42038e3b0d7a8e042e89c2bc70a4488b src/ragie/models/deleteauthenticatorconnectionop.py: id: d544582887e1 last_write_checksum: sha1:3027374de613475a583c38af7a31395e37035b88 @@ -1392,8 +1741,8 @@ trackedFiles: pristine_git_object: 5007371ec240f87a5cb9042b4382629ec51c557f src/ragie/models/deletedocumentop.py: id: 58d750bebb8a - last_write_checksum: sha1:9909ddec1363cfa0cabfaf566421bcec81423ffb - pristine_git_object: 40e1bfd73e497d95443e1aea925ee434084453e1 + last_write_checksum: sha1:857d7faee8aa6d0a027f85f0125f43c0badb2839 + pristine_git_object: ce967109c3ccd2c59f96bd081f52be0e9f89ffa5 src/ragie/models/deleteinstructionop.py: id: c1d15421bef6 last_write_checksum: sha1:39b459d81e0a7a8f48bb5fda140c11e57414b1b8 @@ -1404,16 +1753,16 @@ trackedFiles: pristine_git_object: c29f0f7f299f853e4f9199957759ea4e10f5d494 src/ragie/models/document.py: id: a96c10d6cd79 - last_write_checksum: sha1:24bed6581fa39a127813d27c13744131e9d06cc3 - pristine_git_object: 4816f78a7405c5fcf42d42c49f5fa38854c4f267 + last_write_checksum: sha1:0910f8dbe8c4cbd1cec18ec1b05af746253d200f + pristine_git_object: 752a9775d8528210ab9cf2183d158fbef4ee3e74 src/ragie/models/documentchunk.py: id: ce6bcc1580c5 - last_write_checksum: sha1:872fed55e3a466c4c76477326646e74105820dfa - pristine_git_object: 1e80d7385bbcf0a2ad393e94ebf403ea3d1517bf + last_write_checksum: sha1:54242b9d6cc4c827e8bf904d0a5ca4361933e6a0 + pristine_git_object: 310a2d8ade5577b360dea0799477162f9724bedc src/ragie/models/documentchunkdetail.py: id: bf3ae76d131f - last_write_checksum: sha1:76fe191d09614159fe7b1fc7934f72e0361c8ce5 - pristine_git_object: 1df28bbf62111d028e1b0bd9ebb8aff0ea2975bf + last_write_checksum: sha1:b555f4a8d529967d965b135b82a97a1ac920abaf + pristine_git_object: 2225c68ef659d4ddb9c085a38f5a5a1afa8c5860 src/ragie/models/documentchunklist.py: id: 1eb2c261d55a last_write_checksum: sha1:c53d45efa933bdc65ec3e52852d56e867d8a819a @@ -1422,14 +1771,18 @@ trackedFiles: id: 6b2970342826 last_write_checksum: sha1:db10f0fdad3d99e1b1e35d74005cf5c5c4e1c9e1 pristine_git_object: f665acca3b2f5e554cbda096da1bf2b46925836a + src/ragie/models/documentelementtype.py: + id: bdb7ce1c6448 + last_write_checksum: sha1:b1273976d83d376fa7837ddcded1d7b23a8577fd + pristine_git_object: 3e56d21630279ba6fbfecf0c3bade7a88b76baf4 src/ragie/models/documentfileupdate.py: id: 51f3435c23b0 last_write_checksum: sha1:8f3db2784c4e522620b4b08484a2306db32a9734 pristine_git_object: f8243830abdac49f6bb27fddc884ab33d2e600b5 src/ragie/models/documentget.py: id: 88c6b58ac964 - last_write_checksum: sha1:8a0bd0e8b07086e0d489a58413e63a09ef08ab74 - pristine_git_object: dafb15274f629287963b37440f81e93567d1292c + last_write_checksum: sha1:2e7e43100ac73fa9b5c96aec7e7be29cf2190024 + pristine_git_object: 06986b6d439cb1312a0d4776b7d7c00eb33494e7 src/ragie/models/documentlist.py: id: 2f5b4cad9bef last_write_checksum: sha1:eb0fe83ab3a3dea37f6f16a01c171ea789367ff0 @@ -1452,12 +1805,24 @@ trackedFiles: pristine_git_object: c0760b7984a404b0eb993814b9ab6b891d61ccee src/ragie/models/documentwithcontent.py: id: 35f2af097df0 - last_write_checksum: sha1:88ac305b5a94b0fe0021c552b164e84218513cc1 - pristine_git_object: 689b4fac827e159d9f185f540e9a182b18a5fb17 + last_write_checksum: sha1:298bd35a1294e8110dc4c1ef07d95e138908b705 + pristine_git_object: c313c37c213fc40bd96fa3d56d81c344357e89b1 + src/ragie/models/documentworkflow.py: + id: 92733291835d + last_write_checksum: sha1:00e8b0d5d77ab54783a90bc0bd23ff01450268ad + pristine_git_object: cc64ffda1f35cfcf4366d21ddd9421b64be66587 + src/ragie/models/durationlocation.py: + id: 82885f822cc1 + last_write_checksum: sha1:368eb6bcbff86e3758faaa4215fae9ff427eab68 + pristine_git_object: f79d2467e72bda2ff5897b44551f83bb630b575d + src/ragie/models/emailaddress.py: + id: 7dc4fd3c4227 + last_write_checksum: sha1:70b5e61c3ae43df94f18a2268f668150f6ed725c + pristine_git_object: c1a7e9d242bc13c424840148fcccfa1dcfdfd65e src/ragie/models/entity.py: id: d14c935f650b - last_write_checksum: sha1:613775079fc4b38db58f88c3bfb48ee2c1a7b161 - pristine_git_object: 8e48a55781f0434f2c6e734086a177df8c3b0c0c + last_write_checksum: sha1:7b94047dba9698f1c21da8aaec54dc9758404859 + pristine_git_object: 7c91b319eabab532804d632075c1f725d29cf1fe src/ragie/models/entitylist.py: id: a270a8597ba1 last_write_checksum: sha1:2d2159223102f6546cfa67f80a6dc63fb493d1ad @@ -1468,28 +1833,56 @@ trackedFiles: pristine_git_object: d8ef91ba29452d9ff785cafc6f4f29b40c937af0 src/ragie/models/evaluatedanswerstep.py: id: ab7776538d44 - last_write_checksum: sha1:538182faedbb286de22ce7f518dc27200c4d7d7e - pristine_git_object: 2f890a97ba9197fb36784ae73ef9f3320daf533f + last_write_checksum: sha1:860b5c94c8c78398d51f6dc7eda6838c40c6bc7b + pristine_git_object: 3387be11a635b933de9e8bae7a2b0320c504cd8e src/ragie/models/failedstep.py: id: db7574cefdc9 - last_write_checksum: sha1:6f4a7cbd7131bacf4ec4e6c5d678c58f11f44444 - pristine_git_object: 838eec58e9952033d220e46b5f455443ba17c95b + last_write_checksum: sha1:d4a79ae30ea956fc5377d59453d84e25cfa96e00 + pristine_git_object: 025a28c394b3a19079bcf605438a22e1b2a100ff + src/ragie/models/figure.py: + id: cd97ea8b0429 + last_write_checksum: sha1:f02fa3a7fdd729fb8b2d93e43fe9c9bd9a6226e2 + pristine_git_object: eaad4916af6f1916024a1037eae845b0ed530685 + src/ragie/models/figurecaption.py: + id: e77f2fa52e07 + last_write_checksum: sha1:556a5f854d099da979c39a38c413e18197ce1f54 + pristine_git_object: 3a705df3ecb441f7dd12f55e6f55ff157fdf950d src/ragie/models/filesearchoutput.py: id: "320201341764" - last_write_checksum: sha1:a9170ed25dde175d3a699e22d390ec4f5c30d385 - pristine_git_object: 84ea1ac7bd32a8acc11b5d7872a97ca94e0370db + last_write_checksum: sha1:2ff9eaa5d46aee6f098c7ee55e07158690c55628 + pristine_git_object: 99e21cc1177260a5ddb3690063c4a60bec9a5ae5 src/ragie/models/filesearchresult.py: id: 25534b16d60b last_write_checksum: sha1:4348fa86540c72407ee8eb9d8d5bd0de0430d49e pristine_git_object: f7c186fe2665a1cb008f437acfbd4765e37778bd src/ragie/models/finalanswer.py: id: 8e217345d931 - last_write_checksum: sha1:d3c23d899d4c7647277ae86a7e342d81730bf6e7 - pristine_git_object: 1826f444a24d44fb4bd8897c3e0fa57544127ee4 + last_write_checksum: sha1:813c384c29f09d24270a96ab2db79c4bda92d9cb + pristine_git_object: 8ddbc05f0a2444f4875103934d600ecddeb9fc5c src/ragie/models/folderdata.py: id: c175bbceb3cb last_write_checksum: sha1:e1146ed9023f284d589e948df7bc8383d5c293ef pristine_git_object: 1ca66da0dce4d77e9b7325e90255b61777ac6916 + src/ragie/models/footer.py: + id: 5dc16d8ee8dd + last_write_checksum: sha1:26c5f81eef4a21c23645fc9898b72352cc235005 + pristine_git_object: e7e630e58bafd067e342bee8b5f9d33616b41843 + src/ragie/models/footnote.py: + id: 5371b47356b8 + last_write_checksum: sha1:11930205f150eef8931b0f1122f4b3fdff2e0090 + pristine_git_object: 8d1204b912c69b878ff9be20c15ff46a518dcbcb + src/ragie/models/formfield.py: + id: 1a7b636edde3 + last_write_checksum: sha1:ffd10bb9abd1fa97cec281697117f7286acf9827 + pristine_git_object: 77a143c893b39889d953fb95ab5c87b3b4ef1aab + src/ragie/models/formoption.py: + id: 5e309f9e6edc + last_write_checksum: sha1:30304414c55894d13584a8c79c6b073b0f0cb42e + pristine_git_object: e1dc44ab021d015b4e45987a85f264acac2368a1 + src/ragie/models/formula.py: + id: 42b6efc1e3d8 + last_write_checksum: sha1:2beffa87236fc9a6d481a0aba9dd7e6944bd6957 + pristine_git_object: 4f27be56c932c0a1ccff0cf498534781b47e82a3 src/ragie/models/freshdeskcredentials.py: id: fad6c03e6fa6 last_write_checksum: sha1:66f566e26b06b3be028cc84af4ebc9e194b2b553 @@ -1506,6 +1899,10 @@ trackedFiles: id: dd58c1173815 last_write_checksum: sha1:b1e7576072f36288d8339bd0c70e0a6124f70320 pristine_git_object: e1ba0b2a6126c7c8e2222ee2fe0f2f0acdb14e84 + src/ragie/models/get_elementop.py: + id: 2c3fcff0788f + last_write_checksum: sha1:b755277e5a62cda4ed6d044e31e81021ddc2e76f + pristine_git_object: 7835e78a1f7692c155965ad982432519be5569ed src/ragie/models/get_partition_partitions_partition_id_getop.py: id: 6f5f5200fc5c last_write_checksum: sha1:fca85422acb19005dca488f3f6a0c0dd29cd9fcc @@ -1516,44 +1913,48 @@ trackedFiles: pristine_git_object: c24157194d22014d79afbedd6b023e61196245df src/ragie/models/getdocumentchunkcontentop.py: id: 205da3e140f4 - last_write_checksum: sha1:c0f2e30621f6e5c00bc6e8b64a14081a27406b6d - pristine_git_object: 94443040a9b2ae008cb2dd38b703c380797979eb + last_write_checksum: sha1:bdcdff7aa70ee7c3ea1ad45bf62952823a208d8f + pristine_git_object: 0b822cc506a32cd5a61ac36ed2381b844b10862a src/ragie/models/getdocumentchunkop.py: id: 8119b2218d49 - last_write_checksum: sha1:9f47d18c1163d8d73a0c4af50ad0335697d50126 - pristine_git_object: 926d926e3fec69dad10cdc3def13109c3173e472 + last_write_checksum: sha1:e2d15568b1656b898bbbd04f0a6dd93ab33dd216 + pristine_git_object: 1dfe659d16a56d7d720ba8e6d962175dc1c1c754 src/ragie/models/getdocumentchunksop.py: id: c605cbba4383 - last_write_checksum: sha1:e4a412ae42bc2481a4c4e590a56ea771bf290e4d - pristine_git_object: c94c413597fe91b9dc0521c447f77fce651e4002 + last_write_checksum: sha1:a525deba2fc1aab4f6211448149d62dda8eb1ac0 + pristine_git_object: 879fae3d5985612bde1b2409ce9a0e868e338e37 src/ragie/models/getdocumentcontentop.py: id: da2dcd6aa241 - last_write_checksum: sha1:5f7e37fdce508240e2eca9ee87c1d6d13cb8d1fb - pristine_git_object: 56816638353629d1309867d7311ad9568dfcf47c + last_write_checksum: sha1:44ce4199f8636d39f668449d39b22d008dedc218 + pristine_git_object: e1e48bba0bdac6dc0511faf288d815596e848a5b src/ragie/models/getdocumentop.py: id: 6634d749067a - last_write_checksum: sha1:35fdedf1bdcd3076be5b000defc15961bdf745be - pristine_git_object: b0adaf637ce287103117269dbfec8efb2dfa47c4 + last_write_checksum: sha1:2d9c26685d5daf97b45e6cda99e987dbf877f81d + pristine_git_object: dec66fe7ef09dac298efba5d5b09ab03d1ad6468 src/ragie/models/getdocumentsourceop.py: id: c5f2efdf2a45 - last_write_checksum: sha1:37d03e894780cb99f9ecd52b26217610bb6617bf - pristine_git_object: d0362dcdf7c088e018f167be1be36a29d6853928 + last_write_checksum: sha1:f8d12d20e2342e22ad36591d7950f95d4560a4d1 + pristine_git_object: 546d957b2807b6fbffd77dc19905d1ed2973996e src/ragie/models/getdocumentsummaryop.py: id: 883d9e71ae0d - last_write_checksum: sha1:12120555003d2dcc4b9a0350bb99a46b3c78b424 - pristine_git_object: 6ed4180acea1d5a17c17609cfb0a6833be36e6ac + last_write_checksum: sha1:e4f0327eef32e6f9c4c8637e4ca2832a67460079 + pristine_git_object: 30192ede2d3c1c432513067ee1a3ee69e47178cf src/ragie/models/getwebhookendpointop.py: id: a3295e010dab last_write_checksum: sha1:a8a30e76d5410faeed6d3de1f5ada619ad7d6abc pristine_git_object: 91ee4080c28ea2d5408b9944183be059d213f080 src/ragie/models/gmaildata.py: id: 285c1b268e9b - last_write_checksum: sha1:7b43c1d0c428b683bf505656e3d23ca91f111482 - pristine_git_object: 22bdcacf4485ebd121acadcc3a3ad294b785acde + last_write_checksum: sha1:e79efab7b08af5897a70a59908ab53e33f68d4cd + pristine_git_object: 30ec84f0239b2702bc89af4e75e7865948a95dfd src/ragie/models/googlefolderdata.py: id: e1ca7cde726b last_write_checksum: sha1:6945b13a4be9e3679a9c5278ae477a6324b6d54a pristine_git_object: 38a59adf70cf512762e1ff6d9aac0b32b51fec6b + src/ragie/models/header.py: + id: 8c4f89208699 + last_write_checksum: sha1:72fa4e9f2b3a689f4d8e8b1d2fb4d6091cccb36a + pristine_git_object: 800f9e431e2ee61107b1b69818ddef7390c780ca src/ragie/models/httpvalidationerror.py: id: 8bd614b607c5 last_write_checksum: sha1:2fd78e7994c287e201ba250a80cbb33247b84226 @@ -1562,82 +1963,126 @@ trackedFiles: id: d94436181571 last_write_checksum: sha1:191fa30a42454cf4fff9b6651070a6349e6928f0 pristine_git_object: 4cb2667a6d19961932acb673de3cbc087a548231 + src/ragie/models/image.py: + id: bb2d227d9c8b + last_write_checksum: sha1:1083b5f49a824591af8799b87bd0ad4bf5167017 + pristine_git_object: 9197b741348cd968aa011eda7ea74a68c44749f1 src/ragie/models/inputtokendetails.py: id: f4c01ffc86fb - last_write_checksum: sha1:017d031500cfcbaf2a21811a7e74a2692b664a50 - pristine_git_object: 32c70b7095536e9ce2481ddb701bdc9fd75713e8 + last_write_checksum: sha1:73aec84ec5c7a05013846e193ee81c345d07f85f + pristine_git_object: 361165338195fe699c581a85cc900bdf700b3cfe src/ragie/models/instruction.py: id: 53ecffeb6237 - last_write_checksum: sha1:fc1da3773e6111ee4b1a7c00245b8b0347c98781 - pristine_git_object: c448878d47c9b1061c58f8ca19a8bf21cc0c7643 + last_write_checksum: sha1:63ad108085325e0cce8bc1bbbdc4484c004cbe49 + pristine_git_object: 4486817e750a4e50dd668b9cd6a43a2f744bd583 + src/ragie/models/instructionentityextractionlog.py: + id: decc3d5e37b7 + last_write_checksum: sha1:4a7689d8ac431e49f08867a63e296943ae9b2dda + pristine_git_object: d9f0cffcbe51d381f4e41e6846890afd4ee9f3dd + src/ragie/models/instructionentityextractionloglist.py: + id: e00c77722ad6 + last_write_checksum: sha1:b26d70a03672cb9c81c8e971f713f3e28c7e9cf3 + pristine_git_object: 04551a0cb1253f3300a2d37e75fb6dad34baa7f3 src/ragie/models/intercomcredentials.py: id: 0fec3566a672 last_write_checksum: sha1:69c7fe443a19946df260ca2091bc64c8dcbd3aec pristine_git_object: 879a14b6a5a36c7793bffa9f3ff4172c1129b13a src/ragie/models/intercomdata.py: id: f46cc698c480 - last_write_checksum: sha1:7385f8db59fe35a4feb161cce796fdb6dcf027e4 - pristine_git_object: bd64303f2dd671def36e670e190295800a97d77e + last_write_checksum: sha1:9a565a99e80138e343933923527c0c3647e0ad28 + pristine_git_object: 5f6fc9b12ba6708609c8007b7816762150683de9 + src/ragie/models/json.py: + id: d84619e0453c + last_write_checksum: sha1:c7ee990fdb32f6e322738833dd4f75ff5079b944 + pristine_git_object: b63000529b0b65ca9581ef9d827d2552d5133b9d + src/ragie/models/keyvalue.py: + id: 2b9aef25ee9d + last_write_checksum: sha1:633c4ed1a8f038646f4d83ab3d9120a06895c959 + pristine_git_object: c25b81f0641ff90140079550bfc623c5009eaafb src/ragie/models/link.py: id: ac2a1e11c6ea last_write_checksum: sha1:1ed0f52800b8b2add1237f394ec72b298c89ad15 pristine_git_object: c8aaca09aba1299f5f89c5fbb2ee1aa9c96d7f27 src/ragie/models/list_connections_connections_getop.py: id: 44ae5e0f5798 - last_write_checksum: sha1:c7a4836e92b1260993b55112921515129ac39a74 - pristine_git_object: e95b34e8c79225df0eac7e68bd4b5e125301db51 + last_write_checksum: sha1:d82613bd74469ba561ed9f4262837034185b8002 + pristine_git_object: ba86f1752052fdf14a45bc9d5dffb57880dc8a21 + src/ragie/models/list_elementsop.py: + id: 83837a0792b4 + last_write_checksum: sha1:f7acb854f17f2666844ae33402c194d66d3b9d2a + pristine_git_object: baba5fec73e1e1b437c7358bb8e53b6d0ce30af4 src/ragie/models/list_partitions_partitions_getop.py: id: 03965a1b68fb - last_write_checksum: sha1:b3e1b31034bf6ef9eeec8ec35a1138b8b114004d - pristine_git_object: 50038bbd17890c4bc6a8661a24d09b821f6f4641 + last_write_checksum: sha1:d08c946d210a53a8bd717060c8dd27d020c076ce + pristine_git_object: f0c846da0738c0ad82b0f7f7e56b23c1e4ab5950 src/ragie/models/listauthenticatorsop.py: id: 32320c393339 - last_write_checksum: sha1:19fdf414614682e26e1e88c49d26db027135bea3 - pristine_git_object: 92a1fd777a1d697c115ca0ba35ffda3eb9203086 + last_write_checksum: sha1:7472f00cffeb8c7a1cbc4eee32db6aca6dc17b1d + pristine_git_object: ebab5d18216cc038f7c8e71661265c2ec7536691 src/ragie/models/listconnectorsourcetypeinfo.py: id: a2008faa2fd5 last_write_checksum: sha1:61da13eb36495530b6cd61ed970cd97f8f5cdc3a pristine_git_object: ff12ff667525e1855cb6e687abc9a96ce9be8f79 + src/ragie/models/listdocumentelements.py: + id: 396656e19546 + last_write_checksum: sha1:4c02a2588d2a37f105539b185e25f24fd8e243d0 + pristine_git_object: e4208bd5c9363750615133d9a1cded6db7a53f2a src/ragie/models/listdocumentsop.py: id: ff311357aea7 - last_write_checksum: sha1:d7745c9e5a407082f5a9e916a2d29d36a9e822ac - pristine_git_object: da922346c637ee574e7582f1650bfb2234668229 + last_write_checksum: sha1:1fd3c7efbe4c4fa3b15fc124a0ea4c034e7983e5 + pristine_git_object: 88c602e35cfefede092b4c0b2cc035715c0663ca src/ragie/models/listentitiesbydocumentop.py: id: 004678f37182 - last_write_checksum: sha1:f7c0bc34efd5cfa79c70acfa2bea5a6cfd5775eb - pristine_git_object: 86c01cb2f3f7f7d3cdc44df762ece2123d5fad78 + last_write_checksum: sha1:88f19d5d76acdbfbc72d76e1e7aae4b2797f3ee1 + pristine_git_object: 3a982806a00df9debbe7a0f8c95157e940916bab src/ragie/models/listentitiesbyinstructionop.py: id: f7b8d42e6f40 - last_write_checksum: sha1:3df52fc0f1b4932207929ecb4ad88f53f26bdaa9 - pristine_git_object: 3bd687919463a0fedfd4927d817a32bbee0080af + last_write_checksum: sha1:01a4bbb64c14f66692d8e33cd5d5cb04cae2c7e5 + pristine_git_object: 929172e8c743031a5295b55a68ba0e6ee1432a2c + src/ragie/models/listinstructionentityextractionlogsop.py: + id: 00eef2c458f3 + last_write_checksum: sha1:3ab268d64378ba7dfaa7b6565e5a0eb9bf6f3c91 + pristine_git_object: 523614476158e25a8b6a8948a818630b83637852 + src/ragie/models/listitem.py: + id: a52bd29cab8a + last_write_checksum: sha1:374961fc82736c11ba0032c6fcdc1ed05fc736d0 + pristine_git_object: c5b497d79b891e48adfe08c217def3a209551e4e src/ragie/models/listwebhookendpointsop.py: id: 55edb34bbe29 - last_write_checksum: sha1:b9883a7d22c888448bfe14316f2f3b2d5c265c7e - pristine_git_object: ad365c62f99993a728a603ed259cd69c8e862425 + last_write_checksum: sha1:2dc7dca838230cd013582092b20ebf658059a97e + pristine_git_object: c1e0baa150cfc2a7e9d2db03083ebe4685031b03 + src/ragie/models/logo.py: + id: ecefc4f711f4 + last_write_checksum: sha1:d2d29c01c80433505fc0e5359b7bf1248fe81e38 + pristine_git_object: d255a29c0c07ce19615071324a188db36ac5f892 src/ragie/models/mediamodeparam.py: id: f742caf40caa - last_write_checksum: sha1:b5e4eec230a8630589bd2e262b4f5a84a667c57c - pristine_git_object: cc153f9388a1c5597601d253604ff6ca630b668b + last_write_checksum: sha1:909f5b4d11f87128942ae28db8f6fb3a43da9b3d + pristine_git_object: 96f9210b76f744983936ccc869e8ab05d1d1e406 src/ragie/models/modelusage.py: id: b79a7d9a103e last_write_checksum: sha1:f485608772886e7e45c698007d98e9dcf4653ef5 pristine_git_object: 57ff6dd91ce6dccf6e9f05d1f6c4490deae03751 + src/ragie/models/narrativetext.py: + id: 1c4252ea9887 + last_write_checksum: sha1:ffec41123b1a44803890083b0a9acaac8ff26d15 + pristine_git_object: 4a8b19fafbb3a1e0db0a2eb14cdd422b6c4dd089 src/ragie/models/no_response_error.py: id: 9556dde0a049 last_write_checksum: sha1:7f326424a7d5ae1bcd5c89a0d6b3dbda9138942f pristine_git_object: 1deab64bc43e1e65bf3c412d326a4032ce342366 src/ragie/models/oauthcredentials.py: id: 1dffefece9fe - last_write_checksum: sha1:59e5cbd14f0f00ba5f78df1486c9dcb4d2d64d6a - pristine_git_object: 4b7bd7a56d5def2439f5eb3cb4a3046f6fbb71a7 + last_write_checksum: sha1:5b6ba26504698085e9eefc82c2f3e54c971f6ff5 + pristine_git_object: c0f31ce223288bfa97e2a1abe693f85d1efbaa5e src/ragie/models/oauthrefreshtokencredentials.py: id: 055725d89911 last_write_checksum: sha1:21fe1a4ecb9ff54b93ecd73c4c9efc23c49b0b6d pristine_git_object: cc51e525eda252e9fb3030b06d0fd6d6fcb5981d src/ragie/models/oauthurlcreate.py: id: 02ab9526fd95 - last_write_checksum: sha1:9d25fc95fe64e602d08560b0f05d581dc9ede4d8 - pristine_git_object: ec7947910dfe18a14fb4d7337f9e2ef9f38b28b3 + last_write_checksum: sha1:b2982a43f5761264b2630359788a7e9f99bacaeb + pristine_git_object: 0d2e68f777ccb49a10f5412030db517c5eb3220e src/ragie/models/oauthurlresponse.py: id: 9c7f56174b1a last_write_checksum: sha1:4842fc53764a24634e58c9780c7ec04abf094cd6 @@ -1646,30 +2091,38 @@ trackedFiles: id: 7e7e7be360dd last_write_checksum: sha1:4af208d76693a475d7f18a284204b189414eea94 pristine_git_object: c9afd2bc1f5742481d89619fdb7c0c63cb350019 + src/ragie/models/orderedlist.py: + id: 93bd9c8175cc + last_write_checksum: sha1:5ac2f224a7592c1854bf7603cb77bd290555e363 + pristine_git_object: 2967a881b2d90475dcf433358aa79687555579f5 src/ragie/models/outputtokendetails.py: id: 4c0d878b52fe - last_write_checksum: sha1:056821956d32b4ea9b127406e10ecba654eb0649 - pristine_git_object: bba6c4088862d0cc310698d5ae197bbf759ee52c + last_write_checksum: sha1:c01fcafff2facbce120d1f62fb31c47d86ca7a98 + pristine_git_object: 4493577f58a0ab3943808de5b19b10e6e8032998 + src/ragie/models/pagebreak.py: + id: 0e349641dad5 + last_write_checksum: sha1:04b4c53ab5bf6cbde9e8b626de69f4c8fa95995e + pristine_git_object: a0a59ef17a11aa84fef59bf4c67fd2d5541b6a58 src/ragie/models/pagination.py: id: 8470c88ad7a3 - last_write_checksum: sha1:857dba0f887aaff9e19761cfa89659dc80dddc49 - pristine_git_object: 2bc263adeb93c646eb272873dbe54dd9901934dc + last_write_checksum: sha1:90c3eea4ae1c14fa930478e83e8a7e1904fa5c78 + pristine_git_object: 14ce746b9611a7c214a0211401320cb1853350ad src/ragie/models/partition.py: id: 0098c1d7524f - last_write_checksum: sha1:97f38462b00c5f8a42f5a35e9b51fed93061e524 - pristine_git_object: 4bd582ad404ed0aa5a145ca6b985d2bc494a46d4 + last_write_checksum: sha1:2759ae4cbd00f6cf9a20c83c28d8d5d0d6c25ff5 + pristine_git_object: df309bbdd47c9684f6b4f2effa1e7a184d14dd27 src/ragie/models/partitiondetail.py: id: 7d258f33a93c - last_write_checksum: sha1:8f6a2188cc26d97b9f9b64a2ff1490abe8a723e6 - pristine_git_object: 5851c8e50808cd52c4a94f383a98da9332905c21 + last_write_checksum: sha1:18b6f0c5000b66673e644de26c9feb045738458e + pristine_git_object: 66ccb982d61a2bd956700fa50469e8a2c098bc8b src/ragie/models/partitionlimitparams.py: id: 548cac60e715 - last_write_checksum: sha1:2c78fd511c2eb19b656a8f7afc129b1c6b3ab778 - pristine_git_object: d4624ba7af886f62ba7d84dc46f692537b1d4198 + last_write_checksum: sha1:9ccb499b85846d30bdd02d4b56326bc8b7416b03 + pristine_git_object: a73ef2733b883bec20667f6107fdfee674a35a8b src/ragie/models/partitionlimits.py: id: 2f929857a4b1 - last_write_checksum: sha1:0ef9668e50d0a913e81098d7d30ca0af9e1a4a81 - pristine_git_object: 114acdede75b7104749d1770fe46e2b42d741d6d + last_write_checksum: sha1:935871a861fd5659c03aa763506db4fc93623c15 + pristine_git_object: 47c7540ab88b154edc7ed9fa26b0a54dc61395d6 src/ragie/models/partitionlist.py: id: f32979d145c2 last_write_checksum: sha1:e1b430d295265f7ca521c8fe7325eceeef320ce3 @@ -1680,96 +2133,116 @@ trackedFiles: pristine_git_object: 4248b7f3d03902a38e12d9259db7eca9f93355d4 src/ragie/models/patchdocumentmetadataop.py: id: b10fb020f5ce - last_write_checksum: sha1:29ba006dadc91e32a323ae05c5f47faee1ceda2f - pristine_git_object: 4c9296cc4d6768c28e4915524b53b0858086bc43 + last_write_checksum: sha1:bd4b32c856f8731c72b7b747230d37ddb4fda9a6 + pristine_git_object: c9b67c5ef0ddee624999fc4ac30d9581615833f8 src/ragie/models/patchdocumentmetadataparams.py: id: 37259efb97a1 - last_write_checksum: sha1:e783d9a5e8f496e6573d41de5f65dd8a38628da4 - pristine_git_object: 14e5f57f3ffde40fe395c4938c47a1ead1b7ebec + last_write_checksum: sha1:b1780ab6300e18886596a2427a930755d42dd2eb + pristine_git_object: 4caf825d7ce8b31a267d15fd2553aa1588319f1e + src/ragie/models/patchinstructionop.py: + id: 6e3655dcf50d + last_write_checksum: sha1:2bb08e8b70bfcbe564a6eec2da90ad26c9471102 + pristine_git_object: 3db922c337bdca0b59ca5427451af4b383f2b50b + src/ragie/models/patchinstructionparams.py: + id: b1300a68051a + last_write_checksum: sha1:f44eda3ff1ef356f0b093fd7ccfad2004e499e60 + pristine_git_object: 7182886fc06b34fd79045a093d495001064ed42d src/ragie/models/planstep.py: id: fefb6112ea16 - last_write_checksum: sha1:11633dcfdd4e44a2208db4a69e4f5eb619281af3 - pristine_git_object: 444e54f4f34e8e4f8f4bb97069f39b48c54a834c + last_write_checksum: sha1:ef5d2dc8e781e36f6473cf04c83c37006b3d1d0f + pristine_git_object: b8492f4766d087095478d85f9a87eb3334eddc40 src/ragie/models/publicbackblazeconnection.py: id: 1b7057a0187b - last_write_checksum: sha1:591725ad0f06b433402679a150cb40313adfdc7e - pristine_git_object: 6f8270e15398b8353952f3e566d8d6c7fa3c63d2 + last_write_checksum: sha1:c699ce7a2d9863bf1e6e9d9e14f6455db73a8cc5 + pristine_git_object: 84e39f3c797e040ce64923e17445251af449b257 src/ragie/models/publiccreateconnection.py: id: 37e7b3f8b99f - last_write_checksum: sha1:206ba732d89189e12c30e06cbd715d0870923a04 - pristine_git_object: 1d1e3ff62aa1895078457085bdc5bbdf561029f3 + last_write_checksum: sha1:98fe29b31ffc11460b8c337026a8d4ac7cfe0fa6 + pristine_git_object: 7b5c30dae6792070e686ecb5c1b529f71017eac4 src/ragie/models/publicfreshdeskconnection.py: id: 9cee809fa25d - last_write_checksum: sha1:84799e5d656d0984d5219e232e4860a03ec56250 - pristine_git_object: fa9255b543db4062ab1a6b240e3da43ff34989e4 + last_write_checksum: sha1:b6613bf1c99e799e4fb3bd97aa26f2756478a516 + pristine_git_object: b824709cfdd0ced0b26a9307a6925a546a14ba82 src/ragie/models/publicgcsconnection.py: id: be423cd3cfdb - last_write_checksum: sha1:af108837e3426134f0e5dd0d5835aa663eec96d9 - pristine_git_object: ea2b79d932fb496ce6349056faf3c803f09905c9 + last_write_checksum: sha1:01b818b462d341304ee8a597440f6459d7dd957a + pristine_git_object: 63dd85cb030f610896d3f0d9377e4dc155f48ae4 src/ragie/models/publicintercomconnection.py: id: 75f99c2c5f92 - last_write_checksum: sha1:46fc5391e89d72212f5c7b25dc48697241dde566 - pristine_git_object: 93f8a69513d181550b6564ce05093f79200b65aa + last_write_checksum: sha1:fdc1a6745308326cc93bcc7ce3aca09f1f9d03f4 + pristine_git_object: 69a45f6492b73e75ed1617e2310e6657aa1e3d59 src/ragie/models/publics3compatibleconnection.py: id: 9e776faebab5 - last_write_checksum: sha1:5246223af70a4fb43a705b380c8e50d9a4581688 - pristine_git_object: 6136ebdb47345774fd640c7f3e8196ba912df143 + last_write_checksum: sha1:45e7c0377cb1662829c7f807f370dc2d57ed0ec9 + pristine_git_object: e269300faa2e72cc8f2e2a8f5354ca5acf4bfb7e + src/ragie/models/publicwebcrawlerconnection.py: + id: 1bb6fbe56dd4 + last_write_checksum: sha1:058e3945e71fd5171737fe693526173ab4e68ba4 + pristine_git_object: b68b57b34a1b4ab5d9f88b97a6509a51eea4bf74 src/ragie/models/publiczendeskconnection.py: id: 858ac26c9b94 - last_write_checksum: sha1:c0762cafef3ca0038711f685d13fab080295a674 - pristine_git_object: 8d817d81355e37b52c49779637224183903b0ebf + last_write_checksum: sha1:51574bc60faab00994e50da1b24e67a5e4cc9b9d + pristine_git_object: 4c6a8857e584b3687eac21f5ab1d60a377c5ca1a + src/ragie/models/qrcode.py: + id: cb35ec647f75 + last_write_checksum: sha1:4389b92505a4278c15fcbd2b6647d21e991dea85 + pristine_git_object: 39b6bae5df68746605e2d59e4c8545c52eef0d9b src/ragie/models/querydetails.py: id: c603dd2ae75b last_write_checksum: sha1:de21c994830621eb755c1d809a1f242d9ca27f11 pristine_git_object: cfe04237528e5962f2df6420486275ce90706e81 + src/ragie/models/quote.py: + id: b3dabbf4abaf + last_write_checksum: sha1:59adc751ed3d22445943aa4efacdbcf502c6c30f + pristine_git_object: 3e4bea2d52b099ec93fba9546d7b598957fc39d2 src/ragie/models/ragie_api_schema_response_usage.py: id: 3259cdf8d328 - last_write_checksum: sha1:c7b98652cf1a5aa956bdda6344cbfbf1b5608a6a - pristine_git_object: 7e8a1b328a35766da39d55ee508a4ac1b3e9a669 + last_write_checksum: sha1:b94c555bd8163ec1ca7e7df952e71e40f250e573 + pristine_git_object: 29065fb608f7ce13b50190089f67d2b9f9790ad4 src/ragie/models/ragieerror.py: id: 2557986692fe last_write_checksum: sha1:204f275b694055352f5ba0dd01a1a9378c7e549b pristine_git_object: aab45686b904e15cd2a0bc8e9bf52f91c3fb0b20 src/ragie/models/ragieevidence.py: id: 1f775241eddd - last_write_checksum: sha1:b1c9c43c855f5bee322170a2703c5847a2e2e4f9 - pristine_git_object: d60b83f3ccc2ee9d76249c1ddaceab98bdbe21df + last_write_checksum: sha1:7b5ab2aa70ae3992e32962a709092437c4a8cd17 + pristine_git_object: 9b8d251b20b4ea4118004400e0d8771deccb25f7 src/ragie/models/reasoning.py: id: b538b54c2baf - last_write_checksum: sha1:5f77fc93e52372f6888606238d6d2fcf5cfc9ed6 - pristine_git_object: 4d0a8357f25e41319e62ffba903bee8907b0d90c + last_write_checksum: sha1:3ab41b0f7680c8961ad8fad2b86936de07231400 + pristine_git_object: cd34e70fba242c961d2fef1607e371f182b16e78 src/ragie/models/reasoningoutput.py: id: e1a48cd21d1d - last_write_checksum: sha1:ac475f9fe233cad2df787ccf7c696534089a8c89 - pristine_git_object: aa491bda91161970fcab62d1fced62cddca681e0 + last_write_checksum: sha1:8919bfef27d2e6e8f8b010a435855610d06096f5 + pristine_git_object: 9d1b25897459c2a078e7ad2571653fd46cdf0d06 src/ragie/models/reasoningsummary.py: id: 0f251da8c32e - last_write_checksum: sha1:2a1ffebc56c3895e6e37197596137776aba50544 - pristine_git_object: 24a5f75322f9bfcf3db193f36f5dc21e06e4989f + last_write_checksum: sha1:817b72c6072ed55fdf1e1fa8d735430efdf84e0a + pristine_git_object: 46f18ef7646af771d98be67db0ae6df2e8d35477 src/ragie/models/reasoningtext.py: id: 38752617d3eb - last_write_checksum: sha1:fdc8e9f6dbc922c975b67edddebcc9470281a75f - pristine_git_object: b777d3caae7c110794e112f2e3d02729d9d8217b + last_write_checksum: sha1:812c7b37a4746752385fe1c70f4cb6608091f930 + pristine_git_object: 2c99ad056e3c1627e45cbcc465c74f6e236c111d src/ragie/models/request.py: id: 22e8261db75f - last_write_checksum: sha1:dac3234c96e4001227baca659ca3d42129facf7e - pristine_git_object: 382b7e72b26d144a495057399d75b9fb90694661 + last_write_checksum: sha1:b1a20de222651d486b96b69ef7aa37631a2bbd29 + pristine_git_object: a0e3785b2ad5c0b4d833002d4834a581fe024c21 src/ragie/models/response.py: id: 13850c80e2c8 - last_write_checksum: sha1:c8f945e2eec069d2f1a897ce4482057ac1974578 - pristine_git_object: 61fdf4628c508379cf9689cda216e013e9c38b4a + last_write_checksum: sha1:00dad14a239bd3090478d4d5dcd5032f6221010c + pristine_git_object: 4c52785d110f4c04e53d41f507337197dd02fa31 src/ragie/models/responsecontent.py: id: d28aeff6f91e - last_write_checksum: sha1:2e559fd574e68aa49dde0b26a25f433e8dcb8fff - pristine_git_object: a18c62259388d096cbea51849357184c91210d79 + last_write_checksum: sha1:597a66ac098dc8f45db971f722be6fb399f0f778 + pristine_git_object: 3be1032c6adb16ee0200fa1c16c663447be6706e src/ragie/models/responseok.py: id: 6f933bb6a3ef - last_write_checksum: sha1:608f94d82af1e1657c178fa87f1295aae4702607 - pristine_git_object: ca0e2617b18138950f503d748cf75720ed163f8a + last_write_checksum: sha1:75f632ebd97c81bd16c7bbff03eac330b2251463 + pristine_git_object: 38973dcde442078d6cd802409491e00f29ee2e59 src/ragie/models/responseoutputmessage.py: id: d729a5c22fd2 - last_write_checksum: sha1:28ec30368142118397a35736d5321a89d86936e5 - pristine_git_object: 919a1aade1f67d81dde46084a61d7edd9266d305 + last_write_checksum: sha1:a3a519097661991c5a88613698028918cd843702 + pristine_git_object: 0597099d7c9a7eb1d82c37610ca1db440e1c2fb6 src/ragie/models/responsevalidationerror.py: id: c864a2d677d4 last_write_checksum: sha1:45b22889cc38a58a6961fa98ded91fbf8131975b @@ -1780,16 +2253,16 @@ trackedFiles: pristine_git_object: e3f7d5f35e503888d81e2938397af3e9d8d74e7e src/ragie/models/retrieveparams.py: id: 635e89513881 - last_write_checksum: sha1:2c183e28e71f2322ab49d2d7b78ad2bbfdc4f25b - pristine_git_object: 3f8b7d0f9c97c60701d0153079be81e9008144ae + last_write_checksum: sha1:30eac164762d255197b1318a13e03b64d7d7fae1 + pristine_git_object: 6c20f720745c7a14b7a506845c20245918331ccd src/ragie/models/s3compatiblecredentials.py: id: 14b3e8ef04d7 - last_write_checksum: sha1:20e46c5aeb7b9afb482de3e15e79d638d02542b1 - pristine_git_object: 17a98160ddc167ec0de00e0bb3e88f05a3cdcecf + last_write_checksum: sha1:021bd54a9837ebbf86a3e36d253a4c953c46ceed + pristine_git_object: 0e720235e181436d7f26021fd6bd8b4946bcb080 src/ragie/models/scoredchunk.py: id: f5c561612168 - last_write_checksum: sha1:58c1db1c0815a6db4162c93d4a69a7ef06a78362 - pristine_git_object: 3ed49b486b91876ade1bc712c94e1be3f8be20f2 + last_write_checksum: sha1:bad871a6f8eebc212b6e2bea5204fc24615b2b15 + pristine_git_object: 3a042791c148987a67590dfa9321824e6bc2e1f3 src/ragie/models/sdkerror.py: id: 58f87052d1ef last_write_checksum: sha1:4e2118e5c1406bc92c2ba2168578e052b55fc05c @@ -1808,12 +2281,16 @@ trackedFiles: pristine_git_object: 01b288119fd4f4c3efb1a4bbeced4b782e3b4028 src/ragie/models/searchstep.py: id: a0f82e57eddb - last_write_checksum: sha1:145893c3f928aa70418931bf44af8e8a08710acb - pristine_git_object: 7c6d4c28b9fd103c9472a5bff76c164fd3c55b95 + last_write_checksum: sha1:9624e0a32f313447b2dbffaca6789699cedacb10 + pristine_git_object: efa52c985e928733475570af4b3e0ab1c3652e2d src/ragie/models/searchstepwithquerydetails.py: id: 160f2a5cd2bc - last_write_checksum: sha1:c765068a5725c323be44129a26533207ebd8d555 - pristine_git_object: 277ea692901011e7dc9ae184eeae734e9e60e523 + last_write_checksum: sha1:e82fe9de69cd6d7c88545661edbabea0ae4316a0 + pristine_git_object: 29691f43415e53a9ad7bd04d234f90a787d88180 + src/ragie/models/sectionheader.py: + id: ab1dea6d567a + last_write_checksum: sha1:edb2285c79ee91da65f4b0f869e06cab4a65d606 + pristine_git_object: 1f890a11b46bb8bd155a96af465bbe0195f41d81 src/ragie/models/security.py: id: 5bcfbd85e953 last_write_checksum: sha1:9754de327099572f9bc9b0ae566d42ab28ec9ce3 @@ -1832,40 +2309,84 @@ trackedFiles: pristine_git_object: 0d6f85790f491e62fcc4efa24925c1e626f67cd7 src/ragie/models/setconnectionenabledpayload.py: id: 5bc812ee3255 - last_write_checksum: sha1:0112425855531a9ed9d7e362d72f0bc37d4d122f - pristine_git_object: d9b95f49ce671911f68e4bc705821d5b8cb7f006 + last_write_checksum: sha1:6d606e255207116ca17f21490ea08d22fb77ef98 + pristine_git_object: 514b182078b6beb1bd3a91b14fa4b2fcb3179811 src/ragie/models/sharepointdata.py: id: 5be522b44494 - last_write_checksum: sha1:b5bc384e7d70a08a86788541a44a8c53da293222 - pristine_git_object: 9237bf81b31bfb25550bdcda2eb5e6191ba260e2 + last_write_checksum: sha1:22f41ba751ff09b59f276ef5986ad734031526da + pristine_git_object: 1957c78d52671751bc4e4df25390f09eafd12e17 src/ragie/models/sharepointdrivedata.py: id: 4cf1fbe585ca last_write_checksum: sha1:9dac1e8d8a7dbb862e5b361ea60b800dbbdb4205 pristine_git_object: 01bf06385f399e8dcbf1ebd97d443d1f924509c8 src/ragie/models/sharepointfiledata.py: id: ee2251015c0f - last_write_checksum: sha1:a0866c2b80345d8dab90bc6a3e1361301b7c076d - pristine_git_object: 367ee6cb5dc20f1f9fc4e694fc799b50b2f2068b + last_write_checksum: sha1:00ca4b3b83336b548076a7efa57e343c0dfb0a17 + pristine_git_object: fcf3a6110f44c99587a50f693adff55047df2c82 src/ragie/models/sharepointsitedata.py: id: efa19c0ec772 last_write_checksum: sha1:d5d45a57a97101c71fd4d347a36e11d89b8c65be pristine_git_object: 1f416436a82ddb0eead13c4bddd6e05af0790a97 + src/ragie/models/signature.py: + id: 2dd6ad8afe31 + last_write_checksum: sha1:dcc61060bd875ed05473d4d93cc4230f5b3abfd8 + pristine_git_object: 8ec9d49982e9de54c32b23e72611174c90bbb968 src/ragie/models/slackdata.py: id: dbb8a89e2a37 last_write_checksum: sha1:04ba91c2affc39db692f4294322045f73a0e0115 pristine_git_object: 54220d3867127ecc5e3f454bcdd83a0c9a22b7e5 + src/ragie/models/spreadsheetlocation.py: + id: dee7a7592cc4 + last_write_checksum: sha1:959873c6048433cbef6d75b8c0068fab6ea0d86a + pristine_git_object: d641521a2e1648ff42c989609c37171501b66589 + src/ragie/models/stamp.py: + id: dacb51bce02a + last_write_checksum: sha1:f1ff7ef9f45714a491507d1d1f736fb441cc46c5 + pristine_git_object: 92f9cc02453e284f4a1835a0a51407278c419cb0 + src/ragie/models/subheader.py: + id: a1d1caed076e + last_write_checksum: sha1:bc2aa953dc2d858ecf8e88fe97d99c25d66dc6a4 + pristine_git_object: aa18d700370185fcfe01cf2c43c08bf84ab533ea src/ragie/models/surrenderstep.py: id: 9c06cdbd6a80 - last_write_checksum: sha1:fa4719267e534a4eca6ac513be2bd03e15d35110 - pristine_git_object: cf2e5cf030552dad1fd8c6dda8fb0a1fb1bdfb80 + last_write_checksum: sha1:05272a74c544699884f0638cf8ae961c7811259f + pristine_git_object: 19a1d0aeb9e4e228520e4948d4aa2cc983f0ce88 src/ragie/models/syncconnectionop.py: id: e81ed439fe80 last_write_checksum: sha1:afca5c2e0f540840e9c1fac0f4eee3b866f96895 pristine_git_object: 185d4ad6ba41662d1c0d6ceac4e7173e26eebb07 + src/ragie/models/table.py: + id: a1d1849e11f5 + last_write_checksum: sha1:ff7d72a24082514b899b08b1da1ca905dd643e5d + pristine_git_object: 13f60b52889b772effe7c0f92cf5df5c48b083fd + src/ragie/models/tableofcontents.py: + id: 486d7cfcf721 + last_write_checksum: sha1:7fa850ee9570d85a515145e37262dac5b774e48e + pristine_git_object: 9f5754997b1c46ff74c5e96d15a46924e91b2626 + src/ragie/models/text.py: + id: 252db039e01e + last_write_checksum: sha1:956ade762f196c957539adc267471b918d24d546 + pristine_git_object: 42529ab5da258358d992d93b9d165fb89efa7b85 + src/ragie/models/time.py: + id: 5e35549ac22f + last_write_checksum: sha1:d22f42c7f617289a430c864351926cc425322ea1 + pristine_git_object: ba4583922512a314677d68564f0f692daaf889b4 + src/ragie/models/title.py: + id: aee08be5602d + last_write_checksum: sha1:9bac1e2fafd2b9a3509787edb0f69357193febb9 + pristine_git_object: 4454e4cb4cf4dd414325b5822259c1088f00fb2a src/ragie/models/tool.py: id: 56da73bdeb1c - last_write_checksum: sha1:4385460870b5a881c02d28ed5b3c228f0ebd46ff - pristine_git_object: eefa68961dc3a683ae1edcd2e0a13ecd058f4e67 + last_write_checksum: sha1:8b5163b54f158118bc4cd073fdfe1a37a4afd426 + pristine_git_object: a8931e98129e6d6d8cdc0f27b074cdd3be8c4588 + src/ragie/models/uncategorizedtext.py: + id: b8ca70700ba0 + last_write_checksum: sha1:bdb05e36cfc7041a55f074a39ca588a2e2beeb5f + pristine_git_object: e20015520409bc6704b5e51059029b8701869b67 + src/ragie/models/unorderedlist.py: + id: 9d7dc0d9df45 + last_write_checksum: sha1:c36a78e16013cd7f9f406ecee8914fffb8e32935 + pristine_git_object: b5be301b9af954a500e4eb7ba28bc5c83434519a src/ragie/models/update_connection_connections_connection_id_putop.py: id: 1244e4e544f0 last_write_checksum: sha1:6e737597e23dcc64d74af53c810946c5644be326 @@ -1876,64 +2397,76 @@ trackedFiles: pristine_git_object: 85f71a866215c3840bdb37d63b6049b4cb0c63fc src/ragie/models/updatedocumentfileop.py: id: 472a849f1f0e - last_write_checksum: sha1:b3e888adad6acefbb90d3d5525ffa6fbe5263743 - pristine_git_object: 0dd380b3acfc5fc3750ac0e7ce87a6dbd1e399c7 + last_write_checksum: sha1:2cf1edb4ed9c0efaa004da851b4abbafe440c70c + pristine_git_object: 58af8f1a8ba2729e43070deae7ef62d23117424a src/ragie/models/updatedocumentfileparams.py: id: d76d11ae543c - last_write_checksum: sha1:d48a81e430a9e57ad8fe9f85daf8b35f242386ef - pristine_git_object: 7c2f0a4455b670f2fafb47ae18d510e84747c142 + last_write_checksum: sha1:a13436c709d31c9ddc02dd38d4c5cefab019c346 + pristine_git_object: e4e87a2457d020c20a1b9de6be719c70260b4f16 src/ragie/models/updatedocumentfromurlop.py: id: 4681056d6e7e - last_write_checksum: sha1:673c5ae2d73065ef5dff8068c032cc82709c95f9 - pristine_git_object: c778e4904d6235d625243589d4f6883dedc4ec4a + last_write_checksum: sha1:b2c6a7d4d08ce9eaed94bd8fa982c27e8ec10363 + pristine_git_object: 2393f8bfe81dafc05935fa8f86950ac4a2c45172 src/ragie/models/updatedocumentfromurlparams.py: id: 45e7f112044b - last_write_checksum: sha1:6444532e6f6c531e7be300811d332a44d2506734 - pristine_git_object: 3b6f97028b7f994d9ae9a353f915cb106ed69023 + last_write_checksum: sha1:6ad7f4d489e8c6e71644ac97c7ad59ad33de39a8 + pristine_git_object: d87cec2529ad663ad443310bc890b07f29e6b6d4 src/ragie/models/updatedocumentrawop.py: id: bb62736e7427 - last_write_checksum: sha1:8677a10be17639c8cc4149fdc90d8479fd3cfa09 - pristine_git_object: b3fe86d8409f612374198099e6be03519d93f069 + last_write_checksum: sha1:78837d8aa298be2aa42c8fb80e8d53934c34dadb + pristine_git_object: d532a7d3ddb8dbeea43747ae5b220ef8d746bc11 src/ragie/models/updatedocumentrawparams.py: id: f2841a003bb2 last_write_checksum: sha1:d0a2257fcc995d8d8b9f9be5a67a0a6e8863b459 pristine_git_object: 414bc33d7e0542a6f73008c18c62accee7236d2e - src/ragie/models/updateinstructionop.py: - id: 93c6d1f728ea - last_write_checksum: sha1:73251fab1f9d9b3eecf4c20f9e162f62f82bcd93 - pristine_git_object: 88b6eb3a18b1e65baa5455e19cd7ed774c8264b9 - src/ragie/models/updateinstructionparams.py: - id: b311345d17c8 - last_write_checksum: sha1:386deca01b9a4c1f34fa5184348c4a87f68bff8f - pristine_git_object: c151cdb94244a39b20b7cb4b0c4e3b121c8be68d src/ragie/models/updatepartitionparams.py: id: 69cc827fafd7 - last_write_checksum: sha1:09f15fc47d9644aa31aee30257580203e12e2857 - pristine_git_object: 6194a575bfa86bff89852e487afd8b331d3ee48b + last_write_checksum: sha1:2d23866e6bcfa775a768ea24fb787c53c0fe9f02 + pristine_git_object: ae493754de2ea1df014fb617ae1af23c18cd049e src/ragie/models/updatewebhookendpointop.py: id: 0ff0fa4446eb last_write_checksum: sha1:532b9b4b2a092567ade4457fbba29f6c055ff432 pristine_git_object: 1ce7b2c6be75777c6ecbc065a82ba7aaa8bcff62 src/ragie/models/updatewebhookendpointpayload.py: id: 383e2342c761 - last_write_checksum: sha1:583f8b9436380d96ec7aec9e322be578fc1512bd - pristine_git_object: a68b30bf4a2f9fe1f0bbd01ea78c49fe6b27b828 + last_write_checksum: sha1:9c862ebf59747c5cde9e5ba087873990904ea187 + pristine_git_object: 835b13dd5932bd5dfd8810f5ea740f982cf58689 src/ragie/models/validationerror.py: id: bb8666b5c600 last_write_checksum: sha1:e24055ae9db0f80de32fa5013f71736fe6d28c21 pristine_git_object: 345b9903d9e4d4fd2b6a43ff04b7a50f5202a608 + src/ragie/models/video.py: + id: d1bc008cdb91 + last_write_checksum: sha1:9e3b5e75872b9ca80776b2490e2e4d1e167e62a1 + pristine_git_object: f96cc55324ee5e3943f7f59960c2b6324adc51c5 src/ragie/models/videomodalitydata.py: id: 442b0b0ceb4f - last_write_checksum: sha1:c3dbf3042876c0de33e535865845e147a0ba0294 - pristine_git_object: 5d1c07898c68a9fc2deb27d84e294e718dc11b7c + last_write_checksum: sha1:5edba5be0cc24be9936cdef0a7347769857ab4a2 + pristine_git_object: d718b788772f2ed63dfd98a443e410beabf257c1 + src/ragie/models/videosegment.py: + id: 7b7dec83a175 + last_write_checksum: sha1:a74518337677517e9619abbb36f6e3a5f9fd031b + pristine_git_object: 3e99171a1352848431ed7337ebfbccd3be7da41c + src/ragie/models/watermark.py: + id: 0b7211ece7cc + last_write_checksum: sha1:10c8e77dd72b75f4fad2c6421ba9c1e59ac1c432 + pristine_git_object: 9121216050072978fca1e14eff4efe6d65b81309 + src/ragie/models/webcrawlerdata.py: + id: ce6c0b459ba6 + last_write_checksum: sha1:cb5d10796902df78b1d3dd94678faffa46afbce0 + pristine_git_object: ac2c8ab657dc6e786ded5ffc608a041ff2bd0f4b src/ragie/models/webhookendpoint.py: id: e7a40cbc0582 - last_write_checksum: sha1:12876695069b956205a6b07af710e2184a486416 - pristine_git_object: 8fb67a240c8bc80e56945ca534fb40f3e8a5be51 + last_write_checksum: sha1:bc2b68a3df815842da3fb37f973ffe9eee4211e4 + pristine_git_object: 11e5bc29b0529659c4bb63b0f4558e00d362f68e src/ragie/models/webhookendpointlist.py: id: bfb69e36cf04 last_write_checksum: sha1:78c2c2b8ee4dd6e922418e2f25f09530a97327e3 pristine_git_object: 6572492f9704c7b479cd66fb6c48989cc620ca0a + src/ragie/models/wordmodality.py: + id: 4a9a68d98904 + last_write_checksum: sha1:f4368809cebaac1436a4b93e21a5dd423d44e942 + pristine_git_object: b4db2b076d43e1ac285ae7665b1ac7d6d164c214 src/ragie/models/wordtimestamp.py: id: 449ca7efbc8b last_write_checksum: sha1:97da0b66267da518d5a4dc10575124c7e3aac215 @@ -1948,8 +2481,8 @@ trackedFiles: pristine_git_object: b0cc034d812e85e9b565b74180d9c33ae49260fb src/ragie/partitions.py: id: 4663a21570d4 - last_write_checksum: sha1:bf53c8afa02884038b9a66c39cbaefb92cd2b3e0 - pristine_git_object: e622b08eeaa94bc32b3c034baf701ce7a3629414 + last_write_checksum: sha1:c25a36dcc5c46429278f67f77d910d6abcb931a3 + pristine_git_object: fb46b48498d6236711a4b38d7e5b928dac3b673b src/ragie/py.typed: id: 62ec15734d0a last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 @@ -1964,8 +2497,8 @@ trackedFiles: pristine_git_object: 2c190096ac0a3e594bee2f5e285b2e7161bd34a7 src/ragie/sdk.py: id: 291395f3ef83 - last_write_checksum: sha1:f510f2d55585f36a668b77726ef801b2a5938734 - pristine_git_object: a562cf9929716a04c6b23d9d15b017625709d578 + last_write_checksum: sha1:cf042c934b85174b411a486d35418f56155a1146 + pristine_git_object: 970841189ba573a75ec9b203bb3f0d57f68a77f5 src/ragie/sdkconfiguration.py: id: b25ac9cff00a last_write_checksum: sha1:a5cb603d65ef193da6d3c86eb884e7a9893edddc @@ -1980,8 +2513,8 @@ trackedFiles: pristine_git_object: a9a640a1a7048736383f96c67c6290c86bf536ee src/ragie/utils/__init__.py: id: 794db4b3113d - last_write_checksum: sha1:81e0385b93362e0f3f6911b65bd4cc601ebc11e1 - pristine_git_object: 56164cf3a86399ee7a8e1a68d19fb494689d77c3 + last_write_checksum: sha1:1970816f2234ecb8785798240b0edced961de971 + pristine_git_object: 0498cb8dabf249b39609f81fb10cddc30f1b78b5 src/ragie/utils/annotations.py: id: 82fb6e8764bd last_write_checksum: sha1:a4824ad65f730303e4e1e3ec1febf87b4eb46dbc @@ -1990,14 +2523,18 @@ trackedFiles: id: 3a1c4dde313f last_write_checksum: sha1:c721e4123000e7dc61ec52b28a739439d9e17341 pristine_git_object: a6c52cd61bbe2d459046c940ce5e8c469f2f0664 + src/ragie/utils/dynamic_imports.py: + id: a6f5f0365a8c + last_write_checksum: sha1:a1940c63feb8eddfd8026de53384baf5056d5dcc + pristine_git_object: 673edf82a97d0fea7295625d3e092ea369a36b79 src/ragie/utils/enums.py: id: 6fd4d239babe - last_write_checksum: sha1:786ba597f79dca6fbc0d87c591752bb8d775ecb7 - pristine_git_object: c3bc13cfc48794c143a64667f02e7949a8ce3fcc + last_write_checksum: sha1:bc8c3c1285ae09ba8a094ee5c3d9c7f41fa1284d + pristine_git_object: 3324e1bc2668c54c4d5f5a1a845675319757a828 src/ragie/utils/eventstreaming.py: id: 93ad337e543e - last_write_checksum: sha1:bababae5d54b7efc360db701daa49e18a92c2f3b - pristine_git_object: 0969899bfc491e5e408d05643525f347ea95e4fc + last_write_checksum: sha1:620d78a8b4e3b854e08d136e02e40a01a786bd70 + pristine_git_object: 3bdcd6d3d4fc772cb7f5fca8685dcdc8c85e13e8 src/ragie/utils/forms.py: id: 997a0387d145 last_write_checksum: sha1:15fa7e9ab1611e062a9984cf06cb20969713d295 @@ -2020,20 +2557,20 @@ trackedFiles: pristine_git_object: c04e0db82b68eca041f2cb2614d748fbac80fd41 src/ragie/utils/requestbodies.py: id: b4ac21f8488d - last_write_checksum: sha1:e0a3a78158eba39880475d62d61be906625676b8 - pristine_git_object: d5240dd5f5efffabbd9aefa2f4a349511a9c75b4 + last_write_checksum: sha1:41e2d2d2d3ecc394c8122ca4d4b85e1c3e03f054 + pristine_git_object: 1de32b6d26f46590232f398fdba6ce0072f1659c src/ragie/utils/retries.py: id: ff555dbc4237 - last_write_checksum: sha1:5b97ac4f59357d70c2529975d50364c88bcad607 - pristine_git_object: 88a91b10cd2076b4a2c6cff2ac6bfaa5e3c5ad13 + last_write_checksum: sha1:471372f5c5d1dd5583239c9cf3c75f1b636e5d87 + pristine_git_object: af07d4e941007af4213c5ec9047ef8a2fca04e5e src/ragie/utils/security.py: id: f8f1beb0893c - last_write_checksum: sha1:a17130ace2c0db6394f38dd941ad2b700cc755c8 - pristine_git_object: 295a3f40031dbb40073ad227fd4a355660f97ab2 + last_write_checksum: sha1:435dd8b180cefcd733e635b9fa45512da091d9c0 + pristine_git_object: 17996bd54b8624009802fbbdf30bcb4225b8dfed src/ragie/utils/serializers.py: id: c564e36f25e9 - last_write_checksum: sha1:a0d184ace7371a14a7d005cca7f358a03e3d4b07 - pristine_git_object: 378a14c0f86a867ca7b0eb7e620da82234c0ccc4 + last_write_checksum: sha1:ce1d8d7f500a9ccba0aeca5057cee9c271f4dfd7 + pristine_git_object: 14321eb479de81d0d9580ec8291e0ff91bf29e57 src/ragie/utils/unmarshal_json_response.py: id: c037caf2daa6 last_write_checksum: sha1:a2c0a433f1d541eed7985d3c3cc043e9b7731cdb @@ -2048,8 +2585,8 @@ trackedFiles: pristine_git_object: dae01a44384ac3bc13ae07453a053bf6c898ebe3 src/ragie/webhook_endpoints.py: id: 61e4ee5f0cdb - last_write_checksum: sha1:6bdcd937e993e04018410992acd59f64ef5f88db - pristine_git_object: 4f4568dc1abbff9b6514812e30dff44c0fd59b07 + last_write_checksum: sha1:cb77df2acd1bc9217e92f5f613df79b4ed22d302 + pristine_git_object: b085ed7f3c28083b371ec3a0dd30e4553c574aa3 examples: CreateDocument: speakeasy-default-create-document: @@ -2347,10 +2884,10 @@ examples: CreateInstruction: speakeasy-default-create-instruction: requestBody: - application/json: {"name": "Find all pizzas", "active": true, "scope": "document", "prompt": "Find all pizzas described in the text.", "entity_schema": {"key": "", "key1": ""}, "filter": {"toppings": {"$in": ["pizza", "mushrooms"]}}, "partition": ""} + application/json: {"name": "Find all pizzas", "active": true, "scope": "document", "prompt": "Find all pizzas described in the text.", "context_template": "Document: {{document.name}} {{document.metadata.key_foo}}", "entity_schema": {"key": "", "key1": ""}, "filter": {"toppings": {"$in": ["pizza", "mushrooms"]}}, "partition": ""} responses: "200": - application/json: {"id": "4af7393d-fac3-4962-bb45-25db73b70699", "created_at": "2025-10-01T12:16:29.015Z", "updated_at": "2024-09-12T03:28:32.551Z", "name": "Find all pizzas", "active": true, "scope": "document", "prompt": "Find all pizzas described in the text.", "entity_schema": {"key": "", "key1": ""}, "filter": {"toppings": {"$in": ["pizza", "mushrooms"]}}, "partition": ""} + application/json: {"id": "4af7393d-fac3-4962-bb45-25db73b70699", "created_at": "2025-10-01T12:16:29.015Z", "updated_at": "2024-09-12T03:28:32.551Z", "name": "Find all pizzas", "active": true, "scope": "document", "prompt": "Find all pizzas described in the text.", "context_template": "Document: {{document.name}} {{document.metadata.key_foo}}", "entity_schema": {"key": "", "key1": ""}, "filter": {"toppings": {"$in": ["pizza", "mushrooms"]}}, "partition": ""} "422": application/json: {} "401": @@ -2644,7 +3181,7 @@ examples: CreateConnection: speakeasy-default-create-connection: requestBody: - application/json: {"partition_strategy": {}, "page_limit": null, "config": null, "connection": {"provider": "gcs", "data": {"bucket": "", "import_file_metadata": false}, "credentials": {"key": "", "key1": ""}}} + application/json: {"partition_strategy": {}, "page_limit": null, "connection": {"provider": "gcs", "data": {"bucket": "", "import_file_metadata": false}, "credentials": {"key": "", "key1": ""}}} responses: "201": application/json: {"id": "da70984e-94d6-41d3-8e1f-f5b07380320f", "created_at": "2025-09-01T08:43:13.460Z", "updated_at": "2025-01-25T11:55:52.101Z", "metadata": {}, "type": "", "name": "", "source": {"key": "", "key1": ""}, "enabled": false, "disabled_by_system_reason": "authentication_failed", "page_limit": 278994, "disabled_by_system": false} @@ -2687,7 +3224,7 @@ examples: path: authenticator_id: "84b0792c-1330-4854-b4f2-5d9c7bf9a385" requestBody: - application/json: {"partition_strategy": {}, "page_limit": null, "config": null, "connection": {"provider": "dropbox", "data": {"folder_id": "", "folder_name": ""}, "email": "Aliyah_Feest59@yahoo.com", "credentials": {"refresh_token": ""}}} + application/json: {"partition_strategy": {}, "page_limit": null, "connection": {"provider": "dropbox", "data": {"folder_id": "", "folder_name": ""}, "email": "Aliyah_Feest59@yahoo.com", "credentials": {"refresh_token": ""}}} responses: "201": application/json: {"id": "b8fdca74-a155-4691-a241-f52935516d24", "created_at": "2024-10-12T00:52:42.659Z", "updated_at": "2024-03-31T18:08:45.116Z", "metadata": {"key": true}, "type": "", "name": "", "source": ["", ""], "enabled": true, "disabled_by_system_reason": "connection_over_total_page_limit", "page_limit": 115226, "disabled_by_system": false} @@ -2774,7 +3311,7 @@ examples: application/json: {"name": "", "url": "https://crazy-birth.name"} responses: "201": - application/json: {"id": "eb083a2b-5791-4b88-96e1-b294238d3152", "created_at": "2026-08-26T05:46:20.116Z", "updated_at": "2024-04-28T21:10:08.943Z", "name": "", "url": "https://big-tomatillo.name/", "partition_pattern": "", "active": true} + application/json: {"id": "eb083a2b-5791-4b88-96e1-b294238d3152", "created_at": "2026-08-26T05:46:20.116Z", "updated_at": "2024-04-28T21:10:08.943Z", "name": "", "url": "https://big-tomatillo.name/", "partition_pattern": "", "active": true, "secret": ""} "422": application/json: {} "401": @@ -2788,7 +3325,7 @@ examples: endpoint_id: "b2685048-407b-4461-ba68-ae1653b337f9" responses: "200": - application/json: {"id": "40a280c0-beda-4db7-b2d8-bbd7e7d59572", "created_at": "2026-04-26T14:41:48.179Z", "updated_at": "2024-01-10T00:29:05.466Z", "name": "", "url": "https://lighthearted-reservation.org/", "partition_pattern": null, "active": true} + application/json: {"id": "40a280c0-beda-4db7-b2d8-bbd7e7d59572", "created_at": "2026-04-26T14:41:48.179Z", "updated_at": "2024-01-10T00:29:05.466Z", "name": "", "url": "https://lighthearted-reservation.org/", "partition_pattern": null, "active": true, "secret": ""} "422": application/json: {} "401": @@ -2804,7 +3341,7 @@ examples: application/json: {} responses: "200": - application/json: {"id": "531bf800-3bcc-4f2b-94aa-a0f3d227100b", "created_at": "2024-01-07T09:31:05.674Z", "updated_at": "2024-03-19T13:51:42.032Z", "name": "", "url": "https://sticky-plugin.name/", "partition_pattern": "", "active": false} + application/json: {"id": "531bf800-3bcc-4f2b-94aa-a0f3d227100b", "created_at": "2024-01-07T09:31:05.674Z", "updated_at": "2024-03-19T13:51:42.032Z", "name": "", "url": "https://sticky-plugin.name/", "partition_pattern": "", "active": false, "secret": ""} "422": application/json: {} "401": @@ -2825,9 +3362,75 @@ examples: application/json: {"detail": ""} "500": application/json: {"detail": ""} + PatchInstruction: + speakeasy-default-patch-instruction: + parameters: + path: + instruction_id: "00000000-0000-0000-0000-000000000000" + requestBody: + application/json: {"name": "Find all pizzas", "active": true, "scope": "document", "prompt": "Find all pizzas described in the text.", "context_template": "Document: {{document.name}} {{document.metadata.key_foo}}", "filter": {"toppings": {"$in": ["pizza", "mushrooms"]}}} + responses: + "200": + application/json: {"id": "524b721c-3792-4a6b-9f9c-15825cea919d", "created_at": "2026-03-23T16:52:51.241Z", "updated_at": "2026-06-14T12:56:39.320Z", "name": "Find all pizzas", "active": true, "scope": "document", "prompt": "Find all pizzas described in the text.", "context_template": "Document: {{document.name}} {{document.metadata.key_foo}}", "entity_schema": {}, "filter": {"toppings": {"$in": ["pizza", "mushrooms"]}}, "partition": ""} + "422": + application/json: {} + "401": + application/json: {"detail": ""} + "500": + application/json: {"detail": ""} + ListInstructionEntityExtractionLogs: + speakeasy-default-list-instruction-entity-extraction-logs: + parameters: + path: + instruction_id: "00000000-0000-0000-0000-000000000000" + query: + page_size: 10 + header: + partition: "acme_customer_id" + responses: + "200": + application/json: {"pagination": {"total_count": 812439}, "logs": [{"id": "21bb285a-2e5a-46b7-818c-43b84aa2f5e0", "created_at": "2026-06-09T12:13:23.524Z", "updated_at": "2025-03-21T10:04:34.777Z", "instruction_id": "17a96263-6d31-4863-ba12-bf5381a1afb5", "document_id": "a9cbd6c9-daa2-46e9-9f60-99e09fe5c423", "scope": "document", "status": "error", "page_count": 3815.84}]} + "422": + application/json: {} + "401": + application/json: {"detail": ""} + "500": + application/json: {"detail": ""} + list_elements: + speakeasy-default-list-elements: + parameters: + path: + document_id: "269a3615-37c3-4b93-9a7c-9fa027d282c1" + query: + page_size: 10 + header: + partition: "acme_customer_id" + responses: + "200": + application/json: {"pagination": {"total_count": 947428}, "document_elements": [{"id": "2b484bae-844c-46a8-b50c-ff91e78316b1", "created_at": "2025-08-21T14:47:59.982Z", "index": 462089, "metadata": {"key": "", "key1": ""}, "type": "FigureCaption", "text": "", "markdown": "", "data": {"type": "FigureCaption", "content": ""}}]} + "422": + application/json: {} + "401": + application/json: {"detail": ""} + "500": + application/json: {"detail": ""} + get_element: + speakeasy-default-get-element: + parameters: + path: + element_id: "d255ee42-ddef-408f-9700-686a6c8fed3c" + responses: + "200": + application/json: {"id": "cf13db19-1f33-4ea6-ab60-5ddc09e1c59d", "created_at": "2025-03-04T19:41:23.710Z", "index": 238266, "metadata": {"key": ""}, "type": "Caption", "text": "", "markdown": "", "data": {"type": "Watermark", "content": ""}} + "422": + application/json: {} + "401": + application/json: {"detail": ""} + "500": + application/json: {"detail": ""} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Python SDK Changes:\n* `ragie.authenticators.create_authenticator_connection()`: \n * `request.create_authenticator_connection.connection.[sharepoint].data` **Changed** **Breaking** :warning:\n* `ragie.webhook_endpoints.list()`: **Added**\n* `ragie.webhook_endpoints.create()`: **Added**\n* `ragie.webhook_endpoints.get()`: **Added**\n* `ragie.webhook_endpoints.update()`: **Added**\n* `ragie.webhook_endpoints.delete()`: **Added**\n" +releaseNotes: "## Python SDK Changes:\n* `ragie.entities.update_instruction()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.context_template` **Added**\n* `ragie.entities.create_instruction()`: \n * `request.context_template` **Added**\n * `response.context_template` **Added**\n* `ragie.entities.list_by_instruction()`: `response.entities[]` **Changed**\n* `ragie.elements.get()`: **Added**\n* `ragie.entities.delete()`: **Removed** (Breaking ⚠️)\n* `ragie.documents.create()`: \n * `request.workflow` **Added**\n* `ragie.documents.create_raw()`: \n * `request.workflow` **Added**\n* `ragie.documents.create_document_from_url()`: `request` **Changed**\n* `ragie.documents.update_document_from_url()`: \n * `request.update_document_from_url_params.mode` **Changed**\n* `ragie.entities.list_instructions()`: `response.[].context_template` **Added**\n* `ragie.entities.delete_instruction()`: **Added**\n* `ragie.elements.list()`: **Added**\n* `ragie.entities.list_by_document()`: `response.entities[]` **Changed**\n* `ragie.entities.list_extraction_logs()`: **Added**\n* `ragie.connections.create_connection()`: `request` **Changed**\n* `ragie.connections.create_o_auth_redirect_url()`: `request` **Changed**\n* `ragie.connections.update()`: \n * `request.connection_base.partition_strategy` **Changed**\n* `ragie.webhook_endpoints.list()`: `response.webhook_endpoints[].secret` **Added**\n* `ragie.webhook_endpoints.create()`: `response.secret` **Added**\n* `ragie.webhook_endpoints.get()`: `response.secret` **Added**\n* `ragie.webhook_endpoints.update()`: `response.secret` **Added**\n* `ragie.authenticators.create_authenticator_connection()`: `request.create_authenticator_connection` **Changed**\n" generatedFiles: - .devcontainer/README.md - .devcontainer/devcontainer.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index d208d80..f2f2802 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -16,6 +16,8 @@ generation: requestResponseComponentNamesFeb2024: true securityFeb2025: false sharedErrorComponentsApr2025: false + sharedNestedComponentsJan2026: false + nameOverrideFeb2026: false auth: oAuth2ClientCredentialsEnabled: false oAuth2PasswordEnabled: false @@ -23,13 +25,14 @@ generation: schemas: allOfMergeStrategy: shallowMerge requestBodyFieldName: "" + versioningStrategy: automatic persistentEdits: {} tests: generateTests: true generateNewTests: false skipResponseBodyAssertions: false python: - version: 1.15.1 + version: 2.0.0 additionalDependencies: dev: {} main: {} @@ -47,10 +50,14 @@ python: enableCustomCodeRegions: false enumFormat: enum fixFlags: + asyncPaginationSep2025: false + conflictResistantModelImportsFeb2026: false responseRequiredSep2024: false flattenGlobalSecurity: true flattenRequests: false flatteningOrder: parameters-first + forwardCompatibleEnumsByDefault: false + forwardCompatibleUnionsByDefault: "false" imports: option: openapi paths: @@ -76,3 +83,4 @@ python: responseFormat: flat sseFlatResponse: false templateVersion: v2 + useAsyncHooks: false diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 94d6699..1238a6d 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,20 @@ -speakeasyVersion: 1.682.0 +speakeasyVersion: 1.759.0 sources: Ragie-OAS: sourceNamespace: ragie-oas - sourceRevisionDigest: sha256:bbff923159484b6f5a7027ee8c16c13a60ce2d9e9f523603fcba9243d1b38da7 - sourceBlobDigest: sha256:e781f18c8b4e50249a130e038774b0f9e647fa416eb773f6d638506da7b70f14 + sourceRevisionDigest: sha256:b4fa8a2926ef89a1e5d4bfd5ce23080bb68a90ce41ac35e187403ff570e6cb70 + sourceBlobDigest: sha256:5eefb8f3cc49bdb8aacee55e3c1e7ee7b379d5d953b2637ab7785194dd974844 tags: - latest - - speakeasy-sdk-regen-1765152535 - 1.0.0 targets: ragie: source: Ragie-OAS sourceNamespace: ragie-oas - sourceRevisionDigest: sha256:bbff923159484b6f5a7027ee8c16c13a60ce2d9e9f523603fcba9243d1b38da7 - sourceBlobDigest: sha256:e781f18c8b4e50249a130e038774b0f9e647fa416eb773f6d638506da7b70f14 + sourceRevisionDigest: sha256:b4fa8a2926ef89a1e5d4bfd5ce23080bb68a90ce41ac35e187403ff570e6cb70 + sourceBlobDigest: sha256:5eefb8f3cc49bdb8aacee55e3c1e7ee7b379d5d953b2637ab7785194dd974844 codeSamplesNamespace: ragie-oas-python-code-samples - codeSamplesRevisionDigest: sha256:cb4c40794dfa72db1e2fca9d89f1a2f529ec8379fd12a0d7525ebabf3bee82f7 + codeSamplesRevisionDigest: sha256:bc1ae2a7ecb87d0d74fca268f080f4693d65dc4fa549a5915a17831221bceb53 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README-PYPI.md b/README-PYPI.md index eddccbf..a41f67b 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -84,7 +84,7 @@ It's also possible to write a standalone Python script without needing to set up ```python #!/usr/bin/env -S uv run --script # /// script -# requires-python = ">=3.9" +# requires-python = ">=3.10" # dependencies = [ # "ragie", # ] @@ -181,7 +181,6 @@ with Ragie( res = r_client.connections.create_connection(request=ragie.PublicCreateConnection( partition_strategy=ragie.MediaModeParam(), page_limit=None, - config=None, connection=ragie.PublicGCSConnection( data=ragie.BucketData( bucket="", @@ -217,7 +216,6 @@ async def main(): res = await r_client.connections.create_connection_async(request=ragie.PublicCreateConnection( partition_strategy=ragie.MediaModeParam(), page_limit=None, - config=None, connection=ragie.PublicGCSConnection( data=ragie.BucketData( bucket="", @@ -303,7 +301,6 @@ with Ragie( res = r_client.authenticators.create_authenticator_connection(authenticator_id="84b0792c-1330-4854-b4f2-5d9c7bf9a385", create_authenticator_connection=ragie.CreateAuthenticatorConnection( partition_strategy=ragie.MediaModeParam(), page_limit=None, - config=None, connection=ragie.AuthenticatorDropboxConnection( data=ragie.FolderData( folder_id="", @@ -339,7 +336,6 @@ async def main(): res = await r_client.authenticators.create_authenticator_connection_async(authenticator_id="84b0792c-1330-4854-b4f2-5d9c7bf9a385", create_authenticator_connection=ragie.CreateAuthenticatorConnection( partition_strategy=ragie.MediaModeParam(), page_limit=None, - config=None, connection=ragie.AuthenticatorDropboxConnection( data=ragie.FolderData( folder_id="", @@ -367,8 +363,8 @@ asyncio.run(main()) ### [Authenticators](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/authenticators/README.md) -* [create](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/authenticators/README.md#create) - Create Authenticator * [list](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/authenticators/README.md#list) - List Authenticators +* [create](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/authenticators/README.md#create) - Create Authenticator * [create_authenticator_connection](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/authenticators/README.md#create_authenticator_connection) - Create Authenticator Connection * [delete_authenticator_connection](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/authenticators/README.md#delete_authenticator_connection) - Delete Authenticator @@ -379,8 +375,8 @@ asyncio.run(main()) * [create_o_auth_redirect_url](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/connections/README.md#create_o_auth_redirect_url) - Create Oauth Redirect Url * [list_connection_source_types](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/connections/README.md#list_connection_source_types) - List Connection Source Types * [set_enabled](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/connections/README.md#set_enabled) - Set Connection Enabled -* [update](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/connections/README.md#update) - Update Connection * [get](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/connections/README.md#get) - Get Connection +* [update](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/connections/README.md#update) - Update Connection * [get_stats](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/connections/README.md#get_stats) - Get Connection Stats * [set_limits](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/connections/README.md#set_limits) - Set Connection Limits * [delete](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/connections/README.md#delete) - Delete Connection @@ -388,8 +384,8 @@ asyncio.run(main()) ### [Documents](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/documents/README.md) -* [create](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/documents/README.md#create) - Create Document * [list](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/documents/README.md#list) - List Documents +* [create](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/documents/README.md#create) - Create Document * [create_raw](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/documents/README.md#create_raw) - Create Document Raw * [create_document_from_url](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/documents/README.md#create_document_from_url) - Create Document From Url * [get](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/documents/README.md#get) - Get Document @@ -405,13 +401,19 @@ asyncio.run(main()) * [get_source](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/documents/README.md#get_source) - Get Document Source * [get_summary](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/documents/README.md#get_summary) - Get Document Summary +### [Elements](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/elements/README.md) + +* [list](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/elements/README.md#list) - List Elements For Document +* [get](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/elements/README.md#get) - Get Element For Document + ### [Entities](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/entities/README.md) * [list_instructions](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/entities/README.md#list_instructions) - List Instructions * [create_instruction](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/entities/README.md#create_instruction) - Create Instruction -* [update_instruction](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/entities/README.md#update_instruction) - Update Instruction -* [delete](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/entities/README.md#delete) - Delete Instruction +* [delete_instruction](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/entities/README.md#delete_instruction) - Delete Instruction +* [update_instruction](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/entities/README.md#update_instruction) - Patch Instruction * [list_by_instruction](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/entities/README.md#list_by_instruction) - Get Instruction Extracted Entities +* [list_extraction_logs](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/entities/README.md#list_extraction_logs) - Get Instruction Entity Extraction Logs * [list_by_document](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/entities/README.md#list_by_document) - Get Document Extracted Entities ### [Partitions](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/partitions/README.md) @@ -419,8 +421,8 @@ asyncio.run(main()) * [list](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/partitions/README.md#list) - List Partitions * [create](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/partitions/README.md#create) - Create Partition * [get](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/partitions/README.md#get) - Get Partition -* [update](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/partitions/README.md#update) - Update Partition * [delete](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/partitions/README.md#delete) - Delete Partition +* [update](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/partitions/README.md#update) - Update Partition * [set_limits](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/partitions/README.md#set_limits) - Set Partition Limits ### [Responses](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/responses/README.md) @@ -437,8 +439,8 @@ asyncio.run(main()) * [list](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/webhookendpoints/README.md#list) - List Webhook Endpoints * [create](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/webhookendpoints/README.md#create) - Create Webhook Endpoint * [get](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/webhookendpoints/README.md#get) - Get Webhook Endpoint -* [update](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/webhookendpoints/README.md#update) - Update Webhook Endpoint * [delete](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/webhookendpoints/README.md#delete) - Delete Webhook Endpoint +* [update](https://github.com/ragieai/ragie-python/blob/master/docs/sdks/webhookendpoints/README.md#update) - Update Webhook Endpoint @@ -518,16 +520,16 @@ with Ragie( auth="", ) as r_client: - res = r_client.documents.create(request={ - "file": { - "file_name": "example.file", - "content": open("example.file", "rb"), - }, + res = r_client.documents.list(request={ + "filter_": "{\"department\":{\"$in\":[\"sales\",\"marketing\"]}}", + "partition": "acme_customer_id", }, RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False)) - # Handle response - print(res) + while res is not None: + # Handle items + + res = res.next() ``` @@ -542,15 +544,15 @@ with Ragie( auth="", ) as r_client: - res = r_client.documents.create(request={ - "file": { - "file_name": "example.file", - "content": open("example.file", "rb"), - }, + res = r_client.documents.list(request={ + "filter_": "{\"department\":{\"$in\":[\"sales\",\"marketing\"]}}", + "partition": "acme_customer_id", }) - # Handle response - print(res) + while res is not None: + # Handle items + + res = res.next() ``` @@ -581,15 +583,15 @@ with Ragie( res = None try: - res = r_client.documents.create(request={ - "file": { - "file_name": "example.file", - "content": open("example.file", "rb"), - }, + res = r_client.documents.list(request={ + "filter_": "{\"department\":{\"$in\":[\"sales\",\"marketing\"]}}", + "partition": "acme_customer_id", }) - # Handle response - print(res) + while res is not None: + # Handle items + + res = res.next() except models.RagieError as e: @@ -644,15 +646,15 @@ with Ragie( auth="", ) as r_client: - res = r_client.documents.create(request={ - "file": { - "file_name": "example.file", - "content": open("example.file", "rb"), - }, + res = r_client.documents.list(request={ + "filter_": "{\"department\":{\"$in\":[\"sales\",\"marketing\"]}}", + "partition": "acme_customer_id", }) - # Handle response - print(res) + while res is not None: + # Handle items + + res = res.next() ``` @@ -758,15 +760,15 @@ with Ragie( auth="", ) as r_client: - res = r_client.documents.create(request={ - "file": { - "file_name": "example.file", - "content": open("example.file", "rb"), - }, + res = r_client.documents.list(request={ + "filter_": "{\"department\":{\"$in\":[\"sales\",\"marketing\"]}}", + "partition": "acme_customer_id", }) - # Handle response - print(res) + while res is not None: + # Handle items + + res = res.next() ``` diff --git a/README.md b/README.md index 33b6a17..5692e0b 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ It's also possible to write a standalone Python script without needing to set up ```python #!/usr/bin/env -S uv run --script # /// script -# requires-python = ">=3.9" +# requires-python = ">=3.10" # dependencies = [ # "ragie", # ] @@ -181,7 +181,6 @@ with Ragie( res = r_client.connections.create_connection(request=ragie.PublicCreateConnection( partition_strategy=ragie.MediaModeParam(), page_limit=None, - config=None, connection=ragie.PublicGCSConnection( data=ragie.BucketData( bucket="", @@ -217,7 +216,6 @@ async def main(): res = await r_client.connections.create_connection_async(request=ragie.PublicCreateConnection( partition_strategy=ragie.MediaModeParam(), page_limit=None, - config=None, connection=ragie.PublicGCSConnection( data=ragie.BucketData( bucket="", @@ -303,7 +301,6 @@ with Ragie( res = r_client.authenticators.create_authenticator_connection(authenticator_id="84b0792c-1330-4854-b4f2-5d9c7bf9a385", create_authenticator_connection=ragie.CreateAuthenticatorConnection( partition_strategy=ragie.MediaModeParam(), page_limit=None, - config=None, connection=ragie.AuthenticatorDropboxConnection( data=ragie.FolderData( folder_id="", @@ -339,7 +336,6 @@ async def main(): res = await r_client.authenticators.create_authenticator_connection_async(authenticator_id="84b0792c-1330-4854-b4f2-5d9c7bf9a385", create_authenticator_connection=ragie.CreateAuthenticatorConnection( partition_strategy=ragie.MediaModeParam(), page_limit=None, - config=None, connection=ragie.AuthenticatorDropboxConnection( data=ragie.FolderData( folder_id="", @@ -367,8 +363,8 @@ asyncio.run(main()) ### [Authenticators](docs/sdks/authenticators/README.md) -* [create](docs/sdks/authenticators/README.md#create) - Create Authenticator * [list](docs/sdks/authenticators/README.md#list) - List Authenticators +* [create](docs/sdks/authenticators/README.md#create) - Create Authenticator * [create_authenticator_connection](docs/sdks/authenticators/README.md#create_authenticator_connection) - Create Authenticator Connection * [delete_authenticator_connection](docs/sdks/authenticators/README.md#delete_authenticator_connection) - Delete Authenticator @@ -379,8 +375,8 @@ asyncio.run(main()) * [create_o_auth_redirect_url](docs/sdks/connections/README.md#create_o_auth_redirect_url) - Create Oauth Redirect Url * [list_connection_source_types](docs/sdks/connections/README.md#list_connection_source_types) - List Connection Source Types * [set_enabled](docs/sdks/connections/README.md#set_enabled) - Set Connection Enabled -* [update](docs/sdks/connections/README.md#update) - Update Connection * [get](docs/sdks/connections/README.md#get) - Get Connection +* [update](docs/sdks/connections/README.md#update) - Update Connection * [get_stats](docs/sdks/connections/README.md#get_stats) - Get Connection Stats * [set_limits](docs/sdks/connections/README.md#set_limits) - Set Connection Limits * [delete](docs/sdks/connections/README.md#delete) - Delete Connection @@ -388,8 +384,8 @@ asyncio.run(main()) ### [Documents](docs/sdks/documents/README.md) -* [create](docs/sdks/documents/README.md#create) - Create Document * [list](docs/sdks/documents/README.md#list) - List Documents +* [create](docs/sdks/documents/README.md#create) - Create Document * [create_raw](docs/sdks/documents/README.md#create_raw) - Create Document Raw * [create_document_from_url](docs/sdks/documents/README.md#create_document_from_url) - Create Document From Url * [get](docs/sdks/documents/README.md#get) - Get Document @@ -405,13 +401,19 @@ asyncio.run(main()) * [get_source](docs/sdks/documents/README.md#get_source) - Get Document Source * [get_summary](docs/sdks/documents/README.md#get_summary) - Get Document Summary +### [Elements](docs/sdks/elements/README.md) + +* [list](docs/sdks/elements/README.md#list) - List Elements For Document +* [get](docs/sdks/elements/README.md#get) - Get Element For Document + ### [Entities](docs/sdks/entities/README.md) * [list_instructions](docs/sdks/entities/README.md#list_instructions) - List Instructions * [create_instruction](docs/sdks/entities/README.md#create_instruction) - Create Instruction -* [update_instruction](docs/sdks/entities/README.md#update_instruction) - Update Instruction -* [delete](docs/sdks/entities/README.md#delete) - Delete Instruction +* [delete_instruction](docs/sdks/entities/README.md#delete_instruction) - Delete Instruction +* [update_instruction](docs/sdks/entities/README.md#update_instruction) - Patch Instruction * [list_by_instruction](docs/sdks/entities/README.md#list_by_instruction) - Get Instruction Extracted Entities +* [list_extraction_logs](docs/sdks/entities/README.md#list_extraction_logs) - Get Instruction Entity Extraction Logs * [list_by_document](docs/sdks/entities/README.md#list_by_document) - Get Document Extracted Entities ### [Partitions](docs/sdks/partitions/README.md) @@ -419,8 +421,8 @@ asyncio.run(main()) * [list](docs/sdks/partitions/README.md#list) - List Partitions * [create](docs/sdks/partitions/README.md#create) - Create Partition * [get](docs/sdks/partitions/README.md#get) - Get Partition -* [update](docs/sdks/partitions/README.md#update) - Update Partition * [delete](docs/sdks/partitions/README.md#delete) - Delete Partition +* [update](docs/sdks/partitions/README.md#update) - Update Partition * [set_limits](docs/sdks/partitions/README.md#set_limits) - Set Partition Limits ### [Responses](docs/sdks/responses/README.md) @@ -437,8 +439,8 @@ asyncio.run(main()) * [list](docs/sdks/webhookendpoints/README.md#list) - List Webhook Endpoints * [create](docs/sdks/webhookendpoints/README.md#create) - Create Webhook Endpoint * [get](docs/sdks/webhookendpoints/README.md#get) - Get Webhook Endpoint -* [update](docs/sdks/webhookendpoints/README.md#update) - Update Webhook Endpoint * [delete](docs/sdks/webhookendpoints/README.md#delete) - Delete Webhook Endpoint +* [update](docs/sdks/webhookendpoints/README.md#update) - Update Webhook Endpoint @@ -518,16 +520,16 @@ with Ragie( auth="", ) as r_client: - res = r_client.documents.create(request={ - "file": { - "file_name": "example.file", - "content": open("example.file", "rb"), - }, + res = r_client.documents.list(request={ + "filter_": "{\"department\":{\"$in\":[\"sales\",\"marketing\"]}}", + "partition": "acme_customer_id", }, RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False)) - # Handle response - print(res) + while res is not None: + # Handle items + + res = res.next() ``` @@ -542,15 +544,15 @@ with Ragie( auth="", ) as r_client: - res = r_client.documents.create(request={ - "file": { - "file_name": "example.file", - "content": open("example.file", "rb"), - }, + res = r_client.documents.list(request={ + "filter_": "{\"department\":{\"$in\":[\"sales\",\"marketing\"]}}", + "partition": "acme_customer_id", }) - # Handle response - print(res) + while res is not None: + # Handle items + + res = res.next() ``` @@ -581,15 +583,15 @@ with Ragie( res = None try: - res = r_client.documents.create(request={ - "file": { - "file_name": "example.file", - "content": open("example.file", "rb"), - }, + res = r_client.documents.list(request={ + "filter_": "{\"department\":{\"$in\":[\"sales\",\"marketing\"]}}", + "partition": "acme_customer_id", }) - # Handle response - print(res) + while res is not None: + # Handle items + + res = res.next() except models.RagieError as e: @@ -644,15 +646,15 @@ with Ragie( auth="", ) as r_client: - res = r_client.documents.create(request={ - "file": { - "file_name": "example.file", - "content": open("example.file", "rb"), - }, + res = r_client.documents.list(request={ + "filter_": "{\"department\":{\"$in\":[\"sales\",\"marketing\"]}}", + "partition": "acme_customer_id", }) - # Handle response - print(res) + while res is not None: + # Handle items + + res = res.next() ``` @@ -758,15 +760,15 @@ with Ragie( auth="", ) as r_client: - res = r_client.documents.create(request={ - "file": { - "file_name": "example.file", - "content": open("example.file", "rb"), - }, + res = r_client.documents.list(request={ + "filter_": "{\"department\":{\"$in\":[\"sales\",\"marketing\"]}}", + "partition": "acme_customer_id", }) - # Handle response - print(res) + while res is not None: + # Handle items + + res = res.next() ``` diff --git a/RELEASES.md b/RELEASES.md index 5a7165f..8909070 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -278,4 +278,14 @@ Based on: ### Generated - [python v1.15.1] . ### Releases -- [PyPI v1.15.1] https://pypi.org/project/ragie/1.15.1 - . \ No newline at end of file +- [PyPI v1.15.1] https://pypi.org/project/ragie/1.15.1 - . + +## 2026-03-22 00:12:00 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.759.0 (2.869.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.0.0] . +### Releases +- [PyPI v2.0.0] https://pypi.org/project/ragie/2.0.0 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index e62e485..2f4049f 100644 --- a/USAGE.md +++ b/USAGE.md @@ -60,7 +60,6 @@ with Ragie( res = r_client.connections.create_connection(request=ragie.PublicCreateConnection( partition_strategy=ragie.MediaModeParam(), page_limit=None, - config=None, connection=ragie.PublicGCSConnection( data=ragie.BucketData( bucket="", @@ -96,7 +95,6 @@ async def main(): res = await r_client.connections.create_connection_async(request=ragie.PublicCreateConnection( partition_strategy=ragie.MediaModeParam(), page_limit=None, - config=None, connection=ragie.PublicGCSConnection( data=ragie.BucketData( bucket="", @@ -178,7 +176,6 @@ with Ragie( res = r_client.authenticators.create_authenticator_connection(authenticator_id="84b0792c-1330-4854-b4f2-5d9c7bf9a385", create_authenticator_connection=ragie.CreateAuthenticatorConnection( partition_strategy=ragie.MediaModeParam(), page_limit=None, - config=None, connection=ragie.AuthenticatorDropboxConnection( data=ragie.FolderData( folder_id="", @@ -214,7 +211,6 @@ async def main(): res = await r_client.authenticators.create_authenticator_connection_async(authenticator_id="84b0792c-1330-4854-b4f2-5d9c7bf9a385", create_authenticator_connection=ragie.CreateAuthenticatorConnection( partition_strategy=ragie.MediaModeParam(), page_limit=None, - config=None, connection=ragie.AuthenticatorDropboxConnection( data=ragie.FolderData( folder_id="", diff --git a/docs/models/address.md b/docs/models/address.md new file mode 100644 index 0000000..a6e0e16 --- /dev/null +++ b/docs/models/address.md @@ -0,0 +1,9 @@ +# Address + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `type` | *Optional[Literal["Address"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The text content | \ No newline at end of file diff --git a/docs/models/apidocumentelement.md b/docs/models/apidocumentelement.md new file mode 100644 index 0000000..b40fd69 --- /dev/null +++ b/docs/models/apidocumentelement.md @@ -0,0 +1,16 @@ +# APIDocumentElement + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `index` | *int* | :heavy_check_mark: | N/A | +| `metadata` | Dict[str, *Any*] | :heavy_check_mark: | N/A | +| `type` | [models.DocumentElementType](../models/documentelementtype.md) | :heavy_check_mark: | N/A | +| `text` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `markdown` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `location` | [OptionalNullable[models.Location]](../models/location.md) | :heavy_minus_sign: | N/A | +| `data` | [models.APIElement](../models/apielement.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/apielement.md b/docs/models/apielement.md new file mode 100644 index 0000000..50d5519 --- /dev/null +++ b/docs/models/apielement.md @@ -0,0 +1,263 @@ +# APIElement + + +## Supported Types + +### `models.Text` + +```python +value: models.Text = /* values here */ +``` + +### `models.Header` + +```python +value: models.Header = /* values here */ +``` + +### `models.SubHeader` + +```python +value: models.SubHeader = /* values here */ +``` + +### `models.Footer` + +```python +value: models.Footer = /* values here */ +``` + +### `models.Title` + +```python +value: models.Title = /* values here */ +``` + +### `models.SectionHeader` + +```python +value: models.SectionHeader = /* values here */ +``` + +### `models.FigureCaption` + +```python +value: models.FigureCaption = /* values here */ +``` + +### `models.Address` + +```python +value: models.Address = /* values here */ +``` + +### `models.Author` + +```python +value: models.Author = /* values here */ +``` + +### `models.EmailAddress` + +```python +value: models.EmailAddress = /* values here */ +``` + +### `models.CalendarDate` + +```python +value: models.CalendarDate = /* values here */ +``` + +### `models.Formula` + +```python +value: models.Formula = /* values here */ +``` + +### `models.JSON` + +```python +value: models.JSON = /* values here */ +``` + +### `models.Quote` + +```python +value: models.Quote = /* values here */ +``` + +### `models.Comment` + +```python +value: models.Comment = /* values here */ +``` + +### `models.UnorderedList` + +```python +value: models.UnorderedList = /* values here */ +``` + +### `models.OrderedList` + +```python +value: models.OrderedList = /* values here */ +``` + +### `models.DefinitionList` + +```python +value: models.DefinitionList = /* values here */ +``` + +### `models.Table` + +```python +value: models.Table = /* values here */ +``` + +### `models.Figure` + +```python +value: models.Figure = /* values here */ +``` + +### `models.Stamp` + +```python +value: models.Stamp = /* values here */ +``` + +### `models.Logo` + +```python +value: models.Logo = /* values here */ +``` + +### `models.Watermark` + +```python +value: models.Watermark = /* values here */ +``` + +### `models.Barcode` + +```python +value: models.Barcode = /* values here */ +``` + +### `models.QRCode` + +```python +value: models.QRCode = /* values here */ +``` + +### `models.Signature` + +```python +value: models.Signature = /* values here */ +``` + +### `models.KeyValue` + +```python +value: models.KeyValue = /* values here */ +``` + +### `models.FormField` + +```python +value: models.FormField = /* values here */ +``` + +### `models.Code` + +```python +value: models.Code = /* values here */ +``` + +### `models.Bibliography` + +```python +value: models.Bibliography = /* values here */ +``` + +### `models.TableOfContents` + +```python +value: models.TableOfContents = /* values here */ +``` + +### `models.Footnote` + +```python +value: models.Footnote = /* values here */ +``` + +### `models.Time` + +```python +value: models.Time = /* values here */ +``` + +### `models.Button` + +```python +value: models.Button = /* values here */ +``` + +### `models.Video` + +```python +value: models.Video = /* values here */ +``` + +### `models.AudioTranscriptionSegment` + +```python +value: models.AudioTranscriptionSegment = /* values here */ +``` + +### `models.Caption` + +```python +value: models.Caption = /* values here */ +``` + +### `models.Image` + +```python +value: models.Image = /* values here */ +``` + +### `models.ListItem` + +```python +value: models.ListItem = /* values here */ +``` + +### `models.NarrativeText` + +```python +value: models.NarrativeText = /* values here */ +``` + +### `models.PageBreak` + +```python +value: models.PageBreak = /* values here */ +``` + +### `models.UncategorizedText` + +```python +value: models.UncategorizedText = /* values here */ +``` + +### `models.VideoSegment` + +```python +value: models.VideoSegment = /* values here */ +``` + diff --git a/docs/models/audiotranscriptionsegment.md b/docs/models/audiotranscriptionsegment.md new file mode 100644 index 0000000..3098e7b --- /dev/null +++ b/docs/models/audiotranscriptionsegment.md @@ -0,0 +1,9 @@ +# AudioTranscriptionSegment + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `content` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `modality_data` | List[[models.WordModality](../models/wordmodality.md)] | :heavy_check_mark: | A list of information per word that shows the word, start time, and end time | \ No newline at end of file diff --git a/docs/models/author.md b/docs/models/author.md new file mode 100644 index 0000000..238e6ac --- /dev/null +++ b/docs/models/author.md @@ -0,0 +1,9 @@ +# Author + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `type` | *Optional[Literal["Author"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The text content | \ No newline at end of file diff --git a/docs/models/barcode.md b/docs/models/barcode.md new file mode 100644 index 0000000..af995b9 --- /dev/null +++ b/docs/models/barcode.md @@ -0,0 +1,9 @@ +# Barcode + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `type` | *Optional[Literal["Barcode"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The nearby text content of the barcode | \ No newline at end of file diff --git a/docs/models/bibliography.md b/docs/models/bibliography.md new file mode 100644 index 0000000..f86c14c --- /dev/null +++ b/docs/models/bibliography.md @@ -0,0 +1,9 @@ +# Bibliography + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `type` | *Optional[Literal["Bibliography"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The text content of the bibliography. | \ No newline at end of file diff --git a/docs/models/boundingboxlocation.md b/docs/models/boundingboxlocation.md new file mode 100644 index 0000000..291ceca --- /dev/null +++ b/docs/models/boundingboxlocation.md @@ -0,0 +1,15 @@ +# BoundingBoxLocation + +Location within a paginated document using normalized coordinates. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `location_type` | *Optional[Literal["bounding_box"]]* | :heavy_minus_sign: | N/A | +| `left` | *float* | :heavy_check_mark: | Left coordinate (0.0 to 1.0) | +| `top` | *float* | :heavy_check_mark: | Top coordinate (0.0 to 1.0) | +| `width` | *float* | :heavy_check_mark: | Width of the element (0.0 to 1.0) | +| `height` | *float* | :heavy_check_mark: | Height of the element (0.0 to 1.0) | +| `page_number` | *int* | :heavy_check_mark: | Page number | \ No newline at end of file diff --git a/docs/models/button.md b/docs/models/button.md new file mode 100644 index 0000000..3ba9250 --- /dev/null +++ b/docs/models/button.md @@ -0,0 +1,9 @@ +# Button + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `type` | *Optional[Literal["Button"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The text content inside the button | \ No newline at end of file diff --git a/docs/models/calendardate.md b/docs/models/calendardate.md new file mode 100644 index 0000000..d73656f --- /dev/null +++ b/docs/models/calendardate.md @@ -0,0 +1,9 @@ +# CalendarDate + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `type` | *Optional[Literal["CalendarDate"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The text content | \ No newline at end of file diff --git a/docs/models/caption.md b/docs/models/caption.md new file mode 100644 index 0000000..4646ecf --- /dev/null +++ b/docs/models/caption.md @@ -0,0 +1,8 @@ +# Caption + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `content` | *str* | :heavy_check_mark: | The text content | \ No newline at end of file diff --git a/docs/models/characterindexlocation.md b/docs/models/characterindexlocation.md new file mode 100644 index 0000000..d0139c4 --- /dev/null +++ b/docs/models/characterindexlocation.md @@ -0,0 +1,12 @@ +# CharacterIndexLocation + +Location within linear text using zero-based character offsets. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `location_type` | *Optional[Literal["character_index"]]* | :heavy_minus_sign: | N/A | +| `start_char_index` | *int* | :heavy_check_mark: | Start character index (inclusive) | +| `end_char_index` | *int* | :heavy_check_mark: | End character index (exclusive) | \ No newline at end of file diff --git a/docs/models/code.md b/docs/models/code.md new file mode 100644 index 0000000..48213b2 --- /dev/null +++ b/docs/models/code.md @@ -0,0 +1,10 @@ +# Code + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `type` | *Optional[Literal["Code"]]* | :heavy_minus_sign: | N/A | +| `content` | *Optional[str]* | :heavy_minus_sign: | The content of the code | +| `language` | *Optional[str]* | :heavy_minus_sign: | The language the code is written in | \ No newline at end of file diff --git a/docs/models/codeinterpreteroutputstatus.md b/docs/models/codeinterpreteroutputstatus.md index 7fa8285..09a5db5 100644 --- a/docs/models/codeinterpreteroutputstatus.md +++ b/docs/models/codeinterpreteroutputstatus.md @@ -1,5 +1,13 @@ # CodeInterpreterOutputStatus +## Example Usage + +```python +from ragie.models import CodeInterpreterOutputStatus + +value = CodeInterpreterOutputStatus.IN_PROGRESS +``` + ## Values diff --git a/docs/models/comment.md b/docs/models/comment.md new file mode 100644 index 0000000..c64f20f --- /dev/null +++ b/docs/models/comment.md @@ -0,0 +1,9 @@ +# Comment + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `type` | *Optional[Literal["Comment"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The text content | \ No newline at end of file diff --git a/docs/models/connectorsource.md b/docs/models/connectorsource.md index 2426560..1b29367 100644 --- a/docs/models/connectorsource.md +++ b/docs/models/connectorsource.md @@ -1,5 +1,13 @@ # ConnectorSource +## Example Usage + +```python +from ragie.models import ConnectorSource + +value = ConnectorSource.BACKBLAZE +``` + ## Values diff --git a/docs/models/createauthenticatorconnection.md b/docs/models/createauthenticatorconnection.md index 1d30806..7070f63 100644 --- a/docs/models/createauthenticatorconnection.md +++ b/docs/models/createauthenticatorconnection.md @@ -7,7 +7,8 @@ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `partition_strategy` | [models.MediaModeParam](../models/mediamodeparam.md) | :heavy_check_mark: | N/A | | | `partition` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | -| `page_limit` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `config` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | +| `page_limit` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | 100 | +| `config` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `metadata` | Dict[str, [models.CreateAuthenticatorConnectionMetadata](../models/createauthenticatorconnectionmetadata.md)] | :heavy_minus_sign: | Metadata for the document. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. 1000 total values are allowed. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`, `start_time`, `end_time`, `chunk_content_type`. | | +| `workflow` | [OptionalNullable[models.DocumentWorkflow]](../models/documentworkflow.md) | :heavy_minus_sign: | N/A | | | `connection` | [models.CreateAuthenticatorConnectionConnection](../models/createauthenticatorconnectionconnection.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/createdocumentfromurlparams.md b/docs/models/createdocumentfromurlparams.md index baae7c9..b245468 100644 --- a/docs/models/createdocumentfromurlparams.md +++ b/docs/models/createdocumentfromurlparams.md @@ -3,11 +3,12 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | | -| `metadata` | Dict[str, [models.CreateDocumentFromURLParamsMetadata](../models/createdocumentfromurlparamsmetadata.md)] | :heavy_minus_sign: | Metadata for the document. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. 1000 total values are allowed. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`, `start_time`, `end_time`, `chunk_content_type`. | | -| `mode` | [Optional[models.CreateDocumentFromURLParamsMode]](../models/createdocumentfromurlparamsmode.md) | :heavy_minus_sign: | Partition strategy for the document. Different strategies exist for textual, audio and video file types and you can set the strategy you want for each file type, or just for textual types. For textual documents the options are `'hi_res'` or `'fast'`. When set to `'hi_res'`, images and tables will be extracted from the document. `'fast'` will only extract text. `'fast'` may be up to 20x faster than `'hi_res'`. `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. Images will always be processed in `hi_res`. If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. For audio files, the options are true or false. True if you want to process audio, false otherwise. For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. `'audio_only'` will extract just the audio part of the video. `'video_only'` will similarly just extract the video part, ignoring audio. `'audio_video'` will extract both audio and video. To process all media types at the highest quality, use `'all'`. When you specify audio or video stategies, the format must be a JSON object. In this case, textual documents are denoted by the key "static". If you omit a key, that document type won't be processd. See examples below. Examples Textual documents only "fast" Video documents only { "video": "audio_video" } Specify multiple document types { "static": "hi_res", "audio": true, "video": "video_only" } Specify only textual or audio document types { "static": "fast", "audio": true } Highest quality processing for all media types "all" | | -| `external_id` | *OptionalNullable[str]* | :heavy_minus_sign: | An optional identifier for the document. A common value might be an id in an external system or the URL where the source file may be found. | | -| `partition` | *Optional[str]* | :heavy_minus_sign: | An optional partition identifier. Documents can be scoped to a partition. Partitions must be lowercase alphanumeric and may only include the special characters `_` and `-`. A partition is created any time a document is created. | | -| `url` | *str* | :heavy_check_mark: | Url of the file to download. Must be publicly accessible and HTTP or HTTPS scheme. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `metadata` | Dict[str, [models.CreateDocumentFromURLParamsMetadata](../models/createdocumentfromurlparamsmetadata.md)] | :heavy_minus_sign: | Metadata for the document. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. 1000 total values are allowed. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`, `start_time`, `end_time`, `chunk_content_type`. | | +| `mode` | [Optional[models.CreateDocumentFromURLParamsMode]](../models/createdocumentfromurlparamsmode.md) | :heavy_minus_sign: | Partition strategy for the document.
Different strategies exist for textual, audio and video file types and you can set the strategy you want for
each file type, or just for textual types.

For textual documents the options are `'hi_res'` or `'fast'`.
When set to `'hi_res'`, images and tables will be extracted from the document.
`'fast'` will only extract text.
`'fast'` may be up to 20x faster than `'hi_res'`.
`hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints.
Images will always be processed in `hi_res`.
If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode.

For audio files, the options are true or false. True if you want to process audio, false otherwise.

For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`.
`'audio_only'` will extract just the audio part of the video.
`'video_only'` will similarly just extract the video part, ignoring audio.
`'audio_video'` will extract both audio and video.

To process all media types at the highest quality, use `'all'`.

When you specify audio or video stategies, the format must be a JSON object. In this case,
textual documents are denoted by the key "static". If you omit a key, that document type won't be processd.
See examples below.

Examples

Textual documents only
"fast"

Video documents only
{
"video": "audio_video"
}

Specify multiple document types
{
"static": "hi_res",
"audio": true,
"video": "video_only"
}

Specify only textual or audio document types
{
"static": "fast",
"audio": true
}

Highest quality processing for all media types
"all"

Agentic OCR
"agentic_ocr"
Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai. | | +| `external_id` | *OptionalNullable[str]* | :heavy_minus_sign: | An optional identifier for the document. A common value might be an id in an external system or the URL where the source file may be found. | | +| `partition` | *Optional[str]* | :heavy_minus_sign: | An optional partition identifier. Documents can be scoped to a partition. Partitions must be lowercase alphanumeric and may only include the special characters `_` and `-`. A partition is created any time a document is created. | | +| `workflow` | [Optional[models.DocumentWorkflow]](../models/documentworkflow.md) | :heavy_minus_sign: | N/A | | +| `url` | *str* | :heavy_check_mark: | Url of the file to download. Must be publicly accessible and HTTP or HTTPS scheme. | | \ No newline at end of file diff --git a/docs/models/createdocumentfromurlparamsmode.md b/docs/models/createdocumentfromurlparamsmode.md index 05f7108..74926be 100644 --- a/docs/models/createdocumentfromurlparamsmode.md +++ b/docs/models/createdocumentfromurlparamsmode.md @@ -1,6 +1,59 @@ # CreateDocumentFromURLParamsMode -Partition strategy for the document. Different strategies exist for textual, audio and video file types and you can set the strategy you want for each file type, or just for textual types. For textual documents the options are `'hi_res'` or `'fast'`. When set to `'hi_res'`, images and tables will be extracted from the document. `'fast'` will only extract text. `'fast'` may be up to 20x faster than `'hi_res'`. `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. Images will always be processed in `hi_res`. If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. For audio files, the options are true or false. True if you want to process audio, false otherwise. For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. `'audio_only'` will extract just the audio part of the video. `'video_only'` will similarly just extract the video part, ignoring audio. `'audio_video'` will extract both audio and video. To process all media types at the highest quality, use `'all'`. When you specify audio or video stategies, the format must be a JSON object. In this case, textual documents are denoted by the key "static". If you omit a key, that document type won't be processd. See examples below. Examples Textual documents only "fast" Video documents only { "video": "audio_video" } Specify multiple document types { "static": "hi_res", "audio": true, "video": "video_only" } Specify only textual or audio document types { "static": "fast", "audio": true } Highest quality processing for all media types "all" +Partition strategy for the document. +Different strategies exist for textual, audio and video file types and you can set the strategy you want for +each file type, or just for textual types. + +For textual documents the options are `'hi_res'` or `'fast'`. +When set to `'hi_res'`, images and tables will be extracted from the document. +`'fast'` will only extract text. +`'fast'` may be up to 20x faster than `'hi_res'`. +`hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. +Images will always be processed in `hi_res`. +If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. + +For audio files, the options are true or false. True if you want to process audio, false otherwise. + +For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. +`'audio_only'` will extract just the audio part of the video. +`'video_only'` will similarly just extract the video part, ignoring audio. +`'audio_video'` will extract both audio and video. + +To process all media types at the highest quality, use `'all'`. + +When you specify audio or video stategies, the format must be a JSON object. In this case, +textual documents are denoted by the key "static". If you omit a key, that document type won't be processd. +See examples below. + +Examples + +Textual documents only + "fast" + +Video documents only +{ + "video": "audio_video" +} + +Specify multiple document types +{ + "static": "hi_res", + "audio": true, + "video": "video_only" +} + +Specify only textual or audio document types +{ + "static": "fast", + "audio": true +} + +Highest quality processing for all media types + "all" + +Agentic OCR + "agentic_ocr" + Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai. ## Supported Types diff --git a/docs/models/createdocumentparams.md b/docs/models/createdocumentparams.md index 404a293..92a9d2f 100644 --- a/docs/models/createdocumentparams.md +++ b/docs/models/createdocumentparams.md @@ -3,11 +3,12 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `mode` | [Optional[models.Mode]](../models/mode.md) | :heavy_minus_sign: | Partition strategy for the document. Different strategies exist for textual, audio and video file types and you can set the strategy you want for each file type, or just for textual types. For textual documents the options are `'hi_res'` or `'fast'`. When set to `'hi_res'`, images and tables will be extracted from the document. `'fast'` will only extract text. `'fast'` may be up to 20x faster than `'hi_res'`. `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. Images will always be processed in `hi_res`. If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. For audio files, the options are true or false. True if you want to process audio, false otherwise. For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. `'audio_only'` will extract just the audio part of the video. `'video_only'` will similarly just extract the video part, ignoring audio. `'audio_video'` will extract both audio and video. To process all media types at the highest quality, use `'all'`. When you specify audio or video stategies, the format must be a JSON object. In this case, textual documents are denoted by the key "static". If you omit a key, that document type won't be processd. See examples below. Examples Textual documents only "fast" Video documents only { "video": "audio_video" } Specify multiple document types { "static": "hi_res", "audio": true, "video": "video_only" } Specify only textual or audio document types { "static": "fast", "audio": true } Highest quality processing for all media types "all" | -| `metadata` | Dict[str, [models.Metadata](../models/metadata.md)] | :heavy_minus_sign: | Metadata for the document. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. 1000 total values are allowed. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`, `start_time`, `end_time`, `chunk_content_type`. | -| `file` | [models.File](../models/file.md) | :heavy_check_mark: | The binary file to upload, extract, and index for retrieval. The following file types are supported: Plain Text: `.eml` `.html` `.json` `.md` `.msg` `.rst` `.rtf` `.txt` `.xml`
Images: `.png` `.webp` `.jpg` `.jpeg` `.tiff` `.bmp` `.heic`
Documents: `.csv` `.doc` `.docx` `.epub` `.epub+zip` `.odt` `.pdf` `.ppt` `.pptx` `.tsv` `.xlsx` `.xls`. PDF files over 2000 pages are not supported in hi_res mode. | -| `external_id` | *Optional[str]* | :heavy_minus_sign: | An optional identifier for the document. A common value might be an id in an external system or the URL where the source file may be found. | -| `name` | *Optional[str]* | :heavy_minus_sign: | An optional name for the document. If set, the document will have this name. Otherwise it will default to the file's name. | -| `partition` | *Optional[str]* | :heavy_minus_sign: | An optional partition identifier. Documents can be scoped to a partition. Partitions must be lowercase alphanumeric and may only include the special characters `_` and `-`. A partition is created any time a document is created. | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mode` | [Optional[models.Mode]](../models/mode.md) | :heavy_minus_sign: | Partition strategy for the document.
Different strategies exist for textual, audio and video file types and you can set the strategy you want for
each file type, or just for textual types.

For textual documents the options are `'hi_res'` or `'fast'`.
When set to `'hi_res'`, images and tables will be extracted from the document.
`'fast'` will only extract text.
`'fast'` may be up to 20x faster than `'hi_res'`.
`hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints.
Images will always be processed in `hi_res`.
If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode.

For audio files, the options are true or false. True if you want to process audio, false otherwise.

For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`.
`'audio_only'` will extract just the audio part of the video.
`'video_only'` will similarly just extract the video part, ignoring audio.
`'audio_video'` will extract both audio and video.

To process all media types at the highest quality, use `'all'`.

When you specify audio or video stategies, the format must be a JSON object. In this case,
textual documents are denoted by the key "static". If you omit a key, that document type won't be processd.
See examples below.

Examples

Textual documents only
"fast"

Video documents only
{
"video": "audio_video"
}

Specify multiple document types
{
"static": "hi_res",
"audio": true,
"video": "video_only"
}

Specify only textual or audio document types
{
"static": "fast",
"audio": true
}

Highest quality processing for all media types
"all"

Agentic OCR
"agentic_ocr"
Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai. | +| `metadata` | Dict[str, [models.CreateDocumentParamsMetadata](../models/createdocumentparamsmetadata.md)] | :heavy_minus_sign: | Metadata for the document. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. 1000 total values are allowed. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`, `start_time`, `end_time`, `chunk_content_type`. | +| `file` | [models.File](../models/file.md) | :heavy_check_mark: | The binary file to upload, extract, and index for retrieval. The following file types are supported: Plain Text: `.eml` `.html` `.json` `.md` `.msg` `.rst` `.rtf` `.txt` `.xml`
Images: `.png` `.webp` `.jpg` `.jpeg` `.tiff` `.bmp` `.heic`
Documents: `.csv` `.doc` `.docx` `.epub` `.epub+zip` `.odt` `.pdf` `.ppt` `.pptx` `.tsv` `.xlsx` `.xls`. PDF files over 2000 pages are not supported in hi_res mode. | +| `external_id` | *Optional[str]* | :heavy_minus_sign: | An optional identifier for the document. A common value might be an id in an external system or the URL where the source file may be found. | +| `name` | *Optional[str]* | :heavy_minus_sign: | An optional name for the document. If set, the document will have this name. Otherwise it will default to the file's name. | +| `partition` | *Optional[str]* | :heavy_minus_sign: | An optional partition identifier. Documents can be scoped to a partition. Partitions must be lowercase alphanumeric and may only include the special characters `_` and `-`. A partition is created any time a document is created. | +| `workflow` | [OptionalNullable[models.Workflow]](../models/workflow.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/documentmetadata.md b/docs/models/createdocumentparamsmetadata.md similarity index 77% rename from docs/models/documentmetadata.md rename to docs/models/createdocumentparamsmetadata.md index cda6ed4..b722636 100644 --- a/docs/models/documentmetadata.md +++ b/docs/models/createdocumentparamsmetadata.md @@ -1,4 +1,4 @@ -# DocumentMetadata +# CreateDocumentParamsMetadata ## Supported Types @@ -9,12 +9,6 @@ value: str = /* values here */ ``` -### `int` - -```python -value: int = /* values here */ -``` - ### `float` ```python diff --git a/docs/models/createdocumentrawparams.md b/docs/models/createdocumentrawparams.md index cf72219..bfcaa58 100644 --- a/docs/models/createdocumentrawparams.md +++ b/docs/models/createdocumentrawparams.md @@ -9,4 +9,5 @@ | `metadata` | Dict[str, [models.CreateDocumentRawParamsMetadata](../models/createdocumentrawparamsmetadata.md)] | :heavy_minus_sign: | Metadata for the document. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. 1000 total values are allowed. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`, `start_time`, `end_time`, `chunk_content_type`. | | | `external_id` | *OptionalNullable[str]* | :heavy_minus_sign: | An optional identifier for the document. A common value might be an id in an external system or the URL where the source file may be found. | | | `partition` | *Optional[str]* | :heavy_minus_sign: | An optional partition identifier. Documents can be scoped to a partition. Partitions must be lowercase alphanumeric and may only include the special characters `_` and `-`. A partition is created any time a document is created. | | +| `workflow` | [Optional[models.DocumentWorkflow]](../models/documentworkflow.md) | :heavy_minus_sign: | N/A | | | `data` | [models.Data](../models/data.md) | :heavy_check_mark: | Document data in a text or JSON format. | | \ No newline at end of file diff --git a/docs/models/createinstructionparams.md b/docs/models/createinstructionparams.md index 5679823..2d30a51 100644 --- a/docs/models/createinstructionparams.md +++ b/docs/models/createinstructionparams.md @@ -9,6 +9,7 @@ | `active` | *Optional[bool]* | :heavy_minus_sign: | Whether the instruction is active. Active instructions are applied to documents when they're created or when their file is updated. | true | | `scope` | [Optional[models.CreateInstructionParamsScope]](../models/createinstructionparamsscope.md) | :heavy_minus_sign: | The scope of the instruction. Determines whether the instruction is applied to the entire document or to each chunk of the document. Options are `'document'` or `'chunk'`. Generally `'document'` should be used when analyzing the full document is desired, such as when generating a summary or determining sentiment, and `'chunk'` should be used when a fine grained search over a document is desired. | document | | `prompt` | *str* | :heavy_check_mark: | A natural language instruction which will be applied to documents as they are created and updated. The results of the `instruction_prompt` will be stored as an `entity` in the schema defined by the `entity_schema` parameter. | Find all pizzas described in the text. | +| `context_template` | *Optional[str]* | :heavy_minus_sign: | An optional mustache style template used to prepend document context to the content sent for entity extraction. Available variables include `document.name`, `document.type`, `document.source`, and nested values under `document.metadata`. | Document: {{document.name}} {{document.metadata.key_foo}} | | `entity_schema` | Dict[str, *Any*] | :heavy_check_mark: | N/A | | | `filter_` | Dict[str, *Any*] | :heavy_minus_sign: | An optional metadata filter that is matched against document metadata during update and creation. The instruction will only be applied to documents with metadata matching the filter. The following filter operators are supported: $eq - Equal to (number, string, boolean), $ne - Not equal to (number, string, boolean), $gt - Greater than (number), $gte - Greater than or equal to (number), $lt - Less than (number), $lte - Less than or equal to (number), $in - In array (string or number), $nin - Not in array (string or number). The operators can be combined with AND and OR. Read [Metadata & Filters guide](https://docs.ragie.ai/docs/metadata-filters) for more details and examples. | {
"toppings": {
"$in": [
"pizza",
"mushrooms"
]
}
} | | `partition` | *Optional[str]* | :heavy_minus_sign: | An optional partition identifier. Instructions can be scoped to a partition. An instruction that defines a partition will only be executed for documents in that partition. | | \ No newline at end of file diff --git a/docs/models/createinstructionparamsscope.md b/docs/models/createinstructionparamsscope.md index a86004e..0827506 100644 --- a/docs/models/createinstructionparamsscope.md +++ b/docs/models/createinstructionparamsscope.md @@ -2,6 +2,14 @@ The scope of the instruction. Determines whether the instruction is applied to the entire document or to each chunk of the document. Options are `'document'` or `'chunk'`. Generally `'document'` should be used when analyzing the full document is desired, such as when generating a summary or determining sentiment, and `'chunk'` should be used when a fine grained search over a document is desired. +## Example Usage + +```python +from ragie.models import CreateInstructionParamsScope + +value = CreateInstructionParamsScope.DOCUMENT +``` + ## Values diff --git a/docs/models/definitionlist.md b/docs/models/definitionlist.md new file mode 100644 index 0000000..101af38 --- /dev/null +++ b/docs/models/definitionlist.md @@ -0,0 +1,9 @@ +# DefinitionList + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| `type` | *Optional[Literal["DefinitionList"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The text content of the list and each item. | \ No newline at end of file diff --git a/docs/models/deletepartitionpartitionspartitioniddeleterequest.md b/docs/models/deletepartitionpartitionspartitioniddeleterequest.md index e5e26c5..8184b9f 100644 --- a/docs/models/deletepartitionpartitionspartitioniddeleterequest.md +++ b/docs/models/deletepartitionpartitionspartitioniddeleterequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `partition_id` | *str* | :heavy_check_mark: | N/A | | -| `async_` | *OptionalNullable[bool]* | :heavy_minus_sign: | If true, performs partition deletion asynchronously. | true | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `partition_id` | *str* | :heavy_check_mark: | N/A | +| `async_` | *OptionalNullable[bool]* | :heavy_minus_sign: | If true, performs partition deletion asynchronously. | \ No newline at end of file diff --git a/docs/models/disabledbysystemreason.md b/docs/models/disabledbysystemreason.md index 4658ec7..beec7e2 100644 --- a/docs/models/disabledbysystemreason.md +++ b/docs/models/disabledbysystemreason.md @@ -1,5 +1,13 @@ # DisabledBySystemReason +## Example Usage + +```python +from ragie.models import DisabledBySystemReason + +value = DisabledBySystemReason.CONNECTION_OVER_TOTAL_PAGE_LIMIT +``` + ## Values diff --git a/docs/models/document.md b/docs/models/document.md index 270a7e5..137db66 100644 --- a/docs/models/document.md +++ b/docs/models/document.md @@ -10,7 +10,7 @@ | `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | `name` | *str* | :heavy_check_mark: | N/A | -| `metadata` | Dict[str, [models.DocumentMetadata](../models/documentmetadata.md)] | :heavy_check_mark: | N/A | +| `metadata` | Dict[str, [models.Metadata](../models/metadata.md)] | :heavy_check_mark: | N/A | | `partition` | *str* | :heavy_check_mark: | N/A | | `chunk_count` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | `external_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | diff --git a/docs/models/documentelementtype.md b/docs/models/documentelementtype.md new file mode 100644 index 0000000..605605b --- /dev/null +++ b/docs/models/documentelementtype.md @@ -0,0 +1,59 @@ +# DocumentElementType + +## Example Usage + +```python +from ragie.models import DocumentElementType + +value = DocumentElementType.CAPTION +``` + + +## Values + +| Name | Value | +| ----------------------------- | ----------------------------- | +| `CAPTION` | Caption | +| `TITLE` | Title | +| `TEXT` | Text | +| `UNCATEGORIZED_TEXT` | UncategorizedText | +| `NARRATIVE_TEXT` | NarrativeText | +| `IMAGE` | Image | +| `FIGURE_CAPTION` | FigureCaption | +| `TABLE_CAPTION` | TableCaption | +| `LIST_ITEM` | ListItem | +| `ADDRESS` | Address | +| `EMAIL_ADDRESS` | EmailAddress | +| `PAGE_BREAK` | PageBreak | +| `FORMULA` | Formula | +| `TABLE` | Table | +| `HEADER` | Header | +| `FOOTER` | Footer | +| `JSON` | Json | +| `AUDIO_TRANSCRIPTION_SEGMENT` | AudioTranscriptionSegment | +| `VIDEO_SEGMENT` | VideoSegment | +| `SUB_HEADER` | SubHeader | +| `SECTION_HEADER` | SectionHeader | +| `AUTHOR` | Author | +| `CALENDAR_DATE` | CalendarDate | +| `QUOTE` | Quote | +| `COMMENT` | Comment | +| `UNORDERED_LIST` | UnorderedList | +| `ORDERED_LIST` | OrderedList | +| `DEFINITION_LIST` | DefinitionList | +| `FIGURE` | Figure | +| `STAMP` | Stamp | +| `LOGO` | Logo | +| `WATERMARK` | Watermark | +| `BARCODE` | Barcode | +| `QR_CODE` | QrCode | +| `SIGNATURE` | Signature | +| `KEY_VALUE` | KeyValue | +| `FORM_FIELD` | FormField | +| `CODE` | Code | +| `BIBLIOGRAPHY` | Bibliography | +| `TABLE_OF_CONTENTS` | TableOfContents | +| `FOOTNOTE` | Footnote | +| `TIME` | Time | +| `BUTTON` | Button | +| `VIDEO` | Video | \ No newline at end of file diff --git a/docs/models/documentworkflow.md b/docs/models/documentworkflow.md new file mode 100644 index 0000000..4b0e4fe --- /dev/null +++ b/docs/models/documentworkflow.md @@ -0,0 +1,17 @@ +# DocumentWorkflow + +## Example Usage + +```python +from ragie.models import DocumentWorkflow + +value = DocumentWorkflow.PARSE +``` + + +## Values + +| Name | Value | +| ------- | ------- | +| `PARSE` | parse | +| `INDEX` | index | \ No newline at end of file diff --git a/docs/models/durationlocation.md b/docs/models/durationlocation.md new file mode 100644 index 0000000..19d7c86 --- /dev/null +++ b/docs/models/durationlocation.md @@ -0,0 +1,11 @@ +# DurationLocation + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `location_type` | *Optional[Literal["duration"]]* | :heavy_minus_sign: | N/A | +| `start_time` | *float* | :heavy_check_mark: | N/A | +| `end_time` | *float* | :heavy_check_mark: | N/A | +| `duration` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/effort.md b/docs/models/effort.md index 1fed3cf..6b65d28 100644 --- a/docs/models/effort.md +++ b/docs/models/effort.md @@ -1,5 +1,13 @@ # Effort +## Example Usage + +```python +from ragie.models import Effort + +value = Effort.LOW +``` + ## Values diff --git a/docs/models/emailaddress.md b/docs/models/emailaddress.md new file mode 100644 index 0000000..710de1c --- /dev/null +++ b/docs/models/emailaddress.md @@ -0,0 +1,9 @@ +# EmailAddress + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `type` | *Optional[Literal["EmailAddress"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The text content | \ No newline at end of file diff --git a/docs/models/entity.md b/docs/models/entity.md index ac0428d..055ed8a 100644 --- a/docs/models/entity.md +++ b/docs/models/entity.md @@ -3,12 +3,14 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | N/A | -| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `instruction_id` | *str* | :heavy_check_mark: | The ID of the instruction which generated the entity. | -| `document_id` | *str* | :heavy_check_mark: | The ID of the document which the entity was produced from. | -| `chunk_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `data` | Dict[str, *Any*] | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `instruction_id` | *str* | :heavy_check_mark: | The ID of the instruction which generated the entity. | +| `document_id` | *str* | :heavy_check_mark: | The ID of the document which the entity was produced from. | +| `chunk_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `data` | Dict[str, *Any*] | :heavy_check_mark: | N/A | +| `instruction_schema_version` | *OptionalNullable[int]* | :heavy_minus_sign: | Instruction entity schema version used to generate this entity. | +| `instruction_schema_shape_fingerprint` | *OptionalNullable[str]* | :heavy_minus_sign: | Shape-only fingerprint of the instruction entity schema used to generate this entity. | \ No newline at end of file diff --git a/docs/models/figure.md b/docs/models/figure.md new file mode 100644 index 0000000..a7bceda --- /dev/null +++ b/docs/models/figure.md @@ -0,0 +1,11 @@ +# Figure + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `type` | *Optional[Literal["Figure"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The text visible inside the visual (OCR) | +| `description` | *str* | :heavy_check_mark: | A detailed description of what the visual depicts. | +| `base64_data` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/figurecaption.md b/docs/models/figurecaption.md new file mode 100644 index 0000000..eaa6d55 --- /dev/null +++ b/docs/models/figurecaption.md @@ -0,0 +1,9 @@ +# FigureCaption + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `type` | *Optional[Literal["FigureCaption"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The text content | \ No newline at end of file diff --git a/docs/models/filesearchoutputstatus.md b/docs/models/filesearchoutputstatus.md index c8c57dd..52b5837 100644 --- a/docs/models/filesearchoutputstatus.md +++ b/docs/models/filesearchoutputstatus.md @@ -1,5 +1,13 @@ # FileSearchOutputStatus +## Example Usage + +```python +from ragie.models import FileSearchOutputStatus + +value = FileSearchOutputStatus.IN_PROGRESS +``` + ## Values diff --git a/docs/models/footer.md b/docs/models/footer.md new file mode 100644 index 0000000..94aa2ac --- /dev/null +++ b/docs/models/footer.md @@ -0,0 +1,9 @@ +# Footer + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `type` | *Optional[Literal["Footer"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The text content | \ No newline at end of file diff --git a/docs/models/footnote.md b/docs/models/footnote.md new file mode 100644 index 0000000..565fb6e --- /dev/null +++ b/docs/models/footnote.md @@ -0,0 +1,9 @@ +# Footnote + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `type` | *Optional[Literal["Footnote"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The text content inside the footnote | \ No newline at end of file diff --git a/docs/models/formfield.md b/docs/models/formfield.md new file mode 100644 index 0000000..7fb6a17 --- /dev/null +++ b/docs/models/formfield.md @@ -0,0 +1,15 @@ +# FormField + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `type` | *Optional[Literal["FormField"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The text content of the form field, including both the label and the value | +| `input_type` | [models.InputType](../models/inputtype.md) | :heavy_check_mark: | Type of input. | +| `label` | *str* | :heavy_check_mark: | The main question/label for the field. | +| `value` | *OptionalNullable[str]* | :heavy_minus_sign: | The filled text. For single checkbox: 'true'/'false'. | +| `options` | List[[models.FormOption](../models/formoption.md)] | :heavy_minus_sign: | List of available options. | +| `selected_values` | List[*str*] | :heavy_minus_sign: | The 'label' of the selected option(s). | +| `help_text` | *OptionalNullable[str]* | :heavy_minus_sign: | The help text for the form field. | \ No newline at end of file diff --git a/docs/models/formoption.md b/docs/models/formoption.md new file mode 100644 index 0000000..363f8d3 --- /dev/null +++ b/docs/models/formoption.md @@ -0,0 +1,8 @@ +# FormOption + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `label` | *str* | :heavy_check_mark: | The text label visible next to the checkbox/radio. | \ No newline at end of file diff --git a/docs/models/formula.md b/docs/models/formula.md new file mode 100644 index 0000000..f6033f9 --- /dev/null +++ b/docs/models/formula.md @@ -0,0 +1,10 @@ +# Formula + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `type` | *Optional[Literal["Formula"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The formula as plain text. | +| `latex` | *OptionalNullable[str]* | :heavy_minus_sign: | The LaTeX representation of the formula. | \ No newline at end of file diff --git a/docs/models/getdocumentchunkcontentrequest.md b/docs/models/getdocumentchunkcontentrequest.md index f59c2dc..54bc4a0 100644 --- a/docs/models/getdocumentchunkcontentrequest.md +++ b/docs/models/getdocumentchunkcontentrequest.md @@ -7,7 +7,7 @@ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `document_id` | *str* | :heavy_check_mark: | The id of the document. | 00000000-0000-0000-0000-000000000000 | | `chunk_id` | *str* | :heavy_check_mark: | The ID of the chunk. | 00000000-0000-0000-0000-000000000000 | -| `media_type` | [OptionalNullable[models.MediaType]](../models/mediatype.md) | :heavy_minus_sign: | The desired media type of the content to return described as a mime type. An error will be returned if the requested media type is not supported for the chunk's document type. | text/plain | +| `media_type` | [OptionalNullable[models.MediaType]](../models/mediatype.md) | :heavy_minus_sign: | The desired media type of the content to return described as a mime type. An error will be returned if the requested media type is not supported for the chunk's document type. | **Example 1:** text/plain
**Example 2:** audio/mpeg
**Example 3:** video/mp4 | | `download` | *Optional[bool]* | :heavy_minus_sign: | Whether to return the content as a file download or a raw stream. If set to `true`, the content will be returned as a named file for download. | | | `partition` | *OptionalNullable[str]* | :heavy_minus_sign: | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition. | acme_customer_id | | `range` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/getdocumentcontentrequest.md b/docs/models/getdocumentcontentrequest.md index faa0c5f..9920931 100644 --- a/docs/models/getdocumentcontentrequest.md +++ b/docs/models/getdocumentcontentrequest.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `document_id` | *str* | :heavy_check_mark: | The id of the document. | 00000000-0000-0000-0000-000000000000 | -| `media_type` | [OptionalNullable[models.QueryParamMediaType]](../models/queryparammediatype.md) | :heavy_minus_sign: | The desired media type of the content to return described as a mime type. An error will be returned if the requested media type is not supported for the document's type. | text/plain | +| `media_type` | [OptionalNullable[models.QueryParamMediaType]](../models/queryparammediatype.md) | :heavy_minus_sign: | The desired media type of the content to return described as a mime type. An error will be returned if the requested media type is not supported for the document's type. | **Example 1:** text/plain
**Example 2:** audio/mpeg
**Example 3:** video/mp4 | | `download` | *Optional[bool]* | :heavy_minus_sign: | Whether to return the content as a file download or a raw stream. If set to `true`, the content will be returned as a named file for download. | | | `partition` | *OptionalNullable[str]* | :heavy_minus_sign: | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition. | acme_customer_id | | `range` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/getelementrequest.md b/docs/models/getelementrequest.md new file mode 100644 index 0000000..87869a1 --- /dev/null +++ b/docs/models/getelementrequest.md @@ -0,0 +1,8 @@ +# GetElementRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `element_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/header.md b/docs/models/header.md new file mode 100644 index 0000000..1998ef6 --- /dev/null +++ b/docs/models/header.md @@ -0,0 +1,9 @@ +# Header + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `type` | *Optional[Literal["Header"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The text content | \ No newline at end of file diff --git a/docs/models/image.md b/docs/models/image.md new file mode 100644 index 0000000..c3c0383 --- /dev/null +++ b/docs/models/image.md @@ -0,0 +1,10 @@ +# Image + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `type` | *Optional[Literal["Image"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The text visible inside the visual (OCR) | +| `description` | *str* | :heavy_check_mark: | A detailed description of what the visual depicts. | \ No newline at end of file diff --git a/docs/models/inputtype.md b/docs/models/inputtype.md new file mode 100644 index 0000000..59a3e9e --- /dev/null +++ b/docs/models/inputtype.md @@ -0,0 +1,26 @@ +# InputType + +Type of input. + +## Example Usage + +```python +from ragie.models import InputType + +value = InputType.TEXT +``` + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `TEXT` | text | +| `TEXTAREA` | textarea | +| `CHECKBOX` | checkbox | +| `RADIO` | radio | +| `CHECKBOX_GROUP` | checkbox-group | +| `RADIO_GROUP` | radio-group | +| `DATE` | date | +| `TIME` | time | +| `DATE_TIME` | date-time | \ No newline at end of file diff --git a/docs/models/instruction.md b/docs/models/instruction.md index 7a968bb..ae51d8d 100644 --- a/docs/models/instruction.md +++ b/docs/models/instruction.md @@ -12,6 +12,7 @@ | `active` | *Optional[bool]* | :heavy_minus_sign: | Whether the instruction is active. Active instructions are applied to documents when they're created or when their file is updated. | true | | `scope` | [Optional[models.Scope]](../models/scope.md) | :heavy_minus_sign: | The scope of the instruction. Determines whether the instruction is applied to the entire document or to each chunk of the document. Options are `'document'` or `'chunk'`. Generally `'document'` should be used when analyzing the full document is desired, such as when generating a summary or determining sentiment, and `'chunk'` should be used when a fine grained search over a document is desired. | document | | `prompt` | *str* | :heavy_check_mark: | A natural language instruction which will be applied to documents as they are created and updated. The results of the `instruction_prompt` will be stored as an `entity` in the schema defined by the `entity_schema` parameter. | Find all pizzas described in the text. | +| `context_template` | *Optional[str]* | :heavy_minus_sign: | An optional mustache style template used to prepend document context to the content sent for entity extraction. Available variables include `document.name`, `document.type`, `document.source`, and nested values under `document.metadata`. | Document: {{document.name}} {{document.metadata.key_foo}} | | `entity_schema` | Dict[str, *Any*] | :heavy_check_mark: | N/A | | | `filter_` | Dict[str, *Any*] | :heavy_minus_sign: | An optional metadata filter that is matched against document metadata during update and creation. The instruction will only be applied to documents with metadata matching the filter. The following filter operators are supported: $eq - Equal to (number, string, boolean), $ne - Not equal to (number, string, boolean), $gt - Greater than (number), $gte - Greater than or equal to (number), $lt - Less than (number), $lte - Less than or equal to (number), $in - In array (string or number), $nin - Not in array (string or number). The operators can be combined with AND and OR. Read [Metadata & Filters guide](https://docs.ragie.ai/docs/metadata-filters) for more details and examples. | {
"toppings": {
"$in": [
"pizza",
"mushrooms"
]
}
} | | `partition` | *Optional[str]* | :heavy_minus_sign: | An optional partition identifier. Instructions can be scoped to a partition. An instruction that defines a partition will only be executed for documents in that partition. | | \ No newline at end of file diff --git a/docs/models/instructionentityextractionlog.md b/docs/models/instructionentityextractionlog.md new file mode 100644 index 0000000..222ba26 --- /dev/null +++ b/docs/models/instructionentityextractionlog.md @@ -0,0 +1,19 @@ +# InstructionEntityExtractionLog + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `id` | *str* | :heavy_check_mark: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `instruction_id` | *str* | :heavy_check_mark: | The ID of the instruction which generated the entity. | +| `document_id` | *str* | :heavy_check_mark: | The ID of the document which the entity was produced from. | +| `scope` | [models.InstructionEntityExtractionLogScope](../models/instructionentityextractionlogscope.md) | :heavy_check_mark: | Whether extraction was attempted at document scope or chunk scope. | +| `chunk_index` | *OptionalNullable[int]* | :heavy_minus_sign: | Chunk index when scope is `chunk`; null when scope is `document`. | +| `status` | [models.Status](../models/status.md) | :heavy_check_mark: | Extraction status for this attempt. | +| `reason_code` | [OptionalNullable[models.ReasonCode]](../models/reasoncode.md) | :heavy_minus_sign: | Machine-readable reason code when available. Values: `NO_MATCH`, `AMBIGUOUS`, `OUT_OF_SCOPE`, `SCHEMA_INVALID`, `MODEL_ERROR`. | +| `reason` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional debug text for this attempt. Usually model-provided; may be system-generated when normalization/parsing fails. | +| `errors` | List[*str*] | :heavy_minus_sign: | Machine-readable extraction error identifiers. Public responses map internal entity-shape validation failures to `unexpected_error`. Common values include `unexpected_error`, `invalid_instruction_schema`, and `empty_completion_content`. Raw provider/runtime error strings may also appear. | +| `page_count` | *float* | :heavy_check_mark: | Input pages for this extraction attempt. | \ No newline at end of file diff --git a/docs/models/instructionentityextractionloglist.md b/docs/models/instructionentityextractionloglist.md new file mode 100644 index 0000000..73ff2d7 --- /dev/null +++ b/docs/models/instructionentityextractionloglist.md @@ -0,0 +1,9 @@ +# InstructionEntityExtractionLogList + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `pagination` | [models.Pagination](../models/pagination.md) | :heavy_check_mark: | N/A | +| `logs` | List[[models.InstructionEntityExtractionLog](../models/instructionentityextractionlog.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/instructionentityextractionlogscope.md b/docs/models/instructionentityextractionlogscope.md new file mode 100644 index 0000000..bb865dd --- /dev/null +++ b/docs/models/instructionentityextractionlogscope.md @@ -0,0 +1,19 @@ +# InstructionEntityExtractionLogScope + +Whether extraction was attempted at document scope or chunk scope. + +## Example Usage + +```python +from ragie.models import InstructionEntityExtractionLogScope + +value = InstructionEntityExtractionLogScope.DOCUMENT +``` + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `DOCUMENT` | document | +| `CHUNK` | chunk | \ No newline at end of file diff --git a/docs/models/json.md b/docs/models/json.md new file mode 100644 index 0000000..f56a7f0 --- /dev/null +++ b/docs/models/json.md @@ -0,0 +1,9 @@ +# JSON + + +## Fields + +| Field | Type | Required | Description | +| --------------------------- | --------------------------- | --------------------------- | --------------------------- | +| `type` | *Optional[Literal["Json"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The text content | \ No newline at end of file diff --git a/docs/models/keyvalue.md b/docs/models/keyvalue.md new file mode 100644 index 0000000..3e3f8bf --- /dev/null +++ b/docs/models/keyvalue.md @@ -0,0 +1,10 @@ +# KeyValue + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `type` | *Optional[Literal["KeyValue"]]* | :heavy_minus_sign: | N/A | +| `key` | *str* | :heavy_check_mark: | The label/attribute name (e.g. 'Date', 'Invoice #'). | +| `value` | *str* | :heavy_check_mark: | The static text value found. | \ No newline at end of file diff --git a/docs/models/listconnectionsconnectionsgetrequest.md b/docs/models/listconnectionsconnectionsgetrequest.md index 882597b..3e47b45 100644 --- a/docs/models/listconnectionsconnectionsgetrequest.md +++ b/docs/models/listconnectionsconnectionsgetrequest.md @@ -7,5 +7,5 @@ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | An opaque cursor for pagination | | | `page_size` | *Optional[int]* | :heavy_minus_sign: | The number of items per page (must be greater than 0 and less than or equal to 100) | | -| `filter_` | *OptionalNullable[str]* | :heavy_minus_sign: | The metadata search filter. Returns only items which match the filter. The following filter operators are supported: $eq - Equal to (number, string, boolean), $ne - Not equal to (number, string, boolean), $gt - Greater than (number), $gte - Greater than or equal to (number), $lt - Less than (number), $lte - Less than or equal to (number), $in - In array (string or number), $nin - Not in array (string or number). The operators can be combined with AND and OR. Read [Metadata & Filters guide](https://docs.ragie.ai/docs/metadata-filters) for more details and examples. | {
"department": {
"$in": [
"sales",
"marketing"
]
}
} | +| `filter_` | *OptionalNullable[str]* | :heavy_minus_sign: | The metadata search filter. Returns only items which match the filter. The following filter operators are supported: $eq - Equal to (number, string, boolean), $ne - Not equal to (number, string, boolean), $gt - Greater than (number), $gte - Greater than or equal to (number), $lt - Less than (number), $lte - Less than or equal to (number), $in - In array (string or number), $nin - Not in array (string or number). The operators can be combined with AND and OR. Read [Metadata & Filters guide](https://docs.ragie.ai/docs/metadata-filters) for more details and examples. | | | `partition` | *OptionalNullable[str]* | :heavy_minus_sign: | An optional partition to scope the request to. If omitted, the request will be scoped to the default partition. | acme_customer_id | \ No newline at end of file diff --git a/docs/models/listdocumentelements.md b/docs/models/listdocumentelements.md new file mode 100644 index 0000000..c5f4128 --- /dev/null +++ b/docs/models/listdocumentelements.md @@ -0,0 +1,9 @@ +# ListDocumentElements + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `pagination` | [models.Pagination](../models/pagination.md) | :heavy_check_mark: | N/A | +| `document_elements` | List[[models.APIDocumentElement](../models/apidocumentelement.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/listdocumentsrequest.md b/docs/models/listdocumentsrequest.md index 43330a1..a4b5a68 100644 --- a/docs/models/listdocumentsrequest.md +++ b/docs/models/listdocumentsrequest.md @@ -7,5 +7,5 @@ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | An opaque cursor for pagination | | | `page_size` | *Optional[int]* | :heavy_minus_sign: | The number of items per page (must be greater than 0 and less than or equal to 100) | | -| `filter_` | *OptionalNullable[str]* | :heavy_minus_sign: | The metadata search filter. Returns only items which match the filter. The following filter operators are supported: $eq - Equal to (number, string, boolean), $ne - Not equal to (number, string, boolean), $gt - Greater than (number), $gte - Greater than or equal to (number), $lt - Less than (number), $lte - Less than or equal to (number), $in - In array (string or number), $nin - Not in array (string or number). The operators can be combined with AND and OR. Read [Metadata & Filters guide](https://docs.ragie.ai/docs/metadata-filters) for more details and examples. | {
"department": {
"$in": [
"sales",
"marketing"
]
}
} | +| `filter_` | *OptionalNullable[str]* | :heavy_minus_sign: | The metadata search filter. Returns only items which match the filter. The following filter operators are supported: $eq - Equal to (number, string, boolean), $ne - Not equal to (number, string, boolean), $gt - Greater than (number), $gte - Greater than or equal to (number), $lt - Less than (number), $lte - Less than or equal to (number), $in - In array (string or number), $nin - Not in array (string or number). The operators can be combined with AND and OR. Read [Metadata & Filters guide](https://docs.ragie.ai/docs/metadata-filters) for more details and examples. | | | `partition` | *OptionalNullable[str]* | :heavy_minus_sign: | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition. | acme_customer_id | \ No newline at end of file diff --git a/docs/models/listelementsrequest.md b/docs/models/listelementsrequest.md new file mode 100644 index 0000000..cb8665a --- /dev/null +++ b/docs/models/listelementsrequest.md @@ -0,0 +1,14 @@ +# ListElementsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `document_id` | *str* | :heavy_check_mark: | N/A | | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | An opaque cursor for pagination | | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | The number of items per page (must be greater than 0 and less than or equal to 100) | | +| `type` | List[[models.DocumentElementType](../models/documentelementtype.md)] | :heavy_minus_sign: | N/A | | +| `index_start` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `index_end` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `partition` | *OptionalNullable[str]* | :heavy_minus_sign: | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition. | acme_customer_id | \ No newline at end of file diff --git a/docs/models/listinstructionentityextractionlogsrequest.md b/docs/models/listinstructionentityextractionlogsrequest.md new file mode 100644 index 0000000..3111102 --- /dev/null +++ b/docs/models/listinstructionentityextractionlogsrequest.md @@ -0,0 +1,15 @@ +# ListInstructionEntityExtractionLogsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `instruction_id` | *str* | :heavy_check_mark: | The ID of the instruction. | 00000000-0000-0000-0000-000000000000 | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | An opaque cursor for pagination | | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | The number of items per page (must be greater than 0 and less than or equal to 100) | | +| `document_ids` | List[*str*] | :heavy_minus_sign: | Optional document IDs to filter extraction logs to. | | +| `status` | [OptionalNullable[models.QueryParamStatus]](../models/queryparamstatus.md) | :heavy_minus_sign: | Optional extraction status filter. Supported values are `extracted`, `not_found`, and `error`. | | +| `created_after` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Optional ISO 8601 timestamp. Includes only logs with `created_at >= created_after`. | | +| `created_before` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Optional ISO 8601 timestamp. Includes only logs with `created_at < created_before`. | | +| `partition` | *OptionalNullable[str]* | :heavy_minus_sign: | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition. | acme_customer_id | \ No newline at end of file diff --git a/docs/models/listinstructionentityextractionlogsresponse.md b/docs/models/listinstructionentityextractionlogsresponse.md new file mode 100644 index 0000000..c4b72f8 --- /dev/null +++ b/docs/models/listinstructionentityextractionlogsresponse.md @@ -0,0 +1,8 @@ +# ListInstructionEntityExtractionLogsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `result` | [models.InstructionEntityExtractionLogList](../models/instructionentityextractionloglist.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/listitem.md b/docs/models/listitem.md new file mode 100644 index 0000000..f4456fa --- /dev/null +++ b/docs/models/listitem.md @@ -0,0 +1,9 @@ +# ListItem + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `type` | *Optional[Literal["ListItem"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/location.md b/docs/models/location.md new file mode 100644 index 0000000..6db7996 --- /dev/null +++ b/docs/models/location.md @@ -0,0 +1,29 @@ +# Location + + +## Supported Types + +### `models.BoundingBoxLocation` + +```python +value: models.BoundingBoxLocation = /* values here */ +``` + +### `models.CharacterIndexLocation` + +```python +value: models.CharacterIndexLocation = /* values here */ +``` + +### `models.DurationLocation` + +```python +value: models.DurationLocation = /* values here */ +``` + +### `models.SpreadsheetLocation` + +```python +value: models.SpreadsheetLocation = /* values here */ +``` + diff --git a/docs/models/logo.md b/docs/models/logo.md new file mode 100644 index 0000000..46c1aa2 --- /dev/null +++ b/docs/models/logo.md @@ -0,0 +1,11 @@ +# Logo + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `type` | *Optional[Literal["Logo"]]* | :heavy_minus_sign: | N/A | +| `content` | *Optional[str]* | :heavy_minus_sign: | The text visible inside the logo (OCR) | +| `description` | *str* | :heavy_check_mark: | A detailed description of the logo | +| `base64_data` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/mediamodeparam.md b/docs/models/mediamodeparam.md index d9127fd..feed1a8 100644 --- a/docs/models/mediamodeparam.md +++ b/docs/models/mediamodeparam.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `static` | [OptionalNullable[models.Static]](../models/static.md) | :heavy_minus_sign: | N/A | -| `audio` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | -| `video` | [OptionalNullable[models.Video]](../models/video.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `static` | [OptionalNullable[models.Static]](../models/static.md) | :heavy_minus_sign: | N/A | +| `audio` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | +| `video` | [OptionalNullable[models.MediaModeParamVideo]](../models/mediamodeparamvideo.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/mediamodeparamvideo.md b/docs/models/mediamodeparamvideo.md new file mode 100644 index 0000000..4b7b4f0 --- /dev/null +++ b/docs/models/mediamodeparamvideo.md @@ -0,0 +1,18 @@ +# MediaModeParamVideo + +## Example Usage + +```python +from ragie.models import MediaModeParamVideo + +value = MediaModeParamVideo.AUDIO_ONLY +``` + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `AUDIO_ONLY` | audio_only | +| `VIDEO_ONLY` | video_only | +| `AUDIO_VIDEO` | audio_video | \ No newline at end of file diff --git a/docs/models/mediatype.md b/docs/models/mediatype.md index a787f86..68d4a3f 100644 --- a/docs/models/mediatype.md +++ b/docs/models/mediatype.md @@ -2,6 +2,14 @@ The desired media type of the content to return described as a mime type. An error will be returned if the requested media type is not supported for the chunk's document type. +## Example Usage + +```python +from ragie.models import MediaType + +value = MediaType.TEXT_PLAIN +``` + ## Values diff --git a/docs/models/metadata.md b/docs/models/metadata.md index fdf0ff4..9aeb2ca 100644 --- a/docs/models/metadata.md +++ b/docs/models/metadata.md @@ -9,6 +9,12 @@ value: str = /* values here */ ``` +### `int` + +```python +value: int = /* values here */ +``` + ### `float` ```python diff --git a/docs/models/mode.md b/docs/models/mode.md index 16130ef..0481408 100644 --- a/docs/models/mode.md +++ b/docs/models/mode.md @@ -1,6 +1,59 @@ # Mode -Partition strategy for the document. Different strategies exist for textual, audio and video file types and you can set the strategy you want for each file type, or just for textual types. For textual documents the options are `'hi_res'` or `'fast'`. When set to `'hi_res'`, images and tables will be extracted from the document. `'fast'` will only extract text. `'fast'` may be up to 20x faster than `'hi_res'`. `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. Images will always be processed in `hi_res`. If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. For audio files, the options are true or false. True if you want to process audio, false otherwise. For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. `'audio_only'` will extract just the audio part of the video. `'video_only'` will similarly just extract the video part, ignoring audio. `'audio_video'` will extract both audio and video. To process all media types at the highest quality, use `'all'`. When you specify audio or video stategies, the format must be a JSON object. In this case, textual documents are denoted by the key "static". If you omit a key, that document type won't be processd. See examples below. Examples Textual documents only "fast" Video documents only { "video": "audio_video" } Specify multiple document types { "static": "hi_res", "audio": true, "video": "video_only" } Specify only textual or audio document types { "static": "fast", "audio": true } Highest quality processing for all media types "all" +Partition strategy for the document. +Different strategies exist for textual, audio and video file types and you can set the strategy you want for +each file type, or just for textual types. + +For textual documents the options are `'hi_res'` or `'fast'`. +When set to `'hi_res'`, images and tables will be extracted from the document. +`'fast'` will only extract text. +`'fast'` may be up to 20x faster than `'hi_res'`. +`hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. +Images will always be processed in `hi_res`. +If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. + +For audio files, the options are true or false. True if you want to process audio, false otherwise. + +For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. +`'audio_only'` will extract just the audio part of the video. +`'video_only'` will similarly just extract the video part, ignoring audio. +`'audio_video'` will extract both audio and video. + +To process all media types at the highest quality, use `'all'`. + +When you specify audio or video stategies, the format must be a JSON object. In this case, +textual documents are denoted by the key "static". If you omit a key, that document type won't be processd. +See examples below. + +Examples + +Textual documents only + "fast" + +Video documents only +{ + "video": "audio_video" +} + +Specify multiple document types +{ + "static": "hi_res", + "audio": true, + "video": "video_only" +} + +Specify only textual or audio document types +{ + "static": "fast", + "audio": true +} + +Highest quality processing for all media types + "all" + +Agentic OCR + "agentic_ocr" + Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai. ## Supported Types diff --git a/docs/models/mode1.md b/docs/models/mode1.md index e1fdc0d..2415e96 100644 --- a/docs/models/mode1.md +++ b/docs/models/mode1.md @@ -1,9 +1,18 @@ # Mode1 +## Example Usage + +```python +from ragie.models import Mode1 + +value = Mode1.HI_RES +``` + ## Values -| Name | Value | -| -------- | -------- | -| `HI_RES` | hi_res | -| `FAST` | fast | \ No newline at end of file +| Name | Value | +| ------------- | ------------- | +| `HI_RES` | hi_res | +| `FAST` | fast | +| `AGENTIC_OCR` | agentic_ocr | \ No newline at end of file diff --git a/docs/models/modestatic.md b/docs/models/modestatic.md index 798ad31..fe67158 100644 --- a/docs/models/modestatic.md +++ b/docs/models/modestatic.md @@ -1,5 +1,13 @@ # ModeStatic +## Example Usage + +```python +from ragie.models import ModeStatic + +value = ModeStatic.HI_RES +``` + ## Values diff --git a/docs/models/modevideo.md b/docs/models/modevideo.md index aba18a6..273832f 100644 --- a/docs/models/modevideo.md +++ b/docs/models/modevideo.md @@ -1,5 +1,13 @@ # ModeVideo +## Example Usage + +```python +from ragie.models import ModeVideo + +value = ModeVideo.AUDIO_ONLY +``` + ## Values diff --git a/docs/models/narrativetext.md b/docs/models/narrativetext.md new file mode 100644 index 0000000..8b515b5 --- /dev/null +++ b/docs/models/narrativetext.md @@ -0,0 +1,9 @@ +# NarrativeText + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `type` | *Optional[Literal["NarrativeText"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The text content | \ No newline at end of file diff --git a/docs/models/oauthurlcreate.md b/docs/models/oauthurlcreate.md index 8861303..431789e 100644 --- a/docs/models/oauthurlcreate.md +++ b/docs/models/oauthurlcreate.md @@ -13,4 +13,5 @@ | `theme` | [OptionalNullable[models.Theme]](../models/theme.md) | :heavy_minus_sign: | Sets the theme of the Ragie Web UI when the user lands there. Can be light, dark, or system to use whatever the system value is. If omitted, system is used. | | | `page_limit` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of pages a connection will sync. The connection will be disabled after this limit is reached. Some in progress documents may continue processing after the limit is reached. The limit will be enforced at the start of the next document sync. Remove the limit by setting to null. | 1000 | | `config` | Dict[str, *Any*] | :heavy_minus_sign: | Optional config per connector | | -| `authenticator_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `authenticator_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `workflow` | [OptionalNullable[models.DocumentWorkflow]](../models/documentworkflow.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/oauthurlcreatemode1.md b/docs/models/oauthurlcreatemode1.md index 33f6898..8d7ec0c 100644 --- a/docs/models/oauthurlcreatemode1.md +++ b/docs/models/oauthurlcreatemode1.md @@ -1,9 +1,18 @@ # OAuthURLCreateMode1 +## Example Usage + +```python +from ragie.models import OAuthURLCreateMode1 + +value = OAuthURLCreateMode1.HI_RES +``` + ## Values -| Name | Value | -| -------- | -------- | -| `HI_RES` | hi_res | -| `FAST` | fast | \ No newline at end of file +| Name | Value | +| ------------- | ------------- | +| `HI_RES` | hi_res | +| `FAST` | fast | +| `AGENTIC_OCR` | agentic_ocr | \ No newline at end of file diff --git a/docs/models/orderedlist.md b/docs/models/orderedlist.md new file mode 100644 index 0000000..565603c --- /dev/null +++ b/docs/models/orderedlist.md @@ -0,0 +1,9 @@ +# OrderedList + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `type` | *Optional[Literal["OrderedList"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The text content of the list and each list item. | \ No newline at end of file diff --git a/docs/models/pagebreak.md b/docs/models/pagebreak.md new file mode 100644 index 0000000..c060051 --- /dev/null +++ b/docs/models/pagebreak.md @@ -0,0 +1,8 @@ +# PageBreak + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | +| `type` | *Optional[Literal["PageBreak"]]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/partitionstrategy1.md b/docs/models/partitionstrategy1.md index dce0eef..75407e1 100644 --- a/docs/models/partitionstrategy1.md +++ b/docs/models/partitionstrategy1.md @@ -1,9 +1,18 @@ # PartitionStrategy1 +## Example Usage + +```python +from ragie.models import PartitionStrategy1 + +value = PartitionStrategy1.HI_RES +``` + ## Values -| Name | Value | -| -------- | -------- | -| `HI_RES` | hi_res | -| `FAST` | fast | \ No newline at end of file +| Name | Value | +| ------------- | ------------- | +| `HI_RES` | hi_res | +| `FAST` | fast | +| `AGENTIC_OCR` | agentic_ocr | \ No newline at end of file diff --git a/docs/models/patchinstructionparams.md b/docs/models/patchinstructionparams.md new file mode 100644 index 0000000..5281fc2 --- /dev/null +++ b/docs/models/patchinstructionparams.md @@ -0,0 +1,14 @@ +# PatchInstructionParams + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *Optional[str]* | :heavy_minus_sign: | The name of the instruction. Must be unique. | Find all pizzas | +| `active` | *Optional[bool]* | :heavy_minus_sign: | Whether the instruction is active. Active instructions are applied to documents when they're created or when their file is updated. | true | +| `scope` | [Optional[models.PatchInstructionParamsScope]](../models/patchinstructionparamsscope.md) | :heavy_minus_sign: | The scope of the instruction. Determines whether the instruction is applied to the entire document or to each chunk of the document. Options are `'document'` or `'chunk'`. Generally `'document'` should be used when analyzing the full document is desired, such as when generating a summary or determining sentiment, and `'chunk'` should be used when a fine grained search over a document is desired. | document | +| `prompt` | *Optional[str]* | :heavy_minus_sign: | A natural language instruction which will be applied to documents as they are created and updated. The results of the `instruction_prompt` will be stored as an `entity` in the schema defined by the `entity_schema` parameter. | Find all pizzas described in the text. | +| `context_template` | *Optional[str]* | :heavy_minus_sign: | An optional mustache style template used to prepend document context to the content sent for entity extraction. Available variables include `document.name`, `document.type`, `document.source`, and nested values under `document.metadata`. | Document: {{document.name}} {{document.metadata.key_foo}} | +| `entity_schema` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | +| `filter_` | Dict[str, *Any*] | :heavy_minus_sign: | An optional metadata filter that is matched against document metadata during update and creation. The instruction will only be applied to documents with metadata matching the filter. The following filter operators are supported: $eq - Equal to (number, string, boolean), $ne - Not equal to (number, string, boolean), $gt - Greater than (number), $gte - Greater than or equal to (number), $lt - Less than (number), $lte - Less than or equal to (number), $in - In array (string or number), $nin - Not in array (string or number). The operators can be combined with AND and OR. Read [Metadata & Filters guide](https://docs.ragie.ai/docs/metadata-filters) for more details and examples. | {
"toppings": {
"$in": [
"pizza",
"mushrooms"
]
}
} | \ No newline at end of file diff --git a/docs/models/patchinstructionparamsscope.md b/docs/models/patchinstructionparamsscope.md new file mode 100644 index 0000000..9718711 --- /dev/null +++ b/docs/models/patchinstructionparamsscope.md @@ -0,0 +1,19 @@ +# PatchInstructionParamsScope + +The scope of the instruction. Determines whether the instruction is applied to the entire document or to each chunk of the document. Options are `'document'` or `'chunk'`. Generally `'document'` should be used when analyzing the full document is desired, such as when generating a summary or determining sentiment, and `'chunk'` should be used when a fine grained search over a document is desired. + +## Example Usage + +```python +from ragie.models import PatchInstructionParamsScope + +value = PatchInstructionParamsScope.DOCUMENT +``` + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `DOCUMENT` | document | +| `CHUNK` | chunk | \ No newline at end of file diff --git a/docs/models/patchinstructionrequest.md b/docs/models/patchinstructionrequest.md new file mode 100644 index 0000000..902e3a7 --- /dev/null +++ b/docs/models/patchinstructionrequest.md @@ -0,0 +1,9 @@ +# PatchInstructionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `instruction_id` | *str* | :heavy_check_mark: | The ID of the instruction. | 00000000-0000-0000-0000-000000000000 | +| `patch_instruction_params` | [models.PatchInstructionParams](../models/patchinstructionparams.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/provider.md b/docs/models/provider.md index 7e08e14..d326cdc 100644 --- a/docs/models/provider.md +++ b/docs/models/provider.md @@ -1,5 +1,13 @@ # Provider +## Example Usage + +```python +from ragie.models import Provider + +value = Provider.ATLASSIAN +``` + ## Values diff --git a/docs/models/publiccreateconnection.md b/docs/models/publiccreateconnection.md index efc9912..5ffd05b 100644 --- a/docs/models/publiccreateconnection.md +++ b/docs/models/publiccreateconnection.md @@ -7,7 +7,8 @@ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `partition_strategy` | [models.MediaModeParam](../models/mediamodeparam.md) | :heavy_check_mark: | N/A | | | `partition` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | -| `page_limit` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `config` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | +| `page_limit` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | 100 | +| `config` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `metadata` | Dict[str, [models.PublicCreateConnectionMetadata](../models/publiccreateconnectionmetadata.md)] | :heavy_minus_sign: | Metadata for the document. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. 1000 total values are allowed. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`, `start_time`, `end_time`, `chunk_content_type`. | | +| `workflow` | [OptionalNullable[models.DocumentWorkflow]](../models/documentworkflow.md) | :heavy_minus_sign: | N/A | | | `connection` | [models.PublicCreateConnectionConnection](../models/publiccreateconnectionconnection.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/publiccreateconnectionconnection.md b/docs/models/publiccreateconnectionconnection.md index 9fd40ff..a9052c8 100644 --- a/docs/models/publiccreateconnectionconnection.md +++ b/docs/models/publiccreateconnectionconnection.md @@ -33,6 +33,12 @@ value: models.PublicIntercomConnection = /* values here */ value: models.PublicS3CompatibleConnection = /* values here */ ``` +### `models.PublicWebcrawlerConnection` + +```python +value: models.PublicWebcrawlerConnection = /* values here */ +``` + ### `models.PublicZendeskConnection` ```python diff --git a/docs/models/publicwebcrawlerconnection.md b/docs/models/publicwebcrawlerconnection.md new file mode 100644 index 0000000..c064497 --- /dev/null +++ b/docs/models/publicwebcrawlerconnection.md @@ -0,0 +1,10 @@ +# PublicWebcrawlerConnection + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `provider` | *Literal["webcrawler"]* | :heavy_check_mark: | N/A | +| `data` | [models.WebcrawlerData](../models/webcrawlerdata.md) | :heavy_check_mark: | N/A | +| `credentials` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/qrcode.md b/docs/models/qrcode.md new file mode 100644 index 0000000..696f51e --- /dev/null +++ b/docs/models/qrcode.md @@ -0,0 +1,9 @@ +# QRCode + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | +| `type` | *Optional[Literal["QrCode"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The value the QR code represents | \ No newline at end of file diff --git a/docs/models/queryparam1.md b/docs/models/queryparam1.md index afd85ba..ee9fc53 100644 --- a/docs/models/queryparam1.md +++ b/docs/models/queryparam1.md @@ -1,5 +1,13 @@ # QueryParam1 +## Example Usage + +```python +from ragie.models import QueryParam1 + +value = QueryParam1.TEXT_PLAIN +``` + ## Values diff --git a/docs/models/queryparamstatus.md b/docs/models/queryparamstatus.md new file mode 100644 index 0000000..3b1d9e4 --- /dev/null +++ b/docs/models/queryparamstatus.md @@ -0,0 +1,20 @@ +# QueryParamStatus + +Optional extraction status filter. Supported values are `extracted`, `not_found`, and `error`. + +## Example Usage + +```python +from ragie.models import QueryParamStatus + +value = QueryParamStatus.EXTRACTED +``` + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `EXTRACTED` | extracted | +| `NOT_FOUND` | not_found | +| `ERROR` | error | \ No newline at end of file diff --git a/docs/models/quote.md b/docs/models/quote.md new file mode 100644 index 0000000..a23b6a2 --- /dev/null +++ b/docs/models/quote.md @@ -0,0 +1,9 @@ +# Quote + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `type` | *Optional[Literal["Quote"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The text content | \ No newline at end of file diff --git a/docs/models/reason.md b/docs/models/reason.md index f2195ad..4fcba64 100644 --- a/docs/models/reason.md +++ b/docs/models/reason.md @@ -1,5 +1,13 @@ # Reason +## Example Usage + +```python +from ragie.models import Reason + +value = Reason.CONNECTION_OVER_TOTAL_PAGE_LIMIT +``` + ## Values diff --git a/docs/models/reasoncode.md b/docs/models/reasoncode.md new file mode 100644 index 0000000..09a7159 --- /dev/null +++ b/docs/models/reasoncode.md @@ -0,0 +1,20 @@ +# ReasonCode + +## Example Usage + +```python +from ragie.models import ReasonCode + +value = ReasonCode.NO_MATCH +``` + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `NO_MATCH` | NO_MATCH | +| `AMBIGUOUS` | AMBIGUOUS | +| `OUT_OF_SCOPE` | OUT_OF_SCOPE | +| `SCHEMA_INVALID` | SCHEMA_INVALID | +| `MODEL_ERROR` | MODEL_ERROR | \ No newline at end of file diff --git a/docs/models/reasoningoutputstatus.md b/docs/models/reasoningoutputstatus.md index 0e6d979..8696891 100644 --- a/docs/models/reasoningoutputstatus.md +++ b/docs/models/reasoningoutputstatus.md @@ -1,5 +1,13 @@ # ReasoningOutputStatus +## Example Usage + +```python +from ragie.models import ReasoningOutputStatus + +value = ReasoningOutputStatus.IN_PROGRESS +``` + ## Values diff --git a/docs/models/response.md b/docs/models/response.md index 8f3fa1f..14ec306 100644 --- a/docs/models/response.md +++ b/docs/models/response.md @@ -8,7 +8,7 @@ | `id` | *str* | :heavy_check_mark: | N/A | | `object` | *Optional[Literal["response"]]* | :heavy_minus_sign: | N/A | | `created_at` | *int* | :heavy_check_mark: | N/A | -| `status` | [models.Status](../models/status.md) | :heavy_check_mark: | N/A | +| `status` | [models.ResponseStatus](../models/responsestatus.md) | :heavy_check_mark: | N/A | | `error` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `incomplete_details` | *OptionalNullable[Any]* | :heavy_minus_sign: | N/A | | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | diff --git a/docs/models/responsestatus.md b/docs/models/responsestatus.md new file mode 100644 index 0000000..e47d88b --- /dev/null +++ b/docs/models/responsestatus.md @@ -0,0 +1,19 @@ +# ResponseStatus + +## Example Usage + +```python +from ragie.models import ResponseStatus + +value = ResponseStatus.COMPLETED +``` + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `COMPLETED` | completed | +| `FAILED` | failed | +| `IN_PROGRESS` | in_progress | +| `CANCELLED` | cancelled | \ No newline at end of file diff --git a/docs/models/scope.md b/docs/models/scope.md index c0326c4..29cdf74 100644 --- a/docs/models/scope.md +++ b/docs/models/scope.md @@ -2,6 +2,14 @@ The scope of the instruction. Determines whether the instruction is applied to the entire document or to each chunk of the document. Options are `'document'` or `'chunk'`. Generally `'document'` should be used when analyzing the full document is desired, such as when generating a summary or determining sentiment, and `'chunk'` should be used when a fine grained search over a document is desired. +## Example Usage + +```python +from ragie.models import Scope + +value = Scope.DOCUMENT +``` + ## Values diff --git a/docs/models/searcheffort.md b/docs/models/searcheffort.md index 7b9828b..ea5723f 100644 --- a/docs/models/searcheffort.md +++ b/docs/models/searcheffort.md @@ -1,5 +1,13 @@ # SearchEffort +## Example Usage + +```python +from ragie.models import SearchEffort + +value = SearchEffort.LOW +``` + ## Values diff --git a/docs/models/sectionheader.md b/docs/models/sectionheader.md new file mode 100644 index 0000000..a23f07f --- /dev/null +++ b/docs/models/sectionheader.md @@ -0,0 +1,9 @@ +# SectionHeader + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `type` | *Optional[Literal["SectionHeader"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The text content | \ No newline at end of file diff --git a/docs/models/signature.md b/docs/models/signature.md new file mode 100644 index 0000000..35554b1 --- /dev/null +++ b/docs/models/signature.md @@ -0,0 +1,14 @@ +# Signature + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `type` | *Optional[Literal["Signature"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | Content of the signature. | +| `description` | *str* | :heavy_check_mark: | A detailed description of the signature. | +| `label` | *str* | :heavy_check_mark: | The printed text indicating who should sign (e.g., 'Driver Signature', 'Authorized By'). | +| `is_signed` | *bool* | :heavy_check_mark: | True if a handwritten signature, digital signature, or stamp is present. False if blank. | +| `signer_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the signer | +| `date_` | *OptionalNullable[str]* | :heavy_minus_sign: | The date of the signature if present | \ No newline at end of file diff --git a/docs/models/spreadsheetlocation.md b/docs/models/spreadsheetlocation.md new file mode 100644 index 0000000..0ab9ad8 --- /dev/null +++ b/docs/models/spreadsheetlocation.md @@ -0,0 +1,13 @@ +# SpreadsheetLocation + +Location within a spreadsheet using cell ranges. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `location_type` | *Optional[Literal["spreadsheet"]]* | :heavy_minus_sign: | N/A | +| `range` | *OptionalNullable[str]* | :heavy_minus_sign: | Excel-style range like 'A1:C10' | +| `sheet_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of the sheet | +| `sheet_index` | *OptionalNullable[int]* | :heavy_minus_sign: | 0-based index of the sheet | \ No newline at end of file diff --git a/docs/models/stamp.md b/docs/models/stamp.md new file mode 100644 index 0000000..552ca09 --- /dev/null +++ b/docs/models/stamp.md @@ -0,0 +1,10 @@ +# Stamp + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `type` | *Optional[Literal["Stamp"]]* | :heavy_minus_sign: | N/A | +| `content` | *Optional[str]* | :heavy_minus_sign: | The text inside the stamp | +| `description` | *Optional[str]* | :heavy_minus_sign: | A detailed description of what the visual depicts. | \ No newline at end of file diff --git a/docs/models/static.md b/docs/models/static.md index 35c6320..7ca5a3d 100644 --- a/docs/models/static.md +++ b/docs/models/static.md @@ -1,9 +1,18 @@ # Static +## Example Usage + +```python +from ragie.models import Static + +value = Static.HI_RES +``` + ## Values -| Name | Value | -| -------- | -------- | -| `HI_RES` | hi_res | -| `FAST` | fast | \ No newline at end of file +| Name | Value | +| ------------- | ------------- | +| `HI_RES` | hi_res | +| `FAST` | fast | +| `AGENTIC_OCR` | agentic_ocr | \ No newline at end of file diff --git a/docs/models/status.md b/docs/models/status.md index 22357d1..4989bb0 100644 --- a/docs/models/status.md +++ b/docs/models/status.md @@ -1,11 +1,20 @@ # Status +Extraction status for this attempt. + +## Example Usage + +```python +from ragie.models import Status + +value = Status.EXTRACTED +``` + ## Values -| Name | Value | -| ------------- | ------------- | -| `COMPLETED` | completed | -| `FAILED` | failed | -| `IN_PROGRESS` | in_progress | -| `CANCELLED` | cancelled | \ No newline at end of file +| Name | Value | +| ----------- | ----------- | +| `EXTRACTED` | extracted | +| `NOT_FOUND` | not_found | +| `ERROR` | error | \ No newline at end of file diff --git a/docs/models/subheader.md b/docs/models/subheader.md new file mode 100644 index 0000000..1e608f1 --- /dev/null +++ b/docs/models/subheader.md @@ -0,0 +1,9 @@ +# SubHeader + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | +| `type` | *Optional[Literal["SubHeader"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The text content | \ No newline at end of file diff --git a/docs/models/table.md b/docs/models/table.md new file mode 100644 index 0000000..0c1af4b --- /dev/null +++ b/docs/models/table.md @@ -0,0 +1,11 @@ +# Table + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Optional[Literal["Table"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The Table in HTML. | +| `description` | *str* | :heavy_check_mark: | A brief summary of the content in the table. | +| `header_range` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional normalized header rows range used for construction. | \ No newline at end of file diff --git a/docs/models/tableofcontents.md b/docs/models/tableofcontents.md new file mode 100644 index 0000000..3df7851 --- /dev/null +++ b/docs/models/tableofcontents.md @@ -0,0 +1,9 @@ +# TableOfContents + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `type` | *Optional[Literal["TableOfContents"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | Text content of the table of contents | \ No newline at end of file diff --git a/docs/models/text.md b/docs/models/text.md new file mode 100644 index 0000000..95ea22d --- /dev/null +++ b/docs/models/text.md @@ -0,0 +1,10 @@ +# Text + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `type` | *Optional[Literal["Text"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The text content | +| `handwritten` | *Optional[bool]* | :heavy_minus_sign: | True if handwritten, false otherwise | \ No newline at end of file diff --git a/docs/models/theme.md b/docs/models/theme.md index 5a2bff8..4e68a5e 100644 --- a/docs/models/theme.md +++ b/docs/models/theme.md @@ -1,5 +1,13 @@ # Theme +## Example Usage + +```python +from ragie.models import Theme + +value = Theme.LIGHT +``` + ## Values diff --git a/docs/models/time.md b/docs/models/time.md new file mode 100644 index 0000000..e16842e --- /dev/null +++ b/docs/models/time.md @@ -0,0 +1,9 @@ +# Time + + +## Fields + +| Field | Type | Required | Description | +| --------------------------- | --------------------------- | --------------------------- | --------------------------- | +| `type` | *Optional[Literal["Time"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The time text content | \ No newline at end of file diff --git a/docs/models/title.md b/docs/models/title.md new file mode 100644 index 0000000..6a83bbc --- /dev/null +++ b/docs/models/title.md @@ -0,0 +1,9 @@ +# Title + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `type` | *Optional[Literal["Title"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The text content | \ No newline at end of file diff --git a/docs/models/two1.md b/docs/models/two1.md index 29887a5..04d7c09 100644 --- a/docs/models/two1.md +++ b/docs/models/two1.md @@ -1,5 +1,13 @@ # Two1 +## Example Usage + +```python +from ragie.models import Two1 + +value = Two1.HI_RES +``` + ## Values diff --git a/docs/models/type.md b/docs/models/type.md index 258c6a3..fcbc910 100644 --- a/docs/models/type.md +++ b/docs/models/type.md @@ -1,5 +1,13 @@ # Type +## Example Usage + +```python +from ragie.models import Type + +value = Type.FILE +``` + ## Values diff --git a/docs/models/uncategorizedtext.md b/docs/models/uncategorizedtext.md new file mode 100644 index 0000000..e5fdc72 --- /dev/null +++ b/docs/models/uncategorizedtext.md @@ -0,0 +1,8 @@ +# UncategorizedText + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `content` | *str* | :heavy_check_mark: | The text content | \ No newline at end of file diff --git a/docs/models/unorderedlist.md b/docs/models/unorderedlist.md new file mode 100644 index 0000000..8704c31 --- /dev/null +++ b/docs/models/unorderedlist.md @@ -0,0 +1,9 @@ +# UnorderedList + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `type` | *Optional[Literal["UnorderedList"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The text content of the list and each list item. | \ No newline at end of file diff --git a/docs/models/updatedocumentfileparams.md b/docs/models/updatedocumentfileparams.md index acda3ad..ab225eb 100644 --- a/docs/models/updatedocumentfileparams.md +++ b/docs/models/updatedocumentfileparams.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `mode` | [Optional[models.UpdateDocumentFileParamsMode]](../models/updatedocumentfileparamsmode.md) | :heavy_minus_sign: | Partition strategy for the document. Different strategies exist for textual, audio and video file types and you can set the strategy you want for each file type, or just for textual types. For textual documents the options are `'hi_res'` or `'fast'`. When set to `'hi_res'`, images and tables will be extracted from the document. `'fast'` will only extract text. `'fast'` may be up to 20x faster than `'hi_res'`. `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. Images will always be processed in `hi_res`. If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. For audio files, the options are true or false. True if you want to process audio, false otherwise. For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. `'audio_only'` will extract just the audio part of the video. `'video_only'` will similarly just extract the video part, ignoring audio. `'audio_video'` will extract both audio and video. To process all media types at the highest quality, use `'all'`. When you specify audio or video stategies, the format must be a JSON object. In this case, textual documents are denoted by the key "static". If you omit a key, that document type won't be processd. See examples below. Examples Textual documents only "fast" Video documents only { "video": "audio_video" } Specify multiple document types { "static": "hi_res", "audio": true, "video": "video_only" } Specify only textual or audio document types { "static": "fast", "audio": true } Highest quality processing for all media types "all" | -| `file` | [models.UpdateDocumentFileParamsFile](../models/updatedocumentfileparamsfile.md) | :heavy_check_mark: | The binary file to upload, extract, and index for retrieval. The following file types are supported: Plain Text: `.eml` `.html` `.json` `.md` `.msg` `.rst` `.rtf` `.txt` `.xml`
Images: `.png` `.webp` `.jpg` `.jpeg` `.tiff` `.bmp` `.heic`
Documents: `.csv` `.doc` `.docx` `.epub` `.epub+zip` `.odt` `.pdf` `.ppt` `.pptx` `.tsv` `.xlsx` `.xls`. PDF files over 2000 pages are not supported in hi_res mode. | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mode` | [Optional[models.UpdateDocumentFileParamsMode]](../models/updatedocumentfileparamsmode.md) | :heavy_minus_sign: | Partition strategy for the document.
Different strategies exist for textual, audio and video file types and you can set the strategy you want for
each file type, or just for textual types.

For textual documents the options are `'hi_res'` or `'fast'`.
When set to `'hi_res'`, images and tables will be extracted from the document.
`'fast'` will only extract text.
`'fast'` may be up to 20x faster than `'hi_res'`.
`hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints.
Images will always be processed in `hi_res`.
If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode.

For audio files, the options are true or false. True if you want to process audio, false otherwise.

For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`.
`'audio_only'` will extract just the audio part of the video.
`'video_only'` will similarly just extract the video part, ignoring audio.
`'audio_video'` will extract both audio and video.

To process all media types at the highest quality, use `'all'`.

When you specify audio or video stategies, the format must be a JSON object. In this case,
textual documents are denoted by the key "static". If you omit a key, that document type won't be processd.
See examples below.

Examples

Textual documents only
"fast"

Video documents only
{
"video": "audio_video"
}

Specify multiple document types
{
"static": "hi_res",
"audio": true,
"video": "video_only"
}

Specify only textual or audio document types
{
"static": "fast",
"audio": true
}

Highest quality processing for all media types
"all"

Agentic OCR
"agentic_ocr"
Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai. | +| `file` | [models.UpdateDocumentFileParamsFile](../models/updatedocumentfileparamsfile.md) | :heavy_check_mark: | The binary file to upload, extract, and index for retrieval. The following file types are supported: Plain Text: `.eml` `.html` `.json` `.md` `.msg` `.rst` `.rtf` `.txt` `.xml`
Images: `.png` `.webp` `.jpg` `.jpeg` `.tiff` `.bmp` `.heic`
Documents: `.csv` `.doc` `.docx` `.epub` `.epub+zip` `.odt` `.pdf` `.ppt` `.pptx` `.tsv` `.xlsx` `.xls`. PDF files over 2000 pages are not supported in hi_res mode. | \ No newline at end of file diff --git a/docs/models/updatedocumentfileparams21.md b/docs/models/updatedocumentfileparams21.md index 622af9a..5919f39 100644 --- a/docs/models/updatedocumentfileparams21.md +++ b/docs/models/updatedocumentfileparams21.md @@ -1,5 +1,13 @@ # UpdateDocumentFileParams21 +## Example Usage + +```python +from ragie.models import UpdateDocumentFileParams21 + +value = UpdateDocumentFileParams21.HI_RES +``` + ## Values diff --git a/docs/models/updatedocumentfileparamsmode.md b/docs/models/updatedocumentfileparamsmode.md index e40d073..da5f7d1 100644 --- a/docs/models/updatedocumentfileparamsmode.md +++ b/docs/models/updatedocumentfileparamsmode.md @@ -1,6 +1,59 @@ # UpdateDocumentFileParamsMode -Partition strategy for the document. Different strategies exist for textual, audio and video file types and you can set the strategy you want for each file type, or just for textual types. For textual documents the options are `'hi_res'` or `'fast'`. When set to `'hi_res'`, images and tables will be extracted from the document. `'fast'` will only extract text. `'fast'` may be up to 20x faster than `'hi_res'`. `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. Images will always be processed in `hi_res`. If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. For audio files, the options are true or false. True if you want to process audio, false otherwise. For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. `'audio_only'` will extract just the audio part of the video. `'video_only'` will similarly just extract the video part, ignoring audio. `'audio_video'` will extract both audio and video. To process all media types at the highest quality, use `'all'`. When you specify audio or video stategies, the format must be a JSON object. In this case, textual documents are denoted by the key "static". If you omit a key, that document type won't be processd. See examples below. Examples Textual documents only "fast" Video documents only { "video": "audio_video" } Specify multiple document types { "static": "hi_res", "audio": true, "video": "video_only" } Specify only textual or audio document types { "static": "fast", "audio": true } Highest quality processing for all media types "all" +Partition strategy for the document. +Different strategies exist for textual, audio and video file types and you can set the strategy you want for +each file type, or just for textual types. + +For textual documents the options are `'hi_res'` or `'fast'`. +When set to `'hi_res'`, images and tables will be extracted from the document. +`'fast'` will only extract text. +`'fast'` may be up to 20x faster than `'hi_res'`. +`hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. +Images will always be processed in `hi_res`. +If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. + +For audio files, the options are true or false. True if you want to process audio, false otherwise. + +For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. +`'audio_only'` will extract just the audio part of the video. +`'video_only'` will similarly just extract the video part, ignoring audio. +`'audio_video'` will extract both audio and video. + +To process all media types at the highest quality, use `'all'`. + +When you specify audio or video stategies, the format must be a JSON object. In this case, +textual documents are denoted by the key "static". If you omit a key, that document type won't be processd. +See examples below. + +Examples + +Textual documents only + "fast" + +Video documents only +{ + "video": "audio_video" +} + +Specify multiple document types +{ + "static": "hi_res", + "audio": true, + "video": "video_only" +} + +Specify only textual or audio document types +{ + "static": "fast", + "audio": true +} + +Highest quality processing for all media types + "all" + +Agentic OCR + "agentic_ocr" + Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai. ## Supported Types diff --git a/docs/models/updatedocumentfileparamsmodestatic.md b/docs/models/updatedocumentfileparamsmodestatic.md index ddf2ab2..fe3e3ba 100644 --- a/docs/models/updatedocumentfileparamsmodestatic.md +++ b/docs/models/updatedocumentfileparamsmodestatic.md @@ -1,5 +1,13 @@ # UpdateDocumentFileParamsModeStatic +## Example Usage + +```python +from ragie.models import UpdateDocumentFileParamsModeStatic + +value = UpdateDocumentFileParamsModeStatic.HI_RES +``` + ## Values diff --git a/docs/models/updatedocumentfileparamsmodevideo.md b/docs/models/updatedocumentfileparamsmodevideo.md index 1de9669..97ebf2c 100644 --- a/docs/models/updatedocumentfileparamsmodevideo.md +++ b/docs/models/updatedocumentfileparamsmodevideo.md @@ -1,5 +1,13 @@ # UpdateDocumentFileParamsModeVideo +## Example Usage + +```python +from ragie.models import UpdateDocumentFileParamsModeVideo + +value = UpdateDocumentFileParamsModeVideo.AUDIO_ONLY +``` + ## Values diff --git a/docs/models/updatedocumentfromurlparams.md b/docs/models/updatedocumentfromurlparams.md index d48c61d..7281b26 100644 --- a/docs/models/updatedocumentfromurlparams.md +++ b/docs/models/updatedocumentfromurlparams.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `mode` | [Optional[models.UpdateDocumentFromURLParamsMode]](../models/updatedocumentfromurlparamsmode.md) | :heavy_minus_sign: | Partition strategy for the document. Different strategies exist for textual, audio and video file types and you can set the strategy you want for each file type, or just for textual types. For textual documents the options are `'hi_res'` or `'fast'`. When set to `'hi_res'`, images and tables will be extracted from the document. `'fast'` will only extract text. `'fast'` may be up to 20x faster than `'hi_res'`. `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. Images will always be processed in `hi_res`. If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. For audio files, the options are true or false. True if you want to process audio, false otherwise. For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. `'audio_only'` will extract just the audio part of the video. `'video_only'` will similarly just extract the video part, ignoring audio. `'audio_video'` will extract both audio and video. To process all media types at the highest quality, use `'all'`. When you specify audio or video stategies, the format must be a JSON object. In this case, textual documents are denoted by the key "static". If you omit a key, that document type won't be processd. See examples below. Examples Textual documents only "fast" Video documents only { "video": "audio_video" } Specify multiple document types { "static": "hi_res", "audio": true, "video": "video_only" } Specify only textual or audio document types { "static": "fast", "audio": true } Highest quality processing for all media types "all" | -| `url` | *str* | :heavy_check_mark: | Url of the file to download. Must be publicly accessible and HTTP or HTTPS scheme. | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mode` | [Optional[models.UpdateDocumentFromURLParamsMode]](../models/updatedocumentfromurlparamsmode.md) | :heavy_minus_sign: | Partition strategy for the document.
Different strategies exist for textual, audio and video file types and you can set the strategy you want for
each file type, or just for textual types.

For textual documents the options are `'hi_res'` or `'fast'`.
When set to `'hi_res'`, images and tables will be extracted from the document.
`'fast'` will only extract text.
`'fast'` may be up to 20x faster than `'hi_res'`.
`hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints.
Images will always be processed in `hi_res`.
If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode.

For audio files, the options are true or false. True if you want to process audio, false otherwise.

For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`.
`'audio_only'` will extract just the audio part of the video.
`'video_only'` will similarly just extract the video part, ignoring audio.
`'audio_video'` will extract both audio and video.

To process all media types at the highest quality, use `'all'`.

When you specify audio or video stategies, the format must be a JSON object. In this case,
textual documents are denoted by the key "static". If you omit a key, that document type won't be processd.
See examples below.

Examples

Textual documents only
"fast"

Video documents only
{
"video": "audio_video"
}

Specify multiple document types
{
"static": "hi_res",
"audio": true,
"video": "video_only"
}

Specify only textual or audio document types
{
"static": "fast",
"audio": true
}

Highest quality processing for all media types
"all"

Agentic OCR
"agentic_ocr"
Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai. | +| `url` | *str* | :heavy_check_mark: | Url of the file to download. Must be publicly accessible and HTTP or HTTPS scheme. | \ No newline at end of file diff --git a/docs/models/updatedocumentfromurlparamsmode.md b/docs/models/updatedocumentfromurlparamsmode.md index 71e65de..e3d2c7b 100644 --- a/docs/models/updatedocumentfromurlparamsmode.md +++ b/docs/models/updatedocumentfromurlparamsmode.md @@ -1,6 +1,59 @@ # UpdateDocumentFromURLParamsMode -Partition strategy for the document. Different strategies exist for textual, audio and video file types and you can set the strategy you want for each file type, or just for textual types. For textual documents the options are `'hi_res'` or `'fast'`. When set to `'hi_res'`, images and tables will be extracted from the document. `'fast'` will only extract text. `'fast'` may be up to 20x faster than `'hi_res'`. `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. Images will always be processed in `hi_res`. If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. For audio files, the options are true or false. True if you want to process audio, false otherwise. For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. `'audio_only'` will extract just the audio part of the video. `'video_only'` will similarly just extract the video part, ignoring audio. `'audio_video'` will extract both audio and video. To process all media types at the highest quality, use `'all'`. When you specify audio or video stategies, the format must be a JSON object. In this case, textual documents are denoted by the key "static". If you omit a key, that document type won't be processd. See examples below. Examples Textual documents only "fast" Video documents only { "video": "audio_video" } Specify multiple document types { "static": "hi_res", "audio": true, "video": "video_only" } Specify only textual or audio document types { "static": "fast", "audio": true } Highest quality processing for all media types "all" +Partition strategy for the document. +Different strategies exist for textual, audio and video file types and you can set the strategy you want for +each file type, or just for textual types. + +For textual documents the options are `'hi_res'` or `'fast'`. +When set to `'hi_res'`, images and tables will be extracted from the document. +`'fast'` will only extract text. +`'fast'` may be up to 20x faster than `'hi_res'`. +`hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. +Images will always be processed in `hi_res`. +If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. + +For audio files, the options are true or false. True if you want to process audio, false otherwise. + +For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. +`'audio_only'` will extract just the audio part of the video. +`'video_only'` will similarly just extract the video part, ignoring audio. +`'audio_video'` will extract both audio and video. + +To process all media types at the highest quality, use `'all'`. + +When you specify audio or video stategies, the format must be a JSON object. In this case, +textual documents are denoted by the key "static". If you omit a key, that document type won't be processd. +See examples below. + +Examples + +Textual documents only + "fast" + +Video documents only +{ + "video": "audio_video" +} + +Specify multiple document types +{ + "static": "hi_res", + "audio": true, + "video": "video_only" +} + +Specify only textual or audio document types +{ + "static": "fast", + "audio": true +} + +Highest quality processing for all media types + "all" + +Agentic OCR + "agentic_ocr" + Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai. ## Supported Types diff --git a/docs/models/updatedocumentfromurlparamsmode1.md b/docs/models/updatedocumentfromurlparamsmode1.md index 37f0e79..2398b39 100644 --- a/docs/models/updatedocumentfromurlparamsmode1.md +++ b/docs/models/updatedocumentfromurlparamsmode1.md @@ -1,9 +1,18 @@ # UpdateDocumentFromURLParamsMode1 +## Example Usage + +```python +from ragie.models import UpdateDocumentFromURLParamsMode1 + +value = UpdateDocumentFromURLParamsMode1.HI_RES +``` + ## Values -| Name | Value | -| -------- | -------- | -| `HI_RES` | hi_res | -| `FAST` | fast | \ No newline at end of file +| Name | Value | +| ------------- | ------------- | +| `HI_RES` | hi_res | +| `FAST` | fast | +| `AGENTIC_OCR` | agentic_ocr | \ No newline at end of file diff --git a/docs/models/updateinstructionparams.md b/docs/models/updateinstructionparams.md deleted file mode 100644 index c48062b..0000000 --- a/docs/models/updateinstructionparams.md +++ /dev/null @@ -1,8 +0,0 @@ -# UpdateInstructionParams - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | -| `active` | *bool* | :heavy_check_mark: | Whether the instruction is active. Active instructions are applied to documents when they're created or when their file is updated. | true | \ No newline at end of file diff --git a/docs/models/updateinstructionrequest.md b/docs/models/updateinstructionrequest.md deleted file mode 100644 index 0606081..0000000 --- a/docs/models/updateinstructionrequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# UpdateInstructionRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `instruction_id` | *str* | :heavy_check_mark: | The ID of the instruction. | 00000000-0000-0000-0000-000000000000 | -| `update_instruction_params` | [models.UpdateInstructionParams](../models/updateinstructionparams.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/video.md b/docs/models/video.md index 13d5503..605b0f4 100644 --- a/docs/models/video.md +++ b/docs/models/video.md @@ -1,10 +1,9 @@ # Video -## Values +## Fields -| Name | Value | -| ------------- | ------------- | -| `AUDIO_ONLY` | audio_only | -| `VIDEO_ONLY` | video_only | -| `AUDIO_VIDEO` | audio_video | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `type` | *Optional[Literal["Video"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | A description of what the video shows. | \ No newline at end of file diff --git a/docs/models/videosegment.md b/docs/models/videosegment.md new file mode 100644 index 0000000..402cd93 --- /dev/null +++ b/docs/models/videosegment.md @@ -0,0 +1,8 @@ +# VideoSegment + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `content` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/watermark.md b/docs/models/watermark.md new file mode 100644 index 0000000..024f159 --- /dev/null +++ b/docs/models/watermark.md @@ -0,0 +1,9 @@ +# Watermark + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | +| `type` | *Optional[Literal["Watermark"]]* | :heavy_minus_sign: | N/A | +| `content` | *str* | :heavy_check_mark: | The text content | \ No newline at end of file diff --git a/docs/models/webcrawlerdata.md b/docs/models/webcrawlerdata.md new file mode 100644 index 0000000..e44b6d9 --- /dev/null +++ b/docs/models/webcrawlerdata.md @@ -0,0 +1,11 @@ +# WebcrawlerData + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `url` | *str* | :heavy_check_mark: | N/A | +| `restrict_domain` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `max_depth` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `max_pages` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/webhookendpoint.md b/docs/models/webhookendpoint.md index b8b25e3..58291a3 100644 --- a/docs/models/webhookendpoint.md +++ b/docs/models/webhookendpoint.md @@ -11,4 +11,5 @@ | `name` | *str* | :heavy_check_mark: | N/A | | `url` | *str* | :heavy_check_mark: | N/A | | `partition_pattern` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `active` | *bool* | :heavy_check_mark: | N/A | \ No newline at end of file +| `active` | *bool* | :heavy_check_mark: | N/A | +| `secret` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/wordmodality.md b/docs/models/wordmodality.md new file mode 100644 index 0000000..6691ab9 --- /dev/null +++ b/docs/models/wordmodality.md @@ -0,0 +1,11 @@ +# WordModality + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `word` | *str* | :heavy_check_mark: | N/A | +| `probability` | *float* | :heavy_check_mark: | N/A | +| `start` | *float* | :heavy_check_mark: | N/A | +| `end` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/workflow.md b/docs/models/workflow.md new file mode 100644 index 0000000..c5a476b --- /dev/null +++ b/docs/models/workflow.md @@ -0,0 +1,17 @@ +# Workflow + +## Example Usage + +```python +from ragie.models import Workflow + +value = Workflow.PARSE +``` + + +## Values + +| Name | Value | +| ------- | ------- | +| `PARSE` | parse | +| `INDEX` | index | \ No newline at end of file diff --git a/docs/sdks/authenticators/README.md b/docs/sdks/authenticators/README.md index 42f6089..b7c8ae3 100644 --- a/docs/sdks/authenticators/README.md +++ b/docs/sdks/authenticators/README.md @@ -4,20 +4,19 @@ ### Available Operations -* [create](#create) - Create Authenticator * [list](#list) - List Authenticators +* [create](#create) - Create Authenticator * [create_authenticator_connection](#create_authenticator_connection) - Create Authenticator Connection * [delete_authenticator_connection](#delete_authenticator_connection) - Delete Authenticator -## create +## list -Create White labeled connector credentials +List all authenticators sorted by created_at in descending order. Results are paginated with a max limit of 100. When more authenticators are available, a `cursor` will be provided. Use the `cursor` parameter to retrieve the subsequent page. ### Example Usage - + ```python -import ragie from ragie import Ragie @@ -25,28 +24,25 @@ with Ragie( auth="", ) as r_client: - res = r_client.authenticators.create(request={ - "provider": ragie.Provider.ATLASSIAN, - "name": "", - "client_id": "", - "client_secret": "", - }) + res = r_client.authenticators.list(request={}) - # Handle response - print(res) + while res is not None: + # Handle items + + res = res.next() ``` ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `request` | [models.CreateAuthenticatorPayload](../../models/createauthenticatorpayload.md) | :heavy_check_mark: | The request object to use for the request. | -| `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 | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `request` | [models.ListAuthenticatorsRequest](../../models/listauthenticatorsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response -**[models.BaseGetAuthenticator](../../models/basegetauthenticator.md)** +**[models.ListAuthenticatorsResponse](../../models/listauthenticatorsresponse.md)** ### Errors @@ -57,14 +53,15 @@ with Ragie( | models.ErrorMessage | 500 | application/json | | models.SDKError | 4XX, 5XX | \*/\* | -## list +## create -List all authenticators sorted by created_at in descending order. Results are paginated with a max limit of 100. When more authenticators are available, a `cursor` will be provided. Use the `cursor` parameter to retrieve the subsequent page. +Create White labeled connector credentials ### Example Usage - + ```python +import ragie from ragie import Ragie @@ -72,25 +69,28 @@ with Ragie( auth="", ) as r_client: - res = r_client.authenticators.list(request={}) - - while res is not None: - # Handle items + res = r_client.authenticators.create(request={ + "provider": ragie.Provider.ATLASSIAN, + "name": "", + "client_id": "", + "client_secret": "", + }) - res = res.next() + # Handle response + print(res) ``` ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `request` | [models.ListAuthenticatorsRequest](../../models/listauthenticatorsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `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 | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `request` | [models.CreateAuthenticatorPayload](../../models/createauthenticatorpayload.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response -**[models.ListAuthenticatorsResponse](../../models/listauthenticatorsresponse.md)** +**[models.BaseGetAuthenticator](../../models/basegetauthenticator.md)** ### Errors @@ -120,7 +120,6 @@ with Ragie( res = r_client.authenticators.create_authenticator_connection(authenticator_id="84b0792c-1330-4854-b4f2-5d9c7bf9a385", create_authenticator_connection=ragie.CreateAuthenticatorConnection( partition_strategy=ragie.MediaModeParam(), page_limit=None, - config=None, connection=ragie.AuthenticatorDropboxConnection( data=ragie.FolderData( folder_id="", diff --git a/docs/sdks/connections/README.md b/docs/sdks/connections/README.md index 04363e4..16d2efd 100644 --- a/docs/sdks/connections/README.md +++ b/docs/sdks/connections/README.md @@ -9,8 +9,8 @@ * [create_o_auth_redirect_url](#create_o_auth_redirect_url) - Create Oauth Redirect Url * [list_connection_source_types](#list_connection_source_types) - List Connection Source Types * [set_enabled](#set_enabled) - Set Connection Enabled -* [update](#update) - Update Connection * [get](#get) - Get Connection +* [update](#update) - Update Connection * [get_stats](#get_stats) - Get Connection Stats * [set_limits](#set_limits) - Set Connection Limits * [delete](#delete) - Delete Connection @@ -35,7 +35,6 @@ with Ragie( res = r_client.connections.create_connection(request=ragie.PublicCreateConnection( partition_strategy=ragie.MediaModeParam(), page_limit=None, - config=None, connection=ragie.PublicGCSConnection( data=ragie.BucketData( bucket="", @@ -103,7 +102,7 @@ with Ragie( | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | An opaque cursor for pagination | | | `page_size` | *Optional[int]* | :heavy_minus_sign: | The number of items per page (must be greater than 0 and less than or equal to 100) | | -| `filter_` | *OptionalNullable[str]* | :heavy_minus_sign: | The metadata search filter. Returns only items which match the filter. The following filter operators are supported: $eq - Equal to (number, string, boolean), $ne - Not equal to (number, string, boolean), $gt - Greater than (number), $gte - Greater than or equal to (number), $lt - Less than (number), $lte - Less than or equal to (number), $in - In array (string or number), $nin - Not in array (string or number). The operators can be combined with AND and OR. Read [Metadata & Filters guide](https://docs.ragie.ai/docs/metadata-filters) for more details and examples. | {
"department": {
"$in": [
"sales",
"marketing"
]
}
} | +| `filter_` | *OptionalNullable[str]* | :heavy_minus_sign: | The metadata search filter. Returns only items which match the filter. The following filter operators are supported: $eq - Equal to (number, string, boolean), $ne - Not equal to (number, string, boolean), $gt - Greater than (number), $gte - Greater than or equal to (number), $lt - Less than (number), $lte - Less than or equal to (number), $in - In array (string or number), $nin - Not in array (string or number). The operators can be combined with AND and OR. Read [Metadata & Filters guide](https://docs.ragie.ai/docs/metadata-filters) for more details and examples. | | | `partition` | *OptionalNullable[str]* | :heavy_minus_sign: | An optional partition to scope the request to. If omitted, the request will be scoped to the default partition. | acme_customer_id | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | @@ -250,13 +249,13 @@ with Ragie( | models.ErrorMessage | 500 | application/json | | models.SDKError | 4XX, 5XX | \*/\* | -## update +## get -Updates a connections metadata or mode. These changes will be seen after the next sync. +Get a connection. ### Example Usage - + ```python from ragie import Ragie @@ -265,10 +264,7 @@ with Ragie( auth="", ) as r_client: - res = r_client.connections.update(connection_id="eff214ac-1929-43f3-892b-108f57be0158", connection_base={ - "partition_strategy": {}, - "page_limit": 1000, - }) + res = r_client.connections.get(connection_id="af154d9d-a1af-4619-964d-b1589f2ec4f8") # Handle response print(res) @@ -280,7 +276,6 @@ with Ragie( | Parameter | Type | Required | Description | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | `connection_id` | *str* | :heavy_check_mark: | N/A | -| `connection_base` | [models.ConnectionBase](../../models/connectionbase.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 @@ -296,13 +291,13 @@ with Ragie( | models.ErrorMessage | 500 | application/json | | models.SDKError | 4XX, 5XX | \*/\* | -## get +## update -Get a connection. +Updates a connections metadata or mode. These changes will be seen after the next sync. ### Example Usage - + ```python from ragie import Ragie @@ -311,7 +306,10 @@ with Ragie( auth="", ) as r_client: - res = r_client.connections.get(connection_id="af154d9d-a1af-4619-964d-b1589f2ec4f8") + res = r_client.connections.update(connection_id="eff214ac-1929-43f3-892b-108f57be0158", connection_base={ + "partition_strategy": {}, + "page_limit": 1000, + }) # Handle response print(res) @@ -323,6 +321,7 @@ with Ragie( | Parameter | Type | Required | Description | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | `connection_id` | *str* | :heavy_check_mark: | N/A | +| `connection_base` | [models.ConnectionBase](../../models/connectionbase.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 diff --git a/docs/sdks/documents/README.md b/docs/sdks/documents/README.md index 0cd14c9..be5a84a 100644 --- a/docs/sdks/documents/README.md +++ b/docs/sdks/documents/README.md @@ -4,8 +4,8 @@ ### Available Operations -* [create](#create) - Create Document * [list](#list) - List Documents +* [create](#create) - Create Document * [create_raw](#create_raw) - Create Document Raw * [create_document_from_url](#create_document_from_url) - Create Document From Url * [get](#get) - Get Document @@ -21,13 +21,13 @@ * [get_source](#get_source) - Get Document Source * [get_summary](#get_summary) - Get Document Summary -## create +## list -On ingest, the document goes through a series of steps before it is ready for retrieval. Each step is reflected in the status of the document which can be one of [`pending`, `partitioning`, `partitioned`, `refined`, `chunked`, `indexed`, `summary_indexed`, `keyword_indexed`, `ready`, `failed`]. The document is available for retrieval once it is in ready state. The summary index step can take a few seconds. You can optionally use the document for retrieval once it is in `indexed` state. However the summary will only be available once the state has changed to `summary_indexed` or `ready`. +List all documents sorted by created_at in descending order. Results are paginated with a max limit of 100. When more documents are available, a `cursor` will be provided. Use the `cursor` parameter to retrieve the subsequent page. ### Example Usage - + ```python from ragie import Ragie @@ -36,15 +36,15 @@ with Ragie( auth="", ) as r_client: - res = r_client.documents.create(request={ - "file": { - "file_name": "example.file", - "content": open("example.file", "rb"), - }, + res = r_client.documents.list(request={ + "filter_": "{\"department\":{\"$in\":[\"sales\",\"marketing\"]}}", + "partition": "acme_customer_id", }) - # Handle response - print(res) + while res is not None: + # Handle items + + res = res.next() ``` @@ -52,29 +52,29 @@ with Ragie( | Parameter | Type | Required | Description | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `request` | [models.CreateDocumentParams](../../models/createdocumentparams.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [models.ListDocumentsRequest](../../models/listdocumentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response -**[models.Document](../../models/document.md)** +**[models.ListDocumentsResponse](../../models/listdocumentsresponse.md)** ### Errors | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.HTTPValidationError | 422 | application/json | -| models.ErrorMessage | 400, 401, 402, 429 | application/json | +| models.ErrorMessage | 401, 402, 404, 429 | application/json | | models.ErrorMessage | 500 | application/json | | models.SDKError | 4XX, 5XX | \*/\* | -## list +## create -List all documents sorted by created_at in descending order. Results are paginated with a max limit of 100. When more documents are available, a `cursor` will be provided. Use the `cursor` parameter to retrieve the subsequent page. +On ingest, the document goes through a series of steps before it is ready for retrieval. Each step is reflected in the status of the document which can be one of [`pending`, `partitioning`, `partitioned`, `refined`, `chunked`, `indexed`, `summary_indexed`, `keyword_indexed`, `ready`, `failed`]. The document is available for retrieval once it is in ready state. The summary index step can take a few seconds. You can optionally use the document for retrieval once it is in `indexed` state. However the summary will only be available once the state has changed to `summary_indexed` or `ready`. ### Example Usage - + ```python from ragie import Ragie @@ -83,15 +83,15 @@ with Ragie( auth="", ) as r_client: - res = r_client.documents.list(request={ - "filter_": "{\"department\":{\"$in\":[\"sales\",\"marketing\"]}}", - "partition": "acme_customer_id", + res = r_client.documents.create(request={ + "file": { + "file_name": "example.file", + "content": open("example.file", "rb"), + }, }) - while res is not None: - # Handle items - - res = res.next() + # Handle response + print(res) ``` @@ -99,19 +99,19 @@ with Ragie( | Parameter | Type | Required | Description | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `request` | [models.ListDocumentsRequest](../../models/listdocumentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [models.CreateDocumentParams](../../models/createdocumentparams.md) | :heavy_check_mark: | The request object to use for the request. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response -**[models.ListDocumentsResponse](../../models/listdocumentsresponse.md)** +**[models.Document](../../models/document.md)** ### Errors | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.HTTPValidationError | 422 | application/json | -| models.ErrorMessage | 401, 402, 404, 429 | application/json | +| models.ErrorMessage | 400, 401, 402, 429 | application/json | | models.ErrorMessage | 500 | application/json | | models.SDKError | 4XX, 5XX | \*/\* | diff --git a/docs/sdks/elements/README.md b/docs/sdks/elements/README.md new file mode 100644 index 0000000..443cf6a --- /dev/null +++ b/docs/sdks/elements/README.md @@ -0,0 +1,95 @@ +# Elements + +## Overview + +### Available Operations + +* [list](#list) - List Elements For Document +* [get](#get) - Get Element For Document + +## list + +List the latest elements for a document. The results are sorted by index in ascending order. Results are paginated with a max limit of 100. When more elements are available, a `cursor` will be provided. Use the `cursor` parameter to retrieve the subsequent page + +### Example Usage + + +```python +from ragie import Ragie + + +with Ragie( + auth="", +) as r_client: + + res = r_client.elements.list(request={ + "document_id": "269a3615-37c3-4b93-9a7c-9fa027d282c1", + "partition": "acme_customer_id", + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `request` | [models.ListElementsRequest](../../models/listelementsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.ListDocumentElements](../../models/listdocumentelements.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| models.HTTPValidationError | 422 | application/json | +| models.ErrorMessage | 401, 402, 429 | application/json | +| models.ErrorMessage | 500 | application/json | +| models.SDKError | 4XX, 5XX | \*/\* | + +## get + +Returns an element for a specific id + +### Example Usage + + +```python +from ragie import Ragie + + +with Ragie( + auth="", +) as r_client: + + res = r_client.elements.get(element_id="d255ee42-ddef-408f-9700-686a6c8fed3c") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `element_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.APIDocumentElement](../../models/apidocumentelement.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| models.HTTPValidationError | 422 | application/json | +| models.ErrorMessage | 401, 402, 429 | application/json | +| models.ErrorMessage | 500 | application/json | +| models.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/entities/README.md b/docs/sdks/entities/README.md index c1a8d55..7520fbe 100644 --- a/docs/sdks/entities/README.md +++ b/docs/sdks/entities/README.md @@ -6,9 +6,10 @@ * [list_instructions](#list_instructions) - List Instructions * [create_instruction](#create_instruction) - Create Instruction -* [update_instruction](#update_instruction) - Update Instruction -* [delete](#delete) - Delete Instruction +* [delete_instruction](#delete_instruction) - Delete Instruction +* [update_instruction](#update_instruction) - Patch Instruction * [list_by_instruction](#list_by_instruction) - Get Instruction Extracted Entities +* [list_extraction_logs](#list_extraction_logs) - Get Instruction Entity Extraction Logs * [list_by_document](#list_by_document) - Get Document Extracted Entities ## list_instructions @@ -71,6 +72,7 @@ with Ragie( "name": "Find all pizzas", "scope": ragie.CreateInstructionParamsScope.DOCUMENT, "prompt": "Find all pizzas described in the text.", + "context_template": "Document: {{document.name}} {{document.metadata.key_foo}}", "entity_schema": { "key": "", "key1": "", @@ -111,13 +113,13 @@ with Ragie( | models.ErrorMessage | 500 | application/json | | models.SDKError | 4XX, 5XX | \*/\* | -## update_instruction +## delete_instruction -Update Instruction +Delete an instruction. This will delete the instruction and all entities generated by it. This operation is irreversible. ### Example Usage - + ```python from ragie import Ragie @@ -126,9 +128,7 @@ with Ragie( auth="", ) as r_client: - res = r_client.entities.update_instruction(instruction_id="00000000-0000-0000-0000-000000000000", update_instruction_params={ - "active": True, - }) + res = r_client.entities.delete_instruction(instruction_id="00000000-0000-0000-0000-000000000000") # Handle response print(res) @@ -137,15 +137,14 @@ with Ragie( ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `instruction_id` | *str* | :heavy_check_mark: | The ID of the instruction. | 00000000-0000-0000-0000-000000000000 | -| `update_instruction_params` | [models.UpdateInstructionParams](../../models/updateinstructionparams.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. | | +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `instruction_id` | *str* | :heavy_check_mark: | The ID of the instruction. | 00000000-0000-0000-0000-000000000000 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response -**[models.Instruction](../../models/instruction.md)** +**[Dict[str, str]](../../models/.md)** ### Errors @@ -156,14 +155,15 @@ with Ragie( | models.ErrorMessage | 500 | application/json | | models.SDKError | 4XX, 5XX | \*/\* | -## delete +## update_instruction -Delete an instruction. This will delete the instruction and all entities generated by it. This operation is irreversible. +Patch Instruction ### Example Usage - + ```python +import ragie from ragie import Ragie @@ -171,7 +171,21 @@ with Ragie( auth="", ) as r_client: - res = r_client.entities.delete(instruction_id="00000000-0000-0000-0000-000000000000") + res = r_client.entities.update_instruction(instruction_id="00000000-0000-0000-0000-000000000000", patch_instruction_params={ + "name": "Find all pizzas", + "active": True, + "scope": ragie.PatchInstructionParamsScope.DOCUMENT, + "prompt": "Find all pizzas described in the text.", + "context_template": "Document: {{document.name}} {{document.metadata.key_foo}}", + "filter_": { + "toppings": { + "$in": [ + "pizza", + "mushrooms", + ], + }, + }, + }) # Handle response print(res) @@ -180,14 +194,15 @@ with Ragie( ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `instruction_id` | *str* | :heavy_check_mark: | The ID of the instruction. | 00000000-0000-0000-0000-000000000000 | -| `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 | Example | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `instruction_id` | *str* | :heavy_check_mark: | The ID of the instruction. | 00000000-0000-0000-0000-000000000000 | +| `patch_instruction_params` | [models.PatchInstructionParams](../../models/patchinstructionparams.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 -**[Dict[str, str]](../../models/.md)** +**[models.Instruction](../../models/instruction.md)** ### Errors @@ -245,6 +260,53 @@ with Ragie( | models.ErrorMessage | 500 | application/json | | models.SDKError | 4XX, 5XX | \*/\* | +## list_extraction_logs + +List entity extraction logs for an instruction. Results are attempt-level and include both successful and unsuccessful extraction outcomes. Results are sorted by created_at in descending order and paginated. Historical extraction attempts before 2026-03-06 are unavailable in this endpoint. + +### Example Usage + + +```python +from ragie import Ragie + + +with Ragie( + auth="", +) as r_client: + + res = r_client.entities.list_extraction_logs(request={ + "instruction_id": "00000000-0000-0000-0000-000000000000", + "partition": "acme_customer_id", + }) + + while res is not None: + # Handle items + + res = res.next() + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `request` | [models.ListInstructionEntityExtractionLogsRequest](../../models/listinstructionentityextractionlogsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.ListInstructionEntityExtractionLogsResponse](../../models/listinstructionentityextractionlogsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| models.HTTPValidationError | 422 | application/json | +| models.ErrorMessage | 401, 402, 429 | application/json | +| models.ErrorMessage | 500 | application/json | +| models.SDKError | 4XX, 5XX | \*/\* | + ## list_by_document Get Document Extracted Entities diff --git a/docs/sdks/partitions/README.md b/docs/sdks/partitions/README.md index c2d8860..c4e6332 100644 --- a/docs/sdks/partitions/README.md +++ b/docs/sdks/partitions/README.md @@ -7,8 +7,8 @@ * [list](#list) - List Partitions * [create](#create) - Create Partition * [get](#get) - Get Partition -* [update](#update) - Update Partition * [delete](#delete) - Delete Partition +* [update](#update) - Update Partition * [set_limits](#set_limits) - Set Partition Limits ## list @@ -154,13 +154,13 @@ with Ragie( | models.ErrorMessage | 500 | application/json | | models.SDKError | 4XX, 5XX | \*/\* | -## update +## delete -Updates a partition. This includes the partition's description and metadata schema. +Deletes a partition and all of its associated data. This includes connections, documents, and partition specific instructions. This operation is irreversible. ### Example Usage - + ```python from ragie import Ragie @@ -169,7 +169,7 @@ with Ragie( auth="", ) as r_client: - res = r_client.partitions.update(partition_id="", update_partition_params={}) + res = r_client.partitions.delete(partition_id="", async_=True) # Handle response print(res) @@ -178,15 +178,15 @@ with Ragie( ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `partition_id` | *str* | :heavy_check_mark: | N/A | -| `update_partition_params` | [models.UpdatePartitionParams](../../models/updatepartitionparams.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. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `partition_id` | *str* | :heavy_check_mark: | N/A | +| `async_` | *OptionalNullable[bool]* | :heavy_minus_sign: | If true, performs partition deletion asynchronously. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response -**[models.PartitionDetail](../../models/partitiondetail.md)** +**[models.ResponseOK](../../models/responseok.md)** ### Errors @@ -197,13 +197,13 @@ with Ragie( | models.ErrorMessage | 500 | application/json | | models.SDKError | 4XX, 5XX | \*/\* | -## delete +## update -Deletes a partition and all of its associated data. This includes connections, documents, and partition specific instructions. This operation is irreversible. +Updates a partition. This includes the partition's description and metadata schema. ### Example Usage - + ```python from ragie import Ragie @@ -212,7 +212,7 @@ with Ragie( auth="", ) as r_client: - res = r_client.partitions.delete(partition_id="", async_=True) + res = r_client.partitions.update(partition_id="", update_partition_params={}) # Handle response print(res) @@ -221,15 +221,15 @@ with Ragie( ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `partition_id` | *str* | :heavy_check_mark: | N/A | | -| `async_` | *OptionalNullable[bool]* | :heavy_minus_sign: | If true, performs partition deletion asynchronously. | true | -| `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 | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `partition_id` | *str* | :heavy_check_mark: | N/A | +| `update_partition_params` | [models.UpdatePartitionParams](../../models/updatepartitionparams.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 -**[models.ResponseOK](../../models/responseok.md)** +**[models.PartitionDetail](../../models/partitiondetail.md)** ### Errors diff --git a/docs/sdks/webhookendpoints/README.md b/docs/sdks/webhookendpoints/README.md index 31ca78b..39eed43 100644 --- a/docs/sdks/webhookendpoints/README.md +++ b/docs/sdks/webhookendpoints/README.md @@ -7,8 +7,8 @@ * [list](#list) - List Webhook Endpoints * [create](#create) - Create Webhook Endpoint * [get](#get) - Get Webhook Endpoint -* [update](#update) - Update Webhook Endpoint * [delete](#delete) - Delete Webhook Endpoint +* [update](#update) - Update Webhook Endpoint ## list @@ -142,13 +142,13 @@ with Ragie( | models.ErrorMessage | 500 | application/json | | models.SDKError | 4XX, 5XX | \*/\* | -## update +## delete -Update a webhook endpoint's name, URL, or active status. Use this to rotate endpoints or temporarily disable delivery without deleting the endpoint. +Delete a webhook endpoint to stop delivering webhook notifications to its URL. ### Example Usage - + ```python from ragie import Ragie @@ -157,7 +157,7 @@ with Ragie( auth="", ) as r_client: - res = r_client.webhook_endpoints.update(endpoint_id="70a542b9-871a-42f4-a4a2-9f03a857e785", update_webhook_endpoint_payload={}) + res = r_client.webhook_endpoints.delete(endpoint_id="85d9c6f8-9d22-4119-886a-0389b9d5eee3") # Handle response print(res) @@ -166,15 +166,14 @@ with Ragie( ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `endpoint_id` | *str* | :heavy_check_mark: | N/A | -| `update_webhook_endpoint_payload` | [models.UpdateWebhookEndpointPayload](../../models/updatewebhookendpointpayload.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. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `endpoint_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.WebhookEndpoint](../../models/webhookendpoint.md)** +**[models.ResponseOK](../../models/responseok.md)** ### Errors @@ -185,13 +184,13 @@ with Ragie( | models.ErrorMessage | 500 | application/json | | models.SDKError | 4XX, 5XX | \*/\* | -## delete +## update -Delete a webhook endpoint to stop delivering webhook notifications to its URL. +Update a webhook endpoint's name, URL, or active status. Use this to rotate endpoints or temporarily disable delivery without deleting the endpoint. ### Example Usage - + ```python from ragie import Ragie @@ -200,7 +199,7 @@ with Ragie( auth="", ) as r_client: - res = r_client.webhook_endpoints.delete(endpoint_id="85d9c6f8-9d22-4119-886a-0389b9d5eee3") + res = r_client.webhook_endpoints.update(endpoint_id="70a542b9-871a-42f4-a4a2-9f03a857e785", update_webhook_endpoint_payload={}) # Handle response print(res) @@ -209,14 +208,15 @@ with Ragie( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `endpoint_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. | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `endpoint_id` | *str* | :heavy_check_mark: | N/A | +| `update_webhook_endpoint_payload` | [models.UpdateWebhookEndpointPayload](../../models/updatewebhookendpointpayload.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 -**[models.ResponseOK](../../models/responseok.md)** +**[models.WebhookEndpoint](../../models/webhookendpoint.md)** ### Errors diff --git a/poetry.lock b/poetry.lock index e1212c5..06b9c2c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -98,7 +98,7 @@ description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" groups = ["main"] -markers = "python_version < \"3.11\"" +markers = "python_version == \"3.10\"" files = [ {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"}, {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"}, @@ -471,7 +471,6 @@ mccabe = ">=0.6,<0.8" platformdirs = ">=2.2.0" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} tomlkit = ">=0.10.1" -typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\""} [package.extras] spelling = ["pyenchant (>=3.2,<4.0)"] @@ -517,7 +516,7 @@ description = "A lil' TOML parser" optional = false python-versions = ">=3.7" groups = ["dev"] -markers = "python_version < \"3.11\"" +markers = "python_version == \"3.10\"" files = [ {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, @@ -564,5 +563,5 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.1" -python-versions = ">=3.9.2" -content-hash = "544eca21b1a9b8dee23add5a72a9abaa34df5be8b6d26897a52387db452a02fd" +python-versions = ">=3.10" +content-hash = "50e1444fed63445d3c2242eb37bd78fb77a3a5c2858fd4bd122567c56364b0f7" diff --git a/pylintrc b/pylintrc index e8cd3e8..cb9c15d 100644 --- a/pylintrc +++ b/pylintrc @@ -89,7 +89,7 @@ persistent=yes # Minimum Python version to use for version dependent checks. Will default to # the version used to run pylint. -py-version=3.9 +py-version=3.10 # Discover python modules and packages in the file system subtree. recursive=no @@ -458,7 +458,8 @@ disable=raw-checker-failed, consider-using-with, wildcard-import, unused-wildcard-import, - too-many-return-statements + too-many-return-statements, + redefined-builtin # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option diff --git a/pyproject.toml b/pyproject.toml index 6ac840d..f9e07bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,11 @@ [project] name = "ragie" -version = "1.15.1" +version = "2.0.0" description = "Python Client SDK Generated by Speakeasy." authors = [{ name = "Speakeasy" },] readme = "README-PYPI.md" -requires-python = ">=3.9.2" +requires-python = ">=3.10" dependencies = [ "httpcore >=1.0.9", "httpx >=0.28.1", diff --git a/src/ragie/_version.py b/src/ragie/_version.py index 6e70a67..d0acf54 100644 --- a/src/ragie/_version.py +++ b/src/ragie/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "ragie" -__version__: str = "1.15.1" +__version__: str = "2.0.0" __openapi_doc_version__: str = "1.0.0" -__gen_version__: str = "2.791.1" -__user_agent__: str = "speakeasy-sdk/python 1.15.1 2.791.1 1.0.0 ragie" +__gen_version__: str = "2.869.3" +__user_agent__: str = "speakeasy-sdk/python 2.0.0 2.869.3 1.0.0 ragie" try: if __package__ is not None: diff --git a/src/ragie/authenticators.py b/src/ragie/authenticators.py index 9cbec1e..837e3d4 100644 --- a/src/ragie/authenticators.py +++ b/src/ragie/authenticators.py @@ -10,21 +10,20 @@ class Authenticators(BaseSDK): - def create( + def list( self, *, request: Union[ - models.CreateAuthenticatorPayload, - models.CreateAuthenticatorPayloadTypedDict, - ], + models.ListAuthenticatorsRequest, models.ListAuthenticatorsRequestTypedDict + ] = models.ListAuthenticatorsRequest(), retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.BaseGetAuthenticator: - r"""Create Authenticator + ) -> Optional[models.ListAuthenticatorsResponse]: + r"""List Authenticators - Create White labeled connector credentials + List all authenticators sorted by created_at in descending order. Results are paginated with a max limit of 100. When more authenticators are available, a `cursor` will be provided. Use the `cursor` parameter to retrieve the subsequent page. :param request: The request object to send. :param retries: Override the default retry configuration for this method @@ -43,25 +42,22 @@ def create( base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): - request = utils.unmarshal(request, models.CreateAuthenticatorPayload) - request = cast(models.CreateAuthenticatorPayload, request) + request = utils.unmarshal(request, models.ListAuthenticatorsRequest) + request = cast(models.ListAuthenticatorsRequest, request) req = self._build_request( - method="POST", + method="GET", path="/authenticators", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, + 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, - get_serialized_body=lambda: utils.serialize_request_body( - request, False, False, "json", models.CreateAuthenticatorPayload - ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -78,7 +74,7 @@ def create( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="CreateAuthenticator", + operation_id="ListAuthenticators", oauth2_scopes=None, security_source=self.sdk_configuration.security, ), @@ -87,9 +83,31 @@ def create( retry_config=retry_config, ) + def next_func() -> Optional[models.ListAuthenticatorsResponse]: + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + next_cursor = JSONPath("$.pagination.next_cursor").parse(body) + + if len(next_cursor) == 0: + return None + + next_cursor = next_cursor[0] + if next_cursor is None or str(next_cursor).strip() == "": + return None + + return self.list( + request=models.ListAuthenticatorsRequest( + cursor=next_cursor, + page_size=request.page_size, + ), + retries=retries, + ) + response_data: Any = None - if utils.match_response(http_res, "201", "application/json"): - return unmarshal_json_response(models.BaseGetAuthenticator, http_res) + if utils.match_response(http_res, "200", "application/json"): + return models.ListAuthenticatorsResponse( + result=unmarshal_json_response(models.AuthenticatorList, http_res), + next=next_func, + ) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( models.HTTPValidationErrorData, http_res @@ -112,21 +130,20 @@ def create( raise models.SDKError("Unexpected response received", http_res) - async def create_async( + async def list_async( self, *, request: Union[ - models.CreateAuthenticatorPayload, - models.CreateAuthenticatorPayloadTypedDict, - ], + models.ListAuthenticatorsRequest, models.ListAuthenticatorsRequestTypedDict + ] = models.ListAuthenticatorsRequest(), retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.BaseGetAuthenticator: - r"""Create Authenticator + ) -> Optional[models.ListAuthenticatorsResponse]: + r"""List Authenticators - Create White labeled connector credentials + List all authenticators sorted by created_at in descending order. Results are paginated with a max limit of 100. When more authenticators are available, a `cursor` will be provided. Use the `cursor` parameter to retrieve the subsequent page. :param request: The request object to send. :param retries: Override the default retry configuration for this method @@ -145,25 +162,22 @@ async def create_async( base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): - request = utils.unmarshal(request, models.CreateAuthenticatorPayload) - request = cast(models.CreateAuthenticatorPayload, request) + request = utils.unmarshal(request, models.ListAuthenticatorsRequest) + request = cast(models.ListAuthenticatorsRequest, request) req = self._build_request_async( - method="POST", + method="GET", path="/authenticators", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, + 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, - get_serialized_body=lambda: utils.serialize_request_body( - request, False, False, "json", models.CreateAuthenticatorPayload - ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -180,7 +194,7 @@ async def create_async( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="CreateAuthenticator", + operation_id="ListAuthenticators", oauth2_scopes=None, security_source=self.sdk_configuration.security, ), @@ -189,9 +203,31 @@ async def create_async( retry_config=retry_config, ) + def next_func() -> Optional[models.ListAuthenticatorsResponse]: + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + next_cursor = JSONPath("$.pagination.next_cursor").parse(body) + + if len(next_cursor) == 0: + return None + + next_cursor = next_cursor[0] + if next_cursor is None or str(next_cursor).strip() == "": + return None + + return self.list( + request=models.ListAuthenticatorsRequest( + cursor=next_cursor, + page_size=request.page_size, + ), + retries=retries, + ) + response_data: Any = None - if utils.match_response(http_res, "201", "application/json"): - return unmarshal_json_response(models.BaseGetAuthenticator, http_res) + if utils.match_response(http_res, "200", "application/json"): + return models.ListAuthenticatorsResponse( + result=unmarshal_json_response(models.AuthenticatorList, http_res), + next=next_func, + ) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( models.HTTPValidationErrorData, http_res @@ -214,20 +250,21 @@ async def create_async( raise models.SDKError("Unexpected response received", http_res) - def list( + def create( self, *, request: Union[ - models.ListAuthenticatorsRequest, models.ListAuthenticatorsRequestTypedDict - ] = models.ListAuthenticatorsRequest(), + models.CreateAuthenticatorPayload, + models.CreateAuthenticatorPayloadTypedDict, + ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.ListAuthenticatorsResponse]: - r"""List Authenticators + ) -> models.BaseGetAuthenticator: + r"""Create Authenticator - List all authenticators sorted by created_at in descending order. Results are paginated with a max limit of 100. When more authenticators are available, a `cursor` will be provided. Use the `cursor` parameter to retrieve the subsequent page. + Create White labeled connector credentials :param request: The request object to send. :param retries: Override the default retry configuration for this method @@ -246,22 +283,25 @@ def list( base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): - request = utils.unmarshal(request, models.ListAuthenticatorsRequest) - request = cast(models.ListAuthenticatorsRequest, request) + request = utils.unmarshal(request, models.CreateAuthenticatorPayload) + request = cast(models.CreateAuthenticatorPayload, request) req = self._build_request( - method="GET", + method="POST", path="/authenticators", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=False, + 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.CreateAuthenticatorPayload + ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -278,7 +318,7 @@ def list( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="ListAuthenticators", + operation_id="CreateAuthenticator", oauth2_scopes=None, security_source=self.sdk_configuration.security, ), @@ -287,31 +327,9 @@ def list( retry_config=retry_config, ) - def next_func() -> Optional[models.ListAuthenticatorsResponse]: - body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) - next_cursor = JSONPath("$.pagination.next_cursor").parse(body) - - if len(next_cursor) == 0: - return None - - next_cursor = next_cursor[0] - if next_cursor is None or str(next_cursor).strip() == "": - return None - - return self.list( - request=models.ListAuthenticatorsRequest( - cursor=next_cursor, - page_size=request.page_size, - ), - retries=retries, - ) - response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return models.ListAuthenticatorsResponse( - result=unmarshal_json_response(models.AuthenticatorList, http_res), - next=next_func, - ) + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response(models.BaseGetAuthenticator, http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( models.HTTPValidationErrorData, http_res @@ -334,20 +352,21 @@ def next_func() -> Optional[models.ListAuthenticatorsResponse]: raise models.SDKError("Unexpected response received", http_res) - async def list_async( + async def create_async( self, *, request: Union[ - models.ListAuthenticatorsRequest, models.ListAuthenticatorsRequestTypedDict - ] = models.ListAuthenticatorsRequest(), + models.CreateAuthenticatorPayload, + models.CreateAuthenticatorPayloadTypedDict, + ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.ListAuthenticatorsResponse]: - r"""List Authenticators + ) -> models.BaseGetAuthenticator: + r"""Create Authenticator - List all authenticators sorted by created_at in descending order. Results are paginated with a max limit of 100. When more authenticators are available, a `cursor` will be provided. Use the `cursor` parameter to retrieve the subsequent page. + Create White labeled connector credentials :param request: The request object to send. :param retries: Override the default retry configuration for this method @@ -366,22 +385,25 @@ async def list_async( base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): - request = utils.unmarshal(request, models.ListAuthenticatorsRequest) - request = cast(models.ListAuthenticatorsRequest, request) + request = utils.unmarshal(request, models.CreateAuthenticatorPayload) + request = cast(models.CreateAuthenticatorPayload, request) req = self._build_request_async( - method="GET", + method="POST", path="/authenticators", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=False, + 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.CreateAuthenticatorPayload + ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -398,7 +420,7 @@ async def list_async( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="ListAuthenticators", + operation_id="CreateAuthenticator", oauth2_scopes=None, security_source=self.sdk_configuration.security, ), @@ -407,31 +429,9 @@ async def list_async( retry_config=retry_config, ) - def next_func() -> Optional[models.ListAuthenticatorsResponse]: - body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) - next_cursor = JSONPath("$.pagination.next_cursor").parse(body) - - if len(next_cursor) == 0: - return None - - next_cursor = next_cursor[0] - if next_cursor is None or str(next_cursor).strip() == "": - return None - - return self.list( - request=models.ListAuthenticatorsRequest( - cursor=next_cursor, - page_size=request.page_size, - ), - retries=retries, - ) - response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return models.ListAuthenticatorsResponse( - result=unmarshal_json_response(models.AuthenticatorList, http_res), - next=next_func, - ) + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response(models.BaseGetAuthenticator, http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( models.HTTPValidationErrorData, http_res diff --git a/src/ragie/basesdk.py b/src/ragie/basesdk.py index c904322..5e70dc4 100644 --- a/src/ragie/basesdk.py +++ b/src/ragie/basesdk.py @@ -4,7 +4,12 @@ import httpx from ragie import models, utils from ragie._hooks import AfterErrorContext, AfterSuccessContext, BeforeRequestContext -from ragie.utils import RetryConfig, SerializedRequestBody, get_body_content +from ragie.utils import ( + RetryConfig, + SerializedRequestBody, + get_body_content, + run_sync_in_thread, +) from typing import Callable, List, Mapping, Optional, Tuple from urllib.parse import parse_qs, urlparse @@ -307,7 +312,10 @@ async def do_request_async( async def do(): http_res = None try: - req = hooks.before_request(BeforeRequestContext(hook_ctx), request) + req = await run_sync_in_thread( + hooks.before_request, BeforeRequestContext(hook_ctx), request + ) + logger.debug( "Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s", req.method, @@ -321,7 +329,10 @@ async def do(): http_res = await client.send(req, stream=stream) except Exception as e: - _, e = hooks.after_error(AfterErrorContext(hook_ctx), None, e) + _, e = await run_sync_in_thread( + hooks.after_error, AfterErrorContext(hook_ctx), None, e + ) + if e is not None: logger.debug("Request Exception", exc_info=True) raise e @@ -339,9 +350,10 @@ async def do(): ) if utils.match_status_codes(error_status_codes, http_res.status_code): - result, err = hooks.after_error( - AfterErrorContext(hook_ctx), http_res, None + result, err = await run_sync_in_thread( + hooks.after_error, AfterErrorContext(hook_ctx), http_res, None ) + if err is not None: logger.debug("Request Exception", exc_info=True) raise err @@ -361,6 +373,8 @@ async def do(): http_res = await do() if not utils.match_status_codes(error_status_codes, http_res.status_code): - http_res = hooks.after_success(AfterSuccessContext(hook_ctx), http_res) + http_res = await run_sync_in_thread( + hooks.after_success, AfterSuccessContext(hook_ctx), http_res + ) return http_res diff --git a/src/ragie/connections.py b/src/ragie/connections.py index 9340e5f..cab4b1a 100644 --- a/src/ragie/connections.py +++ b/src/ragie/connections.py @@ -1038,22 +1038,20 @@ async def set_enabled_async( raise models.SDKError("Unexpected response received", http_res) - def update( + def get( self, *, connection_id: str, - connection_base: Union[models.ConnectionBase, models.ConnectionBaseTypedDict], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, ) -> models.Connection: - r"""Update Connection + r"""Get Connection - Updates a connections metadata or mode. These changes will be seen after the next sync. + Get a connection. :param connection_id: - :param connection_base: :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 @@ -1069,29 +1067,23 @@ def update( else: base_url = self._get_url(base_url, url_variables) - request = models.UpdateConnectionConnectionsConnectionIDPutRequest( + request = models.GetConnectionConnectionsConnectionIDGetRequest( connection_id=connection_id, - connection_base=utils.get_pydantic_model( - connection_base, models.ConnectionBase - ), ) req = self._build_request( - method="PUT", + method="GET", path="/connections/{connection_id}", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, + 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, - get_serialized_body=lambda: utils.serialize_request_body( - request.connection_base, False, False, "json", models.ConnectionBase - ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -1108,7 +1100,7 @@ def update( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="update_connection_connections__connection_id__put", + operation_id="get_connection_connections__connection_id__get", oauth2_scopes=None, security_source=self.sdk_configuration.security, ), @@ -1140,22 +1132,20 @@ def update( raise models.SDKError("Unexpected response received", http_res) - async def update_async( + async def get_async( self, *, connection_id: str, - connection_base: Union[models.ConnectionBase, models.ConnectionBaseTypedDict], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, ) -> models.Connection: - r"""Update Connection + r"""Get Connection - Updates a connections metadata or mode. These changes will be seen after the next sync. + Get a connection. :param connection_id: - :param connection_base: :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 @@ -1171,29 +1161,23 @@ async def update_async( else: base_url = self._get_url(base_url, url_variables) - request = models.UpdateConnectionConnectionsConnectionIDPutRequest( + request = models.GetConnectionConnectionsConnectionIDGetRequest( connection_id=connection_id, - connection_base=utils.get_pydantic_model( - connection_base, models.ConnectionBase - ), ) req = self._build_request_async( - method="PUT", + method="GET", path="/connections/{connection_id}", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, + 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, - get_serialized_body=lambda: utils.serialize_request_body( - request.connection_base, False, False, "json", models.ConnectionBase - ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -1210,7 +1194,7 @@ async def update_async( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="update_connection_connections__connection_id__put", + operation_id="get_connection_connections__connection_id__get", oauth2_scopes=None, security_source=self.sdk_configuration.security, ), @@ -1242,20 +1226,22 @@ async def update_async( raise models.SDKError("Unexpected response received", http_res) - def get( + def update( self, *, connection_id: str, + connection_base: Union[models.ConnectionBase, models.ConnectionBaseTypedDict], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, ) -> models.Connection: - r"""Get Connection + r"""Update Connection - Get a connection. + Updates a connections metadata or mode. These changes will be seen after the next sync. :param connection_id: + :param connection_base: :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 @@ -1271,23 +1257,29 @@ def get( else: base_url = self._get_url(base_url, url_variables) - request = models.GetConnectionConnectionsConnectionIDGetRequest( + request = models.UpdateConnectionConnectionsConnectionIDPutRequest( connection_id=connection_id, + connection_base=utils.get_pydantic_model( + connection_base, models.ConnectionBase + ), ) req = self._build_request( - method="GET", + method="PUT", path="/connections/{connection_id}", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=False, + 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.connection_base, False, False, "json", models.ConnectionBase + ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -1304,7 +1296,7 @@ def get( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="get_connection_connections__connection_id__get", + operation_id="update_connection_connections__connection_id__put", oauth2_scopes=None, security_source=self.sdk_configuration.security, ), @@ -1336,20 +1328,22 @@ def get( raise models.SDKError("Unexpected response received", http_res) - async def get_async( + async def update_async( self, *, connection_id: str, + connection_base: Union[models.ConnectionBase, models.ConnectionBaseTypedDict], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, ) -> models.Connection: - r"""Get Connection + r"""Update Connection - Get a connection. + Updates a connections metadata or mode. These changes will be seen after the next sync. :param connection_id: + :param connection_base: :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 @@ -1365,23 +1359,29 @@ async def get_async( else: base_url = self._get_url(base_url, url_variables) - request = models.GetConnectionConnectionsConnectionIDGetRequest( + request = models.UpdateConnectionConnectionsConnectionIDPutRequest( connection_id=connection_id, + connection_base=utils.get_pydantic_model( + connection_base, models.ConnectionBase + ), ) req = self._build_request_async( - method="GET", + method="PUT", path="/connections/{connection_id}", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=False, + 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.connection_base, False, False, "json", models.ConnectionBase + ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -1398,7 +1398,7 @@ async def get_async( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="get_connection_connections__connection_id__get", + operation_id="update_connection_connections__connection_id__put", oauth2_scopes=None, security_source=self.sdk_configuration.security, ), diff --git a/src/ragie/documents.py b/src/ragie/documents.py index 78aa980..615d1e0 100644 --- a/src/ragie/documents.py +++ b/src/ragie/documents.py @@ -11,20 +11,20 @@ class Documents(BaseSDK): - def create( + def list( self, *, request: Union[ - models.CreateDocumentParams, models.CreateDocumentParamsTypedDict - ], + models.ListDocumentsRequest, models.ListDocumentsRequestTypedDict + ] = models.ListDocumentsRequest(), retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.Document: - r"""Create Document + ) -> Optional[models.ListDocumentsResponse]: + r"""List Documents - On ingest, the document goes through a series of steps before it is ready for retrieval. Each step is reflected in the status of the document which can be one of [`pending`, `partitioning`, `partitioned`, `refined`, `chunked`, `indexed`, `summary_indexed`, `keyword_indexed`, `ready`, `failed`]. The document is available for retrieval once it is in ready state. The summary index step can take a few seconds. You can optionally use the document for retrieval once it is in `indexed` state. However the summary will only be available once the state has changed to `summary_indexed` or `ready`. + List all documents sorted by created_at in descending order. Results are paginated with a max limit of 100. When more documents are available, a `cursor` will be provided. Use the `cursor` parameter to retrieve the subsequent page. :param request: The request object to send. :param retries: Override the default retry configuration for this method @@ -43,25 +43,22 @@ def create( base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): - request = utils.unmarshal(request, models.CreateDocumentParams) - request = cast(models.CreateDocumentParams, request) + request = utils.unmarshal(request, models.ListDocumentsRequest) + request = cast(models.ListDocumentsRequest, request) req = self._build_request( - method="POST", + method="GET", path="/documents", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, + 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, - get_serialized_body=lambda: utils.serialize_request_body( - request, False, False, "multipart", models.CreateDocumentParams - ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -78,25 +75,49 @@ def create( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="CreateDocument", + operation_id="ListDocuments", oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["400", "401", "402", "422", "429", "4XX", "500", "5XX"], + error_status_codes=["401", "402", "404", "422", "429", "4XX", "500", "5XX"], retry_config=retry_config, ) + def next_func() -> Optional[models.ListDocumentsResponse]: + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + next_cursor = JSONPath("$.pagination.next_cursor").parse(body) + + if len(next_cursor) == 0: + return None + + next_cursor = next_cursor[0] + if next_cursor is None or str(next_cursor).strip() == "": + return None + + return self.list( + request=models.ListDocumentsRequest( + cursor=next_cursor, + page_size=request.page_size, + filter_=request.filter_, + partition=request.partition, + ), + retries=retries, + ) + response_data: Any = None - if utils.match_response(http_res, "201", "application/json"): - return unmarshal_json_response(models.Document, http_res) + if utils.match_response(http_res, "200", "application/json"): + return models.ListDocumentsResponse( + result=unmarshal_json_response(models.DocumentList, http_res), + next=next_func, + ) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( models.HTTPValidationErrorData, http_res ) raise models.HTTPValidationError(response_data, http_res) if utils.match_response( - http_res, ["400", "401", "402", "429"], "application/json" + http_res, ["401", "402", "404", "429"], "application/json" ): response_data = unmarshal_json_response(models.ErrorMessageData, http_res) raise models.ErrorMessage(response_data, http_res) @@ -112,20 +133,20 @@ def create( raise models.SDKError("Unexpected response received", http_res) - async def create_async( + async def list_async( self, *, request: Union[ - models.CreateDocumentParams, models.CreateDocumentParamsTypedDict - ], + models.ListDocumentsRequest, models.ListDocumentsRequestTypedDict + ] = models.ListDocumentsRequest(), retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.Document: - r"""Create Document + ) -> Optional[models.ListDocumentsResponse]: + r"""List Documents - On ingest, the document goes through a series of steps before it is ready for retrieval. Each step is reflected in the status of the document which can be one of [`pending`, `partitioning`, `partitioned`, `refined`, `chunked`, `indexed`, `summary_indexed`, `keyword_indexed`, `ready`, `failed`]. The document is available for retrieval once it is in ready state. The summary index step can take a few seconds. You can optionally use the document for retrieval once it is in `indexed` state. However the summary will only be available once the state has changed to `summary_indexed` or `ready`. + List all documents sorted by created_at in descending order. Results are paginated with a max limit of 100. When more documents are available, a `cursor` will be provided. Use the `cursor` parameter to retrieve the subsequent page. :param request: The request object to send. :param retries: Override the default retry configuration for this method @@ -144,25 +165,22 @@ async def create_async( base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): - request = utils.unmarshal(request, models.CreateDocumentParams) - request = cast(models.CreateDocumentParams, request) + request = utils.unmarshal(request, models.ListDocumentsRequest) + request = cast(models.ListDocumentsRequest, request) req = self._build_request_async( - method="POST", + method="GET", path="/documents", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, + 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, - get_serialized_body=lambda: utils.serialize_request_body( - request, False, False, "multipart", models.CreateDocumentParams - ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -179,25 +197,49 @@ async def create_async( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="CreateDocument", + operation_id="ListDocuments", oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["400", "401", "402", "422", "429", "4XX", "500", "5XX"], + error_status_codes=["401", "402", "404", "422", "429", "4XX", "500", "5XX"], retry_config=retry_config, ) + def next_func() -> Optional[models.ListDocumentsResponse]: + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + next_cursor = JSONPath("$.pagination.next_cursor").parse(body) + + if len(next_cursor) == 0: + return None + + next_cursor = next_cursor[0] + if next_cursor is None or str(next_cursor).strip() == "": + return None + + return self.list( + request=models.ListDocumentsRequest( + cursor=next_cursor, + page_size=request.page_size, + filter_=request.filter_, + partition=request.partition, + ), + retries=retries, + ) + response_data: Any = None - if utils.match_response(http_res, "201", "application/json"): - return unmarshal_json_response(models.Document, http_res) + if utils.match_response(http_res, "200", "application/json"): + return models.ListDocumentsResponse( + result=unmarshal_json_response(models.DocumentList, http_res), + next=next_func, + ) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( models.HTTPValidationErrorData, http_res ) raise models.HTTPValidationError(response_data, http_res) if utils.match_response( - http_res, ["400", "401", "402", "429"], "application/json" + http_res, ["401", "402", "404", "429"], "application/json" ): response_data = unmarshal_json_response(models.ErrorMessageData, http_res) raise models.ErrorMessage(response_data, http_res) @@ -213,20 +255,20 @@ async def create_async( raise models.SDKError("Unexpected response received", http_res) - def list( + def create( self, *, request: Union[ - models.ListDocumentsRequest, models.ListDocumentsRequestTypedDict - ] = models.ListDocumentsRequest(), + models.CreateDocumentParams, models.CreateDocumentParamsTypedDict + ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.ListDocumentsResponse]: - r"""List Documents + ) -> models.Document: + r"""Create Document - List all documents sorted by created_at in descending order. Results are paginated with a max limit of 100. When more documents are available, a `cursor` will be provided. Use the `cursor` parameter to retrieve the subsequent page. + On ingest, the document goes through a series of steps before it is ready for retrieval. Each step is reflected in the status of the document which can be one of [`pending`, `partitioning`, `partitioned`, `refined`, `chunked`, `indexed`, `summary_indexed`, `keyword_indexed`, `ready`, `failed`]. The document is available for retrieval once it is in ready state. The summary index step can take a few seconds. You can optionally use the document for retrieval once it is in `indexed` state. However the summary will only be available once the state has changed to `summary_indexed` or `ready`. :param request: The request object to send. :param retries: Override the default retry configuration for this method @@ -245,22 +287,25 @@ def list( base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): - request = utils.unmarshal(request, models.ListDocumentsRequest) - request = cast(models.ListDocumentsRequest, request) + request = utils.unmarshal(request, models.CreateDocumentParams) + request = cast(models.CreateDocumentParams, request) req = self._build_request( - method="GET", + method="POST", path="/documents", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=False, + request_body_required=True, request_has_path_params=False, request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "multipart", models.CreateDocumentParams + ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -277,49 +322,25 @@ def list( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="ListDocuments", + operation_id="CreateDocument", oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "402", "404", "422", "429", "4XX", "500", "5XX"], + error_status_codes=["400", "401", "402", "422", "429", "4XX", "500", "5XX"], retry_config=retry_config, ) - def next_func() -> Optional[models.ListDocumentsResponse]: - body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) - next_cursor = JSONPath("$.pagination.next_cursor").parse(body) - - if len(next_cursor) == 0: - return None - - next_cursor = next_cursor[0] - if next_cursor is None or str(next_cursor).strip() == "": - return None - - return self.list( - request=models.ListDocumentsRequest( - cursor=next_cursor, - page_size=request.page_size, - filter_=request.filter_, - partition=request.partition, - ), - retries=retries, - ) - response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return models.ListDocumentsResponse( - result=unmarshal_json_response(models.DocumentList, http_res), - next=next_func, - ) + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response(models.Document, http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( models.HTTPValidationErrorData, http_res ) raise models.HTTPValidationError(response_data, http_res) if utils.match_response( - http_res, ["401", "402", "404", "429"], "application/json" + http_res, ["400", "401", "402", "429"], "application/json" ): response_data = unmarshal_json_response(models.ErrorMessageData, http_res) raise models.ErrorMessage(response_data, http_res) @@ -335,20 +356,20 @@ def next_func() -> Optional[models.ListDocumentsResponse]: raise models.SDKError("Unexpected response received", http_res) - async def list_async( + async def create_async( self, *, request: Union[ - models.ListDocumentsRequest, models.ListDocumentsRequestTypedDict - ] = models.ListDocumentsRequest(), + models.CreateDocumentParams, models.CreateDocumentParamsTypedDict + ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.ListDocumentsResponse]: - r"""List Documents + ) -> models.Document: + r"""Create Document - List all documents sorted by created_at in descending order. Results are paginated with a max limit of 100. When more documents are available, a `cursor` will be provided. Use the `cursor` parameter to retrieve the subsequent page. + On ingest, the document goes through a series of steps before it is ready for retrieval. Each step is reflected in the status of the document which can be one of [`pending`, `partitioning`, `partitioned`, `refined`, `chunked`, `indexed`, `summary_indexed`, `keyword_indexed`, `ready`, `failed`]. The document is available for retrieval once it is in ready state. The summary index step can take a few seconds. You can optionally use the document for retrieval once it is in `indexed` state. However the summary will only be available once the state has changed to `summary_indexed` or `ready`. :param request: The request object to send. :param retries: Override the default retry configuration for this method @@ -367,22 +388,25 @@ async def list_async( base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): - request = utils.unmarshal(request, models.ListDocumentsRequest) - request = cast(models.ListDocumentsRequest, request) + request = utils.unmarshal(request, models.CreateDocumentParams) + request = cast(models.CreateDocumentParams, request) req = self._build_request_async( - method="GET", + method="POST", path="/documents", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=False, + request_body_required=True, request_has_path_params=False, request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "multipart", models.CreateDocumentParams + ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -399,49 +423,25 @@ async def list_async( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="ListDocuments", + operation_id="CreateDocument", oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "402", "404", "422", "429", "4XX", "500", "5XX"], + error_status_codes=["400", "401", "402", "422", "429", "4XX", "500", "5XX"], retry_config=retry_config, ) - def next_func() -> Optional[models.ListDocumentsResponse]: - body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) - next_cursor = JSONPath("$.pagination.next_cursor").parse(body) - - if len(next_cursor) == 0: - return None - - next_cursor = next_cursor[0] - if next_cursor is None or str(next_cursor).strip() == "": - return None - - return self.list( - request=models.ListDocumentsRequest( - cursor=next_cursor, - page_size=request.page_size, - filter_=request.filter_, - partition=request.partition, - ), - retries=retries, - ) - response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return models.ListDocumentsResponse( - result=unmarshal_json_response(models.DocumentList, http_res), - next=next_func, - ) + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response(models.Document, http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( models.HTTPValidationErrorData, http_res ) raise models.HTTPValidationError(response_data, http_res) if utils.match_response( - http_res, ["401", "402", "404", "429"], "application/json" + http_res, ["400", "401", "402", "429"], "application/json" ): response_data = unmarshal_json_response(models.ErrorMessageData, http_res) raise models.ErrorMessage(response_data, http_res) diff --git a/src/ragie/elements.py b/src/ragie/elements.py new file mode 100644 index 0000000..aab5afd --- /dev/null +++ b/src/ragie/elements.py @@ -0,0 +1,386 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from ragie import models, utils +from ragie._hooks import HookContext +from ragie.types import BaseModel, OptionalNullable, UNSET +from ragie.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, Mapping, Optional, Union, cast + + +class Elements(BaseSDK): + def list( + self, + *, + request: Union[models.ListElementsRequest, models.ListElementsRequestTypedDict], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ListDocumentElements: + r"""List Elements For Document + + List the latest elements for a document. The results are sorted by index in ascending order. Results are paginated with a max limit of 100. When more elements are available, a `cursor` will be provided. Use the `cursor` parameter to retrieve the subsequent page + + :param request: The request object to send. + :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 server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, models.ListElementsRequest) + request = cast(models.ListElementsRequest, request) + + req = self._build_request( + method="GET", + path="/documents/{document_id}/elements", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="list_elements", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["401", "402", "422", "429", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ListDocumentElements, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.HTTPValidationErrorData, http_res + ) + raise models.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, ["401", "402", "429"], "application/json"): + response_data = unmarshal_json_response(models.ErrorMessageData, http_res) + raise models.ErrorMessage(response_data, http_res) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorMessageData, http_res) + raise models.ErrorMessage(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + + raise models.SDKError("Unexpected response received", http_res) + + async def list_async( + self, + *, + request: Union[models.ListElementsRequest, models.ListElementsRequestTypedDict], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ListDocumentElements: + r"""List Elements For Document + + List the latest elements for a document. The results are sorted by index in ascending order. Results are paginated with a max limit of 100. When more elements are available, a `cursor` will be provided. Use the `cursor` parameter to retrieve the subsequent page + + :param request: The request object to send. + :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 server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, models.ListElementsRequest) + request = cast(models.ListElementsRequest, request) + + req = self._build_request_async( + method="GET", + path="/documents/{document_id}/elements", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="list_elements", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["401", "402", "422", "429", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ListDocumentElements, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.HTTPValidationErrorData, http_res + ) + raise models.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, ["401", "402", "429"], "application/json"): + response_data = unmarshal_json_response(models.ErrorMessageData, http_res) + raise models.ErrorMessage(response_data, http_res) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorMessageData, http_res) + raise models.ErrorMessage(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + + raise models.SDKError("Unexpected response received", http_res) + + def get( + self, + *, + element_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.APIDocumentElement: + r"""Get Element For Document + + Returns an element for a specific id + + :param element_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 server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetElementRequest( + element_id=element_id, + ) + + req = self._build_request( + method="GET", + path="/elements/{element_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_element", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["401", "402", "422", "429", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.APIDocumentElement, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.HTTPValidationErrorData, http_res + ) + raise models.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, ["401", "402", "429"], "application/json"): + response_data = unmarshal_json_response(models.ErrorMessageData, http_res) + raise models.ErrorMessage(response_data, http_res) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorMessageData, http_res) + raise models.ErrorMessage(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + + raise models.SDKError("Unexpected response received", http_res) + + async def get_async( + self, + *, + element_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.APIDocumentElement: + r"""Get Element For Document + + Returns an element for a specific id + + :param element_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 server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetElementRequest( + element_id=element_id, + ) + + req = self._build_request_async( + method="GET", + path="/elements/{element_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_element", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["401", "402", "422", "429", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.APIDocumentElement, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.HTTPValidationErrorData, http_res + ) + raise models.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, ["401", "402", "429"], "application/json"): + response_data = unmarshal_json_response(models.ErrorMessageData, http_res) + raise models.ErrorMessage(response_data, http_res) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorMessageData, http_res) + raise models.ErrorMessage(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + + raise models.SDKError("Unexpected response received", http_res) diff --git a/src/ragie/entities.py b/src/ragie/entities.py index e4bba5f..0adc5d9 100644 --- a/src/ragie/entities.py +++ b/src/ragie/entities.py @@ -372,22 +372,20 @@ async def create_instruction_async( raise models.SDKError("Unexpected response received", http_res) - def update_instruction( + def delete_instruction( self, *, instruction_id: str, - update_instruction_params: Union[ - models.UpdateInstructionParams, models.UpdateInstructionParamsTypedDict - ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.Instruction: - r"""Update Instruction + ) -> Dict[str, str]: + r"""Delete Instruction + + Delete an instruction. This will delete the instruction and all entities generated by it. This operation is irreversible. :param instruction_id: The ID of the instruction. - :param update_instruction_params: :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 @@ -403,33 +401,23 @@ def update_instruction( else: base_url = self._get_url(base_url, url_variables) - request = models.UpdateInstructionRequest( + request = models.DeleteInstructionRequest( instruction_id=instruction_id, - update_instruction_params=utils.get_pydantic_model( - update_instruction_params, models.UpdateInstructionParams - ), ) req = self._build_request( - method="PUT", + method="DELETE", path="/instructions/{instruction_id}", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, + 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, - get_serialized_body=lambda: utils.serialize_request_body( - request.update_instruction_params, - False, - False, - "json", - models.UpdateInstructionParams, - ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -446,7 +434,7 @@ def update_instruction( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="UpdateInstruction", + operation_id="DeleteInstruction", oauth2_scopes=None, security_source=self.sdk_configuration.security, ), @@ -457,7 +445,7 @@ def update_instruction( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.Instruction, http_res) + return unmarshal_json_response(Dict[str, str], http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( models.HTTPValidationErrorData, http_res @@ -478,22 +466,20 @@ def update_instruction( raise models.SDKError("Unexpected response received", http_res) - async def update_instruction_async( + async def delete_instruction_async( self, *, instruction_id: str, - update_instruction_params: Union[ - models.UpdateInstructionParams, models.UpdateInstructionParamsTypedDict - ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.Instruction: - r"""Update Instruction + ) -> Dict[str, str]: + r"""Delete Instruction + + Delete an instruction. This will delete the instruction and all entities generated by it. This operation is irreversible. :param instruction_id: The ID of the instruction. - :param update_instruction_params: :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 @@ -509,33 +495,23 @@ async def update_instruction_async( else: base_url = self._get_url(base_url, url_variables) - request = models.UpdateInstructionRequest( + request = models.DeleteInstructionRequest( instruction_id=instruction_id, - update_instruction_params=utils.get_pydantic_model( - update_instruction_params, models.UpdateInstructionParams - ), ) req = self._build_request_async( - method="PUT", + method="DELETE", path="/instructions/{instruction_id}", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, + 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, - get_serialized_body=lambda: utils.serialize_request_body( - request.update_instruction_params, - False, - False, - "json", - models.UpdateInstructionParams, - ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -552,7 +528,7 @@ async def update_instruction_async( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="UpdateInstruction", + operation_id="DeleteInstruction", oauth2_scopes=None, security_source=self.sdk_configuration.security, ), @@ -563,7 +539,7 @@ async def update_instruction_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.Instruction, http_res) + return unmarshal_json_response(Dict[str, str], http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( models.HTTPValidationErrorData, http_res @@ -584,20 +560,22 @@ async def update_instruction_async( raise models.SDKError("Unexpected response received", http_res) - def delete( + def update_instruction( self, *, instruction_id: str, + patch_instruction_params: Union[ + models.PatchInstructionParams, models.PatchInstructionParamsTypedDict + ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Dict[str, str]: - r"""Delete Instruction - - Delete an instruction. This will delete the instruction and all entities generated by it. This operation is irreversible. + ) -> models.Instruction: + r"""Patch Instruction :param instruction_id: The ID of the instruction. + :param patch_instruction_params: :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 @@ -613,23 +591,33 @@ def delete( else: base_url = self._get_url(base_url, url_variables) - request = models.DeleteInstructionRequest( + request = models.PatchInstructionRequest( instruction_id=instruction_id, + patch_instruction_params=utils.get_pydantic_model( + patch_instruction_params, models.PatchInstructionParams + ), ) req = self._build_request( - method="DELETE", + method="PATCH", path="/instructions/{instruction_id}", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=False, + 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.patch_instruction_params, + False, + False, + "json", + models.PatchInstructionParams, + ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -646,7 +634,7 @@ def delete( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="DeleteInstruction", + operation_id="PatchInstruction", oauth2_scopes=None, security_source=self.sdk_configuration.security, ), @@ -657,7 +645,7 @@ def delete( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Dict[str, str], http_res) + return unmarshal_json_response(models.Instruction, http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( models.HTTPValidationErrorData, http_res @@ -678,20 +666,22 @@ def delete( raise models.SDKError("Unexpected response received", http_res) - async def delete_async( + async def update_instruction_async( self, *, instruction_id: str, + patch_instruction_params: Union[ + models.PatchInstructionParams, models.PatchInstructionParamsTypedDict + ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Dict[str, str]: - r"""Delete Instruction - - Delete an instruction. This will delete the instruction and all entities generated by it. This operation is irreversible. + ) -> models.Instruction: + r"""Patch Instruction :param instruction_id: The ID of the instruction. + :param patch_instruction_params: :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 @@ -707,23 +697,33 @@ async def delete_async( else: base_url = self._get_url(base_url, url_variables) - request = models.DeleteInstructionRequest( + request = models.PatchInstructionRequest( instruction_id=instruction_id, + patch_instruction_params=utils.get_pydantic_model( + patch_instruction_params, models.PatchInstructionParams + ), ) req = self._build_request_async( - method="DELETE", + method="PATCH", path="/instructions/{instruction_id}", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=False, + 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.patch_instruction_params, + False, + False, + "json", + models.PatchInstructionParams, + ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -740,7 +740,7 @@ async def delete_async( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="DeleteInstruction", + operation_id="PatchInstruction", oauth2_scopes=None, security_source=self.sdk_configuration.security, ), @@ -751,7 +751,7 @@ async def delete_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Dict[str, str], http_res) + return unmarshal_json_response(models.Instruction, http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( models.HTTPValidationErrorData, http_res @@ -1010,6 +1010,264 @@ def next_func() -> Optional[models.ListEntitiesByInstructionResponse]: raise models.SDKError("Unexpected response received", http_res) + def list_extraction_logs( + self, + *, + request: Union[ + models.ListInstructionEntityExtractionLogsRequest, + models.ListInstructionEntityExtractionLogsRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Optional[models.ListInstructionEntityExtractionLogsResponse]: + r"""Get Instruction Entity Extraction Logs + + List entity extraction logs for an instruction. Results are attempt-level and include both successful and unsuccessful extraction outcomes. Results are sorted by created_at in descending order and paginated. Historical extraction attempts before 2026-03-06 are unavailable in this endpoint. + + :param request: The request object to send. + :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 server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal( + request, models.ListInstructionEntityExtractionLogsRequest + ) + request = cast(models.ListInstructionEntityExtractionLogsRequest, request) + + req = self._build_request( + method="GET", + path="/instructions/{instruction_id}/entity-extraction-logs", + 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="ListInstructionEntityExtractionLogs", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["401", "402", "422", "429", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + def next_func() -> Optional[models.ListInstructionEntityExtractionLogsResponse]: + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + next_cursor = JSONPath("$.pagination.next_cursor").parse(body) + + if len(next_cursor) == 0: + return None + + next_cursor = next_cursor[0] + if next_cursor is None or str(next_cursor).strip() == "": + return None + + return self.list_extraction_logs( + request=models.ListInstructionEntityExtractionLogsRequest( + instruction_id=request.instruction_id, + cursor=next_cursor, + page_size=request.page_size, + document_ids=request.document_ids, + status=request.status, + created_after=request.created_after, + created_before=request.created_before, + partition=request.partition, + ), + retries=retries, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.ListInstructionEntityExtractionLogsResponse( + result=unmarshal_json_response( + models.InstructionEntityExtractionLogList, http_res + ), + next=next_func, + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.HTTPValidationErrorData, http_res + ) + raise models.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, ["401", "402", "429"], "application/json"): + response_data = unmarshal_json_response(models.ErrorMessageData, http_res) + raise models.ErrorMessage(response_data, http_res) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorMessageData, http_res) + raise models.ErrorMessage(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + + raise models.SDKError("Unexpected response received", http_res) + + async def list_extraction_logs_async( + self, + *, + request: Union[ + models.ListInstructionEntityExtractionLogsRequest, + models.ListInstructionEntityExtractionLogsRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Optional[models.ListInstructionEntityExtractionLogsResponse]: + r"""Get Instruction Entity Extraction Logs + + List entity extraction logs for an instruction. Results are attempt-level and include both successful and unsuccessful extraction outcomes. Results are sorted by created_at in descending order and paginated. Historical extraction attempts before 2026-03-06 are unavailable in this endpoint. + + :param request: The request object to send. + :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 server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal( + request, models.ListInstructionEntityExtractionLogsRequest + ) + request = cast(models.ListInstructionEntityExtractionLogsRequest, request) + + req = self._build_request_async( + method="GET", + path="/instructions/{instruction_id}/entity-extraction-logs", + 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="ListInstructionEntityExtractionLogs", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["401", "402", "422", "429", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + def next_func() -> Optional[models.ListInstructionEntityExtractionLogsResponse]: + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + next_cursor = JSONPath("$.pagination.next_cursor").parse(body) + + if len(next_cursor) == 0: + return None + + next_cursor = next_cursor[0] + if next_cursor is None or str(next_cursor).strip() == "": + return None + + return self.list_extraction_logs( + request=models.ListInstructionEntityExtractionLogsRequest( + instruction_id=request.instruction_id, + cursor=next_cursor, + page_size=request.page_size, + document_ids=request.document_ids, + status=request.status, + created_after=request.created_after, + created_before=request.created_before, + partition=request.partition, + ), + retries=retries, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.ListInstructionEntityExtractionLogsResponse( + result=unmarshal_json_response( + models.InstructionEntityExtractionLogList, http_res + ), + next=next_func, + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.HTTPValidationErrorData, http_res + ) + raise models.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, ["401", "402", "429"], "application/json"): + response_data = unmarshal_json_response(models.ErrorMessageData, http_res) + raise models.ErrorMessage(response_data, http_res) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorMessageData, http_res) + raise models.ErrorMessage(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + + raise models.SDKError("Unexpected response received", http_res) + def list_by_document( self, *, diff --git a/src/ragie/models/__init__.py b/src/ragie/models/__init__.py index 7c95a6b..8bdfaf2 100644 --- a/src/ragie/models/__init__.py +++ b/src/ragie/models/__init__.py @@ -1,27 +1,38 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from .ragieerror import RagieError -from typing import TYPE_CHECKING -from importlib import import_module -import builtins -import sys +from typing import Any, TYPE_CHECKING + +from ragie.utils.dynamic_imports import lazy_getattr, lazy_dir if TYPE_CHECKING: from .accesstokencredentials import ( AccessTokenCredentials, AccessTokenCredentialsTypedDict, ) + from .address import Address, AddressTypedDict from .agent_hopps_models_models_usage import ( AgentHoppsModelsModelsUsage, AgentHoppsModelsModelsUsageTypedDict, ) from .answer import Answer, AnswerTypedDict from .answerstep import AnswerStep, AnswerStepTypedDict + from .apidocumentelement import ( + APIDocumentElement, + APIDocumentElementTypedDict, + Location, + LocationTypedDict, + ) + from .apielement import APIElement, APIElementTypedDict from .asyncdocumentmetadataupdate import ( AsyncDocumentMetadataUpdate, AsyncDocumentMetadataUpdateTypedDict, ) from .audiomodalitydata import AudioModalityData, AudioModalityDataTypedDict + from .audiotranscriptionsegment import ( + AudioTranscriptionSegment, + AudioTranscriptionSegmentTypedDict, + ) from .authenticatorconfluenceconnection import ( AuthenticatorConfluenceConnection, AuthenticatorConfluenceConnectionTypedDict, @@ -67,15 +78,27 @@ AuthenticatorSlackConnection, AuthenticatorSlackConnectionTypedDict, ) + from .author import Author, AuthorTypedDict from .backblazecredentials import ( BackblazeCredentials, BackblazeCredentialsTypedDict, ) + from .barcode import Barcode, BarcodeTypedDict from .basegetauthenticator import ( BaseGetAuthenticator, BaseGetAuthenticatorTypedDict, ) + from .bibliography import Bibliography, BibliographyTypedDict + from .boundingboxlocation import BoundingBoxLocation, BoundingBoxLocationTypedDict from .bucketdata import BucketData, BucketDataTypedDict + from .button import Button, ButtonTypedDict + from .calendardate import CalendarDate, CalendarDateTypedDict + from .caption import Caption, CaptionTypedDict + from .characterindexlocation import ( + CharacterIndexLocation, + CharacterIndexLocationTypedDict, + ) + from .code import Code, CodeTypedDict from .codeinterpreterevidence import ( CodeInterpreterEvidence, CodeInterpreterEvidenceTypedDict, @@ -90,6 +113,7 @@ CodeInterpreterOutputLogsTypedDict, ) from .codestep import CodeStep, CodeStepTypedDict + from .comment import Comment, CommentTypedDict from .confluencedata import ConfluenceData, ConfluenceDataTypedDict from .connection import ( Connection, @@ -147,11 +171,11 @@ ) from .createdocumentparams import ( CreateDocumentParams, + CreateDocumentParamsMetadata, + CreateDocumentParamsMetadataTypedDict, CreateDocumentParamsTypedDict, File, FileTypedDict, - Metadata, - MetadataTypedDict, Mode, ModeStatic, ModeTypedDict, @@ -163,6 +187,7 @@ Two2, Two2TypedDict, TwoTypedDict, + Workflow, ) from .createdocumentrawparams import ( CreateDocumentRawParams, @@ -191,6 +216,7 @@ CreateWebhookEndpointPayload, CreateWebhookEndpointPayloadTypedDict, ) + from .definitionlist import DefinitionList, DefinitionListTypedDict from .delete_connection_connections_connection_id_delete_postop import ( DeleteConnectionConnectionsConnectionIDDeletePostRequest, DeleteConnectionConnectionsConnectionIDDeletePostRequestTypedDict, @@ -216,12 +242,7 @@ DeleteWebhookEndpointRequest, DeleteWebhookEndpointRequestTypedDict, ) - from .document import ( - Document, - DocumentMetadata, - DocumentMetadataTypedDict, - DocumentTypedDict, - ) + from .document import Document, DocumentTypedDict, Metadata, MetadataTypedDict from .documentchunk import DocumentChunk, DocumentChunkTypedDict from .documentchunkdetail import ( DocumentChunkDetail, @@ -231,6 +252,7 @@ ) from .documentchunklist import DocumentChunkList, DocumentChunkListTypedDict from .documentdelete import DocumentDelete, DocumentDeleteTypedDict + from .documentelementtype import DocumentElementType from .documentfileupdate import DocumentFileUpdate, DocumentFileUpdateTypedDict from .documentget import ( DocumentGet, @@ -254,11 +276,16 @@ DocumentWithContentMetadataTypedDict, DocumentWithContentTypedDict, ) + from .documentworkflow import DocumentWorkflow + from .durationlocation import DurationLocation, DurationLocationTypedDict + from .emailaddress import EmailAddress, EmailAddressTypedDict from .entity import Entity, EntityTypedDict from .entitylist import EntityList, EntityListTypedDict from .errormessage import ErrorMessage, ErrorMessageData from .evaluatedanswerstep import EvaluatedAnswerStep, EvaluatedAnswerStepTypedDict from .failedstep import FailedStep, FailedStepTypedDict + from .figure import Figure, FigureTypedDict + from .figurecaption import FigureCaption, FigureCaptionTypedDict from .filesearchoutput import ( FileSearchOutput, FileSearchOutputStatus, @@ -274,6 +301,11 @@ StepsTypedDict, ) from .folderdata import FolderData, FolderDataTypedDict + from .footer import Footer, FooterTypedDict + from .footnote import Footnote, FootnoteTypedDict + from .formfield import FormField, FormFieldTypedDict, InputType + from .formoption import FormOption, FormOptionTypedDict + from .formula import Formula, FormulaTypedDict from .freshdeskcredentials import ( FreshdeskCredentials, FreshdeskCredentialsTypedDict, @@ -287,6 +319,7 @@ GetConnectionStatsConnectionsConnectionIDStatsGetRequest, GetConnectionStatsConnectionsConnectionIDStatsGetRequestTypedDict, ) + from .get_elementop import GetElementRequest, GetElementRequestTypedDict from .get_partition_partitions_partition_id_getop import ( GetPartitionPartitionsPartitionIDGetRequest, GetPartitionPartitionsPartitionIDGetRequestTypedDict, @@ -330,12 +363,27 @@ ) from .gmaildata import GmailData, GmailDataTypedDict from .googlefolderdata import GoogleFolderData, GoogleFolderDataTypedDict + from .header import Header, HeaderTypedDict from .httpvalidationerror import HTTPValidationError, HTTPValidationErrorData from .hubspotdata import HubspotData, HubspotDataTypedDict + from .image import Image, ImageTypedDict from .inputtokendetails import InputTokenDetails, InputTokenDetailsTypedDict from .instruction import Instruction, InstructionTypedDict, Scope + from .instructionentityextractionlog import ( + InstructionEntityExtractionLog, + InstructionEntityExtractionLogScope, + InstructionEntityExtractionLogTypedDict, + ReasonCode, + Status, + ) + from .instructionentityextractionloglist import ( + InstructionEntityExtractionLogList, + InstructionEntityExtractionLogListTypedDict, + ) from .intercomcredentials import IntercomCredentials, IntercomCredentialsTypedDict from .intercomdata import IntercomData, IntercomDataTypedDict + from .json import JSON, JSONTypedDict + from .keyvalue import KeyValue, KeyValueTypedDict from .link import Link, LinkTypedDict from .list_connections_connections_getop import ( ListConnectionsConnectionsGetRequest, @@ -343,6 +391,7 @@ ListConnectionsConnectionsGetResponse, ListConnectionsConnectionsGetResponseTypedDict, ) + from .list_elementsop import ListElementsRequest, ListElementsRequestTypedDict from .list_partitions_partitions_getop import ( ListPartitionsPartitionsGetRequest, ListPartitionsPartitionsGetRequestTypedDict, @@ -359,6 +408,10 @@ ListConnectorSourceTypeInfo, ListConnectorSourceTypeInfoTypedDict, ) + from .listdocumentelements import ( + ListDocumentElements, + ListDocumentElementsTypedDict, + ) from .listdocumentsop import ( ListDocumentsRequest, ListDocumentsRequestTypedDict, @@ -377,14 +430,29 @@ ListEntitiesByInstructionResponse, ListEntitiesByInstructionResponseTypedDict, ) + from .listinstructionentityextractionlogsop import ( + ListInstructionEntityExtractionLogsRequest, + ListInstructionEntityExtractionLogsRequestTypedDict, + ListInstructionEntityExtractionLogsResponse, + ListInstructionEntityExtractionLogsResponseTypedDict, + QueryParamStatus, + ) + from .listitem import ListItem, ListItemTypedDict from .listwebhookendpointsop import ( ListWebhookEndpointsRequest, ListWebhookEndpointsRequestTypedDict, ListWebhookEndpointsResponse, ListWebhookEndpointsResponseTypedDict, ) - from .mediamodeparam import MediaModeParam, MediaModeParamTypedDict, Static, Video + from .logo import Logo, LogoTypedDict + from .mediamodeparam import ( + MediaModeParam, + MediaModeParamTypedDict, + MediaModeParamVideo, + Static, + ) from .modelusage import ModelUsage, ModelUsageTypedDict + from .narrativetext import NarrativeText, NarrativeTextTypedDict from .no_response_error import NoResponseError from .oauthcredentials import OAuthCredentials, OAuthCredentialsTypedDict, Provider from .oauthrefreshtokencredentials import ( @@ -403,7 +471,9 @@ ) from .oauthurlresponse import OAuthURLResponse, OAuthURLResponseTypedDict from .onedrivedata import OnedriveData, OnedriveDataTypedDict + from .orderedlist import OrderedList, OrderedListTypedDict from .outputtokendetails import OutputTokenDetails, OutputTokenDetailsTypedDict + from .pagebreak import PageBreak, PageBreakTypedDict from .pagination import Pagination, PaginationTypedDict from .partition import ( MetadataSchema, @@ -434,6 +504,15 @@ PatchDocumentMetadataParams, PatchDocumentMetadataParamsTypedDict, ) + from .patchinstructionop import ( + PatchInstructionRequest, + PatchInstructionRequestTypedDict, + ) + from .patchinstructionparams import ( + PatchInstructionParams, + PatchInstructionParamsScope, + PatchInstructionParamsTypedDict, + ) from .planstep import PlanStep, PlanStepTypedDict from .publicbackblazeconnection import ( PublicBackblazeConnection, @@ -460,11 +539,17 @@ PublicS3CompatibleConnection, PublicS3CompatibleConnectionTypedDict, ) + from .publicwebcrawlerconnection import ( + PublicWebcrawlerConnection, + PublicWebcrawlerConnectionTypedDict, + ) from .publiczendeskconnection import ( PublicZendeskConnection, PublicZendeskConnectionTypedDict, ) + from .qrcode import QRCode, QRCodeTypedDict from .querydetails import QueryDetails, QueryDetailsTypedDict + from .quote import Quote, QuoteTypedDict from .ragie_api_schema_response_usage import ( RagieAPISchemaResponseUsage, RagieAPISchemaResponseUsageTypedDict, @@ -479,7 +564,13 @@ from .reasoningsummary import ReasoningSummary, ReasoningSummaryTypedDict from .reasoningtext import ReasoningText, ReasoningTextTypedDict from .request import Request, RequestTypedDict - from .response import Output, OutputTypedDict, Response, ResponseTypedDict, Status + from .response import ( + Output, + OutputTypedDict, + Response, + ResponseStatus, + ResponseTypedDict, + ) from .responsecontent import ResponseContent, ResponseContentTypedDict from .responseok import ResponseOK, ResponseOKTypedDict from .responseoutputmessage import ( @@ -503,6 +594,7 @@ SearchStepWithQueryDetails, SearchStepWithQueryDetailsTypedDict, ) + from .sectionheader import SectionHeader, SectionHeaderTypedDict from .security import Security, SecurityTypedDict from .set_connection_enabled_connections_connection_id_enabled_putop import ( SetConnectionEnabledConnectionsConnectionIDEnabledPutRequest, @@ -529,10 +621,21 @@ Type, ) from .sharepointsitedata import SharepointSiteData, SharepointSiteDataTypedDict + from .signature import Signature, SignatureTypedDict from .slackdata import SlackData, SlackDataTypedDict + from .spreadsheetlocation import SpreadsheetLocation, SpreadsheetLocationTypedDict + from .stamp import Stamp, StampTypedDict + from .subheader import SubHeader, SubHeaderTypedDict from .surrenderstep import SurrenderStep, SurrenderStepTypedDict from .syncconnectionop import SyncConnectionRequest, SyncConnectionRequestTypedDict + from .table import Table, TableTypedDict + from .tableofcontents import TableOfContents, TableOfContentsTypedDict + from .text import Text, TextTypedDict + from .time import Time, TimeTypedDict + from .title import Title, TitleTypedDict from .tool import Tool, ToolTypedDict + from .uncategorizedtext import UncategorizedText, UncategorizedTextTypedDict + from .unorderedlist import UnorderedList, UnorderedListTypedDict from .update_connection_connections_connection_id_putop import ( UpdateConnectionConnectionsConnectionIDPutRequest, UpdateConnectionConnectionsConnectionIDPutRequestTypedDict, @@ -583,14 +686,6 @@ UpdateDocumentRawParamsDataTypedDict, UpdateDocumentRawParamsTypedDict, ) - from .updateinstructionop import ( - UpdateInstructionRequest, - UpdateInstructionRequestTypedDict, - ) - from .updateinstructionparams import ( - UpdateInstructionParams, - UpdateInstructionParamsTypedDict, - ) from .updatepartitionparams import ( UpdatePartitionParams, UpdatePartitionParamsMetadataSchema, @@ -611,16 +706,27 @@ ValidationError, ValidationErrorTypedDict, ) + from .video import Video, VideoTypedDict from .videomodalitydata import VideoModalityData, VideoModalityDataTypedDict + from .videosegment import VideoSegment, VideoSegmentTypedDict + from .watermark import Watermark, WatermarkTypedDict + from .webcrawlerdata import WebcrawlerData, WebcrawlerDataTypedDict from .webhookendpoint import WebhookEndpoint, WebhookEndpointTypedDict from .webhookendpointlist import WebhookEndpointList, WebhookEndpointListTypedDict + from .wordmodality import WordModality, WordModalityTypedDict from .wordtimestamp import WordTimestamp, WordTimestampTypedDict from .zendeskcredentials import ZendeskCredentials, ZendeskCredentialsTypedDict from .zendeskdata import ZendeskData, ZendeskDataTypedDict __all__ = [ + "APIDocumentElement", + "APIDocumentElementTypedDict", + "APIElement", + "APIElementTypedDict", "AccessTokenCredentials", "AccessTokenCredentialsTypedDict", + "Address", + "AddressTypedDict", "AgentHoppsModelsModelsUsage", "AgentHoppsModelsModelsUsageTypedDict", "Answer", @@ -631,6 +737,8 @@ "AsyncDocumentMetadataUpdateTypedDict", "AudioModalityData", "AudioModalityDataTypedDict", + "AudioTranscriptionSegment", + "AudioTranscriptionSegmentTypedDict", "AuthenticatorConfluenceConnection", "AuthenticatorConfluenceConnectionTypedDict", "AuthenticatorDropboxConnection", @@ -655,12 +763,29 @@ "AuthenticatorSharepointConnectionTypedDict", "AuthenticatorSlackConnection", "AuthenticatorSlackConnectionTypedDict", + "Author", + "AuthorTypedDict", "BackblazeCredentials", "BackblazeCredentialsTypedDict", + "Barcode", + "BarcodeTypedDict", "BaseGetAuthenticator", "BaseGetAuthenticatorTypedDict", + "Bibliography", + "BibliographyTypedDict", + "BoundingBoxLocation", + "BoundingBoxLocationTypedDict", "BucketData", "BucketDataTypedDict", + "Button", + "ButtonTypedDict", + "CalendarDate", + "CalendarDateTypedDict", + "Caption", + "CaptionTypedDict", + "CharacterIndexLocation", + "CharacterIndexLocationTypedDict", + "Code", "CodeInterpreterEvidence", "CodeInterpreterEvidenceTypedDict", "CodeInterpreterOutput", @@ -670,6 +795,9 @@ "CodeInterpreterOutputTypedDict", "CodeStep", "CodeStepTypedDict", + "CodeTypedDict", + "Comment", + "CommentTypedDict", "ConfluenceData", "ConfluenceDataTypedDict", "Connection", @@ -706,6 +834,8 @@ "CreateDocumentFromURLParamsModeTypedDict", "CreateDocumentFromURLParamsTypedDict", "CreateDocumentParams", + "CreateDocumentParamsMetadata", + "CreateDocumentParamsMetadataTypedDict", "CreateDocumentParamsTypedDict", "CreateDocumentRawParams", "CreateDocumentRawParamsMetadata", @@ -724,6 +854,8 @@ "CreateWebhookEndpointPayloadTypedDict", "Data", "DataTypedDict", + "DefinitionList", + "DefinitionListTypedDict", "DeleteAuthenticatorConnectionRequest", "DeleteAuthenticatorConnectionRequestTypedDict", "DeleteConnectionConnectionsConnectionIDDeletePostRequest", @@ -748,6 +880,7 @@ "DocumentChunkTypedDict", "DocumentDelete", "DocumentDeleteTypedDict", + "DocumentElementType", "DocumentFileUpdate", "DocumentFileUpdateTypedDict", "DocumentGet", @@ -756,8 +889,6 @@ "DocumentGetTypedDict", "DocumentList", "DocumentListTypedDict", - "DocumentMetadata", - "DocumentMetadataTypedDict", "DocumentMetadataUpdate", "DocumentMetadataUpdateMetadata", "DocumentMetadataUpdateMetadataTypedDict", @@ -773,7 +904,12 @@ "DocumentWithContentMetadata", "DocumentWithContentMetadataTypedDict", "DocumentWithContentTypedDict", + "DocumentWorkflow", + "DurationLocation", + "DurationLocationTypedDict", "Effort", + "EmailAddress", + "EmailAddressTypedDict", "Entity", "EntityList", "EntityListTypedDict", @@ -786,6 +922,10 @@ "EvidenceTypedDict", "FailedStep", "FailedStepTypedDict", + "Figure", + "FigureCaption", + "FigureCaptionTypedDict", + "FigureTypedDict", "File", "FileSearchOutput", "FileSearchOutputStatus", @@ -797,6 +937,16 @@ "FinalAnswerTypedDict", "FolderData", "FolderDataTypedDict", + "Footer", + "FooterTypedDict", + "Footnote", + "FootnoteTypedDict", + "FormField", + "FormFieldTypedDict", + "FormOption", + "FormOptionTypedDict", + "Formula", + "FormulaTypedDict", "FreshdeskCredentials", "FreshdeskCredentialsTypedDict", "FreshdeskData", @@ -819,6 +969,8 @@ "GetDocumentSourceRequestTypedDict", "GetDocumentSummaryRequest", "GetDocumentSummaryRequestTypedDict", + "GetElementRequest", + "GetElementRequestTypedDict", "GetPartitionPartitionsPartitionIDGetRequest", "GetPartitionPartitionsPartitionIDGetRequestTypedDict", "GetResponseResponsesResponseIDGetRequest", @@ -831,16 +983,30 @@ "GoogleFolderDataTypedDict", "HTTPValidationError", "HTTPValidationErrorData", + "Header", + "HeaderTypedDict", "HubspotData", "HubspotDataTypedDict", + "Image", + "ImageTypedDict", "InputTokenDetails", "InputTokenDetailsTypedDict", + "InputType", "Instruction", + "InstructionEntityExtractionLog", + "InstructionEntityExtractionLogList", + "InstructionEntityExtractionLogListTypedDict", + "InstructionEntityExtractionLogScope", + "InstructionEntityExtractionLogTypedDict", "InstructionTypedDict", "IntercomCredentials", "IntercomCredentialsTypedDict", "IntercomData", "IntercomDataTypedDict", + "JSON", + "JSONTypedDict", + "KeyValue", + "KeyValueTypedDict", "Link", "LinkTypedDict", "ListAuthenticatorsRequest", @@ -853,10 +1019,14 @@ "ListConnectionsConnectionsGetResponseTypedDict", "ListConnectorSourceTypeInfo", "ListConnectorSourceTypeInfoTypedDict", + "ListDocumentElements", + "ListDocumentElementsTypedDict", "ListDocumentsRequest", "ListDocumentsRequestTypedDict", "ListDocumentsResponse", "ListDocumentsResponseTypedDict", + "ListElementsRequest", + "ListElementsRequestTypedDict", "ListEntitiesByDocumentRequest", "ListEntitiesByDocumentRequestTypedDict", "ListEntitiesByDocumentResponse", @@ -865,6 +1035,12 @@ "ListEntitiesByInstructionRequestTypedDict", "ListEntitiesByInstructionResponse", "ListEntitiesByInstructionResponseTypedDict", + "ListInstructionEntityExtractionLogsRequest", + "ListInstructionEntityExtractionLogsRequestTypedDict", + "ListInstructionEntityExtractionLogsResponse", + "ListInstructionEntityExtractionLogsResponseTypedDict", + "ListItem", + "ListItemTypedDict", "ListPartitionsPartitionsGetRequest", "ListPartitionsPartitionsGetRequestTypedDict", "ListPartitionsPartitionsGetResponse", @@ -875,8 +1051,13 @@ "ListWebhookEndpointsResponseTypedDict", "Loc", "LocTypedDict", + "Location", + "LocationTypedDict", + "Logo", + "LogoTypedDict", "MediaModeParam", "MediaModeParamTypedDict", + "MediaModeParamVideo", "MediaType", "Metadata", "MetadataSchema", @@ -893,6 +1074,8 @@ "ModeVideo", "ModelUsage", "ModelUsageTypedDict", + "NarrativeText", + "NarrativeTextTypedDict", "NoResponseError", "OAuthCredentials", "OAuthCredentialsTypedDict", @@ -911,10 +1094,14 @@ "OneTypedDict", "OnedriveData", "OnedriveDataTypedDict", + "OrderedList", + "OrderedListTypedDict", "Output", "OutputTokenDetails", "OutputTokenDetailsTypedDict", "OutputTypedDict", + "PageBreak", + "PageBreakTypedDict", "Pagination", "PaginationTypedDict", "Partition", @@ -940,6 +1127,11 @@ "PatchDocumentMetadataRequestTypedDict", "PatchDocumentMetadataResponsePatchdocumentmetadata", "PatchDocumentMetadataResponsePatchdocumentmetadataTypedDict", + "PatchInstructionParams", + "PatchInstructionParamsScope", + "PatchInstructionParamsTypedDict", + "PatchInstructionRequest", + "PatchInstructionRequestTypedDict", "PlanStep", "PlanStepTypedDict", "Provider", @@ -959,19 +1151,27 @@ "PublicIntercomConnectionTypedDict", "PublicS3CompatibleConnection", "PublicS3CompatibleConnectionTypedDict", + "PublicWebcrawlerConnection", + "PublicWebcrawlerConnectionTypedDict", "PublicZendeskConnection", "PublicZendeskConnectionTypedDict", + "QRCode", + "QRCodeTypedDict", "QueryDetails", "QueryDetailsTypedDict", "QueryParam1", "QueryParamMediaType", "QueryParamMediaTypeTypedDict", + "QueryParamStatus", + "Quote", + "QuoteTypedDict", "RagieAPISchemaResponseUsage", "RagieAPISchemaResponseUsageTypedDict", "RagieError", "RagieEvidence", "RagieEvidenceTypedDict", "Reason", + "ReasonCode", "Reasoning", "ReasoningOutput", "ReasoningOutputStatus", @@ -990,6 +1190,7 @@ "ResponseOKTypedDict", "ResponseOutputMessage", "ResponseOutputMessageTypedDict", + "ResponseStatus", "ResponseTypedDict", "ResponseValidationError", "Retrieval", @@ -1011,6 +1212,8 @@ "SearchStepWithQueryDetails", "SearchStepWithQueryDetailsTypedDict", "SearchTypedDict", + "SectionHeader", + "SectionHeaderTypedDict", "Security", "SecurityTypedDict", "SetConnectionEnabledConnectionsConnectionIDEnabledPutRequest", @@ -1029,19 +1232,37 @@ "SharepointFileDataTypedDict", "SharepointSiteData", "SharepointSiteDataTypedDict", + "Signature", + "SignatureTypedDict", "SlackData", "SlackDataTypedDict", "Source", "SourceTypedDict", + "SpreadsheetLocation", + "SpreadsheetLocationTypedDict", + "Stamp", + "StampTypedDict", "Static", "Status", "Steps", "StepsTypedDict", + "SubHeader", + "SubHeaderTypedDict", "SurrenderStep", "SurrenderStepTypedDict", "SyncConnectionRequest", "SyncConnectionRequestTypedDict", + "Table", + "TableOfContents", + "TableOfContentsTypedDict", + "TableTypedDict", + "Text", + "TextTypedDict", "Theme", + "Time", + "TimeTypedDict", + "Title", + "TitleTypedDict", "Tool", "ToolTypedDict", "Two", @@ -1050,6 +1271,10 @@ "Two2TypedDict", "TwoTypedDict", "Type", + "UncategorizedText", + "UncategorizedTextTypedDict", + "UnorderedList", + "UnorderedListTypedDict", "UpdateConnectionConnectionsConnectionIDPutRequest", "UpdateConnectionConnectionsConnectionIDPutRequestTypedDict", "UpdateDocumentFileParams", @@ -1080,10 +1305,6 @@ "UpdateDocumentRawParamsTypedDict", "UpdateDocumentRawRequest", "UpdateDocumentRawRequestTypedDict", - "UpdateInstructionParams", - "UpdateInstructionParamsTypedDict", - "UpdateInstructionRequest", - "UpdateInstructionRequestTypedDict", "UpdatePartitionParams", "UpdatePartitionParamsMetadataSchema", "UpdatePartitionParamsMetadataSchemaTypedDict", @@ -1099,12 +1320,22 @@ "Video", "VideoModalityData", "VideoModalityDataTypedDict", + "VideoSegment", + "VideoSegmentTypedDict", + "VideoTypedDict", + "Watermark", + "WatermarkTypedDict", + "WebcrawlerData", + "WebcrawlerDataTypedDict", "WebhookEndpoint", "WebhookEndpointList", "WebhookEndpointListTypedDict", "WebhookEndpointTypedDict", + "WordModality", + "WordModalityTypedDict", "WordTimestamp", "WordTimestampTypedDict", + "Workflow", "ZendeskCredentials", "ZendeskCredentialsTypedDict", "ZendeskData", @@ -1114,16 +1345,26 @@ _dynamic_imports: dict[str, str] = { "AccessTokenCredentials": ".accesstokencredentials", "AccessTokenCredentialsTypedDict": ".accesstokencredentials", + "Address": ".address", + "AddressTypedDict": ".address", "AgentHoppsModelsModelsUsage": ".agent_hopps_models_models_usage", "AgentHoppsModelsModelsUsageTypedDict": ".agent_hopps_models_models_usage", "Answer": ".answer", "AnswerTypedDict": ".answer", "AnswerStep": ".answerstep", "AnswerStepTypedDict": ".answerstep", + "APIDocumentElement": ".apidocumentelement", + "APIDocumentElementTypedDict": ".apidocumentelement", + "Location": ".apidocumentelement", + "LocationTypedDict": ".apidocumentelement", + "APIElement": ".apielement", + "APIElementTypedDict": ".apielement", "AsyncDocumentMetadataUpdate": ".asyncdocumentmetadataupdate", "AsyncDocumentMetadataUpdateTypedDict": ".asyncdocumentmetadataupdate", "AudioModalityData": ".audiomodalitydata", "AudioModalityDataTypedDict": ".audiomodalitydata", + "AudioTranscriptionSegment": ".audiotranscriptionsegment", + "AudioTranscriptionSegmentTypedDict": ".audiotranscriptionsegment", "AuthenticatorConfluenceConnection": ".authenticatorconfluenceconnection", "AuthenticatorConfluenceConnectionTypedDict": ".authenticatorconfluenceconnection", "AuthenticatorDropboxConnection": ".authenticatordropboxconnection", @@ -1148,12 +1389,30 @@ "AuthenticatorSharepointConnectionTypedDict": ".authenticatorsharepointconnection", "AuthenticatorSlackConnection": ".authenticatorslackconnection", "AuthenticatorSlackConnectionTypedDict": ".authenticatorslackconnection", + "Author": ".author", + "AuthorTypedDict": ".author", "BackblazeCredentials": ".backblazecredentials", "BackblazeCredentialsTypedDict": ".backblazecredentials", + "Barcode": ".barcode", + "BarcodeTypedDict": ".barcode", "BaseGetAuthenticator": ".basegetauthenticator", "BaseGetAuthenticatorTypedDict": ".basegetauthenticator", + "Bibliography": ".bibliography", + "BibliographyTypedDict": ".bibliography", + "BoundingBoxLocation": ".boundingboxlocation", + "BoundingBoxLocationTypedDict": ".boundingboxlocation", "BucketData": ".bucketdata", "BucketDataTypedDict": ".bucketdata", + "Button": ".button", + "ButtonTypedDict": ".button", + "CalendarDate": ".calendardate", + "CalendarDateTypedDict": ".calendardate", + "Caption": ".caption", + "CaptionTypedDict": ".caption", + "CharacterIndexLocation": ".characterindexlocation", + "CharacterIndexLocationTypedDict": ".characterindexlocation", + "Code": ".code", + "CodeTypedDict": ".code", "CodeInterpreterEvidence": ".codeinterpreterevidence", "CodeInterpreterEvidenceTypedDict": ".codeinterpreterevidence", "CodeInterpreterOutput": ".codeinterpreteroutput", @@ -1163,6 +1422,8 @@ "CodeInterpreterOutputLogsTypedDict": ".codeinterpreteroutputlogs", "CodeStep": ".codestep", "CodeStepTypedDict": ".codestep", + "Comment": ".comment", + "CommentTypedDict": ".comment", "ConfluenceData": ".confluencedata", "ConfluenceDataTypedDict": ".confluencedata", "Connection": ".connection", @@ -1206,11 +1467,11 @@ "CreateDocumentFromURLParamsTypedDict": ".createdocumentfromurlparams", "Mode1": ".createdocumentfromurlparams", "CreateDocumentParams": ".createdocumentparams", + "CreateDocumentParamsMetadata": ".createdocumentparams", + "CreateDocumentParamsMetadataTypedDict": ".createdocumentparams", "CreateDocumentParamsTypedDict": ".createdocumentparams", "File": ".createdocumentparams", "FileTypedDict": ".createdocumentparams", - "Metadata": ".createdocumentparams", - "MetadataTypedDict": ".createdocumentparams", "Mode": ".createdocumentparams", "ModeStatic": ".createdocumentparams", "ModeTypedDict": ".createdocumentparams", @@ -1222,6 +1483,7 @@ "Two2": ".createdocumentparams", "Two2TypedDict": ".createdocumentparams", "TwoTypedDict": ".createdocumentparams", + "Workflow": ".createdocumentparams", "CreateDocumentRawParams": ".createdocumentrawparams", "CreateDocumentRawParamsMetadata": ".createdocumentrawparams", "CreateDocumentRawParamsMetadataTypedDict": ".createdocumentrawparams", @@ -1239,6 +1501,8 @@ "CreatePartitionParamsTypedDict": ".createpartitionparams", "CreateWebhookEndpointPayload": ".createwebhookendpointpayload", "CreateWebhookEndpointPayloadTypedDict": ".createwebhookendpointpayload", + "DefinitionList": ".definitionlist", + "DefinitionListTypedDict": ".definitionlist", "DeleteConnectionConnectionsConnectionIDDeletePostRequest": ".delete_connection_connections_connection_id_delete_postop", "DeleteConnectionConnectionsConnectionIDDeletePostRequestTypedDict": ".delete_connection_connections_connection_id_delete_postop", "DeletePartitionPartitionsPartitionIDDeleteRequest": ".delete_partition_partitions_partition_id_deleteop", @@ -1254,9 +1518,9 @@ "DeleteWebhookEndpointRequest": ".deletewebhookendpointop", "DeleteWebhookEndpointRequestTypedDict": ".deletewebhookendpointop", "Document": ".document", - "DocumentMetadata": ".document", - "DocumentMetadataTypedDict": ".document", "DocumentTypedDict": ".document", + "Metadata": ".document", + "MetadataTypedDict": ".document", "DocumentChunk": ".documentchunk", "DocumentChunkTypedDict": ".documentchunk", "DocumentChunkDetail": ".documentchunkdetail", @@ -1267,6 +1531,7 @@ "DocumentChunkListTypedDict": ".documentchunklist", "DocumentDelete": ".documentdelete", "DocumentDeleteTypedDict": ".documentdelete", + "DocumentElementType": ".documentelementtype", "DocumentFileUpdate": ".documentfileupdate", "DocumentFileUpdateTypedDict": ".documentfileupdate", "DocumentGet": ".documentget", @@ -1289,6 +1554,11 @@ "DocumentWithContentMetadata": ".documentwithcontent", "DocumentWithContentMetadataTypedDict": ".documentwithcontent", "DocumentWithContentTypedDict": ".documentwithcontent", + "DocumentWorkflow": ".documentworkflow", + "DurationLocation": ".durationlocation", + "DurationLocationTypedDict": ".durationlocation", + "EmailAddress": ".emailaddress", + "EmailAddressTypedDict": ".emailaddress", "Entity": ".entity", "EntityTypedDict": ".entity", "EntityList": ".entitylist", @@ -1299,6 +1569,10 @@ "EvaluatedAnswerStepTypedDict": ".evaluatedanswerstep", "FailedStep": ".failedstep", "FailedStepTypedDict": ".failedstep", + "Figure": ".figure", + "FigureTypedDict": ".figure", + "FigureCaption": ".figurecaption", + "FigureCaptionTypedDict": ".figurecaption", "FileSearchOutput": ".filesearchoutput", "FileSearchOutputStatus": ".filesearchoutput", "FileSearchOutputTypedDict": ".filesearchoutput", @@ -1312,6 +1586,17 @@ "StepsTypedDict": ".finalanswer", "FolderData": ".folderdata", "FolderDataTypedDict": ".folderdata", + "Footer": ".footer", + "FooterTypedDict": ".footer", + "Footnote": ".footnote", + "FootnoteTypedDict": ".footnote", + "FormField": ".formfield", + "FormFieldTypedDict": ".formfield", + "InputType": ".formfield", + "FormOption": ".formoption", + "FormOptionTypedDict": ".formoption", + "Formula": ".formula", + "FormulaTypedDict": ".formula", "FreshdeskCredentials": ".freshdeskcredentials", "FreshdeskCredentialsTypedDict": ".freshdeskcredentials", "FreshdeskData": ".freshdeskdata", @@ -1320,6 +1605,8 @@ "GetConnectionConnectionsConnectionIDGetRequestTypedDict": ".get_connection_connections_connection_id_getop", "GetConnectionStatsConnectionsConnectionIDStatsGetRequest": ".get_connection_stats_connections_connection_id_stats_getop", "GetConnectionStatsConnectionsConnectionIDStatsGetRequestTypedDict": ".get_connection_stats_connections_connection_id_stats_getop", + "GetElementRequest": ".get_elementop", + "GetElementRequestTypedDict": ".get_elementop", "GetPartitionPartitionsPartitionIDGetRequest": ".get_partition_partitions_partition_id_getop", "GetPartitionPartitionsPartitionIDGetRequestTypedDict": ".get_partition_partitions_partition_id_getop", "GetResponseResponsesResponseIDGetRequest": ".get_response_responses_response_id_getop", @@ -1348,25 +1635,42 @@ "GmailDataTypedDict": ".gmaildata", "GoogleFolderData": ".googlefolderdata", "GoogleFolderDataTypedDict": ".googlefolderdata", + "Header": ".header", + "HeaderTypedDict": ".header", "HTTPValidationError": ".httpvalidationerror", "HTTPValidationErrorData": ".httpvalidationerror", "HubspotData": ".hubspotdata", "HubspotDataTypedDict": ".hubspotdata", + "Image": ".image", + "ImageTypedDict": ".image", "InputTokenDetails": ".inputtokendetails", "InputTokenDetailsTypedDict": ".inputtokendetails", "Instruction": ".instruction", "InstructionTypedDict": ".instruction", "Scope": ".instruction", + "InstructionEntityExtractionLog": ".instructionentityextractionlog", + "InstructionEntityExtractionLogScope": ".instructionentityextractionlog", + "InstructionEntityExtractionLogTypedDict": ".instructionentityextractionlog", + "ReasonCode": ".instructionentityextractionlog", + "Status": ".instructionentityextractionlog", + "InstructionEntityExtractionLogList": ".instructionentityextractionloglist", + "InstructionEntityExtractionLogListTypedDict": ".instructionentityextractionloglist", "IntercomCredentials": ".intercomcredentials", "IntercomCredentialsTypedDict": ".intercomcredentials", "IntercomData": ".intercomdata", "IntercomDataTypedDict": ".intercomdata", + "JSON": ".json", + "JSONTypedDict": ".json", + "KeyValue": ".keyvalue", + "KeyValueTypedDict": ".keyvalue", "Link": ".link", "LinkTypedDict": ".link", "ListConnectionsConnectionsGetRequest": ".list_connections_connections_getop", "ListConnectionsConnectionsGetRequestTypedDict": ".list_connections_connections_getop", "ListConnectionsConnectionsGetResponse": ".list_connections_connections_getop", "ListConnectionsConnectionsGetResponseTypedDict": ".list_connections_connections_getop", + "ListElementsRequest": ".list_elementsop", + "ListElementsRequestTypedDict": ".list_elementsop", "ListPartitionsPartitionsGetRequest": ".list_partitions_partitions_getop", "ListPartitionsPartitionsGetRequestTypedDict": ".list_partitions_partitions_getop", "ListPartitionsPartitionsGetResponse": ".list_partitions_partitions_getop", @@ -1377,6 +1681,8 @@ "ListAuthenticatorsResponseTypedDict": ".listauthenticatorsop", "ListConnectorSourceTypeInfo": ".listconnectorsourcetypeinfo", "ListConnectorSourceTypeInfoTypedDict": ".listconnectorsourcetypeinfo", + "ListDocumentElements": ".listdocumentelements", + "ListDocumentElementsTypedDict": ".listdocumentelements", "ListDocumentsRequest": ".listdocumentsop", "ListDocumentsRequestTypedDict": ".listdocumentsop", "ListDocumentsResponse": ".listdocumentsop", @@ -1389,16 +1695,27 @@ "ListEntitiesByInstructionRequestTypedDict": ".listentitiesbyinstructionop", "ListEntitiesByInstructionResponse": ".listentitiesbyinstructionop", "ListEntitiesByInstructionResponseTypedDict": ".listentitiesbyinstructionop", + "ListInstructionEntityExtractionLogsRequest": ".listinstructionentityextractionlogsop", + "ListInstructionEntityExtractionLogsRequestTypedDict": ".listinstructionentityextractionlogsop", + "ListInstructionEntityExtractionLogsResponse": ".listinstructionentityextractionlogsop", + "ListInstructionEntityExtractionLogsResponseTypedDict": ".listinstructionentityextractionlogsop", + "QueryParamStatus": ".listinstructionentityextractionlogsop", + "ListItem": ".listitem", + "ListItemTypedDict": ".listitem", "ListWebhookEndpointsRequest": ".listwebhookendpointsop", "ListWebhookEndpointsRequestTypedDict": ".listwebhookendpointsop", "ListWebhookEndpointsResponse": ".listwebhookendpointsop", "ListWebhookEndpointsResponseTypedDict": ".listwebhookendpointsop", + "Logo": ".logo", + "LogoTypedDict": ".logo", "MediaModeParam": ".mediamodeparam", "MediaModeParamTypedDict": ".mediamodeparam", + "MediaModeParamVideo": ".mediamodeparam", "Static": ".mediamodeparam", - "Video": ".mediamodeparam", "ModelUsage": ".modelusage", "ModelUsageTypedDict": ".modelusage", + "NarrativeText": ".narrativetext", + "NarrativeTextTypedDict": ".narrativetext", "NoResponseError": ".no_response_error", "OAuthCredentials": ".oauthcredentials", "OAuthCredentialsTypedDict": ".oauthcredentials", @@ -1417,8 +1734,12 @@ "OAuthURLResponseTypedDict": ".oauthurlresponse", "OnedriveData": ".onedrivedata", "OnedriveDataTypedDict": ".onedrivedata", + "OrderedList": ".orderedlist", + "OrderedListTypedDict": ".orderedlist", "OutputTokenDetails": ".outputtokendetails", "OutputTokenDetailsTypedDict": ".outputtokendetails", + "PageBreak": ".pagebreak", + "PageBreakTypedDict": ".pagebreak", "Pagination": ".pagination", "PaginationTypedDict": ".pagination", "MetadataSchema": ".partition", @@ -1443,6 +1764,11 @@ "PatchDocumentMetadataResponsePatchdocumentmetadataTypedDict": ".patchdocumentmetadataop", "PatchDocumentMetadataParams": ".patchdocumentmetadataparams", "PatchDocumentMetadataParamsTypedDict": ".patchdocumentmetadataparams", + "PatchInstructionRequest": ".patchinstructionop", + "PatchInstructionRequestTypedDict": ".patchinstructionop", + "PatchInstructionParams": ".patchinstructionparams", + "PatchInstructionParamsScope": ".patchinstructionparams", + "PatchInstructionParamsTypedDict": ".patchinstructionparams", "PlanStep": ".planstep", "PlanStepTypedDict": ".planstep", "PublicBackblazeConnection": ".publicbackblazeconnection", @@ -1461,10 +1787,16 @@ "PublicIntercomConnectionTypedDict": ".publicintercomconnection", "PublicS3CompatibleConnection": ".publics3compatibleconnection", "PublicS3CompatibleConnectionTypedDict": ".publics3compatibleconnection", + "PublicWebcrawlerConnection": ".publicwebcrawlerconnection", + "PublicWebcrawlerConnectionTypedDict": ".publicwebcrawlerconnection", "PublicZendeskConnection": ".publiczendeskconnection", "PublicZendeskConnectionTypedDict": ".publiczendeskconnection", + "QRCode": ".qrcode", + "QRCodeTypedDict": ".qrcode", "QueryDetails": ".querydetails", "QueryDetailsTypedDict": ".querydetails", + "Quote": ".quote", + "QuoteTypedDict": ".quote", "RagieAPISchemaResponseUsage": ".ragie_api_schema_response_usage", "RagieAPISchemaResponseUsageTypedDict": ".ragie_api_schema_response_usage", "RagieEvidence": ".ragieevidence", @@ -1484,8 +1816,8 @@ "Output": ".response", "OutputTypedDict": ".response", "Response": ".response", + "ResponseStatus": ".response", "ResponseTypedDict": ".response", - "Status": ".response", "ResponseContent": ".responsecontent", "ResponseContentTypedDict": ".responsecontent", "ResponseOK": ".responseok", @@ -1511,6 +1843,8 @@ "SearchStepTypedDict": ".searchstep", "SearchStepWithQueryDetails": ".searchstepwithquerydetails", "SearchStepWithQueryDetailsTypedDict": ".searchstepwithquerydetails", + "SectionHeader": ".sectionheader", + "SectionHeaderTypedDict": ".sectionheader", "Security": ".security", "SecurityTypedDict": ".security", "SetConnectionEnabledConnectionsConnectionIDEnabledPutRequest": ".set_connection_enabled_connections_connection_id_enabled_putop", @@ -1531,14 +1865,36 @@ "Type": ".sharepointfiledata", "SharepointSiteData": ".sharepointsitedata", "SharepointSiteDataTypedDict": ".sharepointsitedata", + "Signature": ".signature", + "SignatureTypedDict": ".signature", "SlackData": ".slackdata", "SlackDataTypedDict": ".slackdata", + "SpreadsheetLocation": ".spreadsheetlocation", + "SpreadsheetLocationTypedDict": ".spreadsheetlocation", + "Stamp": ".stamp", + "StampTypedDict": ".stamp", + "SubHeader": ".subheader", + "SubHeaderTypedDict": ".subheader", "SurrenderStep": ".surrenderstep", "SurrenderStepTypedDict": ".surrenderstep", "SyncConnectionRequest": ".syncconnectionop", "SyncConnectionRequestTypedDict": ".syncconnectionop", + "Table": ".table", + "TableTypedDict": ".table", + "TableOfContents": ".tableofcontents", + "TableOfContentsTypedDict": ".tableofcontents", + "Text": ".text", + "TextTypedDict": ".text", + "Time": ".time", + "TimeTypedDict": ".time", + "Title": ".title", + "TitleTypedDict": ".title", "Tool": ".tool", "ToolTypedDict": ".tool", + "UncategorizedText": ".uncategorizedtext", + "UncategorizedTextTypedDict": ".uncategorizedtext", + "UnorderedList": ".unorderedlist", + "UnorderedListTypedDict": ".unorderedlist", "UpdateConnectionConnectionsConnectionIDPutRequest": ".update_connection_connections_connection_id_putop", "UpdateConnectionConnectionsConnectionIDPutRequestTypedDict": ".update_connection_connections_connection_id_putop", "UpdatePartitionPartitionsPartitionIDPatchRequest": ".update_partition_partitions_partition_id_patchop", @@ -1573,10 +1929,6 @@ "UpdateDocumentRawParamsData": ".updatedocumentrawparams", "UpdateDocumentRawParamsDataTypedDict": ".updatedocumentrawparams", "UpdateDocumentRawParamsTypedDict": ".updatedocumentrawparams", - "UpdateInstructionRequest": ".updateinstructionop", - "UpdateInstructionRequestTypedDict": ".updateinstructionop", - "UpdateInstructionParams": ".updateinstructionparams", - "UpdateInstructionParamsTypedDict": ".updateinstructionparams", "UpdatePartitionParams": ".updatepartitionparams", "UpdatePartitionParamsMetadataSchema": ".updatepartitionparams", "UpdatePartitionParamsMetadataSchemaTypedDict": ".updatepartitionparams", @@ -1589,12 +1941,22 @@ "LocTypedDict": ".validationerror", "ValidationError": ".validationerror", "ValidationErrorTypedDict": ".validationerror", + "Video": ".video", + "VideoTypedDict": ".video", "VideoModalityData": ".videomodalitydata", "VideoModalityDataTypedDict": ".videomodalitydata", + "VideoSegment": ".videosegment", + "VideoSegmentTypedDict": ".videosegment", + "Watermark": ".watermark", + "WatermarkTypedDict": ".watermark", + "WebcrawlerData": ".webcrawlerdata", + "WebcrawlerDataTypedDict": ".webcrawlerdata", "WebhookEndpoint": ".webhookendpoint", "WebhookEndpointTypedDict": ".webhookendpoint", "WebhookEndpointList": ".webhookendpointlist", "WebhookEndpointListTypedDict": ".webhookendpointlist", + "WordModality": ".wordmodality", + "WordModalityTypedDict": ".wordmodality", "WordTimestamp": ".wordtimestamp", "WordTimestampTypedDict": ".wordtimestamp", "ZendeskCredentials": ".zendeskcredentials", @@ -1604,39 +1966,11 @@ } -def dynamic_import(modname, retries=3): - for attempt in range(retries): - try: - return import_module(modname, __package__) - except KeyError: - # Clear any half-initialized module and retry - sys.modules.pop(modname, None) - if attempt == retries - 1: - break - raise KeyError(f"Failed to import module '{modname}' after {retries} attempts") - - -def __getattr__(attr_name: str) -> object: - module_name = _dynamic_imports.get(attr_name) - if module_name is None: - raise AttributeError( - f"No {attr_name} found in _dynamic_imports for module name -> {__name__} " - ) - - try: - module = dynamic_import(module_name) - result = getattr(module, attr_name) - return result - except ImportError as e: - raise ImportError( - f"Failed to import {attr_name} from {module_name}: {e}" - ) from e - except AttributeError as e: - raise AttributeError( - f"Failed to get {attr_name} from {module_name}: {e}" - ) from e +def __getattr__(attr_name: str) -> Any: + return lazy_getattr( + attr_name, package=__package__, dynamic_imports=_dynamic_imports + ) def __dir__(): - lazy_attrs = builtins.list(_dynamic_imports.keys()) - return builtins.sorted(lazy_attrs) + return lazy_dir(dynamic_imports=_dynamic_imports) diff --git a/src/ragie/models/address.py b/src/ragie/models/address.py new file mode 100644 index 0000000..7ff5c57 --- /dev/null +++ b/src/ragie/models/address.py @@ -0,0 +1,50 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class AddressTypedDict(TypedDict): + content: str + r"""The text content""" + type: Literal["Address"] + + +class Address(BaseModel): + content: str + r"""The text content""" + + TYPE: Annotated[ + Annotated[ + Optional[Literal["Address"]], AfterValidator(validate_const("Address")) + ], + pydantic.Field(alias="type"), + ] = "Address" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + Address.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/agent_hopps_models_models_usage.py b/src/ragie/models/agent_hopps_models_models_usage.py index bdfbcdf..b3a12a6 100644 --- a/src/ragie/models/agent_hopps_models_models_usage.py +++ b/src/ragie/models/agent_hopps_models_models_usage.py @@ -2,7 +2,8 @@ from __future__ import annotations from .modelusage import ModelUsage, ModelUsageTypedDict -from ragie.types import BaseModel +from pydantic import model_serializer +from ragie.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -13,3 +14,19 @@ class AgentHoppsModelsModelsUsageTypedDict(TypedDict): class AgentHoppsModelsModelsUsage(BaseModel): models: Optional[List[ModelUsage]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["models"]) + 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/ragie/models/answer.py b/src/ragie/models/answer.py index d895414..2de6f77 100644 --- a/src/ragie/models/answer.py +++ b/src/ragie/models/answer.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from ragie.types import BaseModel +from pydantic import model_serializer +from ragie.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -19,3 +20,19 @@ class Answer(BaseModel): evidence: Optional[List[str]] = None r"""The evidence used to derive the answer.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["evidence"]) + 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/ragie/models/answerstep.py b/src/ragie/models/answerstep.py index 4e82388..9b1d182 100644 --- a/src/ragie/models/answerstep.py +++ b/src/ragie/models/answerstep.py @@ -3,8 +3,9 @@ from __future__ import annotations from .answer import Answer, AnswerTypedDict import pydantic +from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from ragie.types import BaseModel +from ragie.types import BaseModel, UNSET_SENTINEL from ragie.utils import validate_const from typing import List, Literal, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -38,3 +39,25 @@ class AnswerStep(BaseModel): other_resolved_question_ids: Optional[List[str]] = None r"""A list of question ids that are no longer relevant to the current answer referenced by their IDs.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type", "errored", "other_resolved_question_ids"]) + 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: + AnswerStep.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/apidocumentelement.py b/src/ragie/models/apidocumentelement.py new file mode 100644 index 0000000..0377b71 --- /dev/null +++ b/src/ragie/models/apidocumentelement.py @@ -0,0 +1,97 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .apielement import APIElement, APIElementTypedDict +from .boundingboxlocation import BoundingBoxLocation, BoundingBoxLocationTypedDict +from .characterindexlocation import ( + CharacterIndexLocation, + CharacterIndexLocationTypedDict, +) +from .documentelementtype import DocumentElementType +from .durationlocation import DurationLocation, DurationLocationTypedDict +from .spreadsheetlocation import SpreadsheetLocation, SpreadsheetLocationTypedDict +from datetime import datetime +from pydantic import Discriminator, Tag, model_serializer +from ragie.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from ragie.utils import get_discriminator +from typing import Any, Dict, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +LocationTypedDict = TypeAliasType( + "LocationTypedDict", + Union[ + CharacterIndexLocationTypedDict, + SpreadsheetLocationTypedDict, + DurationLocationTypedDict, + BoundingBoxLocationTypedDict, + ], +) + + +Location = Annotated[ + Union[ + Annotated[BoundingBoxLocation, Tag("bounding_box")], + Annotated[CharacterIndexLocation, Tag("character_index")], + Annotated[DurationLocation, Tag("duration")], + Annotated[SpreadsheetLocation, Tag("spreadsheet")], + ], + Discriminator(lambda m: get_discriminator(m, "location_type", "location_type")), +] + + +class APIDocumentElementTypedDict(TypedDict): + id: str + created_at: datetime + index: int + metadata: Dict[str, Any] + type: DocumentElementType + text: Nullable[str] + markdown: Nullable[str] + data: APIElementTypedDict + location: NotRequired[Nullable[LocationTypedDict]] + + +class APIDocumentElement(BaseModel): + id: str + + created_at: datetime + + index: int + + metadata: Dict[str, Any] + + type: DocumentElementType + + text: Nullable[str] + + markdown: Nullable[str] + + data: APIElement + + location: OptionalNullable[Location] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["location"]) + nullable_fields = set(["text", "markdown", "location"]) + 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/ragie/models/apielement.py b/src/ragie/models/apielement.py new file mode 100644 index 0000000..a257f96 --- /dev/null +++ b/src/ragie/models/apielement.py @@ -0,0 +1,151 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .address import Address, AddressTypedDict +from .audiotranscriptionsegment import ( + AudioTranscriptionSegment, + AudioTranscriptionSegmentTypedDict, +) +from .author import Author, AuthorTypedDict +from .barcode import Barcode, BarcodeTypedDict +from .bibliography import Bibliography, BibliographyTypedDict +from .button import Button, ButtonTypedDict +from .calendardate import CalendarDate, CalendarDateTypedDict +from .caption import Caption, CaptionTypedDict +from .code import Code, CodeTypedDict +from .comment import Comment, CommentTypedDict +from .definitionlist import DefinitionList, DefinitionListTypedDict +from .emailaddress import EmailAddress, EmailAddressTypedDict +from .figure import Figure, FigureTypedDict +from .figurecaption import FigureCaption, FigureCaptionTypedDict +from .footer import Footer, FooterTypedDict +from .footnote import Footnote, FootnoteTypedDict +from .formfield import FormField, FormFieldTypedDict +from .formula import Formula, FormulaTypedDict +from .header import Header, HeaderTypedDict +from .image import Image, ImageTypedDict +from .json import JSON, JSONTypedDict +from .keyvalue import KeyValue, KeyValueTypedDict +from .listitem import ListItem, ListItemTypedDict +from .logo import Logo, LogoTypedDict +from .narrativetext import NarrativeText, NarrativeTextTypedDict +from .orderedlist import OrderedList, OrderedListTypedDict +from .pagebreak import PageBreak, PageBreakTypedDict +from .qrcode import QRCode, QRCodeTypedDict +from .quote import Quote, QuoteTypedDict +from .sectionheader import SectionHeader, SectionHeaderTypedDict +from .signature import Signature, SignatureTypedDict +from .stamp import Stamp, StampTypedDict +from .subheader import SubHeader, SubHeaderTypedDict +from .table import Table, TableTypedDict +from .tableofcontents import TableOfContents, TableOfContentsTypedDict +from .text import Text, TextTypedDict +from .time import Time, TimeTypedDict +from .title import Title, TitleTypedDict +from .uncategorizedtext import UncategorizedText, UncategorizedTextTypedDict +from .unorderedlist import UnorderedList, UnorderedListTypedDict +from .video import Video, VideoTypedDict +from .videosegment import VideoSegment, VideoSegmentTypedDict +from .watermark import Watermark, WatermarkTypedDict +from typing import Union +from typing_extensions import TypeAliasType + + +APIElementTypedDict = TypeAliasType( + "APIElementTypedDict", + Union[ + CaptionTypedDict, + VideoSegmentTypedDict, + UncategorizedTextTypedDict, + PageBreakTypedDict, + TableOfContentsTypedDict, + TimeTypedDict, + FigureCaptionTypedDict, + AddressTypedDict, + AuthorTypedDict, + EmailAddressTypedDict, + CalendarDateTypedDict, + HeaderTypedDict, + JSONTypedDict, + QuoteTypedDict, + CommentTypedDict, + UnorderedListTypedDict, + OrderedListTypedDict, + DefinitionListTypedDict, + SubHeaderTypedDict, + FooterTypedDict, + BarcodeTypedDict, + NarrativeTextTypedDict, + SectionHeaderTypedDict, + ListItemTypedDict, + TitleTypedDict, + AudioTranscriptionSegmentTypedDict, + VideoTypedDict, + QRCodeTypedDict, + ButtonTypedDict, + BibliographyTypedDict, + WatermarkTypedDict, + FootnoteTypedDict, + TextTypedDict, + CodeTypedDict, + KeyValueTypedDict, + ImageTypedDict, + StampTypedDict, + FormulaTypedDict, + LogoTypedDict, + FigureTypedDict, + TableTypedDict, + SignatureTypedDict, + FormFieldTypedDict, + ], +) + + +APIElement = TypeAliasType( + "APIElement", + Union[ + Caption, + VideoSegment, + UncategorizedText, + PageBreak, + TableOfContents, + Time, + FigureCaption, + Address, + Author, + EmailAddress, + CalendarDate, + Header, + JSON, + Quote, + Comment, + UnorderedList, + OrderedList, + DefinitionList, + SubHeader, + Footer, + Barcode, + NarrativeText, + SectionHeader, + ListItem, + Title, + AudioTranscriptionSegment, + Video, + QRCode, + Button, + Bibliography, + Watermark, + Footnote, + Text, + Code, + KeyValue, + Image, + Stamp, + Formula, + Logo, + Figure, + Table, + Signature, + FormField, + ], +) diff --git a/src/ragie/models/audiomodalitydata.py b/src/ragie/models/audiomodalitydata.py index b900305..16efff2 100644 --- a/src/ragie/models/audiomodalitydata.py +++ b/src/ragie/models/audiomodalitydata.py @@ -3,8 +3,9 @@ from __future__ import annotations from .wordtimestamp import WordTimestamp, WordTimestampTypedDict import pydantic +from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from ragie.types import BaseModel +from ragie.types import BaseModel, UNSET_SENTINEL from ragie.utils import validate_const from typing import List, Literal, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -22,3 +23,25 @@ class AudioModalityData(BaseModel): ] = "audio" word_timestamps: Optional[List[WordTimestamp]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type", "word_timestamps"]) + 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: + AudioModalityData.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/audiotranscriptionsegment.py b/src/ragie/models/audiotranscriptionsegment.py new file mode 100644 index 0000000..f3dae95 --- /dev/null +++ b/src/ragie/models/audiotranscriptionsegment.py @@ -0,0 +1,46 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .wordmodality import WordModality, WordModalityTypedDict +from pydantic import model_serializer +from ragie.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class AudioTranscriptionSegmentTypedDict(TypedDict): + modality_data: List[WordModalityTypedDict] + r"""A list of information per word that shows the word, start time, and end time""" + content: NotRequired[Nullable[str]] + + +class AudioTranscriptionSegment(BaseModel): + modality_data: List[WordModality] + r"""A list of information per word that shows the word, start time, and end time""" + + content: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["content"]) + nullable_fields = set(["content"]) + 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/ragie/models/authenticatorconfluenceconnection.py b/src/ragie/models/authenticatorconfluenceconnection.py index 1b219ba..836d0c6 100644 --- a/src/ragie/models/authenticatorconfluenceconnection.py +++ b/src/ragie/models/authenticatorconfluenceconnection.py @@ -29,3 +29,9 @@ class AuthenticatorConfluenceConnection(BaseModel): Annotated[Literal["confluence"], AfterValidator(validate_const("confluence"))], pydantic.Field(alias="provider"), ] = "confluence" + + +try: + AuthenticatorConfluenceConnection.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/authenticatordropboxconnection.py b/src/ragie/models/authenticatordropboxconnection.py index 9c3daa0..52fb688 100644 --- a/src/ragie/models/authenticatordropboxconnection.py +++ b/src/ragie/models/authenticatordropboxconnection.py @@ -34,3 +34,9 @@ class AuthenticatorDropboxConnection(BaseModel): Annotated[Literal["dropbox"], AfterValidator(validate_const("dropbox"))], pydantic.Field(alias="provider"), ] = "dropbox" + + +try: + AuthenticatorDropboxConnection.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/authenticatorgmailconnection.py b/src/ragie/models/authenticatorgmailconnection.py index a772caa..eb59203 100644 --- a/src/ragie/models/authenticatorgmailconnection.py +++ b/src/ragie/models/authenticatorgmailconnection.py @@ -34,3 +34,9 @@ class AuthenticatorGmailConnection(BaseModel): Annotated[Literal["gmail"], AfterValidator(validate_const("gmail"))], pydantic.Field(alias="provider"), ] = "gmail" + + +try: + AuthenticatorGmailConnection.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/authenticatorgoogledriveconnection.py b/src/ragie/models/authenticatorgoogledriveconnection.py index 38d69c8..46c9604 100644 --- a/src/ragie/models/authenticatorgoogledriveconnection.py +++ b/src/ragie/models/authenticatorgoogledriveconnection.py @@ -36,3 +36,9 @@ class AuthenticatorGoogleDriveConnection(BaseModel): ], pydantic.Field(alias="provider"), ] = "google_drive" + + +try: + AuthenticatorGoogleDriveConnection.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/authenticatorhubspotconnection.py b/src/ragie/models/authenticatorhubspotconnection.py index edfa532..93c2a45 100644 --- a/src/ragie/models/authenticatorhubspotconnection.py +++ b/src/ragie/models/authenticatorhubspotconnection.py @@ -35,3 +35,9 @@ class AuthenticatorHubspotConnection(BaseModel): Annotated[Literal["hubspot"], AfterValidator(validate_const("hubspot"))], pydantic.Field(alias="provider"), ] = "hubspot" + + +try: + AuthenticatorHubspotConnection.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/authenticatorjiraconnection.py b/src/ragie/models/authenticatorjiraconnection.py index dff17b7..a4e0d08 100644 --- a/src/ragie/models/authenticatorjiraconnection.py +++ b/src/ragie/models/authenticatorjiraconnection.py @@ -25,3 +25,9 @@ class AuthenticatorJiraConnection(BaseModel): Annotated[Literal["jira"], AfterValidator(validate_const("jira"))], pydantic.Field(alias="provider"), ] = "jira" + + +try: + AuthenticatorJiraConnection.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/authenticatornotionconnection.py b/src/ragie/models/authenticatornotionconnection.py index 35f471d..435bb8c 100644 --- a/src/ragie/models/authenticatornotionconnection.py +++ b/src/ragie/models/authenticatornotionconnection.py @@ -36,3 +36,9 @@ class AuthenticatorNotionConnection(BaseModel): Annotated[Literal["notion"], AfterValidator(validate_const("notion"))], pydantic.Field(alias="provider"), ] = "notion" + + +try: + AuthenticatorNotionConnection.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/authenticatoronedriveconnection.py b/src/ragie/models/authenticatoronedriveconnection.py index d2cd607..ac4ef18 100644 --- a/src/ragie/models/authenticatoronedriveconnection.py +++ b/src/ragie/models/authenticatoronedriveconnection.py @@ -34,3 +34,9 @@ class AuthenticatorOnedriveConnection(BaseModel): Annotated[Literal["onedrive"], AfterValidator(validate_const("onedrive"))], pydantic.Field(alias="provider"), ] = "onedrive" + + +try: + AuthenticatorOnedriveConnection.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/authenticatorsalesforceconnection.py b/src/ragie/models/authenticatorsalesforceconnection.py index 1c906d3..deee21f 100644 --- a/src/ragie/models/authenticatorsalesforceconnection.py +++ b/src/ragie/models/authenticatorsalesforceconnection.py @@ -35,3 +35,9 @@ class AuthenticatorSalesforceConnection(BaseModel): Annotated[Literal["salesforce"], AfterValidator(validate_const("salesforce"))], pydantic.Field(alias="provider"), ] = "salesforce" + + +try: + AuthenticatorSalesforceConnection.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/authenticatorsharepointconnection.py b/src/ragie/models/authenticatorsharepointconnection.py index f81b6f8..d844afb 100644 --- a/src/ragie/models/authenticatorsharepointconnection.py +++ b/src/ragie/models/authenticatorsharepointconnection.py @@ -34,3 +34,9 @@ class AuthenticatorSharepointConnection(BaseModel): Annotated[Literal["sharepoint"], AfterValidator(validate_const("sharepoint"))], pydantic.Field(alias="provider"), ] = "sharepoint" + + +try: + AuthenticatorSharepointConnection.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/authenticatorslackconnection.py b/src/ragie/models/authenticatorslackconnection.py index 63acc12..341475b 100644 --- a/src/ragie/models/authenticatorslackconnection.py +++ b/src/ragie/models/authenticatorslackconnection.py @@ -34,3 +34,9 @@ class AuthenticatorSlackConnection(BaseModel): Annotated[Literal["slack"], AfterValidator(validate_const("slack"))], pydantic.Field(alias="provider"), ] = "slack" + + +try: + AuthenticatorSlackConnection.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/author.py b/src/ragie/models/author.py new file mode 100644 index 0000000..e8a2929 --- /dev/null +++ b/src/ragie/models/author.py @@ -0,0 +1,50 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class AuthorTypedDict(TypedDict): + content: str + r"""The text content""" + type: Literal["Author"] + + +class Author(BaseModel): + content: str + r"""The text content""" + + TYPE: Annotated[ + Annotated[ + Optional[Literal["Author"]], AfterValidator(validate_const("Author")) + ], + pydantic.Field(alias="type"), + ] = "Author" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + Author.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/barcode.py b/src/ragie/models/barcode.py new file mode 100644 index 0000000..2141984 --- /dev/null +++ b/src/ragie/models/barcode.py @@ -0,0 +1,50 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class BarcodeTypedDict(TypedDict): + content: str + r"""The nearby text content of the barcode""" + type: Literal["Barcode"] + + +class Barcode(BaseModel): + content: str + r"""The nearby text content of the barcode""" + + TYPE: Annotated[ + Annotated[ + Optional[Literal["Barcode"]], AfterValidator(validate_const("Barcode")) + ], + pydantic.Field(alias="type"), + ] = "Barcode" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + Barcode.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/bibliography.py b/src/ragie/models/bibliography.py new file mode 100644 index 0000000..8321603 --- /dev/null +++ b/src/ragie/models/bibliography.py @@ -0,0 +1,51 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class BibliographyTypedDict(TypedDict): + content: str + r"""The text content of the bibliography.""" + type: Literal["Bibliography"] + + +class Bibliography(BaseModel): + content: str + r"""The text content of the bibliography.""" + + TYPE: Annotated[ + Annotated[ + Optional[Literal["Bibliography"]], + AfterValidator(validate_const("Bibliography")), + ], + pydantic.Field(alias="type"), + ] = "Bibliography" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + Bibliography.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/boundingboxlocation.py b/src/ragie/models/boundingboxlocation.py new file mode 100644 index 0000000..c94524b --- /dev/null +++ b/src/ragie/models/boundingboxlocation.py @@ -0,0 +1,75 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class BoundingBoxLocationTypedDict(TypedDict): + r"""Location within a paginated document using normalized coordinates.""" + + left: float + r"""Left coordinate (0.0 to 1.0)""" + top: float + r"""Top coordinate (0.0 to 1.0)""" + width: float + r"""Width of the element (0.0 to 1.0)""" + height: float + r"""Height of the element (0.0 to 1.0)""" + page_number: int + r"""Page number""" + location_type: Literal["bounding_box"] + + +class BoundingBoxLocation(BaseModel): + r"""Location within a paginated document using normalized coordinates.""" + + left: float + r"""Left coordinate (0.0 to 1.0)""" + + top: float + r"""Top coordinate (0.0 to 1.0)""" + + width: float + r"""Width of the element (0.0 to 1.0)""" + + height: float + r"""Height of the element (0.0 to 1.0)""" + + page_number: int + r"""Page number""" + + LOCATION_TYPE: Annotated[ + Annotated[ + Optional[Literal["bounding_box"]], + AfterValidator(validate_const("bounding_box")), + ], + pydantic.Field(alias="location_type"), + ] = "bounding_box" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["location_type"]) + 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: + BoundingBoxLocation.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/bucketdata.py b/src/ragie/models/bucketdata.py index bebdd43..5de7986 100644 --- a/src/ragie/models/bucketdata.py +++ b/src/ragie/models/bucketdata.py @@ -22,30 +22,25 @@ class BucketData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["prefix", "import_file_metadata"] - nullable_fields = ["prefix"] - null_default_fields = [] - + optional_fields = set(["prefix", "import_file_metadata"]) + nullable_fields = set(["prefix"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/button.py b/src/ragie/models/button.py new file mode 100644 index 0000000..4991abb --- /dev/null +++ b/src/ragie/models/button.py @@ -0,0 +1,50 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class ButtonTypedDict(TypedDict): + content: str + r"""The text content inside the button""" + type: Literal["Button"] + + +class Button(BaseModel): + content: str + r"""The text content inside the button""" + + TYPE: Annotated[ + Annotated[ + Optional[Literal["Button"]], AfterValidator(validate_const("Button")) + ], + pydantic.Field(alias="type"), + ] = "Button" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + Button.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/calendardate.py b/src/ragie/models/calendardate.py new file mode 100644 index 0000000..d9e628c --- /dev/null +++ b/src/ragie/models/calendardate.py @@ -0,0 +1,51 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class CalendarDateTypedDict(TypedDict): + content: str + r"""The text content""" + type: Literal["CalendarDate"] + + +class CalendarDate(BaseModel): + content: str + r"""The text content""" + + TYPE: Annotated[ + Annotated[ + Optional[Literal["CalendarDate"]], + AfterValidator(validate_const("CalendarDate")), + ], + pydantic.Field(alias="type"), + ] = "CalendarDate" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + CalendarDate.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/caption.py b/src/ragie/models/caption.py new file mode 100644 index 0000000..fbce5bf --- /dev/null +++ b/src/ragie/models/caption.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from ragie.types import BaseModel +from typing_extensions import TypedDict + + +class CaptionTypedDict(TypedDict): + content: str + r"""The text content""" + + +class Caption(BaseModel): + content: str + r"""The text content""" diff --git a/src/ragie/models/characterindexlocation.py b/src/ragie/models/characterindexlocation.py new file mode 100644 index 0000000..3dd44e7 --- /dev/null +++ b/src/ragie/models/characterindexlocation.py @@ -0,0 +1,60 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class CharacterIndexLocationTypedDict(TypedDict): + r"""Location within linear text using zero-based character offsets.""" + + start_char_index: int + r"""Start character index (inclusive)""" + end_char_index: int + r"""End character index (exclusive)""" + location_type: Literal["character_index"] + + +class CharacterIndexLocation(BaseModel): + r"""Location within linear text using zero-based character offsets.""" + + start_char_index: int + r"""Start character index (inclusive)""" + + end_char_index: int + r"""End character index (exclusive)""" + + LOCATION_TYPE: Annotated[ + Annotated[ + Optional[Literal["character_index"]], + AfterValidator(validate_const("character_index")), + ], + pydantic.Field(alias="location_type"), + ] = "character_index" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["location_type"]) + 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: + CharacterIndexLocation.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/code.py b/src/ragie/models/code.py new file mode 100644 index 0000000..9350a59 --- /dev/null +++ b/src/ragie/models/code.py @@ -0,0 +1,53 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CodeTypedDict(TypedDict): + type: Literal["Code"] + content: NotRequired[str] + r"""The content of the code""" + language: NotRequired[str] + r"""The language the code is written in""" + + +class Code(BaseModel): + TYPE: Annotated[ + Annotated[Optional[Literal["Code"]], AfterValidator(validate_const("Code"))], + pydantic.Field(alias="type"), + ] = "Code" + + content: Optional[str] = "" + r"""The content of the code""" + + language: Optional[str] = "" + r"""The language the code is written in""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type", "content", "language"]) + 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: + Code.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/codeinterpreterevidence.py b/src/ragie/models/codeinterpreterevidence.py index 91d279b..e8e5231 100644 --- a/src/ragie/models/codeinterpreterevidence.py +++ b/src/ragie/models/codeinterpreterevidence.py @@ -2,8 +2,9 @@ from __future__ import annotations import pydantic +from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from ragie.types import BaseModel +from ragie.types import BaseModel, UNSET_SENTINEL from ragie.utils import validate_const from typing import Literal, Optional from typing_extensions import Annotated, TypedDict @@ -39,3 +40,25 @@ class CodeInterpreterEvidence(BaseModel): ], pydantic.Field(alias="type"), ] = "code_interpreter" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + CodeInterpreterEvidence.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/codeinterpreteroutput.py b/src/ragie/models/codeinterpreteroutput.py index c7b0e96..8d439d5 100644 --- a/src/ragie/models/codeinterpreteroutput.py +++ b/src/ragie/models/codeinterpreteroutput.py @@ -7,8 +7,9 @@ ) from enum import Enum import pydantic +from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from ragie.types import BaseModel +from ragie.types import BaseModel, UNSET_SENTINEL from ragie.utils import validate_const from typing import List, Literal, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -59,3 +60,25 @@ class CodeInterpreterOutput(BaseModel): status: Optional[CodeInterpreterOutputStatus] = ( CodeInterpreterOutputStatus.COMPLETED ) + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type", "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 + + +try: + CodeInterpreterOutput.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/codeinterpreteroutputlogs.py b/src/ragie/models/codeinterpreteroutputlogs.py index c1303f7..afe9a36 100644 --- a/src/ragie/models/codeinterpreteroutputlogs.py +++ b/src/ragie/models/codeinterpreteroutputlogs.py @@ -2,8 +2,9 @@ from __future__ import annotations import pydantic +from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from ragie.types import BaseModel +from ragie.types import BaseModel, UNSET_SENTINEL from ragie.utils import validate_const from typing import Literal, Optional from typing_extensions import Annotated, TypedDict @@ -23,3 +24,25 @@ class CodeInterpreterOutputLogs(BaseModel): Annotated[Optional[Literal["logs"]], AfterValidator(validate_const("logs"))], pydantic.Field(alias="type"), ] = "logs" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + CodeInterpreterOutputLogs.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/codestep.py b/src/ragie/models/codestep.py index b1fcfd7..da0e290 100644 --- a/src/ragie/models/codestep.py +++ b/src/ragie/models/codestep.py @@ -2,8 +2,9 @@ from __future__ import annotations import pydantic +from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from ragie.types import BaseModel +from ragie.types import BaseModel, UNSET_SENTINEL from ragie.utils import validate_const from typing import Literal, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -42,3 +43,25 @@ class CodeStep(BaseModel): code_result: Optional[str] = "" r"""The result of the code you generated after executing it.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type", "errored", "code", "code_result"]) + 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: + CodeStep.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/comment.py b/src/ragie/models/comment.py new file mode 100644 index 0000000..9610553 --- /dev/null +++ b/src/ragie/models/comment.py @@ -0,0 +1,50 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class CommentTypedDict(TypedDict): + content: str + r"""The text content""" + type: Literal["Comment"] + + +class Comment(BaseModel): + content: str + r"""The text content""" + + TYPE: Annotated[ + Annotated[ + Optional[Literal["Comment"]], AfterValidator(validate_const("Comment")) + ], + pydantic.Field(alias="type"), + ] = "Comment" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + Comment.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/connection.py b/src/ragie/models/connection.py index af832a5..87667cc 100644 --- a/src/ragie/models/connection.py +++ b/src/ragie/models/connection.py @@ -80,37 +80,34 @@ class Connection(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["last_synced_at", "syncing", "partition"] - nullable_fields = [ - "source", - "disabled_by_system_reason", - "last_synced_at", - "syncing", - "partition", - "page_limit", - ] - null_default_fields = [] - + optional_fields = set(["last_synced_at", "syncing", "partition"]) + nullable_fields = set( + [ + "source", + "disabled_by_system_reason", + "last_synced_at", + "syncing", + "partition", + "page_limit", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/connectionbase.py b/src/ragie/models/connectionbase.py index 3ff91c1..f1cf043 100644 --- a/src/ragie/models/connectionbase.py +++ b/src/ragie/models/connectionbase.py @@ -12,6 +12,7 @@ class PartitionStrategy1(str, Enum): HI_RES = "hi_res" FAST = "fast" + AGENTIC_OCR = "agentic_ocr" PartitionStrategyTypedDict = TypeAliasType( @@ -53,30 +54,25 @@ class ConnectionBase(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["metadata", "page_limit"] - nullable_fields = ["page_limit"] - null_default_fields = [] - + optional_fields = set(["metadata", "page_limit"]) + nullable_fields = set(["page_limit"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/connectionlimitparams.py b/src/ragie/models/connectionlimitparams.py index a916e6b..977b952 100644 --- a/src/ragie/models/connectionlimitparams.py +++ b/src/ragie/models/connectionlimitparams.py @@ -17,30 +17,25 @@ class ConnectionLimitParams(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["page_limit"] - nullable_fields = ["page_limit"] - null_default_fields = [] - + optional_fields = set(["page_limit"]) + nullable_fields = set(["page_limit"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/createauthenticatorconnection.py b/src/ragie/models/createauthenticatorconnection.py index aa7f745..0b8cd64 100644 --- a/src/ragie/models/createauthenticatorconnection.py +++ b/src/ragie/models/createauthenticatorconnection.py @@ -45,6 +45,7 @@ AuthenticatorSlackConnection, AuthenticatorSlackConnectionTypedDict, ) +from .documentworkflow import DocumentWorkflow from .mediamodeparam import MediaModeParam, MediaModeParamTypedDict from pydantic import Field, model_serializer from ragie.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL @@ -107,6 +108,7 @@ class CreateAuthenticatorConnectionTypedDict(TypedDict): config: NotRequired[Nullable[Dict[str, Any]]] metadata: NotRequired[Dict[str, CreateAuthenticatorConnectionMetadataTypedDict]] r"""Metadata for the document. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. 1000 total values are allowed. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`, `start_time`, `end_time`, `chunk_content_type`.""" + workflow: NotRequired[Nullable[DocumentWorkflow]] class CreateAuthenticatorConnection(BaseModel): @@ -123,32 +125,31 @@ class CreateAuthenticatorConnection(BaseModel): metadata: Optional[Dict[str, CreateAuthenticatorConnectionMetadata]] = None r"""Metadata for the document. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. 1000 total values are allowed. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`, `start_time`, `end_time`, `chunk_content_type`.""" + workflow: OptionalNullable[DocumentWorkflow] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["partition", "page_limit", "config", "metadata"] - nullable_fields = ["partition", "page_limit", "config"] - null_default_fields = [] - + optional_fields = set( + ["partition", "page_limit", "config", "metadata", "workflow"] + ) + nullable_fields = set(["partition", "page_limit", "config", "workflow"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/createdocumentfromurlparams.py b/src/ragie/models/createdocumentfromurlparams.py index c573b24..681b606 100644 --- a/src/ragie/models/createdocumentfromurlparams.py +++ b/src/ragie/models/createdocumentfromurlparams.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .documentworkflow import DocumentWorkflow from .mediamodeparam import MediaModeParam, MediaModeParamTypedDict from enum import Enum from pydantic import model_serializer @@ -23,18 +24,127 @@ class Mode1(str, Enum): HI_RES = "hi_res" FAST = "fast" + AGENTIC_OCR = "agentic_ocr" CreateDocumentFromURLParamsModeTypedDict = TypeAliasType( "CreateDocumentFromURLParamsModeTypedDict", Union[MediaModeParamTypedDict, Mode1] ) -r"""Partition strategy for the document. Different strategies exist for textual, audio and video file types and you can set the strategy you want for each file type, or just for textual types. For textual documents the options are `'hi_res'` or `'fast'`. When set to `'hi_res'`, images and tables will be extracted from the document. `'fast'` will only extract text. `'fast'` may be up to 20x faster than `'hi_res'`. `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. Images will always be processed in `hi_res`. If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. For audio files, the options are true or false. True if you want to process audio, false otherwise. For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. `'audio_only'` will extract just the audio part of the video. `'video_only'` will similarly just extract the video part, ignoring audio. `'audio_video'` will extract both audio and video. To process all media types at the highest quality, use `'all'`. When you specify audio or video stategies, the format must be a JSON object. In this case, textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. See examples below. Examples Textual documents only \"fast\" Video documents only { \"video\": \"audio_video\" } Specify multiple document types { \"static\": \"hi_res\", \"audio\": true, \"video\": \"video_only\" } Specify only textual or audio document types { \"static\": \"fast\", \"audio\": true } Highest quality processing for all media types \"all\" """ +r"""Partition strategy for the document. +Different strategies exist for textual, audio and video file types and you can set the strategy you want for +each file type, or just for textual types. + +For textual documents the options are `'hi_res'` or `'fast'`. +When set to `'hi_res'`, images and tables will be extracted from the document. +`'fast'` will only extract text. +`'fast'` may be up to 20x faster than `'hi_res'`. +`hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. +Images will always be processed in `hi_res`. +If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. + +For audio files, the options are true or false. True if you want to process audio, false otherwise. + +For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. +`'audio_only'` will extract just the audio part of the video. +`'video_only'` will similarly just extract the video part, ignoring audio. +`'audio_video'` will extract both audio and video. + +To process all media types at the highest quality, use `'all'`. + +When you specify audio or video stategies, the format must be a JSON object. In this case, +textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. +See examples below. + +Examples + +Textual documents only +\"fast\" + +Video documents only +{ +\"video\": \"audio_video\" +} + +Specify multiple document types +{ +\"static\": \"hi_res\", +\"audio\": true, +\"video\": \"video_only\" +} + +Specify only textual or audio document types +{ +\"static\": \"fast\", +\"audio\": true +} + +Highest quality processing for all media types +\"all\" + +Agentic OCR +\"agentic_ocr\" +Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai. +""" CreateDocumentFromURLParamsMode = TypeAliasType( "CreateDocumentFromURLParamsMode", Union[MediaModeParam, Mode1] ) -r"""Partition strategy for the document. Different strategies exist for textual, audio and video file types and you can set the strategy you want for each file type, or just for textual types. For textual documents the options are `'hi_res'` or `'fast'`. When set to `'hi_res'`, images and tables will be extracted from the document. `'fast'` will only extract text. `'fast'` may be up to 20x faster than `'hi_res'`. `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. Images will always be processed in `hi_res`. If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. For audio files, the options are true or false. True if you want to process audio, false otherwise. For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. `'audio_only'` will extract just the audio part of the video. `'video_only'` will similarly just extract the video part, ignoring audio. `'audio_video'` will extract both audio and video. To process all media types at the highest quality, use `'all'`. When you specify audio or video stategies, the format must be a JSON object. In this case, textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. See examples below. Examples Textual documents only \"fast\" Video documents only { \"video\": \"audio_video\" } Specify multiple document types { \"static\": \"hi_res\", \"audio\": true, \"video\": \"video_only\" } Specify only textual or audio document types { \"static\": \"fast\", \"audio\": true } Highest quality processing for all media types \"all\" """ +r"""Partition strategy for the document. +Different strategies exist for textual, audio and video file types and you can set the strategy you want for +each file type, or just for textual types. + +For textual documents the options are `'hi_res'` or `'fast'`. +When set to `'hi_res'`, images and tables will be extracted from the document. +`'fast'` will only extract text. +`'fast'` may be up to 20x faster than `'hi_res'`. +`hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. +Images will always be processed in `hi_res`. +If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. + +For audio files, the options are true or false. True if you want to process audio, false otherwise. + +For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. +`'audio_only'` will extract just the audio part of the video. +`'video_only'` will similarly just extract the video part, ignoring audio. +`'audio_video'` will extract both audio and video. + +To process all media types at the highest quality, use `'all'`. + +When you specify audio or video stategies, the format must be a JSON object. In this case, +textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. +See examples below. + +Examples + +Textual documents only +\"fast\" + +Video documents only +{ +\"video\": \"audio_video\" +} + +Specify multiple document types +{ +\"static\": \"hi_res\", +\"audio\": true, +\"video\": \"video_only\" +} + +Specify only textual or audio document types +{ +\"static\": \"fast\", +\"audio\": true +} + +Highest quality processing for all media types +\"all\" + +Agentic OCR +\"agentic_ocr\" +Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai. +""" class CreateDocumentFromURLParamsTypedDict(TypedDict): @@ -44,11 +154,66 @@ class CreateDocumentFromURLParamsTypedDict(TypedDict): metadata: NotRequired[Dict[str, CreateDocumentFromURLParamsMetadataTypedDict]] r"""Metadata for the document. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. 1000 total values are allowed. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`, `start_time`, `end_time`, `chunk_content_type`.""" mode: NotRequired[CreateDocumentFromURLParamsModeTypedDict] - r"""Partition strategy for the document. Different strategies exist for textual, audio and video file types and you can set the strategy you want for each file type, or just for textual types. For textual documents the options are `'hi_res'` or `'fast'`. When set to `'hi_res'`, images and tables will be extracted from the document. `'fast'` will only extract text. `'fast'` may be up to 20x faster than `'hi_res'`. `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. Images will always be processed in `hi_res`. If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. For audio files, the options are true or false. True if you want to process audio, false otherwise. For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. `'audio_only'` will extract just the audio part of the video. `'video_only'` will similarly just extract the video part, ignoring audio. `'audio_video'` will extract both audio and video. To process all media types at the highest quality, use `'all'`. When you specify audio or video stategies, the format must be a JSON object. In this case, textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. See examples below. Examples Textual documents only \"fast\" Video documents only { \"video\": \"audio_video\" } Specify multiple document types { \"static\": \"hi_res\", \"audio\": true, \"video\": \"video_only\" } Specify only textual or audio document types { \"static\": \"fast\", \"audio\": true } Highest quality processing for all media types \"all\" """ + r"""Partition strategy for the document. + Different strategies exist for textual, audio and video file types and you can set the strategy you want for + each file type, or just for textual types. + + For textual documents the options are `'hi_res'` or `'fast'`. + When set to `'hi_res'`, images and tables will be extracted from the document. + `'fast'` will only extract text. + `'fast'` may be up to 20x faster than `'hi_res'`. + `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. + Images will always be processed in `hi_res`. + If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. + + For audio files, the options are true or false. True if you want to process audio, false otherwise. + + For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. + `'audio_only'` will extract just the audio part of the video. + `'video_only'` will similarly just extract the video part, ignoring audio. + `'audio_video'` will extract both audio and video. + + To process all media types at the highest quality, use `'all'`. + + When you specify audio or video stategies, the format must be a JSON object. In this case, + textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. + See examples below. + + Examples + + Textual documents only + \"fast\" + + Video documents only + { + \"video\": \"audio_video\" + } + + Specify multiple document types + { + \"static\": \"hi_res\", + \"audio\": true, + \"video\": \"video_only\" + } + + Specify only textual or audio document types + { + \"static\": \"fast\", + \"audio\": true + } + + Highest quality processing for all media types + \"all\" + + Agentic OCR + \"agentic_ocr\" + Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai. + """ external_id: NotRequired[Nullable[str]] r"""An optional identifier for the document. A common value might be an id in an external system or the URL where the source file may be found.""" partition: NotRequired[str] r"""An optional partition identifier. Documents can be scoped to a partition. Partitions must be lowercase alphanumeric and may only include the special characters `_` and `-`. A partition is created any time a document is created.""" + workflow: NotRequired[DocumentWorkflow] class CreateDocumentFromURLParams(BaseModel): @@ -61,7 +226,61 @@ class CreateDocumentFromURLParams(BaseModel): r"""Metadata for the document. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. 1000 total values are allowed. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`, `start_time`, `end_time`, `chunk_content_type`.""" mode: Optional[CreateDocumentFromURLParamsMode] = None - r"""Partition strategy for the document. Different strategies exist for textual, audio and video file types and you can set the strategy you want for each file type, or just for textual types. For textual documents the options are `'hi_res'` or `'fast'`. When set to `'hi_res'`, images and tables will be extracted from the document. `'fast'` will only extract text. `'fast'` may be up to 20x faster than `'hi_res'`. `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. Images will always be processed in `hi_res`. If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. For audio files, the options are true or false. True if you want to process audio, false otherwise. For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. `'audio_only'` will extract just the audio part of the video. `'video_only'` will similarly just extract the video part, ignoring audio. `'audio_video'` will extract both audio and video. To process all media types at the highest quality, use `'all'`. When you specify audio or video stategies, the format must be a JSON object. In this case, textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. See examples below. Examples Textual documents only \"fast\" Video documents only { \"video\": \"audio_video\" } Specify multiple document types { \"static\": \"hi_res\", \"audio\": true, \"video\": \"video_only\" } Specify only textual or audio document types { \"static\": \"fast\", \"audio\": true } Highest quality processing for all media types \"all\" """ + r"""Partition strategy for the document. + Different strategies exist for textual, audio and video file types and you can set the strategy you want for + each file type, or just for textual types. + + For textual documents the options are `'hi_res'` or `'fast'`. + When set to `'hi_res'`, images and tables will be extracted from the document. + `'fast'` will only extract text. + `'fast'` may be up to 20x faster than `'hi_res'`. + `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. + Images will always be processed in `hi_res`. + If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. + + For audio files, the options are true or false. True if you want to process audio, false otherwise. + + For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. + `'audio_only'` will extract just the audio part of the video. + `'video_only'` will similarly just extract the video part, ignoring audio. + `'audio_video'` will extract both audio and video. + + To process all media types at the highest quality, use `'all'`. + + When you specify audio or video stategies, the format must be a JSON object. In this case, + textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. + See examples below. + + Examples + + Textual documents only + \"fast\" + + Video documents only + { + \"video\": \"audio_video\" + } + + Specify multiple document types + { + \"static\": \"hi_res\", + \"audio\": true, + \"video\": \"video_only\" + } + + Specify only textual or audio document types + { + \"static\": \"fast\", + \"audio\": true + } + + Highest quality processing for all media types + \"all\" + + Agentic OCR + \"agentic_ocr\" + Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai. + """ external_id: OptionalNullable[str] = UNSET r"""An optional identifier for the document. A common value might be an id in an external system or the URL where the source file may be found.""" @@ -69,32 +288,31 @@ class CreateDocumentFromURLParams(BaseModel): partition: Optional[str] = None r"""An optional partition identifier. Documents can be scoped to a partition. Partitions must be lowercase alphanumeric and may only include the special characters `_` and `-`. A partition is created any time a document is created.""" + workflow: Optional[DocumentWorkflow] = None + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["name", "metadata", "mode", "external_id", "partition"] - nullable_fields = ["external_id"] - null_default_fields = [] - + optional_fields = set( + ["name", "metadata", "mode", "external_id", "partition", "workflow"] + ) + nullable_fields = set(["external_id"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/createdocumentparams.py b/src/ragie/models/createdocumentparams.py index 70387dc..fe2a850 100644 --- a/src/ragie/models/createdocumentparams.py +++ b/src/ragie/models/createdocumentparams.py @@ -24,15 +24,15 @@ class Two1(str, Enum): FAST = "fast" -TwoTypedDict = TypeAliasType("TwoTypedDict", Union[Two2TypedDict, Two1]) +class ModeStatic(str, Enum): + HI_RES = "hi_res" + FAST = "fast" -Two = TypeAliasType("Two", Union[Two2, Two1]) +TwoTypedDict = TypeAliasType("TwoTypedDict", Union[Two2TypedDict, Two1]) -class ModeStatic(str, Enum): - HI_RES = "hi_res" - FAST = "fast" +Two = TypeAliasType("Two", Union[Two2, Two1]) class ModeVideo(str, Enum): @@ -56,49 +56,154 @@ class One(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["static", "audio", "video"] - nullable_fields = ["static", "audio", "video"] - null_default_fields = [] - + optional_fields = set(["static", "audio", "video"]) + nullable_fields = set(["static", "audio", "video"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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 ModeTypedDict = TypeAliasType("ModeTypedDict", Union[OneTypedDict, TwoTypedDict]) -r"""Partition strategy for the document. Different strategies exist for textual, audio and video file types and you can set the strategy you want for each file type, or just for textual types. For textual documents the options are `'hi_res'` or `'fast'`. When set to `'hi_res'`, images and tables will be extracted from the document. `'fast'` will only extract text. `'fast'` may be up to 20x faster than `'hi_res'`. `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. Images will always be processed in `hi_res`. If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. For audio files, the options are true or false. True if you want to process audio, false otherwise. For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. `'audio_only'` will extract just the audio part of the video. `'video_only'` will similarly just extract the video part, ignoring audio. `'audio_video'` will extract both audio and video. To process all media types at the highest quality, use `'all'`. When you specify audio or video stategies, the format must be a JSON object. In this case, textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. See examples below. Examples Textual documents only \"fast\" Video documents only { \"video\": \"audio_video\" } Specify multiple document types { \"static\": \"hi_res\", \"audio\": true, \"video\": \"video_only\" } Specify only textual or audio document types { \"static\": \"fast\", \"audio\": true } Highest quality processing for all media types \"all\" """ +r"""Partition strategy for the document. +Different strategies exist for textual, audio and video file types and you can set the strategy you want for +each file type, or just for textual types. + +For textual documents the options are `'hi_res'` or `'fast'`. +When set to `'hi_res'`, images and tables will be extracted from the document. +`'fast'` will only extract text. +`'fast'` may be up to 20x faster than `'hi_res'`. +`hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. +Images will always be processed in `hi_res`. +If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. + +For audio files, the options are true or false. True if you want to process audio, false otherwise. + +For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. +`'audio_only'` will extract just the audio part of the video. +`'video_only'` will similarly just extract the video part, ignoring audio. +`'audio_video'` will extract both audio and video. + +To process all media types at the highest quality, use `'all'`. + +When you specify audio or video stategies, the format must be a JSON object. In this case, +textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. +See examples below. + +Examples + +Textual documents only +\"fast\" + +Video documents only +{ +\"video\": \"audio_video\" +} + +Specify multiple document types +{ +\"static\": \"hi_res\", +\"audio\": true, +\"video\": \"video_only\" +} + +Specify only textual or audio document types +{ +\"static\": \"fast\", +\"audio\": true +} + +Highest quality processing for all media types +\"all\" + +Agentic OCR +\"agentic_ocr\" +Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai. +""" Mode = TypeAliasType("Mode", Union[One, Two]) -r"""Partition strategy for the document. Different strategies exist for textual, audio and video file types and you can set the strategy you want for each file type, or just for textual types. For textual documents the options are `'hi_res'` or `'fast'`. When set to `'hi_res'`, images and tables will be extracted from the document. `'fast'` will only extract text. `'fast'` may be up to 20x faster than `'hi_res'`. `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. Images will always be processed in `hi_res`. If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. For audio files, the options are true or false. True if you want to process audio, false otherwise. For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. `'audio_only'` will extract just the audio part of the video. `'video_only'` will similarly just extract the video part, ignoring audio. `'audio_video'` will extract both audio and video. To process all media types at the highest quality, use `'all'`. When you specify audio or video stategies, the format must be a JSON object. In this case, textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. See examples below. Examples Textual documents only \"fast\" Video documents only { \"video\": \"audio_video\" } Specify multiple document types { \"static\": \"hi_res\", \"audio\": true, \"video\": \"video_only\" } Specify only textual or audio document types { \"static\": \"fast\", \"audio\": true } Highest quality processing for all media types \"all\" """ +r"""Partition strategy for the document. +Different strategies exist for textual, audio and video file types and you can set the strategy you want for +each file type, or just for textual types. + +For textual documents the options are `'hi_res'` or `'fast'`. +When set to `'hi_res'`, images and tables will be extracted from the document. +`'fast'` will only extract text. +`'fast'` may be up to 20x faster than `'hi_res'`. +`hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. +Images will always be processed in `hi_res`. +If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. + +For audio files, the options are true or false. True if you want to process audio, false otherwise. + +For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. +`'audio_only'` will extract just the audio part of the video. +`'video_only'` will similarly just extract the video part, ignoring audio. +`'audio_video'` will extract both audio and video. + +To process all media types at the highest quality, use `'all'`. + +When you specify audio or video stategies, the format must be a JSON object. In this case, +textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. +See examples below. + +Examples + +Textual documents only +\"fast\" + +Video documents only +{ +\"video\": \"audio_video\" +} +Specify multiple document types +{ +\"static\": \"hi_res\", +\"audio\": true, +\"video\": \"video_only\" +} -MetadataTypedDict = TypeAliasType( - "MetadataTypedDict", Union[str, float, bool, List[str]] +Specify only textual or audio document types +{ +\"static\": \"fast\", +\"audio\": true +} + +Highest quality processing for all media types +\"all\" + +Agentic OCR +\"agentic_ocr\" +Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai. +""" + + +CreateDocumentParamsMetadataTypedDict = TypeAliasType( + "CreateDocumentParamsMetadataTypedDict", Union[str, float, bool, List[str]] ) -Metadata = TypeAliasType("Metadata", Union[str, float, bool, List[str]]) +CreateDocumentParamsMetadata = TypeAliasType( + "CreateDocumentParamsMetadata", Union[str, float, bool, List[str]] +) class FileTypedDict(TypedDict): @@ -124,6 +229,27 @@ class File(BaseModel): FieldMetadata(multipart=True), ] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["contentType"]) + 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 + + +class Workflow(str, Enum): + PARSE = "parse" + INDEX = "index" + class CreateDocumentParamsTypedDict(TypedDict): file: FileTypedDict @@ -132,8 +258,62 @@ class CreateDocumentParamsTypedDict(TypedDict): Documents: `.csv` `.doc` `.docx` `.epub` `.epub+zip` `.odt` `.pdf` `.ppt` `.pptx` `.tsv` `.xlsx` `.xls`. PDF files over 2000 pages are not supported in hi_res mode. """ mode: NotRequired[ModeTypedDict] - r"""Partition strategy for the document. Different strategies exist for textual, audio and video file types and you can set the strategy you want for each file type, or just for textual types. For textual documents the options are `'hi_res'` or `'fast'`. When set to `'hi_res'`, images and tables will be extracted from the document. `'fast'` will only extract text. `'fast'` may be up to 20x faster than `'hi_res'`. `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. Images will always be processed in `hi_res`. If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. For audio files, the options are true or false. True if you want to process audio, false otherwise. For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. `'audio_only'` will extract just the audio part of the video. `'video_only'` will similarly just extract the video part, ignoring audio. `'audio_video'` will extract both audio and video. To process all media types at the highest quality, use `'all'`. When you specify audio or video stategies, the format must be a JSON object. In this case, textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. See examples below. Examples Textual documents only \"fast\" Video documents only { \"video\": \"audio_video\" } Specify multiple document types { \"static\": \"hi_res\", \"audio\": true, \"video\": \"video_only\" } Specify only textual or audio document types { \"static\": \"fast\", \"audio\": true } Highest quality processing for all media types \"all\" """ - metadata: NotRequired[Dict[str, MetadataTypedDict]] + r"""Partition strategy for the document. + Different strategies exist for textual, audio and video file types and you can set the strategy you want for + each file type, or just for textual types. + + For textual documents the options are `'hi_res'` or `'fast'`. + When set to `'hi_res'`, images and tables will be extracted from the document. + `'fast'` will only extract text. + `'fast'` may be up to 20x faster than `'hi_res'`. + `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. + Images will always be processed in `hi_res`. + If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. + + For audio files, the options are true or false. True if you want to process audio, false otherwise. + + For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. + `'audio_only'` will extract just the audio part of the video. + `'video_only'` will similarly just extract the video part, ignoring audio. + `'audio_video'` will extract both audio and video. + + To process all media types at the highest quality, use `'all'`. + + When you specify audio or video stategies, the format must be a JSON object. In this case, + textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. + See examples below. + + Examples + + Textual documents only + \"fast\" + + Video documents only + { + \"video\": \"audio_video\" + } + + Specify multiple document types + { + \"static\": \"hi_res\", + \"audio\": true, + \"video\": \"video_only\" + } + + Specify only textual or audio document types + { + \"static\": \"fast\", + \"audio\": true + } + + Highest quality processing for all media types + \"all\" + + Agentic OCR + \"agentic_ocr\" + Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai. + """ + metadata: NotRequired[Dict[str, CreateDocumentParamsMetadataTypedDict]] r"""Metadata for the document. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. 1000 total values are allowed. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`, `start_time`, `end_time`, `chunk_content_type`.""" external_id: NotRequired[str] r"""An optional identifier for the document. A common value might be an id in an external system or the URL where the source file may be found.""" @@ -141,6 +321,7 @@ class CreateDocumentParamsTypedDict(TypedDict): r"""An optional name for the document. If set, the document will have this name. Otherwise it will default to the file's name.""" partition: NotRequired[str] r"""An optional partition identifier. Documents can be scoped to a partition. Partitions must be lowercase alphanumeric and may only include the special characters `_` and `-`. A partition is created any time a document is created.""" + workflow: NotRequired[Nullable[Workflow]] class CreateDocumentParams(BaseModel): @@ -153,10 +334,64 @@ class CreateDocumentParams(BaseModel): mode: Annotated[ Optional[Mode], FieldMetadata(multipart=MultipartFormMetadata(json=True)) ] = None - r"""Partition strategy for the document. Different strategies exist for textual, audio and video file types and you can set the strategy you want for each file type, or just for textual types. For textual documents the options are `'hi_res'` or `'fast'`. When set to `'hi_res'`, images and tables will be extracted from the document. `'fast'` will only extract text. `'fast'` may be up to 20x faster than `'hi_res'`. `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. Images will always be processed in `hi_res`. If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. For audio files, the options are true or false. True if you want to process audio, false otherwise. For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. `'audio_only'` will extract just the audio part of the video. `'video_only'` will similarly just extract the video part, ignoring audio. `'audio_video'` will extract both audio and video. To process all media types at the highest quality, use `'all'`. When you specify audio or video stategies, the format must be a JSON object. In this case, textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. See examples below. Examples Textual documents only \"fast\" Video documents only { \"video\": \"audio_video\" } Specify multiple document types { \"static\": \"hi_res\", \"audio\": true, \"video\": \"video_only\" } Specify only textual or audio document types { \"static\": \"fast\", \"audio\": true } Highest quality processing for all media types \"all\" """ + r"""Partition strategy for the document. + Different strategies exist for textual, audio and video file types and you can set the strategy you want for + each file type, or just for textual types. + + For textual documents the options are `'hi_res'` or `'fast'`. + When set to `'hi_res'`, images and tables will be extracted from the document. + `'fast'` will only extract text. + `'fast'` may be up to 20x faster than `'hi_res'`. + `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. + Images will always be processed in `hi_res`. + If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. + + For audio files, the options are true or false. True if you want to process audio, false otherwise. + + For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. + `'audio_only'` will extract just the audio part of the video. + `'video_only'` will similarly just extract the video part, ignoring audio. + `'audio_video'` will extract both audio and video. + + To process all media types at the highest quality, use `'all'`. + + When you specify audio or video stategies, the format must be a JSON object. In this case, + textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. + See examples below. + + Examples + + Textual documents only + \"fast\" + + Video documents only + { + \"video\": \"audio_video\" + } + + Specify multiple document types + { + \"static\": \"hi_res\", + \"audio\": true, + \"video\": \"video_only\" + } + + Specify only textual or audio document types + { + \"static\": \"fast\", + \"audio\": true + } + + Highest quality processing for all media types + \"all\" + + Agentic OCR + \"agentic_ocr\" + Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai. + """ metadata: Annotated[ - Optional[Dict[str, Metadata]], + Optional[Dict[str, CreateDocumentParamsMetadata]], FieldMetadata(multipart=MultipartFormMetadata(json=True)), ] = None r"""Metadata for the document. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. 1000 total values are allowed. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`, `start_time`, `end_time`, `chunk_content_type`.""" @@ -169,3 +404,34 @@ class CreateDocumentParams(BaseModel): partition: Annotated[Optional[str], FieldMetadata(multipart=True)] = None r"""An optional partition identifier. Documents can be scoped to a partition. Partitions must be lowercase alphanumeric and may only include the special characters `_` and `-`. A partition is created any time a document is created.""" + + workflow: Annotated[OptionalNullable[Workflow], FieldMetadata(multipart=True)] = ( + UNSET + ) + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["mode", "metadata", "external_id", "name", "partition", "workflow"] + ) + nullable_fields = set(["workflow"]) + 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/ragie/models/createdocumentrawparams.py b/src/ragie/models/createdocumentrawparams.py index 674b1d7..8e5b100 100644 --- a/src/ragie/models/createdocumentrawparams.py +++ b/src/ragie/models/createdocumentrawparams.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .documentworkflow import DocumentWorkflow from pydantic import model_serializer from ragie.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL from typing import Any, Dict, List, Optional, Union @@ -36,6 +37,7 @@ class CreateDocumentRawParamsTypedDict(TypedDict): r"""An optional identifier for the document. A common value might be an id in an external system or the URL where the source file may be found.""" partition: NotRequired[str] r"""An optional partition identifier. Documents can be scoped to a partition. Partitions must be lowercase alphanumeric and may only include the special characters `_` and `-`. A partition is created any time a document is created.""" + workflow: NotRequired[DocumentWorkflow] class CreateDocumentRawParams(BaseModel): @@ -54,32 +56,31 @@ class CreateDocumentRawParams(BaseModel): partition: Optional[str] = None r"""An optional partition identifier. Documents can be scoped to a partition. Partitions must be lowercase alphanumeric and may only include the special characters `_` and `-`. A partition is created any time a document is created.""" + workflow: Optional[DocumentWorkflow] = None + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["name", "metadata", "external_id", "partition"] - nullable_fields = ["external_id"] - null_default_fields = [] - + optional_fields = set( + ["name", "metadata", "external_id", "partition", "workflow"] + ) + nullable_fields = set(["external_id"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/creategoogleauthenticator.py b/src/ragie/models/creategoogleauthenticator.py index 916b456..e210c62 100644 --- a/src/ragie/models/creategoogleauthenticator.py +++ b/src/ragie/models/creategoogleauthenticator.py @@ -39,30 +39,31 @@ class CreateGoogleAuthenticator(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["domain", "project_number"] - nullable_fields = ["domain", "project_number"] - null_default_fields = [] - + optional_fields = set(["domain", "project_number"]) + nullable_fields = set(["domain", "project_number"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m + + +try: + CreateGoogleAuthenticator.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/createinstructionparams.py b/src/ragie/models/createinstructionparams.py index 7b8ee41..f3988fd 100644 --- a/src/ragie/models/createinstructionparams.py +++ b/src/ragie/models/createinstructionparams.py @@ -3,7 +3,8 @@ from __future__ import annotations from enum import Enum import pydantic -from ragie.types import BaseModel +from pydantic import model_serializer +from ragie.types import BaseModel, UNSET_SENTINEL from typing import Any, Dict, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -25,6 +26,8 @@ class CreateInstructionParamsTypedDict(TypedDict): r"""Whether the instruction is active. Active instructions are applied to documents when they're created or when their file is updated.""" scope: NotRequired[CreateInstructionParamsScope] r"""The scope of the instruction. Determines whether the instruction is applied to the entire document or to each chunk of the document. Options are `'document'` or `'chunk'`. Generally `'document'` should be used when analyzing the full document is desired, such as when generating a summary or determining sentiment, and `'chunk'` should be used when a fine grained search over a document is desired.""" + context_template: NotRequired[str] + r"""An optional mustache style template used to prepend document context to the content sent for entity extraction. Available variables include `document.name`, `document.type`, `document.source`, and nested values under `document.metadata`.""" filter_: NotRequired[Dict[str, Any]] r"""An optional metadata filter that is matched against document metadata during update and creation. The instruction will only be applied to documents with metadata matching the filter. The following filter operators are supported: $eq - Equal to (number, string, boolean), $ne - Not equal to (number, string, boolean), $gt - Greater than (number), $gte - Greater than or equal to (number), $lt - Less than (number), $lte - Less than or equal to (number), $in - In array (string or number), $nin - Not in array (string or number). The operators can be combined with AND and OR. Read [Metadata & Filters guide](https://docs.ragie.ai/docs/metadata-filters) for more details and examples.""" partition: NotRequired[str] @@ -46,8 +49,35 @@ class CreateInstructionParams(BaseModel): scope: Optional[CreateInstructionParamsScope] = CreateInstructionParamsScope.CHUNK r"""The scope of the instruction. Determines whether the instruction is applied to the entire document or to each chunk of the document. Options are `'document'` or `'chunk'`. Generally `'document'` should be used when analyzing the full document is desired, such as when generating a summary or determining sentiment, and `'chunk'` should be used when a fine grained search over a document is desired.""" + context_template: Optional[str] = None + r"""An optional mustache style template used to prepend document context to the content sent for entity extraction. Available variables include `document.name`, `document.type`, `document.source`, and nested values under `document.metadata`.""" + filter_: Annotated[Optional[Dict[str, Any]], pydantic.Field(alias="filter")] = None r"""An optional metadata filter that is matched against document metadata during update and creation. The instruction will only be applied to documents with metadata matching the filter. The following filter operators are supported: $eq - Equal to (number, string, boolean), $ne - Not equal to (number, string, boolean), $gt - Greater than (number), $gte - Greater than or equal to (number), $lt - Less than (number), $lte - Less than or equal to (number), $in - In array (string or number), $nin - Not in array (string or number). The operators can be combined with AND and OR. Read [Metadata & Filters guide](https://docs.ragie.ai/docs/metadata-filters) for more details and examples.""" partition: Optional[str] = None r"""An optional partition identifier. Instructions can be scoped to a partition. An instruction that defines a partition will only be executed for documents in that partition.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["active", "scope", "context_template", "filter", "partition"] + ) + 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: + CreateInstructionParams.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/createpartitionparams.py b/src/ragie/models/createpartitionparams.py index 22e5202..674402b 100644 --- a/src/ragie/models/createpartitionparams.py +++ b/src/ragie/models/createpartitionparams.py @@ -102,60 +102,59 @@ class CreatePartitionParams(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "description", - "pages_hosted_limit_monthly", - "pages_processed_limit_monthly", - "pages_hosted_limit_max", - "pages_processed_limit_max", - "audio_processed_limit_monthly", - "audio_processed_limit_max", - "video_processed_limit_monthly", - "video_processed_limit_max", - "media_streamed_limit_monthly", - "media_streamed_limit_max", - "media_hosted_limit_monthly", - "media_hosted_limit_max", - "metadata_schema", - ] - nullable_fields = [ - "description", - "pages_hosted_limit_monthly", - "pages_processed_limit_monthly", - "pages_hosted_limit_max", - "pages_processed_limit_max", - "audio_processed_limit_monthly", - "audio_processed_limit_max", - "video_processed_limit_monthly", - "video_processed_limit_max", - "media_streamed_limit_monthly", - "media_streamed_limit_max", - "media_hosted_limit_monthly", - "media_hosted_limit_max", - "metadata_schema", - ] - null_default_fields = [] - + optional_fields = set( + [ + "description", + "pages_hosted_limit_monthly", + "pages_processed_limit_monthly", + "pages_hosted_limit_max", + "pages_processed_limit_max", + "audio_processed_limit_monthly", + "audio_processed_limit_max", + "video_processed_limit_monthly", + "video_processed_limit_max", + "media_streamed_limit_monthly", + "media_streamed_limit_max", + "media_hosted_limit_monthly", + "media_hosted_limit_max", + "metadata_schema", + ] + ) + nullable_fields = set( + [ + "description", + "pages_hosted_limit_monthly", + "pages_processed_limit_monthly", + "pages_hosted_limit_max", + "pages_processed_limit_max", + "audio_processed_limit_monthly", + "audio_processed_limit_max", + "video_processed_limit_monthly", + "video_processed_limit_max", + "media_streamed_limit_monthly", + "media_streamed_limit_max", + "media_hosted_limit_monthly", + "media_hosted_limit_max", + "metadata_schema", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/createwebhookendpointpayload.py b/src/ragie/models/createwebhookendpointpayload.py index 0e84b70..b6595b4 100644 --- a/src/ragie/models/createwebhookendpointpayload.py +++ b/src/ragie/models/createwebhookendpointpayload.py @@ -21,30 +21,25 @@ class CreateWebhookEndpointPayload(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["partition_pattern"] - nullable_fields = ["partition_pattern"] - null_default_fields = [] - + optional_fields = set(["partition_pattern"]) + nullable_fields = set(["partition_pattern"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/definitionlist.py b/src/ragie/models/definitionlist.py new file mode 100644 index 0000000..42a92df --- /dev/null +++ b/src/ragie/models/definitionlist.py @@ -0,0 +1,51 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class DefinitionListTypedDict(TypedDict): + content: str + r"""The text content of the list and each item.""" + type: Literal["DefinitionList"] + + +class DefinitionList(BaseModel): + content: str + r"""The text content of the list and each item.""" + + TYPE: Annotated[ + Annotated[ + Optional[Literal["DefinitionList"]], + AfterValidator(validate_const("DefinitionList")), + ], + pydantic.Field(alias="type"), + ] = "DefinitionList" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + DefinitionList.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/delete_partition_partitions_partition_id_deleteop.py b/src/ragie/models/delete_partition_partitions_partition_id_deleteop.py index c740d29..ade5c63 100644 --- a/src/ragie/models/delete_partition_partitions_partition_id_deleteop.py +++ b/src/ragie/models/delete_partition_partitions_partition_id_deleteop.py @@ -28,30 +28,25 @@ class DeletePartitionPartitionsPartitionIDDeleteRequest(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["async"] - nullable_fields = ["async"] - null_default_fields = [] - + optional_fields = set(["async"]) + nullable_fields = set(["async"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/deletedocumentop.py b/src/ragie/models/deletedocumentop.py index 40e1bfd..ce96710 100644 --- a/src/ragie/models/deletedocumentop.py +++ b/src/ragie/models/deletedocumentop.py @@ -43,30 +43,25 @@ class DeleteDocumentRequest(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["async", "partition"] - nullable_fields = ["async", "partition"] - null_default_fields = [] - + optional_fields = set(["async", "partition"]) + nullable_fields = set(["async", "partition"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member + 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 is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/document.py b/src/ragie/models/document.py index 4816f78..752a977 100644 --- a/src/ragie/models/document.py +++ b/src/ragie/models/document.py @@ -8,14 +8,12 @@ from typing_extensions import NotRequired, TypeAliasType, TypedDict -DocumentMetadataTypedDict = TypeAliasType( - "DocumentMetadataTypedDict", Union[str, int, float, bool, List[str]] +MetadataTypedDict = TypeAliasType( + "MetadataTypedDict", Union[str, int, float, bool, List[str]] ) -DocumentMetadata = TypeAliasType( - "DocumentMetadata", Union[str, int, float, bool, List[str]] -) +Metadata = TypeAliasType("Metadata", Union[str, int, float, bool, List[str]]) class DocumentTypedDict(TypedDict): @@ -24,7 +22,7 @@ class DocumentTypedDict(TypedDict): created_at: datetime updated_at: datetime name: str - metadata: Dict[str, DocumentMetadataTypedDict] + metadata: Dict[str, MetadataTypedDict] partition: str chunk_count: NotRequired[Nullable[int]] external_id: NotRequired[Nullable[str]] @@ -42,7 +40,7 @@ class Document(BaseModel): name: str - metadata: Dict[str, DocumentMetadata] + metadata: Dict[str, Metadata] partition: str @@ -54,30 +52,25 @@ class Document(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["chunk_count", "external_id", "page_count"] - nullable_fields = ["chunk_count", "external_id", "page_count"] - null_default_fields = [] - + optional_fields = set(["chunk_count", "external_id", "page_count"]) + nullable_fields = set(["chunk_count", "external_id", "page_count"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/documentchunk.py b/src/ragie/models/documentchunk.py index 1e80d73..310a2d8 100644 --- a/src/ragie/models/documentchunk.py +++ b/src/ragie/models/documentchunk.py @@ -2,7 +2,8 @@ from __future__ import annotations from .link import Link, LinkTypedDict -from ragie.types import BaseModel +from pydantic import model_serializer +from ragie.types import BaseModel, UNSET_SENTINEL from typing import Any, Dict, Optional from typing_extensions import NotRequired, TypedDict @@ -25,3 +26,19 @@ class DocumentChunk(BaseModel): index: Optional[int] = -1 metadata: Optional[Dict[str, Any]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["index", "metadata"]) + 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/ragie/models/documentchunkdetail.py b/src/ragie/models/documentchunkdetail.py index 1df28bb..2225c68 100644 --- a/src/ragie/models/documentchunkdetail.py +++ b/src/ragie/models/documentchunkdetail.py @@ -52,30 +52,25 @@ class DocumentChunkDetail(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["index", "metadata", "modality_data"] - nullable_fields = ["modality_data"] - null_default_fields = [] - + optional_fields = set(["index", "metadata", "modality_data"]) + nullable_fields = set(["modality_data"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/documentelementtype.py b/src/ragie/models/documentelementtype.py new file mode 100644 index 0000000..3e56d21 --- /dev/null +++ b/src/ragie/models/documentelementtype.py @@ -0,0 +1,51 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum + + +class DocumentElementType(str, Enum): + CAPTION = "Caption" + TITLE = "Title" + TEXT = "Text" + UNCATEGORIZED_TEXT = "UncategorizedText" + NARRATIVE_TEXT = "NarrativeText" + IMAGE = "Image" + FIGURE_CAPTION = "FigureCaption" + TABLE_CAPTION = "TableCaption" + LIST_ITEM = "ListItem" + ADDRESS = "Address" + EMAIL_ADDRESS = "EmailAddress" + PAGE_BREAK = "PageBreak" + FORMULA = "Formula" + TABLE = "Table" + HEADER = "Header" + FOOTER = "Footer" + JSON = "Json" + AUDIO_TRANSCRIPTION_SEGMENT = "AudioTranscriptionSegment" + VIDEO_SEGMENT = "VideoSegment" + SUB_HEADER = "SubHeader" + SECTION_HEADER = "SectionHeader" + AUTHOR = "Author" + CALENDAR_DATE = "CalendarDate" + QUOTE = "Quote" + COMMENT = "Comment" + UNORDERED_LIST = "UnorderedList" + ORDERED_LIST = "OrderedList" + DEFINITION_LIST = "DefinitionList" + FIGURE = "Figure" + STAMP = "Stamp" + LOGO = "Logo" + WATERMARK = "Watermark" + BARCODE = "Barcode" + QR_CODE = "QrCode" + SIGNATURE = "Signature" + KEY_VALUE = "KeyValue" + FORM_FIELD = "FormField" + CODE = "Code" + BIBLIOGRAPHY = "Bibliography" + TABLE_OF_CONTENTS = "TableOfContents" + FOOTNOTE = "Footnote" + TIME = "Time" + BUTTON = "Button" + VIDEO = "Video" diff --git a/src/ragie/models/documentget.py b/src/ragie/models/documentget.py index dafb152..06986b6 100644 --- a/src/ragie/models/documentget.py +++ b/src/ragie/models/documentget.py @@ -57,30 +57,25 @@ class DocumentGet(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["chunk_count", "external_id", "page_count"] - nullable_fields = ["chunk_count", "external_id", "page_count"] - null_default_fields = [] - + optional_fields = set(["chunk_count", "external_id", "page_count"]) + nullable_fields = set(["chunk_count", "external_id", "page_count"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/documentwithcontent.py b/src/ragie/models/documentwithcontent.py index 689b4fa..c313c37 100644 --- a/src/ragie/models/documentwithcontent.py +++ b/src/ragie/models/documentwithcontent.py @@ -57,30 +57,25 @@ class DocumentWithContent(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["chunk_count", "external_id", "page_count"] - nullable_fields = ["chunk_count", "external_id", "page_count"] - null_default_fields = [] - + optional_fields = set(["chunk_count", "external_id", "page_count"]) + nullable_fields = set(["chunk_count", "external_id", "page_count"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/documentworkflow.py b/src/ragie/models/documentworkflow.py new file mode 100644 index 0000000..cc64ffd --- /dev/null +++ b/src/ragie/models/documentworkflow.py @@ -0,0 +1,9 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum + + +class DocumentWorkflow(str, Enum): + PARSE = "parse" + INDEX = "index" diff --git a/src/ragie/models/durationlocation.py b/src/ragie/models/durationlocation.py new file mode 100644 index 0000000..f79d246 --- /dev/null +++ b/src/ragie/models/durationlocation.py @@ -0,0 +1,54 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class DurationLocationTypedDict(TypedDict): + start_time: float + end_time: float + duration: float + location_type: Literal["duration"] + + +class DurationLocation(BaseModel): + start_time: float + + end_time: float + + duration: float + + LOCATION_TYPE: Annotated[ + Annotated[ + Optional[Literal["duration"]], AfterValidator(validate_const("duration")) + ], + pydantic.Field(alias="location_type"), + ] = "duration" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["location_type"]) + 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: + DurationLocation.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/emailaddress.py b/src/ragie/models/emailaddress.py new file mode 100644 index 0000000..c1a7e9d --- /dev/null +++ b/src/ragie/models/emailaddress.py @@ -0,0 +1,51 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class EmailAddressTypedDict(TypedDict): + content: str + r"""The text content""" + type: Literal["EmailAddress"] + + +class EmailAddress(BaseModel): + content: str + r"""The text content""" + + TYPE: Annotated[ + Annotated[ + Optional[Literal["EmailAddress"]], + AfterValidator(validate_const("EmailAddress")), + ], + pydantic.Field(alias="type"), + ] = "EmailAddress" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + EmailAddress.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/entity.py b/src/ragie/models/entity.py index 8e48a55..7c91b31 100644 --- a/src/ragie/models/entity.py +++ b/src/ragie/models/entity.py @@ -18,6 +18,10 @@ class EntityTypedDict(TypedDict): r"""The ID of the document which the entity was produced from.""" data: Dict[str, Any] chunk_id: NotRequired[Nullable[str]] + instruction_schema_version: NotRequired[Nullable[int]] + r"""Instruction entity schema version used to generate this entity.""" + instruction_schema_shape_fingerprint: NotRequired[Nullable[str]] + r"""Shape-only fingerprint of the instruction entity schema used to generate this entity.""" class Entity(BaseModel): @@ -37,32 +41,45 @@ class Entity(BaseModel): chunk_id: OptionalNullable[str] = UNSET + instruction_schema_version: OptionalNullable[int] = UNSET + r"""Instruction entity schema version used to generate this entity.""" + + instruction_schema_shape_fingerprint: OptionalNullable[str] = UNSET + r"""Shape-only fingerprint of the instruction entity schema used to generate this entity.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["chunk_id"] - nullable_fields = ["chunk_id"] - null_default_fields = [] - + optional_fields = set( + [ + "chunk_id", + "instruction_schema_version", + "instruction_schema_shape_fingerprint", + ] + ) + nullable_fields = set( + [ + "chunk_id", + "instruction_schema_version", + "instruction_schema_shape_fingerprint", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/evaluatedanswerstep.py b/src/ragie/models/evaluatedanswerstep.py index 2f890a9..3387be1 100644 --- a/src/ragie/models/evaluatedanswerstep.py +++ b/src/ragie/models/evaluatedanswerstep.py @@ -3,8 +3,9 @@ from __future__ import annotations from .answer import Answer, AnswerTypedDict import pydantic +from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from ragie.types import BaseModel +from ragie.types import BaseModel, UNSET_SENTINEL from ragie.utils import validate_const from typing import List, Literal, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -45,3 +46,25 @@ class EvaluatedAnswerStep(BaseModel): other_resolved_question_ids: Optional[List[str]] = None r"""A list of questions ids that are no longer relevant to the current answer referenced by their IDs.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type", "errored", "other_resolved_question_ids"]) + 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: + EvaluatedAnswerStep.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/failedstep.py b/src/ragie/models/failedstep.py index 838eec5..025a28c 100644 --- a/src/ragie/models/failedstep.py +++ b/src/ragie/models/failedstep.py @@ -2,8 +2,9 @@ from __future__ import annotations import pydantic +from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from ragie.types import BaseModel +from ragie.types import BaseModel, UNSET_SENTINEL from ragie.utils import validate_const from typing import Literal, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -29,3 +30,25 @@ class FailedStep(BaseModel): ] = "failed" errored: Optional[bool] = False + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type", "errored"]) + 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: + FailedStep.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/figure.py b/src/ragie/models/figure.py new file mode 100644 index 0000000..eaad491 --- /dev/null +++ b/src/ragie/models/figure.py @@ -0,0 +1,67 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class FigureTypedDict(TypedDict): + content: str + r"""The text visible inside the visual (OCR)""" + description: str + r"""A detailed description of what the visual depicts.""" + type: Literal["Figure"] + base64_data: NotRequired[Nullable[str]] + + +class Figure(BaseModel): + content: str + r"""The text visible inside the visual (OCR)""" + + description: str + r"""A detailed description of what the visual depicts.""" + + TYPE: Annotated[ + Annotated[ + Optional[Literal["Figure"]], AfterValidator(validate_const("Figure")) + ], + pydantic.Field(alias="type"), + ] = "Figure" + + base64_data: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type", "base64_data"]) + nullable_fields = set(["base64_data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + Figure.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/figurecaption.py b/src/ragie/models/figurecaption.py new file mode 100644 index 0000000..3a705df --- /dev/null +++ b/src/ragie/models/figurecaption.py @@ -0,0 +1,51 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class FigureCaptionTypedDict(TypedDict): + content: str + r"""The text content""" + type: Literal["FigureCaption"] + + +class FigureCaption(BaseModel): + content: str + r"""The text content""" + + TYPE: Annotated[ + Annotated[ + Optional[Literal["FigureCaption"]], + AfterValidator(validate_const("FigureCaption")), + ], + pydantic.Field(alias="type"), + ] = "FigureCaption" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + FigureCaption.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/filesearchoutput.py b/src/ragie/models/filesearchoutput.py index 84ea1ac..99e21cc 100644 --- a/src/ragie/models/filesearchoutput.py +++ b/src/ragie/models/filesearchoutput.py @@ -4,8 +4,9 @@ from .filesearchresult import FileSearchResult, FileSearchResultTypedDict from enum import Enum import pydantic +from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from ragie.types import BaseModel +from ragie.types import BaseModel, UNSET_SENTINEL from ragie.utils import validate_const from typing import List, Literal, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -47,3 +48,25 @@ class FileSearchOutput(BaseModel): ], pydantic.Field(alias="type"), ] = "file_search_call" + + @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 + + +try: + FileSearchOutput.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/finalanswer.py b/src/ragie/models/finalanswer.py index 1826f44..8ddbc05 100644 --- a/src/ragie/models/finalanswer.py +++ b/src/ragie/models/finalanswer.py @@ -21,7 +21,8 @@ SearchStepWithQueryDetailsTypedDict, ) from .surrenderstep import SurrenderStep, SurrenderStepTypedDict -from ragie.types import BaseModel +from pydantic import model_serializer +from ragie.types import BaseModel, UNSET_SENTINEL from typing import List, Optional, Union from typing_extensions import NotRequired, TypeAliasType, TypedDict @@ -85,3 +86,19 @@ class FinalAnswer(BaseModel): r"""The steps that led to the answer.""" usage: Optional[AgentHoppsModelsModelsUsage] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["evidence", "steps", "usage"]) + 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/ragie/models/footer.py b/src/ragie/models/footer.py new file mode 100644 index 0000000..e7e630e --- /dev/null +++ b/src/ragie/models/footer.py @@ -0,0 +1,50 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class FooterTypedDict(TypedDict): + content: str + r"""The text content""" + type: Literal["Footer"] + + +class Footer(BaseModel): + content: str + r"""The text content""" + + TYPE: Annotated[ + Annotated[ + Optional[Literal["Footer"]], AfterValidator(validate_const("Footer")) + ], + pydantic.Field(alias="type"), + ] = "Footer" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + Footer.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/footnote.py b/src/ragie/models/footnote.py new file mode 100644 index 0000000..8d1204b --- /dev/null +++ b/src/ragie/models/footnote.py @@ -0,0 +1,50 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class FootnoteTypedDict(TypedDict): + content: str + r"""The text content inside the footnote""" + type: Literal["Footnote"] + + +class Footnote(BaseModel): + content: str + r"""The text content inside the footnote""" + + TYPE: Annotated[ + Annotated[ + Optional[Literal["Footnote"]], AfterValidator(validate_const("Footnote")) + ], + pydantic.Field(alias="type"), + ] = "Footnote" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + Footnote.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/formfield.py b/src/ragie/models/formfield.py new file mode 100644 index 0000000..77a143c --- /dev/null +++ b/src/ragie/models/formfield.py @@ -0,0 +1,107 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .formoption import FormOption, FormOptionTypedDict +from enum import Enum +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import List, Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class InputType(str, Enum): + r"""Type of input.""" + + TEXT = "text" + TEXTAREA = "textarea" + CHECKBOX = "checkbox" + RADIO = "radio" + CHECKBOX_GROUP = "checkbox-group" + RADIO_GROUP = "radio-group" + DATE = "date" + TIME = "time" + DATE_TIME = "date-time" + + +class FormFieldTypedDict(TypedDict): + content: str + r"""The text content of the form field, including both the label and the value""" + input_type: InputType + r"""Type of input.""" + label: str + r"""The main question/label for the field.""" + type: Literal["FormField"] + value: NotRequired[Nullable[str]] + r"""The filled text. For single checkbox: 'true'/'false'.""" + options: NotRequired[Nullable[List[FormOptionTypedDict]]] + r"""List of available options.""" + selected_values: NotRequired[Nullable[List[str]]] + r"""The 'label' of the selected option(s).""" + help_text: NotRequired[Nullable[str]] + r"""The help text for the form field.""" + + +class FormField(BaseModel): + content: str + r"""The text content of the form field, including both the label and the value""" + + input_type: InputType + r"""Type of input.""" + + label: str + r"""The main question/label for the field.""" + + TYPE: Annotated[ + Annotated[ + Optional[Literal["FormField"]], AfterValidator(validate_const("FormField")) + ], + pydantic.Field(alias="type"), + ] = "FormField" + + value: OptionalNullable[str] = UNSET + r"""The filled text. For single checkbox: 'true'/'false'.""" + + options: OptionalNullable[List[FormOption]] = UNSET + r"""List of available options.""" + + selected_values: OptionalNullable[List[str]] = UNSET + r"""The 'label' of the selected option(s).""" + + help_text: OptionalNullable[str] = UNSET + r"""The help text for the form field.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["type", "value", "options", "selected_values", "help_text"] + ) + nullable_fields = set(["value", "options", "selected_values", "help_text"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + FormField.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/formoption.py b/src/ragie/models/formoption.py new file mode 100644 index 0000000..e1dc44a --- /dev/null +++ b/src/ragie/models/formoption.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from ragie.types import BaseModel +from typing_extensions import TypedDict + + +class FormOptionTypedDict(TypedDict): + label: str + r"""The text label visible next to the checkbox/radio.""" + + +class FormOption(BaseModel): + label: str + r"""The text label visible next to the checkbox/radio.""" diff --git a/src/ragie/models/formula.py b/src/ragie/models/formula.py new file mode 100644 index 0000000..4f27be5 --- /dev/null +++ b/src/ragie/models/formula.py @@ -0,0 +1,64 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class FormulaTypedDict(TypedDict): + content: str + r"""The formula as plain text.""" + type: Literal["Formula"] + latex: NotRequired[Nullable[str]] + r"""The LaTeX representation of the formula.""" + + +class Formula(BaseModel): + content: str + r"""The formula as plain text.""" + + TYPE: Annotated[ + Annotated[ + Optional[Literal["Formula"]], AfterValidator(validate_const("Formula")) + ], + pydantic.Field(alias="type"), + ] = "Formula" + + latex: OptionalNullable[str] = UNSET + r"""The LaTeX representation of the formula.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type", "latex"]) + nullable_fields = set(["latex"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + Formula.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/get_elementop.py b/src/ragie/models/get_elementop.py new file mode 100644 index 0000000..7835e78 --- /dev/null +++ b/src/ragie/models/get_elementop.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from ragie.types import BaseModel +from ragie.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetElementRequestTypedDict(TypedDict): + element_id: str + + +class GetElementRequest(BaseModel): + element_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/ragie/models/getdocumentchunkcontentop.py b/src/ragie/models/getdocumentchunkcontentop.py index 9444304..0b822cc 100644 --- a/src/ragie/models/getdocumentchunkcontentop.py +++ b/src/ragie/models/getdocumentchunkcontentop.py @@ -78,30 +78,25 @@ class GetDocumentChunkContentRequest(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["media_type", "download", "partition", "range"] - nullable_fields = ["media_type", "partition", "range"] - null_default_fields = [] - + optional_fields = set(["media_type", "download", "partition", "range"]) + nullable_fields = set(["media_type", "partition", "range"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/getdocumentchunkop.py b/src/ragie/models/getdocumentchunkop.py index 926d926..1dfe659 100644 --- a/src/ragie/models/getdocumentchunkop.py +++ b/src/ragie/models/getdocumentchunkop.py @@ -35,30 +35,25 @@ class GetDocumentChunkRequest(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["partition"] - nullable_fields = ["partition"] - null_default_fields = [] - + optional_fields = set(["partition"]) + nullable_fields = set(["partition"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/getdocumentchunksop.py b/src/ragie/models/getdocumentchunksop.py index c94c413..879fae3 100644 --- a/src/ragie/models/getdocumentchunksop.py +++ b/src/ragie/models/getdocumentchunksop.py @@ -66,36 +66,27 @@ class GetDocumentChunksRequest(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "start_index", - "end_index", - "cursor", - "page_size", - "partition", - ] - nullable_fields = ["start_index", "end_index", "cursor", "partition"] - null_default_fields = [] - + optional_fields = set( + ["start_index", "end_index", "cursor", "page_size", "partition"] + ) + nullable_fields = set(["start_index", "end_index", "cursor", "partition"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/getdocumentcontentop.py b/src/ragie/models/getdocumentcontentop.py index 5681663..e1e48bb 100644 --- a/src/ragie/models/getdocumentcontentop.py +++ b/src/ragie/models/getdocumentcontentop.py @@ -79,30 +79,25 @@ class GetDocumentContentRequest(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["media_type", "download", "partition", "range"] - nullable_fields = ["media_type", "partition", "range"] - null_default_fields = [] - + optional_fields = set(["media_type", "download", "partition", "range"]) + nullable_fields = set(["media_type", "partition", "range"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/getdocumentop.py b/src/ragie/models/getdocumentop.py index b0adaf6..dec66fe 100644 --- a/src/ragie/models/getdocumentop.py +++ b/src/ragie/models/getdocumentop.py @@ -28,30 +28,25 @@ class GetDocumentRequest(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["partition"] - nullable_fields = ["partition"] - null_default_fields = [] - + optional_fields = set(["partition"]) + nullable_fields = set(["partition"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/getdocumentsourceop.py b/src/ragie/models/getdocumentsourceop.py index d0362dc..546d957 100644 --- a/src/ragie/models/getdocumentsourceop.py +++ b/src/ragie/models/getdocumentsourceop.py @@ -28,30 +28,25 @@ class GetDocumentSourceRequest(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["partition"] - nullable_fields = ["partition"] - null_default_fields = [] - + optional_fields = set(["partition"]) + nullable_fields = set(["partition"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/getdocumentsummaryop.py b/src/ragie/models/getdocumentsummaryop.py index 6ed4180..30192ed 100644 --- a/src/ragie/models/getdocumentsummaryop.py +++ b/src/ragie/models/getdocumentsummaryop.py @@ -28,30 +28,25 @@ class GetDocumentSummaryRequest(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["partition"] - nullable_fields = ["partition"] - null_default_fields = [] - + optional_fields = set(["partition"]) + nullable_fields = set(["partition"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/gmaildata.py b/src/ragie/models/gmaildata.py index 22bdcac..30ec84f 100644 --- a/src/ragie/models/gmaildata.py +++ b/src/ragie/models/gmaildata.py @@ -15,30 +15,25 @@ class GmailData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["label"] - nullable_fields = ["label"] - null_default_fields = [] - + optional_fields = set(["label"]) + nullable_fields = set(["label"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/header.py b/src/ragie/models/header.py new file mode 100644 index 0000000..800f9e4 --- /dev/null +++ b/src/ragie/models/header.py @@ -0,0 +1,50 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class HeaderTypedDict(TypedDict): + content: str + r"""The text content""" + type: Literal["Header"] + + +class Header(BaseModel): + content: str + r"""The text content""" + + TYPE: Annotated[ + Annotated[ + Optional[Literal["Header"]], AfterValidator(validate_const("Header")) + ], + pydantic.Field(alias="type"), + ] = "Header" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + Header.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/image.py b/src/ragie/models/image.py new file mode 100644 index 0000000..9197b74 --- /dev/null +++ b/src/ragie/models/image.py @@ -0,0 +1,53 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class ImageTypedDict(TypedDict): + content: str + r"""The text visible inside the visual (OCR)""" + description: str + r"""A detailed description of what the visual depicts.""" + type: Literal["Image"] + + +class Image(BaseModel): + content: str + r"""The text visible inside the visual (OCR)""" + + description: str + r"""A detailed description of what the visual depicts.""" + + TYPE: Annotated[ + Annotated[Optional[Literal["Image"]], AfterValidator(validate_const("Image"))], + pydantic.Field(alias="type"), + ] = "Image" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + Image.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/inputtokendetails.py b/src/ragie/models/inputtokendetails.py index 32c70b7..3611653 100644 --- a/src/ragie/models/inputtokendetails.py +++ b/src/ragie/models/inputtokendetails.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from ragie.types import BaseModel +from pydantic import model_serializer +from ragie.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -12,3 +13,19 @@ class InputTokenDetailsTypedDict(TypedDict): class InputTokenDetails(BaseModel): cached_tokens: Optional[int] = 0 + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["cached_tokens"]) + 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/ragie/models/instruction.py b/src/ragie/models/instruction.py index c448878..4486817 100644 --- a/src/ragie/models/instruction.py +++ b/src/ragie/models/instruction.py @@ -4,7 +4,8 @@ from datetime import datetime from enum import Enum import pydantic -from ragie.types import BaseModel +from pydantic import model_serializer +from ragie.types import BaseModel, UNSET_SENTINEL from typing import Any, Dict, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -29,6 +30,8 @@ class InstructionTypedDict(TypedDict): r"""Whether the instruction is active. Active instructions are applied to documents when they're created or when their file is updated.""" scope: NotRequired[Scope] r"""The scope of the instruction. Determines whether the instruction is applied to the entire document or to each chunk of the document. Options are `'document'` or `'chunk'`. Generally `'document'` should be used when analyzing the full document is desired, such as when generating a summary or determining sentiment, and `'chunk'` should be used when a fine grained search over a document is desired.""" + context_template: NotRequired[str] + r"""An optional mustache style template used to prepend document context to the content sent for entity extraction. Available variables include `document.name`, `document.type`, `document.source`, and nested values under `document.metadata`.""" filter_: NotRequired[Dict[str, Any]] r"""An optional metadata filter that is matched against document metadata during update and creation. The instruction will only be applied to documents with metadata matching the filter. The following filter operators are supported: $eq - Equal to (number, string, boolean), $ne - Not equal to (number, string, boolean), $gt - Greater than (number), $gte - Greater than or equal to (number), $lt - Less than (number), $lte - Less than or equal to (number), $in - In array (string or number), $nin - Not in array (string or number). The operators can be combined with AND and OR. Read [Metadata & Filters guide](https://docs.ragie.ai/docs/metadata-filters) for more details and examples.""" partition: NotRequired[str] @@ -56,8 +59,35 @@ class Instruction(BaseModel): scope: Optional[Scope] = Scope.CHUNK r"""The scope of the instruction. Determines whether the instruction is applied to the entire document or to each chunk of the document. Options are `'document'` or `'chunk'`. Generally `'document'` should be used when analyzing the full document is desired, such as when generating a summary or determining sentiment, and `'chunk'` should be used when a fine grained search over a document is desired.""" + context_template: Optional[str] = None + r"""An optional mustache style template used to prepend document context to the content sent for entity extraction. Available variables include `document.name`, `document.type`, `document.source`, and nested values under `document.metadata`.""" + filter_: Annotated[Optional[Dict[str, Any]], pydantic.Field(alias="filter")] = None r"""An optional metadata filter that is matched against document metadata during update and creation. The instruction will only be applied to documents with metadata matching the filter. The following filter operators are supported: $eq - Equal to (number, string, boolean), $ne - Not equal to (number, string, boolean), $gt - Greater than (number), $gte - Greater than or equal to (number), $lt - Less than (number), $lte - Less than or equal to (number), $in - In array (string or number), $nin - Not in array (string or number). The operators can be combined with AND and OR. Read [Metadata & Filters guide](https://docs.ragie.ai/docs/metadata-filters) for more details and examples.""" partition: Optional[str] = None r"""An optional partition identifier. Instructions can be scoped to a partition. An instruction that defines a partition will only be executed for documents in that partition.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["active", "scope", "context_template", "filter", "partition"] + ) + 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: + Instruction.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/instructionentityextractionlog.py b/src/ragie/models/instructionentityextractionlog.py new file mode 100644 index 0000000..d9f0cff --- /dev/null +++ b/src/ragie/models/instructionentityextractionlog.py @@ -0,0 +1,116 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import datetime +from enum import Enum +from pydantic import model_serializer +from ragie.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class InstructionEntityExtractionLogScope(str, Enum): + r"""Whether extraction was attempted at document scope or chunk scope.""" + + DOCUMENT = "document" + CHUNK = "chunk" + + +class Status(str, Enum): + r"""Extraction status for this attempt.""" + + EXTRACTED = "extracted" + NOT_FOUND = "not_found" + ERROR = "error" + + +class ReasonCode(str, Enum): + NO_MATCH = "NO_MATCH" + AMBIGUOUS = "AMBIGUOUS" + OUT_OF_SCOPE = "OUT_OF_SCOPE" + SCHEMA_INVALID = "SCHEMA_INVALID" + MODEL_ERROR = "MODEL_ERROR" + + +class InstructionEntityExtractionLogTypedDict(TypedDict): + id: str + created_at: datetime + updated_at: datetime + instruction_id: str + r"""The ID of the instruction which generated the entity.""" + document_id: str + r"""The ID of the document which the entity was produced from.""" + scope: InstructionEntityExtractionLogScope + r"""Whether extraction was attempted at document scope or chunk scope.""" + status: Status + r"""Extraction status for this attempt.""" + page_count: float + r"""Input pages for this extraction attempt.""" + chunk_index: NotRequired[Nullable[int]] + r"""Chunk index when scope is `chunk`; null when scope is `document`.""" + reason_code: NotRequired[Nullable[ReasonCode]] + r"""Machine-readable reason code when available. Values: `NO_MATCH`, `AMBIGUOUS`, `OUT_OF_SCOPE`, `SCHEMA_INVALID`, `MODEL_ERROR`.""" + reason: NotRequired[Nullable[str]] + r"""Optional debug text for this attempt. Usually model-provided; may be system-generated when normalization/parsing fails.""" + errors: NotRequired[List[str]] + r"""Machine-readable extraction error identifiers. Public responses map internal entity-shape validation failures to `unexpected_error`. Common values include `unexpected_error`, `invalid_instruction_schema`, and `empty_completion_content`. Raw provider/runtime error strings may also appear.""" + + +class InstructionEntityExtractionLog(BaseModel): + id: str + + created_at: datetime + + updated_at: datetime + + instruction_id: str + r"""The ID of the instruction which generated the entity.""" + + document_id: str + r"""The ID of the document which the entity was produced from.""" + + scope: InstructionEntityExtractionLogScope + r"""Whether extraction was attempted at document scope or chunk scope.""" + + status: Status + r"""Extraction status for this attempt.""" + + page_count: float + r"""Input pages for this extraction attempt.""" + + chunk_index: OptionalNullable[int] = UNSET + r"""Chunk index when scope is `chunk`; null when scope is `document`.""" + + reason_code: OptionalNullable[ReasonCode] = UNSET + r"""Machine-readable reason code when available. Values: `NO_MATCH`, `AMBIGUOUS`, `OUT_OF_SCOPE`, `SCHEMA_INVALID`, `MODEL_ERROR`.""" + + reason: OptionalNullable[str] = UNSET + r"""Optional debug text for this attempt. Usually model-provided; may be system-generated when normalization/parsing fails.""" + + errors: Optional[List[str]] = None + r"""Machine-readable extraction error identifiers. Public responses map internal entity-shape validation failures to `unexpected_error`. Common values include `unexpected_error`, `invalid_instruction_schema`, and `empty_completion_content`. Raw provider/runtime error strings may also appear.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["chunk_index", "reason_code", "reason", "errors"]) + nullable_fields = set(["chunk_index", "reason_code", "reason"]) + 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/ragie/models/instructionentityextractionloglist.py b/src/ragie/models/instructionentityextractionloglist.py new file mode 100644 index 0000000..04551a0 --- /dev/null +++ b/src/ragie/models/instructionentityextractionloglist.py @@ -0,0 +1,22 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .instructionentityextractionlog import ( + InstructionEntityExtractionLog, + InstructionEntityExtractionLogTypedDict, +) +from .pagination import Pagination, PaginationTypedDict +from ragie.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class InstructionEntityExtractionLogListTypedDict(TypedDict): + pagination: PaginationTypedDict + logs: List[InstructionEntityExtractionLogTypedDict] + + +class InstructionEntityExtractionLogList(BaseModel): + pagination: Pagination + + logs: List[InstructionEntityExtractionLog] diff --git a/src/ragie/models/intercomdata.py b/src/ragie/models/intercomdata.py index bd64303..5f6fc9b 100644 --- a/src/ragie/models/intercomdata.py +++ b/src/ragie/models/intercomdata.py @@ -46,42 +46,39 @@ class IntercomData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "articles_help_center", - "admins", - "contacts", - "conversations", - "conversation_attachments", - "conversation_notes", - "tickets", - "ticket_attachments", - "ticket_comments", - "ticket_notes", - "filter_user_id", - ] - nullable_fields = ["filter_user_id"] - null_default_fields = [] - + optional_fields = set( + [ + "articles_help_center", + "admins", + "contacts", + "conversations", + "conversation_attachments", + "conversation_notes", + "tickets", + "ticket_attachments", + "ticket_comments", + "ticket_notes", + "filter_user_id", + ] + ) + nullable_fields = set(["filter_user_id"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/json.py b/src/ragie/models/json.py new file mode 100644 index 0000000..b630005 --- /dev/null +++ b/src/ragie/models/json.py @@ -0,0 +1,48 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class JSONTypedDict(TypedDict): + content: str + r"""The text content""" + type: Literal["Json"] + + +class JSON(BaseModel): + content: str + r"""The text content""" + + TYPE: Annotated[ + Annotated[Optional[Literal["Json"]], AfterValidator(validate_const("Json"))], + pydantic.Field(alias="type"), + ] = "Json" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + JSON.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/keyvalue.py b/src/ragie/models/keyvalue.py new file mode 100644 index 0000000..c25b81f --- /dev/null +++ b/src/ragie/models/keyvalue.py @@ -0,0 +1,55 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class KeyValueTypedDict(TypedDict): + key: str + r"""The label/attribute name (e.g. 'Date', 'Invoice #').""" + value: str + r"""The static text value found.""" + type: Literal["KeyValue"] + + +class KeyValue(BaseModel): + key: str + r"""The label/attribute name (e.g. 'Date', 'Invoice #').""" + + value: str + r"""The static text value found.""" + + TYPE: Annotated[ + Annotated[ + Optional[Literal["KeyValue"]], AfterValidator(validate_const("KeyValue")) + ], + pydantic.Field(alias="type"), + ] = "KeyValue" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + KeyValue.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/list_connections_connections_getop.py b/src/ragie/models/list_connections_connections_getop.py index e95b34e..ba86f17 100644 --- a/src/ragie/models/list_connections_connections_getop.py +++ b/src/ragie/models/list_connections_connections_getop.py @@ -49,31 +49,26 @@ class ListConnectionsConnectionsGetRequest(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["cursor", "page_size", "filter", "partition"] - nullable_fields = ["cursor", "filter", "partition"] - null_default_fields = [] - + optional_fields = set(["cursor", "page_size", "filter", "partition"]) + nullable_fields = set(["cursor", "filter", "partition"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/list_elementsop.py b/src/ragie/models/list_elementsop.py new file mode 100644 index 0000000..baba5fe --- /dev/null +++ b/src/ragie/models/list_elementsop.py @@ -0,0 +1,95 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .documentelementtype import DocumentElementType +from pydantic import model_serializer +from ragie.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from ragie.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, +) +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ListElementsRequestTypedDict(TypedDict): + document_id: str + cursor: NotRequired[Nullable[str]] + r"""An opaque cursor for pagination""" + page_size: NotRequired[int] + r"""The number of items per page (must be greater than 0 and less than or equal to 100)""" + type: NotRequired[Nullable[List[DocumentElementType]]] + index_start: NotRequired[Nullable[int]] + index_end: NotRequired[Nullable[int]] + partition: NotRequired[Nullable[str]] + r"""An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.""" + + +class ListElementsRequest(BaseModel): + document_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + cursor: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""An opaque cursor for pagination""" + + page_size: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 10 + r"""The number of items per page (must be greater than 0 and less than or equal to 100)""" + + type: Annotated[ + OptionalNullable[List[DocumentElementType]], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + index_start: Annotated[ + OptionalNullable[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + index_end: Annotated[ + OptionalNullable[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + partition: Annotated[ + OptionalNullable[str], + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = UNSET + r"""An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["cursor", "page_size", "type", "index_start", "index_end", "partition"] + ) + nullable_fields = set( + ["cursor", "type", "index_start", "index_end", "partition"] + ) + 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/ragie/models/list_partitions_partitions_getop.py b/src/ragie/models/list_partitions_partitions_getop.py index 50038bb..f0c846d 100644 --- a/src/ragie/models/list_partitions_partitions_getop.py +++ b/src/ragie/models/list_partitions_partitions_getop.py @@ -31,31 +31,26 @@ class ListPartitionsPartitionsGetRequest(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["cursor", "page_size"] - nullable_fields = ["cursor"] - null_default_fields = [] - + optional_fields = set(["cursor", "page_size"]) + nullable_fields = set(["cursor"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/listauthenticatorsop.py b/src/ragie/models/listauthenticatorsop.py index 92a1fd7..ebab5d1 100644 --- a/src/ragie/models/listauthenticatorsop.py +++ b/src/ragie/models/listauthenticatorsop.py @@ -31,31 +31,26 @@ class ListAuthenticatorsRequest(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["cursor", "page_size"] - nullable_fields = ["cursor"] - null_default_fields = [] - + optional_fields = set(["cursor", "page_size"]) + nullable_fields = set(["cursor"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/listdocumentelements.py b/src/ragie/models/listdocumentelements.py new file mode 100644 index 0000000..e4208bd --- /dev/null +++ b/src/ragie/models/listdocumentelements.py @@ -0,0 +1,19 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .apidocumentelement import APIDocumentElement, APIDocumentElementTypedDict +from .pagination import Pagination, PaginationTypedDict +from ragie.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class ListDocumentElementsTypedDict(TypedDict): + pagination: PaginationTypedDict + document_elements: List[APIDocumentElementTypedDict] + + +class ListDocumentElements(BaseModel): + pagination: Pagination + + document_elements: List[APIDocumentElement] diff --git a/src/ragie/models/listdocumentsop.py b/src/ragie/models/listdocumentsop.py index da92234..88c602e 100644 --- a/src/ragie/models/listdocumentsop.py +++ b/src/ragie/models/listdocumentsop.py @@ -49,31 +49,26 @@ class ListDocumentsRequest(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["cursor", "page_size", "filter", "partition"] - nullable_fields = ["cursor", "filter", "partition"] - null_default_fields = [] - + optional_fields = set(["cursor", "page_size", "filter", "partition"]) + nullable_fields = set(["cursor", "filter", "partition"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/listentitiesbydocumentop.py b/src/ragie/models/listentitiesbydocumentop.py index 86c01cb..3a98280 100644 --- a/src/ragie/models/listentitiesbydocumentop.py +++ b/src/ragie/models/listentitiesbydocumentop.py @@ -51,31 +51,26 @@ class ListEntitiesByDocumentRequest(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["cursor", "page_size", "partition"] - nullable_fields = ["cursor", "partition"] - null_default_fields = [] - + optional_fields = set(["cursor", "page_size", "partition"]) + nullable_fields = set(["cursor", "partition"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/listentitiesbyinstructionop.py b/src/ragie/models/listentitiesbyinstructionop.py index 3bd6879..929172e 100644 --- a/src/ragie/models/listentitiesbyinstructionop.py +++ b/src/ragie/models/listentitiesbyinstructionop.py @@ -51,31 +51,26 @@ class ListEntitiesByInstructionRequest(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["cursor", "page_size", "partition"] - nullable_fields = ["cursor", "partition"] - null_default_fields = [] - + optional_fields = set(["cursor", "page_size", "partition"]) + nullable_fields = set(["cursor", "partition"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/listinstructionentityextractionlogsop.py b/src/ragie/models/listinstructionentityextractionlogsop.py new file mode 100644 index 0000000..5236144 --- /dev/null +++ b/src/ragie/models/listinstructionentityextractionlogsop.py @@ -0,0 +1,149 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .instructionentityextractionloglist import ( + InstructionEntityExtractionLogList, + InstructionEntityExtractionLogListTypedDict, +) +from datetime import datetime +from enum import Enum +from pydantic import model_serializer +from ragie.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from ragie.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, +) +from typing import Callable, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class QueryParamStatus(str, Enum): + r"""Optional extraction status filter. Supported values are `extracted`, `not_found`, and `error`.""" + + EXTRACTED = "extracted" + NOT_FOUND = "not_found" + ERROR = "error" + + +class ListInstructionEntityExtractionLogsRequestTypedDict(TypedDict): + instruction_id: str + r"""The ID of the instruction.""" + cursor: NotRequired[Nullable[str]] + r"""An opaque cursor for pagination""" + page_size: NotRequired[int] + r"""The number of items per page (must be greater than 0 and less than or equal to 100)""" + document_ids: NotRequired[Nullable[List[str]]] + r"""Optional document IDs to filter extraction logs to.""" + status: NotRequired[Nullable[QueryParamStatus]] + r"""Optional extraction status filter. Supported values are `extracted`, `not_found`, and `error`.""" + created_after: NotRequired[Nullable[datetime]] + r"""Optional ISO 8601 timestamp. Includes only logs with `created_at >= created_after`.""" + created_before: NotRequired[Nullable[datetime]] + r"""Optional ISO 8601 timestamp. Includes only logs with `created_at < created_before`.""" + partition: NotRequired[Nullable[str]] + r"""An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.""" + + +class ListInstructionEntityExtractionLogsRequest(BaseModel): + instruction_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The ID of the instruction.""" + + cursor: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""An opaque cursor for pagination""" + + page_size: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 10 + r"""The number of items per page (must be greater than 0 and less than or equal to 100)""" + + document_ids: Annotated[ + OptionalNullable[List[str]], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Optional document IDs to filter extraction logs to.""" + + status: Annotated[ + OptionalNullable[QueryParamStatus], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Optional extraction status filter. Supported values are `extracted`, `not_found`, and `error`.""" + + created_after: Annotated[ + OptionalNullable[datetime], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Optional ISO 8601 timestamp. Includes only logs with `created_at >= created_after`.""" + + created_before: Annotated[ + OptionalNullable[datetime], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Optional ISO 8601 timestamp. Includes only logs with `created_at < created_before`.""" + + partition: Annotated[ + OptionalNullable[str], + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = UNSET + r"""An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "cursor", + "page_size", + "document_ids", + "status", + "created_after", + "created_before", + "partition", + ] + ) + nullable_fields = set( + [ + "cursor", + "document_ids", + "status", + "created_after", + "created_before", + "partition", + ] + ) + 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 + + +class ListInstructionEntityExtractionLogsResponseTypedDict(TypedDict): + result: InstructionEntityExtractionLogListTypedDict + + +class ListInstructionEntityExtractionLogsResponse(BaseModel): + next: Callable[[], Optional[ListInstructionEntityExtractionLogsResponse]] + + result: InstructionEntityExtractionLogList diff --git a/src/ragie/models/listitem.py b/src/ragie/models/listitem.py new file mode 100644 index 0000000..c5b497d --- /dev/null +++ b/src/ragie/models/listitem.py @@ -0,0 +1,48 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class ListItemTypedDict(TypedDict): + content: str + type: Literal["ListItem"] + + +class ListItem(BaseModel): + content: str + + TYPE: Annotated[ + Annotated[ + Optional[Literal["ListItem"]], AfterValidator(validate_const("ListItem")) + ], + pydantic.Field(alias="type"), + ] = "ListItem" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + ListItem.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/listwebhookendpointsop.py b/src/ragie/models/listwebhookendpointsop.py index ad365c6..c1e0baa 100644 --- a/src/ragie/models/listwebhookendpointsop.py +++ b/src/ragie/models/listwebhookendpointsop.py @@ -31,31 +31,26 @@ class ListWebhookEndpointsRequest(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["cursor", "page_size"] - nullable_fields = ["cursor"] - null_default_fields = [] - + optional_fields = set(["cursor", "page_size"]) + nullable_fields = set(["cursor"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/logo.py b/src/ragie/models/logo.py new file mode 100644 index 0000000..d255a29 --- /dev/null +++ b/src/ragie/models/logo.py @@ -0,0 +1,65 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class LogoTypedDict(TypedDict): + description: str + r"""A detailed description of the logo""" + type: Literal["Logo"] + content: NotRequired[str] + r"""The text visible inside the logo (OCR)""" + base64_data: NotRequired[Nullable[str]] + + +class Logo(BaseModel): + description: str + r"""A detailed description of the logo""" + + TYPE: Annotated[ + Annotated[Optional[Literal["Logo"]], AfterValidator(validate_const("Logo"))], + pydantic.Field(alias="type"), + ] = "Logo" + + content: Optional[str] = "" + r"""The text visible inside the logo (OCR)""" + + base64_data: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type", "content", "base64_data"]) + nullable_fields = set(["base64_data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + Logo.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/mediamodeparam.py b/src/ragie/models/mediamodeparam.py index cc153f9..96f9210 100644 --- a/src/ragie/models/mediamodeparam.py +++ b/src/ragie/models/mediamodeparam.py @@ -10,9 +10,10 @@ class Static(str, Enum): HI_RES = "hi_res" FAST = "fast" + AGENTIC_OCR = "agentic_ocr" -class Video(str, Enum): +class MediaModeParamVideo(str, Enum): AUDIO_ONLY = "audio_only" VIDEO_ONLY = "video_only" AUDIO_VIDEO = "audio_video" @@ -21,7 +22,7 @@ class Video(str, Enum): class MediaModeParamTypedDict(TypedDict): static: NotRequired[Nullable[Static]] audio: NotRequired[Nullable[bool]] - video: NotRequired[Nullable[Video]] + video: NotRequired[Nullable[MediaModeParamVideo]] class MediaModeParam(BaseModel): @@ -29,34 +30,29 @@ class MediaModeParam(BaseModel): audio: OptionalNullable[bool] = UNSET - video: OptionalNullable[Video] = UNSET + video: OptionalNullable[MediaModeParamVideo] = UNSET @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["static", "audio", "video"] - nullable_fields = ["static", "audio", "video"] - null_default_fields = [] - + optional_fields = set(["static", "audio", "video"]) + nullable_fields = set(["static", "audio", "video"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/narrativetext.py b/src/ragie/models/narrativetext.py new file mode 100644 index 0000000..4a8b19f --- /dev/null +++ b/src/ragie/models/narrativetext.py @@ -0,0 +1,51 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class NarrativeTextTypedDict(TypedDict): + content: str + r"""The text content""" + type: Literal["NarrativeText"] + + +class NarrativeText(BaseModel): + content: str + r"""The text content""" + + TYPE: Annotated[ + Annotated[ + Optional[Literal["NarrativeText"]], + AfterValidator(validate_const("NarrativeText")), + ], + pydantic.Field(alias="type"), + ] = "NarrativeText" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + NarrativeText.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/oauthcredentials.py b/src/ragie/models/oauthcredentials.py index 4b7bd7a..c0f31ce 100644 --- a/src/ragie/models/oauthcredentials.py +++ b/src/ragie/models/oauthcredentials.py @@ -39,30 +39,25 @@ class OAuthCredentials(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["domain"] - nullable_fields = ["domain"] - null_default_fields = [] - + optional_fields = set(["domain"]) + nullable_fields = set(["domain"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/oauthurlcreate.py b/src/ragie/models/oauthurlcreate.py index ec79479..0d2e68f 100644 --- a/src/ragie/models/oauthurlcreate.py +++ b/src/ragie/models/oauthurlcreate.py @@ -2,6 +2,7 @@ from __future__ import annotations from .connectorsource import ConnectorSource +from .documentworkflow import DocumentWorkflow from .mediamodeparam import MediaModeParam, MediaModeParamTypedDict from enum import Enum from pydantic import model_serializer @@ -23,6 +24,7 @@ class OAuthURLCreateMode1(str, Enum): HI_RES = "hi_res" FAST = "fast" + AGENTIC_OCR = "agentic_ocr" OAuthURLCreateModeTypedDict = TypeAliasType( @@ -55,6 +57,7 @@ class OAuthURLCreateTypedDict(TypedDict): config: NotRequired[Dict[str, Any]] r"""Optional config per connector""" authenticator_id: NotRequired[Nullable[str]] + workflow: NotRequired[Nullable[DocumentWorkflow]] class OAuthURLCreate(BaseModel): @@ -80,47 +83,43 @@ class OAuthURLCreate(BaseModel): authenticator_id: OptionalNullable[str] = UNSET + workflow: OptionalNullable[DocumentWorkflow] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "partition", - "source_type", - "metadata", - "mode", - "theme", - "page_limit", - "config", - "authenticator_id", - ] - nullable_fields = [ - "partition", - "mode", - "theme", - "page_limit", - "authenticator_id", - ] - null_default_fields = [] - + optional_fields = set( + [ + "partition", + "source_type", + "metadata", + "mode", + "theme", + "page_limit", + "config", + "authenticator_id", + "workflow", + ] + ) + nullable_fields = set( + ["partition", "mode", "theme", "page_limit", "authenticator_id", "workflow"] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/orderedlist.py b/src/ragie/models/orderedlist.py new file mode 100644 index 0000000..2967a88 --- /dev/null +++ b/src/ragie/models/orderedlist.py @@ -0,0 +1,51 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class OrderedListTypedDict(TypedDict): + content: str + r"""The text content of the list and each list item.""" + type: Literal["OrderedList"] + + +class OrderedList(BaseModel): + content: str + r"""The text content of the list and each list item.""" + + TYPE: Annotated[ + Annotated[ + Optional[Literal["OrderedList"]], + AfterValidator(validate_const("OrderedList")), + ], + pydantic.Field(alias="type"), + ] = "OrderedList" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + OrderedList.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/outputtokendetails.py b/src/ragie/models/outputtokendetails.py index bba6c40..4493577 100644 --- a/src/ragie/models/outputtokendetails.py +++ b/src/ragie/models/outputtokendetails.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from ragie.types import BaseModel +from pydantic import model_serializer +from ragie.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -12,3 +13,19 @@ class OutputTokenDetailsTypedDict(TypedDict): class OutputTokenDetails(BaseModel): reasoning_tokens: Optional[int] = 0 + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["reasoning_tokens"]) + 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/ragie/models/pagebreak.py b/src/ragie/models/pagebreak.py new file mode 100644 index 0000000..a0a59ef --- /dev/null +++ b/src/ragie/models/pagebreak.py @@ -0,0 +1,45 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class PageBreakTypedDict(TypedDict): + type: Literal["PageBreak"] + + +class PageBreak(BaseModel): + TYPE: Annotated[ + Annotated[ + Optional[Literal["PageBreak"]], AfterValidator(validate_const("PageBreak")) + ], + pydantic.Field(alias="type"), + ] = "PageBreak" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + PageBreak.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/pagination.py b/src/ragie/models/pagination.py index 2bc263a..14ce746 100644 --- a/src/ragie/models/pagination.py +++ b/src/ragie/models/pagination.py @@ -18,30 +18,25 @@ class Pagination(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["next_cursor"] - nullable_fields = ["next_cursor"] - null_default_fields = [] - + optional_fields = set(["next_cursor"]) + nullable_fields = set(["next_cursor"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/partition.py b/src/ragie/models/partition.py index 4bd582a..df309bb 100644 --- a/src/ragie/models/partition.py +++ b/src/ragie/models/partition.py @@ -48,30 +48,25 @@ class Partition(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["limit_exceeded_at"] - nullable_fields = ["limit_exceeded_at", "description", "metadata_schema"] - null_default_fields = [] - + optional_fields = set(["limit_exceeded_at"]) + nullable_fields = set(["limit_exceeded_at", "description", "metadata_schema"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/partitiondetail.py b/src/ragie/models/partitiondetail.py index 5851c8e..66ccb98 100644 --- a/src/ragie/models/partitiondetail.py +++ b/src/ragie/models/partitiondetail.py @@ -53,30 +53,25 @@ class PartitionDetail(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["limit_exceeded_at"] - nullable_fields = ["limit_exceeded_at", "description", "metadata_schema"] - null_default_fields = [] - + optional_fields = set(["limit_exceeded_at"]) + nullable_fields = set(["limit_exceeded_at", "description", "metadata_schema"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/partitionlimitparams.py b/src/ragie/models/partitionlimitparams.py index d4624ba..a73ef27 100644 --- a/src/ragie/models/partitionlimitparams.py +++ b/src/ragie/models/partitionlimitparams.py @@ -72,56 +72,55 @@ class PartitionLimitParams(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "pages_hosted_limit_monthly", - "pages_processed_limit_monthly", - "pages_hosted_limit_max", - "pages_processed_limit_max", - "video_processed_limit_monthly", - "video_processed_limit_max", - "audio_processed_limit_monthly", - "audio_processed_limit_max", - "media_streamed_limit_monthly", - "media_streamed_limit_max", - "media_hosted_limit_monthly", - "media_hosted_limit_max", - ] - nullable_fields = [ - "pages_hosted_limit_monthly", - "pages_processed_limit_monthly", - "pages_hosted_limit_max", - "pages_processed_limit_max", - "video_processed_limit_monthly", - "video_processed_limit_max", - "audio_processed_limit_monthly", - "audio_processed_limit_max", - "media_streamed_limit_monthly", - "media_streamed_limit_max", - "media_hosted_limit_monthly", - "media_hosted_limit_max", - ] - null_default_fields = [] - + optional_fields = set( + [ + "pages_hosted_limit_monthly", + "pages_processed_limit_monthly", + "pages_hosted_limit_max", + "pages_processed_limit_max", + "video_processed_limit_monthly", + "video_processed_limit_max", + "audio_processed_limit_monthly", + "audio_processed_limit_max", + "media_streamed_limit_monthly", + "media_streamed_limit_max", + "media_hosted_limit_monthly", + "media_hosted_limit_max", + ] + ) + nullable_fields = set( + [ + "pages_hosted_limit_monthly", + "pages_processed_limit_monthly", + "pages_hosted_limit_max", + "pages_processed_limit_max", + "video_processed_limit_monthly", + "video_processed_limit_max", + "audio_processed_limit_monthly", + "audio_processed_limit_max", + "media_streamed_limit_monthly", + "media_streamed_limit_max", + "media_hosted_limit_monthly", + "media_hosted_limit_max", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/partitionlimits.py b/src/ragie/models/partitionlimits.py index 114acde..47c7540 100644 --- a/src/ragie/models/partitionlimits.py +++ b/src/ragie/models/partitionlimits.py @@ -72,56 +72,55 @@ class PartitionLimits(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "pages_processed_limit_monthly", - "pages_hosted_limit_monthly", - "pages_processed_limit_max", - "pages_hosted_limit_max", - "video_processed_limit_monthly", - "video_processed_limit_max", - "audio_processed_limit_monthly", - "audio_processed_limit_max", - "media_streamed_limit_monthly", - "media_streamed_limit_max", - "media_hosted_limit_monthly", - "media_hosted_limit_max", - ] - nullable_fields = [ - "pages_processed_limit_monthly", - "pages_hosted_limit_monthly", - "pages_processed_limit_max", - "pages_hosted_limit_max", - "video_processed_limit_monthly", - "video_processed_limit_max", - "audio_processed_limit_monthly", - "audio_processed_limit_max", - "media_streamed_limit_monthly", - "media_streamed_limit_max", - "media_hosted_limit_monthly", - "media_hosted_limit_max", - ] - null_default_fields = [] - + optional_fields = set( + [ + "pages_processed_limit_monthly", + "pages_hosted_limit_monthly", + "pages_processed_limit_max", + "pages_hosted_limit_max", + "video_processed_limit_monthly", + "video_processed_limit_max", + "audio_processed_limit_monthly", + "audio_processed_limit_max", + "media_streamed_limit_monthly", + "media_streamed_limit_max", + "media_hosted_limit_monthly", + "media_hosted_limit_max", + ] + ) + nullable_fields = set( + [ + "pages_processed_limit_monthly", + "pages_hosted_limit_monthly", + "pages_processed_limit_max", + "pages_hosted_limit_max", + "video_processed_limit_monthly", + "video_processed_limit_max", + "audio_processed_limit_monthly", + "audio_processed_limit_max", + "media_streamed_limit_monthly", + "media_streamed_limit_max", + "media_hosted_limit_monthly", + "media_hosted_limit_max", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/patchdocumentmetadataop.py b/src/ragie/models/patchdocumentmetadataop.py index 4c9296c..c9b67c5 100644 --- a/src/ragie/models/patchdocumentmetadataop.py +++ b/src/ragie/models/patchdocumentmetadataop.py @@ -52,31 +52,26 @@ class PatchDocumentMetadataRequest(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["partition"] - nullable_fields = ["partition"] - null_default_fields = [] - + optional_fields = set(["partition"]) + nullable_fields = set(["partition"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/patchdocumentmetadataparams.py b/src/ragie/models/patchdocumentmetadataparams.py index 14e5f57..4caf825 100644 --- a/src/ragie/models/patchdocumentmetadataparams.py +++ b/src/ragie/models/patchdocumentmetadataparams.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from ragie.types import BaseModel +from pydantic import model_serializer +from ragie.types import BaseModel, UNSET_SENTINEL from typing import Any, Dict, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -20,3 +21,25 @@ class PatchDocumentMetadataParams(BaseModel): async_: Annotated[Optional[bool], pydantic.Field(alias="async")] = False r"""Whether to run the metadata update asynchronously. If true, the metadata update will be run in the background and the response will be 202. If false, the metadata update will be run synchronously and the response will be 200.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["async"]) + 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: + PatchDocumentMetadataParams.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/updateinstructionop.py b/src/ragie/models/patchinstructionop.py similarity index 62% rename from src/ragie/models/updateinstructionop.py rename to src/ragie/models/patchinstructionop.py index 88b6eb3..3db922c 100644 --- a/src/ragie/models/updateinstructionop.py +++ b/src/ragie/models/patchinstructionop.py @@ -1,28 +1,28 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .updateinstructionparams import ( - UpdateInstructionParams, - UpdateInstructionParamsTypedDict, +from .patchinstructionparams import ( + PatchInstructionParams, + PatchInstructionParamsTypedDict, ) from ragie.types import BaseModel from ragie.utils import FieldMetadata, PathParamMetadata, RequestMetadata from typing_extensions import Annotated, TypedDict -class UpdateInstructionRequestTypedDict(TypedDict): +class PatchInstructionRequestTypedDict(TypedDict): instruction_id: str r"""The ID of the instruction.""" - update_instruction_params: UpdateInstructionParamsTypedDict + patch_instruction_params: PatchInstructionParamsTypedDict -class UpdateInstructionRequest(BaseModel): +class PatchInstructionRequest(BaseModel): instruction_id: Annotated[ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) ] r"""The ID of the instruction.""" - update_instruction_params: Annotated[ - UpdateInstructionParams, + patch_instruction_params: Annotated[ + PatchInstructionParams, FieldMetadata(request=RequestMetadata(media_type="application/json")), ] diff --git a/src/ragie/models/patchinstructionparams.py b/src/ragie/models/patchinstructionparams.py new file mode 100644 index 0000000..7182886 --- /dev/null +++ b/src/ragie/models/patchinstructionparams.py @@ -0,0 +1,86 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +import pydantic +from pydantic import model_serializer +from ragie.types import BaseModel, UNSET_SENTINEL +from typing import Any, Dict, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PatchInstructionParamsScope(str, Enum): + r"""The scope of the instruction. Determines whether the instruction is applied to the entire document or to each chunk of the document. Options are `'document'` or `'chunk'`. Generally `'document'` should be used when analyzing the full document is desired, such as when generating a summary or determining sentiment, and `'chunk'` should be used when a fine grained search over a document is desired.""" + + DOCUMENT = "document" + CHUNK = "chunk" + + +class PatchInstructionParamsTypedDict(TypedDict): + name: NotRequired[str] + r"""The name of the instruction. Must be unique.""" + active: NotRequired[bool] + r"""Whether the instruction is active. Active instructions are applied to documents when they're created or when their file is updated.""" + scope: NotRequired[PatchInstructionParamsScope] + r"""The scope of the instruction. Determines whether the instruction is applied to the entire document or to each chunk of the document. Options are `'document'` or `'chunk'`. Generally `'document'` should be used when analyzing the full document is desired, such as when generating a summary or determining sentiment, and `'chunk'` should be used when a fine grained search over a document is desired.""" + prompt: NotRequired[str] + r"""A natural language instruction which will be applied to documents as they are created and updated. The results of the `instruction_prompt` will be stored as an `entity` in the schema defined by the `entity_schema` parameter.""" + context_template: NotRequired[str] + r"""An optional mustache style template used to prepend document context to the content sent for entity extraction. Available variables include `document.name`, `document.type`, `document.source`, and nested values under `document.metadata`.""" + entity_schema: NotRequired[Dict[str, Any]] + filter_: NotRequired[Dict[str, Any]] + r"""An optional metadata filter that is matched against document metadata during update and creation. The instruction will only be applied to documents with metadata matching the filter. The following filter operators are supported: $eq - Equal to (number, string, boolean), $ne - Not equal to (number, string, boolean), $gt - Greater than (number), $gte - Greater than or equal to (number), $lt - Less than (number), $lte - Less than or equal to (number), $in - In array (string or number), $nin - Not in array (string or number). The operators can be combined with AND and OR. Read [Metadata & Filters guide](https://docs.ragie.ai/docs/metadata-filters) for more details and examples.""" + + +class PatchInstructionParams(BaseModel): + name: Optional[str] = None + r"""The name of the instruction. Must be unique.""" + + active: Optional[bool] = None + r"""Whether the instruction is active. Active instructions are applied to documents when they're created or when their file is updated.""" + + scope: Optional[PatchInstructionParamsScope] = None + r"""The scope of the instruction. Determines whether the instruction is applied to the entire document or to each chunk of the document. Options are `'document'` or `'chunk'`. Generally `'document'` should be used when analyzing the full document is desired, such as when generating a summary or determining sentiment, and `'chunk'` should be used when a fine grained search over a document is desired.""" + + prompt: Optional[str] = None + r"""A natural language instruction which will be applied to documents as they are created and updated. The results of the `instruction_prompt` will be stored as an `entity` in the schema defined by the `entity_schema` parameter.""" + + context_template: Optional[str] = None + r"""An optional mustache style template used to prepend document context to the content sent for entity extraction. Available variables include `document.name`, `document.type`, `document.source`, and nested values under `document.metadata`.""" + + entity_schema: Optional[Dict[str, Any]] = None + + filter_: Annotated[Optional[Dict[str, Any]], pydantic.Field(alias="filter")] = None + r"""An optional metadata filter that is matched against document metadata during update and creation. The instruction will only be applied to documents with metadata matching the filter. The following filter operators are supported: $eq - Equal to (number, string, boolean), $ne - Not equal to (number, string, boolean), $gt - Greater than (number), $gte - Greater than or equal to (number), $lt - Less than (number), $lte - Less than or equal to (number), $in - In array (string or number), $nin - Not in array (string or number). The operators can be combined with AND and OR. Read [Metadata & Filters guide](https://docs.ragie.ai/docs/metadata-filters) for more details and examples.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "name", + "active", + "scope", + "prompt", + "context_template", + "entity_schema", + "filter", + ] + ) + 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: + PatchInstructionParams.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/planstep.py b/src/ragie/models/planstep.py index 444e54f..b8492f4 100644 --- a/src/ragie/models/planstep.py +++ b/src/ragie/models/planstep.py @@ -2,8 +2,9 @@ from __future__ import annotations import pydantic +from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from ragie.types import BaseModel +from ragie.types import BaseModel, UNSET_SENTINEL from ragie.utils import validate_const from typing import List, Literal, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -32,3 +33,25 @@ class PlanStep(BaseModel): questions_to_answer: Optional[List[str]] = None r"""The questions that need to be answered to answer the original question.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type", "errored", "questions_to_answer"]) + 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: + PlanStep.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/publicbackblazeconnection.py b/src/ragie/models/publicbackblazeconnection.py index 6f8270e..84e39f3 100644 --- a/src/ragie/models/publicbackblazeconnection.py +++ b/src/ragie/models/publicbackblazeconnection.py @@ -26,3 +26,9 @@ class PublicBackblazeConnection(BaseModel): Annotated[Literal["backblaze"], AfterValidator(validate_const("backblaze"))], pydantic.Field(alias="provider"), ] = "backblaze" + + +try: + PublicBackblazeConnection.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/publiccreateconnection.py b/src/ragie/models/publiccreateconnection.py index 1d1e3ff..7b5c30d 100644 --- a/src/ragie/models/publiccreateconnection.py +++ b/src/ragie/models/publiccreateconnection.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .documentworkflow import DocumentWorkflow from .mediamodeparam import MediaModeParam, MediaModeParamTypedDict from .publicbackblazeconnection import ( PublicBackblazeConnection, @@ -19,6 +20,10 @@ PublicS3CompatibleConnection, PublicS3CompatibleConnectionTypedDict, ) +from .publicwebcrawlerconnection import ( + PublicWebcrawlerConnection, + PublicWebcrawlerConnectionTypedDict, +) from .publiczendeskconnection import ( PublicZendeskConnection, PublicZendeskConnectionTypedDict, @@ -46,6 +51,7 @@ PublicGCSConnectionTypedDict, PublicIntercomConnectionTypedDict, PublicS3CompatibleConnectionTypedDict, + PublicWebcrawlerConnectionTypedDict, PublicZendeskConnectionTypedDict, PublicFreshdeskConnectionTypedDict, ], @@ -59,6 +65,7 @@ PublicGCSConnection, PublicIntercomConnection, PublicS3CompatibleConnection, + PublicWebcrawlerConnection, PublicZendeskConnection, ], Field(discriminator="PROVIDER"), @@ -73,6 +80,7 @@ class PublicCreateConnectionTypedDict(TypedDict): config: NotRequired[Nullable[Dict[str, Any]]] metadata: NotRequired[Dict[str, PublicCreateConnectionMetadataTypedDict]] r"""Metadata for the document. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. 1000 total values are allowed. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`, `start_time`, `end_time`, `chunk_content_type`.""" + workflow: NotRequired[Nullable[DocumentWorkflow]] class PublicCreateConnection(BaseModel): @@ -89,32 +97,31 @@ class PublicCreateConnection(BaseModel): metadata: Optional[Dict[str, PublicCreateConnectionMetadata]] = None r"""Metadata for the document. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. 1000 total values are allowed. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`, `start_time`, `end_time`, `chunk_content_type`.""" + workflow: OptionalNullable[DocumentWorkflow] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["partition", "page_limit", "config", "metadata"] - nullable_fields = ["partition", "page_limit", "config"] - null_default_fields = [] - + optional_fields = set( + ["partition", "page_limit", "config", "metadata", "workflow"] + ) + nullable_fields = set(["partition", "page_limit", "config", "workflow"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/publicfreshdeskconnection.py b/src/ragie/models/publicfreshdeskconnection.py index fa9255b..b824709 100644 --- a/src/ragie/models/publicfreshdeskconnection.py +++ b/src/ragie/models/publicfreshdeskconnection.py @@ -31,3 +31,9 @@ class PublicFreshdeskConnection(BaseModel): Annotated[Literal["freshdesk"], AfterValidator(validate_const("freshdesk"))], pydantic.Field(alias="provider"), ] = "freshdesk" + + +try: + PublicFreshdeskConnection.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/publicgcsconnection.py b/src/ragie/models/publicgcsconnection.py index ea2b79d..63dd85c 100644 --- a/src/ragie/models/publicgcsconnection.py +++ b/src/ragie/models/publicgcsconnection.py @@ -25,3 +25,9 @@ class PublicGCSConnection(BaseModel): Annotated[Literal["gcs"], AfterValidator(validate_const("gcs"))], pydantic.Field(alias="provider"), ] = "gcs" + + +try: + PublicGCSConnection.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/publicintercomconnection.py b/src/ragie/models/publicintercomconnection.py index 93f8a69..69a45f6 100644 --- a/src/ragie/models/publicintercomconnection.py +++ b/src/ragie/models/publicintercomconnection.py @@ -26,3 +26,9 @@ class PublicIntercomConnection(BaseModel): Annotated[Literal["intercom"], AfterValidator(validate_const("intercom"))], pydantic.Field(alias="provider"), ] = "intercom" + + +try: + PublicIntercomConnection.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/publics3compatibleconnection.py b/src/ragie/models/publics3compatibleconnection.py index 6136ebd..e269300 100644 --- a/src/ragie/models/publics3compatibleconnection.py +++ b/src/ragie/models/publics3compatibleconnection.py @@ -29,3 +29,9 @@ class PublicS3CompatibleConnection(BaseModel): Annotated[Literal["s3"], AfterValidator(validate_const("s3"))], pydantic.Field(alias="provider"), ] = "s3" + + +try: + PublicS3CompatibleConnection.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/publicwebcrawlerconnection.py b/src/ragie/models/publicwebcrawlerconnection.py new file mode 100644 index 0000000..b68b57b --- /dev/null +++ b/src/ragie/models/publicwebcrawlerconnection.py @@ -0,0 +1,50 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .webcrawlerdata import WebcrawlerData, WebcrawlerDataTypedDict +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Any, Dict, Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PublicWebcrawlerConnectionTypedDict(TypedDict): + data: WebcrawlerDataTypedDict + provider: Literal["webcrawler"] + credentials: NotRequired[Dict[str, Any]] + + +class PublicWebcrawlerConnection(BaseModel): + data: WebcrawlerData + + PROVIDER: Annotated[ + Annotated[Literal["webcrawler"], AfterValidator(validate_const("webcrawler"))], + pydantic.Field(alias="provider"), + ] = "webcrawler" + + credentials: Optional[Dict[str, Any]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["credentials"]) + 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: + PublicWebcrawlerConnection.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/publiczendeskconnection.py b/src/ragie/models/publiczendeskconnection.py index 8d817d8..4c6a885 100644 --- a/src/ragie/models/publiczendeskconnection.py +++ b/src/ragie/models/publiczendeskconnection.py @@ -26,3 +26,9 @@ class PublicZendeskConnection(BaseModel): Annotated[Literal["zendesk"], AfterValidator(validate_const("zendesk"))], pydantic.Field(alias="provider"), ] = "zendesk" + + +try: + PublicZendeskConnection.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/qrcode.py b/src/ragie/models/qrcode.py new file mode 100644 index 0000000..39b6bae --- /dev/null +++ b/src/ragie/models/qrcode.py @@ -0,0 +1,50 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class QRCodeTypedDict(TypedDict): + content: str + r"""The value the QR code represents""" + type: Literal["QrCode"] + + +class QRCode(BaseModel): + content: str + r"""The value the QR code represents""" + + TYPE: Annotated[ + Annotated[ + Optional[Literal["QrCode"]], AfterValidator(validate_const("QrCode")) + ], + pydantic.Field(alias="type"), + ] = "QrCode" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + QRCode.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/quote.py b/src/ragie/models/quote.py new file mode 100644 index 0000000..3e4bea2 --- /dev/null +++ b/src/ragie/models/quote.py @@ -0,0 +1,48 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class QuoteTypedDict(TypedDict): + content: str + r"""The text content""" + type: Literal["Quote"] + + +class Quote(BaseModel): + content: str + r"""The text content""" + + TYPE: Annotated[ + Annotated[Optional[Literal["Quote"]], AfterValidator(validate_const("Quote"))], + pydantic.Field(alias="type"), + ] = "Quote" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + Quote.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/ragie_api_schema_response_usage.py b/src/ragie/models/ragie_api_schema_response_usage.py index 7e8a1b3..29065fb 100644 --- a/src/ragie/models/ragie_api_schema_response_usage.py +++ b/src/ragie/models/ragie_api_schema_response_usage.py @@ -3,7 +3,8 @@ from __future__ import annotations from .inputtokendetails import InputTokenDetails, InputTokenDetailsTypedDict from .outputtokendetails import OutputTokenDetails, OutputTokenDetailsTypedDict -from ragie.types import BaseModel +from pydantic import model_serializer +from ragie.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -26,3 +27,19 @@ class RagieAPISchemaResponseUsage(BaseModel): input_token_details: Optional[InputTokenDetails] = None output_token_details: Optional[OutputTokenDetails] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["input_token_details", "output_token_details"]) + 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/ragie/models/ragieevidence.py b/src/ragie/models/ragieevidence.py index d60b83f..9b8d251 100644 --- a/src/ragie/models/ragieevidence.py +++ b/src/ragie/models/ragieevidence.py @@ -3,8 +3,9 @@ from __future__ import annotations from .searchresultlink import SearchResultLink, SearchResultLinkTypedDict import pydantic +from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from ragie.types import BaseModel +from ragie.types import BaseModel, UNSET_SENTINEL from ragie.utils import validate_const from typing import Any, Dict, Literal, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -57,3 +58,25 @@ class RagieEvidence(BaseModel): links: Optional[Dict[str, SearchResultLink]] = None r"""The links to the evidence.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type", "metadata", "document_metadata", "links"]) + 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: + RagieEvidence.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/reasoning.py b/src/ragie/models/reasoning.py index 4d0a835..cd34e70 100644 --- a/src/ragie/models/reasoning.py +++ b/src/ragie/models/reasoning.py @@ -26,30 +26,25 @@ class Reasoning(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["summary"] - nullable_fields = ["summary"] - null_default_fields = [] - + optional_fields = set(["summary"]) + nullable_fields = set(["summary"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/reasoningoutput.py b/src/ragie/models/reasoningoutput.py index aa491bd..9d1b258 100644 --- a/src/ragie/models/reasoningoutput.py +++ b/src/ragie/models/reasoningoutput.py @@ -5,8 +5,9 @@ from .reasoningtext import ReasoningText, ReasoningTextTypedDict from enum import Enum import pydantic +from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from ragie.types import BaseModel +from ragie.types import BaseModel, UNSET_SENTINEL from ragie.utils import validate_const from typing import List, Literal, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -52,3 +53,25 @@ class ReasoningOutput(BaseModel): ] = "reasoning" status: Optional[ReasoningOutputStatus] = ReasoningOutputStatus.COMPLETED + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type", "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 + + +try: + ReasoningOutput.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/reasoningsummary.py b/src/ragie/models/reasoningsummary.py index 24a5f75..46f18ef 100644 --- a/src/ragie/models/reasoningsummary.py +++ b/src/ragie/models/reasoningsummary.py @@ -2,8 +2,9 @@ from __future__ import annotations import pydantic +from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from ragie.types import BaseModel +from ragie.types import BaseModel, UNSET_SENTINEL from ragie.utils import validate_const from typing import Literal, Optional from typing_extensions import Annotated, TypedDict @@ -25,3 +26,25 @@ class ReasoningSummary(BaseModel): ], pydantic.Field(alias="type"), ] = "summary" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + ReasoningSummary.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/reasoningtext.py b/src/ragie/models/reasoningtext.py index b777d3c..2c99ad0 100644 --- a/src/ragie/models/reasoningtext.py +++ b/src/ragie/models/reasoningtext.py @@ -2,8 +2,9 @@ from __future__ import annotations import pydantic +from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from ragie.types import BaseModel +from ragie.types import BaseModel, UNSET_SENTINEL from ragie.utils import validate_const from typing import Literal, Optional from typing_extensions import Annotated, TypedDict @@ -26,3 +27,25 @@ class ReasoningText(BaseModel): ], pydantic.Field(alias="type"), ] = "reasoning_text" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + ReasoningText.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/request.py b/src/ragie/models/request.py index 382b7e7..a0e3785 100644 --- a/src/ragie/models/request.py +++ b/src/ragie/models/request.py @@ -52,30 +52,31 @@ class Request(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["instructions", "tools", "model", "reasoning", "stream"] - nullable_fields = ["instructions"] - null_default_fields = [] - + optional_fields = set(["instructions", "tools", "model", "reasoning", "stream"]) + nullable_fields = set(["instructions"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m + + +try: + Request.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/response.py b/src/ragie/models/response.py index 61fdf46..4c52785 100644 --- a/src/ragie/models/response.py +++ b/src/ragie/models/response.py @@ -22,7 +22,7 @@ from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict -class Status(str, Enum): +class ResponseStatus(str, Enum): COMPLETED = "completed" FAILED = "failed" IN_PROGRESS = "in_progress" @@ -51,7 +51,7 @@ class Status(str, Enum): class ResponseTypedDict(TypedDict): id: str created_at: int - status: Status + status: ResponseStatus output: List[OutputTypedDict] tools: List[ToolTypedDict] reasoning: ReasoningTypedDict @@ -79,7 +79,7 @@ class Response(BaseModel): created_at: int - status: Status + status: ResponseStatus output: List[Output] @@ -142,55 +142,60 @@ class Response(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "object", - "error", - "incomplete_details", - "instructions", - "max_output_tokens", - "model", - "output_parsed", - "parallel_tool_calls", - "store", - "temperature", - "previous_response_id", - "tool_choice", - "top_p", - "truncation", - "user", - "metadata", - ] - nullable_fields = [ - "error", - "incomplete_details", - "instructions", - "max_output_tokens", - "output_parsed", - "previous_response_id", - "user", - ] - null_default_fields = [] - + optional_fields = set( + [ + "object", + "error", + "incomplete_details", + "instructions", + "max_output_tokens", + "model", + "output_parsed", + "parallel_tool_calls", + "store", + "temperature", + "previous_response_id", + "tool_choice", + "top_p", + "truncation", + "user", + "metadata", + ] + ) + nullable_fields = set( + [ + "error", + "incomplete_details", + "instructions", + "max_output_tokens", + "output_parsed", + "previous_response_id", + "user", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m + + +try: + Response.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/responsecontent.py b/src/ragie/models/responsecontent.py index a18c622..3be1032 100644 --- a/src/ragie/models/responsecontent.py +++ b/src/ragie/models/responsecontent.py @@ -2,8 +2,9 @@ from __future__ import annotations import pydantic +from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from ragie.types import BaseModel +from ragie.types import BaseModel, UNSET_SENTINEL from ragie.utils import validate_const from typing import Any, Dict, List, Literal, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -24,3 +25,25 @@ class ResponseContent(BaseModel): ] = "text" annotations: Optional[List[Dict[str, Any]]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type", "annotations"]) + 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: + ResponseContent.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/responseok.py b/src/ragie/models/responseok.py index ca0e261..38973dc 100644 --- a/src/ragie/models/responseok.py +++ b/src/ragie/models/responseok.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from ragie.types import BaseModel +from pydantic import model_serializer +from ragie.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -12,3 +13,19 @@ class ResponseOKTypedDict(TypedDict): class ResponseOK(BaseModel): message: Optional[str] = "ok" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["message"]) + 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/ragie/models/responseoutputmessage.py b/src/ragie/models/responseoutputmessage.py index 919a1aa..0597099 100644 --- a/src/ragie/models/responseoutputmessage.py +++ b/src/ragie/models/responseoutputmessage.py @@ -3,8 +3,9 @@ from __future__ import annotations from .responsecontent import ResponseContent, ResponseContentTypedDict import pydantic +from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from ragie.types import BaseModel +from ragie.types import BaseModel, UNSET_SENTINEL from ragie.utils import validate_const from typing import List, Literal, Optional from typing_extensions import Annotated, TypedDict @@ -35,3 +36,25 @@ class ResponseOutputMessage(BaseModel): ], pydantic.Field(alias="role"), ] = "assistant" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type", "role"]) + 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: + ResponseOutputMessage.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/retrieveparams.py b/src/ragie/models/retrieveparams.py index 3f8b7d0..6c20f72 100644 --- a/src/ragie/models/retrieveparams.py +++ b/src/ragie/models/retrieveparams.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from ragie.types import BaseModel +from pydantic import model_serializer +from ragie.types import BaseModel, UNSET_SENTINEL from typing import Any, Dict, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -43,3 +44,34 @@ class RetrieveParams(BaseModel): recency_bias: Optional[bool] = False r"""Enables recency bias which will favor more recent documents vs older documents. https://docs.ragie.ai/docs/retrievals-recency-bias""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "top_k", + "filter", + "rerank", + "max_chunks_per_document", + "partition", + "recency_bias", + ] + ) + 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: + RetrieveParams.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/s3compatiblecredentials.py b/src/ragie/models/s3compatiblecredentials.py index 17a9816..0e72023 100644 --- a/src/ragie/models/s3compatiblecredentials.py +++ b/src/ragie/models/s3compatiblecredentials.py @@ -24,30 +24,25 @@ class S3CompatibleCredentials(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["endpoint"] - nullable_fields = ["endpoint"] - null_default_fields = [] - + optional_fields = set(["endpoint"]) + nullable_fields = set(["endpoint"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/scoredchunk.py b/src/ragie/models/scoredchunk.py index 3ed49b4..3a04279 100644 --- a/src/ragie/models/scoredchunk.py +++ b/src/ragie/models/scoredchunk.py @@ -2,7 +2,8 @@ from __future__ import annotations from .link import Link, LinkTypedDict -from ragie.types import BaseModel +from pydantic import model_serializer +from ragie.types import BaseModel, UNSET_SENTINEL from typing import Any, Dict, Optional from typing_extensions import NotRequired, TypedDict @@ -37,3 +38,19 @@ class ScoredChunk(BaseModel): links: Dict[str, Link] metadata: Optional[Dict[str, Any]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["metadata"]) + 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/ragie/models/searchstep.py b/src/ragie/models/searchstep.py index 7c6d4c2..efa52c9 100644 --- a/src/ragie/models/searchstep.py +++ b/src/ragie/models/searchstep.py @@ -3,8 +3,9 @@ from __future__ import annotations from .search import Search, SearchTypedDict import pydantic +from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from ragie.types import BaseModel +from ragie.types import BaseModel, UNSET_SENTINEL from ragie.utils import validate_const from typing import Literal, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -34,3 +35,25 @@ class SearchStep(BaseModel): ] = "base_search" errored: Optional[bool] = False + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type", "errored"]) + 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: + SearchStep.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/searchstepwithquerydetails.py b/src/ragie/models/searchstepwithquerydetails.py index 277ea69..29691f4 100644 --- a/src/ragie/models/searchstepwithquerydetails.py +++ b/src/ragie/models/searchstepwithquerydetails.py @@ -4,8 +4,9 @@ from .querydetails import QueryDetails, QueryDetailsTypedDict from .search import Search, SearchTypedDict import pydantic +from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from ragie.types import BaseModel +from ragie.types import BaseModel, UNSET_SENTINEL from ragie.utils import validate_const from typing import List, Literal, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -42,3 +43,25 @@ class SearchStepWithQueryDetails(BaseModel): search_log: Optional[str] = "" r"""A log of the search results you found.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type", "errored", "query_details", "search_log"]) + 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: + SearchStepWithQueryDetails.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/sectionheader.py b/src/ragie/models/sectionheader.py new file mode 100644 index 0000000..1f890a1 --- /dev/null +++ b/src/ragie/models/sectionheader.py @@ -0,0 +1,51 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class SectionHeaderTypedDict(TypedDict): + content: str + r"""The text content""" + type: Literal["SectionHeader"] + + +class SectionHeader(BaseModel): + content: str + r"""The text content""" + + TYPE: Annotated[ + Annotated[ + Optional[Literal["SectionHeader"]], + AfterValidator(validate_const("SectionHeader")), + ], + pydantic.Field(alias="type"), + ] = "SectionHeader" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + SectionHeader.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/setconnectionenabledpayload.py b/src/ragie/models/setconnectionenabledpayload.py index d9b95f4..514b182 100644 --- a/src/ragie/models/setconnectionenabledpayload.py +++ b/src/ragie/models/setconnectionenabledpayload.py @@ -24,30 +24,25 @@ class SetConnectionEnabledPayload(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["reason"] - nullable_fields = ["reason"] - null_default_fields = [] - + optional_fields = set(["reason"]) + nullable_fields = set(["reason"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/sharepointdata.py b/src/ragie/models/sharepointdata.py index 9237bf8..1957c78 100644 --- a/src/ragie/models/sharepointdata.py +++ b/src/ragie/models/sharepointdata.py @@ -25,30 +25,14 @@ class SharepointData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["drive"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m diff --git a/src/ragie/models/sharepointfiledata.py b/src/ragie/models/sharepointfiledata.py index 367ee6c..fcf3a61 100644 --- a/src/ragie/models/sharepointfiledata.py +++ b/src/ragie/models/sharepointfiledata.py @@ -33,30 +33,14 @@ class SharepointFileData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["drive_id"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m diff --git a/src/ragie/models/signature.py b/src/ragie/models/signature.py new file mode 100644 index 0000000..8ec9d49 --- /dev/null +++ b/src/ragie/models/signature.py @@ -0,0 +1,84 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class SignatureTypedDict(TypedDict): + content: str + r"""Content of the signature.""" + description: str + r"""A detailed description of the signature.""" + label: str + r"""The printed text indicating who should sign (e.g., 'Driver Signature', 'Authorized By').""" + is_signed: bool + r"""True if a handwritten signature, digital signature, or stamp is present. False if blank.""" + type: Literal["Signature"] + signer_name: NotRequired[Nullable[str]] + r"""The name of the signer""" + date_: NotRequired[Nullable[str]] + r"""The date of the signature if present""" + + +class Signature(BaseModel): + content: str + r"""Content of the signature.""" + + description: str + r"""A detailed description of the signature.""" + + label: str + r"""The printed text indicating who should sign (e.g., 'Driver Signature', 'Authorized By').""" + + is_signed: bool + r"""True if a handwritten signature, digital signature, or stamp is present. False if blank.""" + + TYPE: Annotated[ + Annotated[ + Optional[Literal["Signature"]], AfterValidator(validate_const("Signature")) + ], + pydantic.Field(alias="type"), + ] = "Signature" + + signer_name: OptionalNullable[str] = UNSET + r"""The name of the signer""" + + date_: Annotated[OptionalNullable[str], pydantic.Field(alias="date")] = UNSET + r"""The date of the signature if present""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type", "signer_name", "date"]) + nullable_fields = set(["signer_name", "date"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + Signature.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/spreadsheetlocation.py b/src/ragie/models/spreadsheetlocation.py new file mode 100644 index 0000000..d641521 --- /dev/null +++ b/src/ragie/models/spreadsheetlocation.py @@ -0,0 +1,74 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class SpreadsheetLocationTypedDict(TypedDict): + r"""Location within a spreadsheet using cell ranges.""" + + location_type: Literal["spreadsheet"] + range: NotRequired[Nullable[str]] + r"""Excel-style range like 'A1:C10'""" + sheet_name: NotRequired[Nullable[str]] + r"""Name of the sheet""" + sheet_index: NotRequired[Nullable[int]] + r"""0-based index of the sheet""" + + +class SpreadsheetLocation(BaseModel): + r"""Location within a spreadsheet using cell ranges.""" + + LOCATION_TYPE: Annotated[ + Annotated[ + Optional[Literal["spreadsheet"]], + AfterValidator(validate_const("spreadsheet")), + ], + pydantic.Field(alias="location_type"), + ] = "spreadsheet" + + range: OptionalNullable[str] = UNSET + r"""Excel-style range like 'A1:C10'""" + + sheet_name: OptionalNullable[str] = UNSET + r"""Name of the sheet""" + + sheet_index: OptionalNullable[int] = UNSET + r"""0-based index of the sheet""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["location_type", "range", "sheet_name", "sheet_index"]) + nullable_fields = set(["range", "sheet_name", "sheet_index"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + SpreadsheetLocation.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/stamp.py b/src/ragie/models/stamp.py new file mode 100644 index 0000000..92f9cc0 --- /dev/null +++ b/src/ragie/models/stamp.py @@ -0,0 +1,53 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class StampTypedDict(TypedDict): + type: Literal["Stamp"] + content: NotRequired[str] + r"""The text inside the stamp""" + description: NotRequired[str] + r"""A detailed description of what the visual depicts.""" + + +class Stamp(BaseModel): + TYPE: Annotated[ + Annotated[Optional[Literal["Stamp"]], AfterValidator(validate_const("Stamp"))], + pydantic.Field(alias="type"), + ] = "Stamp" + + content: Optional[str] = "" + r"""The text inside the stamp""" + + description: Optional[str] = "" + r"""A detailed description of what the visual depicts.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type", "content", "description"]) + 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: + Stamp.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/subheader.py b/src/ragie/models/subheader.py new file mode 100644 index 0000000..aa18d70 --- /dev/null +++ b/src/ragie/models/subheader.py @@ -0,0 +1,50 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class SubHeaderTypedDict(TypedDict): + content: str + r"""The text content""" + type: Literal["SubHeader"] + + +class SubHeader(BaseModel): + content: str + r"""The text content""" + + TYPE: Annotated[ + Annotated[ + Optional[Literal["SubHeader"]], AfterValidator(validate_const("SubHeader")) + ], + pydantic.Field(alias="type"), + ] = "SubHeader" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + SubHeader.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/surrenderstep.py b/src/ragie/models/surrenderstep.py index cf2e5cf..19a1d0a 100644 --- a/src/ragie/models/surrenderstep.py +++ b/src/ragie/models/surrenderstep.py @@ -3,8 +3,9 @@ from __future__ import annotations from .answer import Answer, AnswerTypedDict import pydantic +from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from ragie.types import BaseModel +from ragie.types import BaseModel, UNSET_SENTINEL from ragie.utils import validate_const from typing import Literal, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -33,3 +34,25 @@ class SurrenderStep(BaseModel): ] = "surrender" errored: Optional[bool] = False + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type", "errored"]) + 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: + SurrenderStep.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/table.py b/src/ragie/models/table.py new file mode 100644 index 0000000..13f60b5 --- /dev/null +++ b/src/ragie/models/table.py @@ -0,0 +1,67 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class TableTypedDict(TypedDict): + content: str + r"""The Table in HTML.""" + description: str + r"""A brief summary of the content in the table.""" + type: Literal["Table"] + header_range: NotRequired[Nullable[str]] + r"""Optional normalized header rows range used for construction.""" + + +class Table(BaseModel): + content: str + r"""The Table in HTML.""" + + description: str + r"""A brief summary of the content in the table.""" + + TYPE: Annotated[ + Annotated[Optional[Literal["Table"]], AfterValidator(validate_const("Table"))], + pydantic.Field(alias="type"), + ] = "Table" + + header_range: OptionalNullable[str] = UNSET + r"""Optional normalized header rows range used for construction.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type", "header_range"]) + nullable_fields = set(["header_range"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + Table.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/tableofcontents.py b/src/ragie/models/tableofcontents.py new file mode 100644 index 0000000..9f57549 --- /dev/null +++ b/src/ragie/models/tableofcontents.py @@ -0,0 +1,51 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class TableOfContentsTypedDict(TypedDict): + content: str + r"""Text content of the table of contents""" + type: Literal["TableOfContents"] + + +class TableOfContents(BaseModel): + content: str + r"""Text content of the table of contents""" + + TYPE: Annotated[ + Annotated[ + Optional[Literal["TableOfContents"]], + AfterValidator(validate_const("TableOfContents")), + ], + pydantic.Field(alias="type"), + ] = "TableOfContents" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + TableOfContents.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/text.py b/src/ragie/models/text.py new file mode 100644 index 0000000..42529ab --- /dev/null +++ b/src/ragie/models/text.py @@ -0,0 +1,53 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class TextTypedDict(TypedDict): + content: str + r"""The text content""" + type: Literal["Text"] + handwritten: NotRequired[bool] + r"""True if handwritten, false otherwise""" + + +class Text(BaseModel): + content: str + r"""The text content""" + + TYPE: Annotated[ + Annotated[Optional[Literal["Text"]], AfterValidator(validate_const("Text"))], + pydantic.Field(alias="type"), + ] = "Text" + + handwritten: Optional[bool] = False + r"""True if handwritten, false otherwise""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type", "handwritten"]) + 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: + Text.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/time.py b/src/ragie/models/time.py new file mode 100644 index 0000000..ba45839 --- /dev/null +++ b/src/ragie/models/time.py @@ -0,0 +1,48 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class TimeTypedDict(TypedDict): + content: str + r"""The time text content""" + type: Literal["Time"] + + +class Time(BaseModel): + content: str + r"""The time text content""" + + TYPE: Annotated[ + Annotated[Optional[Literal["Time"]], AfterValidator(validate_const("Time"))], + pydantic.Field(alias="type"), + ] = "Time" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + Time.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/title.py b/src/ragie/models/title.py new file mode 100644 index 0000000..4454e4c --- /dev/null +++ b/src/ragie/models/title.py @@ -0,0 +1,48 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class TitleTypedDict(TypedDict): + content: str + r"""The text content""" + type: Literal["Title"] + + +class Title(BaseModel): + content: str + r"""The text content""" + + TYPE: Annotated[ + Annotated[Optional[Literal["Title"]], AfterValidator(validate_const("Title"))], + pydantic.Field(alias="type"), + ] = "Title" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + Title.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/tool.py b/src/ragie/models/tool.py index eefa689..a8931e9 100644 --- a/src/ragie/models/tool.py +++ b/src/ragie/models/tool.py @@ -21,3 +21,9 @@ class Tool(BaseModel): Annotated[Literal["retrieve"], AfterValidator(validate_const("retrieve"))], pydantic.Field(alias="type"), ] = "retrieve" + + +try: + Tool.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/uncategorizedtext.py b/src/ragie/models/uncategorizedtext.py new file mode 100644 index 0000000..e200155 --- /dev/null +++ b/src/ragie/models/uncategorizedtext.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from ragie.types import BaseModel +from typing_extensions import TypedDict + + +class UncategorizedTextTypedDict(TypedDict): + content: str + r"""The text content""" + + +class UncategorizedText(BaseModel): + content: str + r"""The text content""" diff --git a/src/ragie/models/unorderedlist.py b/src/ragie/models/unorderedlist.py new file mode 100644 index 0000000..b5be301 --- /dev/null +++ b/src/ragie/models/unorderedlist.py @@ -0,0 +1,51 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class UnorderedListTypedDict(TypedDict): + content: str + r"""The text content of the list and each list item.""" + type: Literal["UnorderedList"] + + +class UnorderedList(BaseModel): + content: str + r"""The text content of the list and each list item.""" + + TYPE: Annotated[ + Annotated[ + Optional[Literal["UnorderedList"]], + AfterValidator(validate_const("UnorderedList")), + ], + pydantic.Field(alias="type"), + ] = "UnorderedList" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + UnorderedList.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/updatedocumentfileop.py b/src/ragie/models/updatedocumentfileop.py index 0dd380b..58af8f1 100644 --- a/src/ragie/models/updatedocumentfileop.py +++ b/src/ragie/models/updatedocumentfileop.py @@ -43,30 +43,25 @@ class UpdateDocumentFileRequest(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["partition"] - nullable_fields = ["partition"] - null_default_fields = [] - + optional_fields = set(["partition"]) + nullable_fields = set(["partition"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member + 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 is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/updatedocumentfileparams.py b/src/ragie/models/updatedocumentfileparams.py index 7c2f0a4..e4e87a2 100644 --- a/src/ragie/models/updatedocumentfileparams.py +++ b/src/ragie/models/updatedocumentfileparams.py @@ -24,6 +24,11 @@ class UpdateDocumentFileParams21(str, Enum): FAST = "fast" +class UpdateDocumentFileParamsModeStatic(str, Enum): + HI_RES = "hi_res" + FAST = "fast" + + Mode2TypedDict = TypeAliasType( "Mode2TypedDict", Union[UpdateDocumentFileParams22TypedDict, UpdateDocumentFileParams21], @@ -35,11 +40,6 @@ class UpdateDocumentFileParams21(str, Enum): ) -class UpdateDocumentFileParamsModeStatic(str, Enum): - HI_RES = "hi_res" - FAST = "fast" - - class UpdateDocumentFileParamsModeVideo(str, Enum): AUDIO_ONLY = "audio_only" VIDEO_ONLY = "video_only" @@ -61,31 +61,26 @@ class UpdateDocumentFileParamsMode1(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["static", "audio", "video"] - nullable_fields = ["static", "audio", "video"] - null_default_fields = [] - + optional_fields = set(["static", "audio", "video"]) + nullable_fields = set(["static", "audio", "video"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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 @@ -94,13 +89,121 @@ def serialize_model(self, handler): "UpdateDocumentFileParamsModeTypedDict", Union[UpdateDocumentFileParamsMode1TypedDict, Mode2TypedDict], ) -r"""Partition strategy for the document. Different strategies exist for textual, audio and video file types and you can set the strategy you want for each file type, or just for textual types. For textual documents the options are `'hi_res'` or `'fast'`. When set to `'hi_res'`, images and tables will be extracted from the document. `'fast'` will only extract text. `'fast'` may be up to 20x faster than `'hi_res'`. `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. Images will always be processed in `hi_res`. If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. For audio files, the options are true or false. True if you want to process audio, false otherwise. For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. `'audio_only'` will extract just the audio part of the video. `'video_only'` will similarly just extract the video part, ignoring audio. `'audio_video'` will extract both audio and video. To process all media types at the highest quality, use `'all'`. When you specify audio or video stategies, the format must be a JSON object. In this case, textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. See examples below. Examples Textual documents only \"fast\" Video documents only { \"video\": \"audio_video\" } Specify multiple document types { \"static\": \"hi_res\", \"audio\": true, \"video\": \"video_only\" } Specify only textual or audio document types { \"static\": \"fast\", \"audio\": true } Highest quality processing for all media types \"all\" """ +r"""Partition strategy for the document. +Different strategies exist for textual, audio and video file types and you can set the strategy you want for +each file type, or just for textual types. + +For textual documents the options are `'hi_res'` or `'fast'`. +When set to `'hi_res'`, images and tables will be extracted from the document. +`'fast'` will only extract text. +`'fast'` may be up to 20x faster than `'hi_res'`. +`hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. +Images will always be processed in `hi_res`. +If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. + +For audio files, the options are true or false. True if you want to process audio, false otherwise. + +For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. +`'audio_only'` will extract just the audio part of the video. +`'video_only'` will similarly just extract the video part, ignoring audio. +`'audio_video'` will extract both audio and video. + +To process all media types at the highest quality, use `'all'`. + +When you specify audio or video stategies, the format must be a JSON object. In this case, +textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. +See examples below. + +Examples + +Textual documents only +\"fast\" + +Video documents only +{ +\"video\": \"audio_video\" +} + +Specify multiple document types +{ +\"static\": \"hi_res\", +\"audio\": true, +\"video\": \"video_only\" +} + +Specify only textual or audio document types +{ +\"static\": \"fast\", +\"audio\": true +} + +Highest quality processing for all media types +\"all\" + +Agentic OCR +\"agentic_ocr\" +Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai. +""" UpdateDocumentFileParamsMode = TypeAliasType( "UpdateDocumentFileParamsMode", Union[UpdateDocumentFileParamsMode1, Mode2] ) -r"""Partition strategy for the document. Different strategies exist for textual, audio and video file types and you can set the strategy you want for each file type, or just for textual types. For textual documents the options are `'hi_res'` or `'fast'`. When set to `'hi_res'`, images and tables will be extracted from the document. `'fast'` will only extract text. `'fast'` may be up to 20x faster than `'hi_res'`. `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. Images will always be processed in `hi_res`. If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. For audio files, the options are true or false. True if you want to process audio, false otherwise. For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. `'audio_only'` will extract just the audio part of the video. `'video_only'` will similarly just extract the video part, ignoring audio. `'audio_video'` will extract both audio and video. To process all media types at the highest quality, use `'all'`. When you specify audio or video stategies, the format must be a JSON object. In this case, textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. See examples below. Examples Textual documents only \"fast\" Video documents only { \"video\": \"audio_video\" } Specify multiple document types { \"static\": \"hi_res\", \"audio\": true, \"video\": \"video_only\" } Specify only textual or audio document types { \"static\": \"fast\", \"audio\": true } Highest quality processing for all media types \"all\" """ +r"""Partition strategy for the document. +Different strategies exist for textual, audio and video file types and you can set the strategy you want for +each file type, or just for textual types. + +For textual documents the options are `'hi_res'` or `'fast'`. +When set to `'hi_res'`, images and tables will be extracted from the document. +`'fast'` will only extract text. +`'fast'` may be up to 20x faster than `'hi_res'`. +`hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. +Images will always be processed in `hi_res`. +If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. + +For audio files, the options are true or false. True if you want to process audio, false otherwise. + +For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. +`'audio_only'` will extract just the audio part of the video. +`'video_only'` will similarly just extract the video part, ignoring audio. +`'audio_video'` will extract both audio and video. + +To process all media types at the highest quality, use `'all'`. + +When you specify audio or video stategies, the format must be a JSON object. In this case, +textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. +See examples below. + +Examples + +Textual documents only +\"fast\" + +Video documents only +{ +\"video\": \"audio_video\" +} + +Specify multiple document types +{ +\"static\": \"hi_res\", +\"audio\": true, +\"video\": \"video_only\" +} + +Specify only textual or audio document types +{ +\"static\": \"fast\", +\"audio\": true +} + +Highest quality processing for all media types +\"all\" + +Agentic OCR +\"agentic_ocr\" +Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai. +""" class UpdateDocumentFileParamsFileTypedDict(TypedDict): @@ -126,6 +229,22 @@ class UpdateDocumentFileParamsFile(BaseModel): FieldMetadata(multipart=True), ] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["contentType"]) + 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 + class UpdateDocumentFileParamsTypedDict(TypedDict): file: UpdateDocumentFileParamsFileTypedDict @@ -134,7 +253,61 @@ class UpdateDocumentFileParamsTypedDict(TypedDict): Documents: `.csv` `.doc` `.docx` `.epub` `.epub+zip` `.odt` `.pdf` `.ppt` `.pptx` `.tsv` `.xlsx` `.xls`. PDF files over 2000 pages are not supported in hi_res mode. """ mode: NotRequired[UpdateDocumentFileParamsModeTypedDict] - r"""Partition strategy for the document. Different strategies exist for textual, audio and video file types and you can set the strategy you want for each file type, or just for textual types. For textual documents the options are `'hi_res'` or `'fast'`. When set to `'hi_res'`, images and tables will be extracted from the document. `'fast'` will only extract text. `'fast'` may be up to 20x faster than `'hi_res'`. `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. Images will always be processed in `hi_res`. If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. For audio files, the options are true or false. True if you want to process audio, false otherwise. For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. `'audio_only'` will extract just the audio part of the video. `'video_only'` will similarly just extract the video part, ignoring audio. `'audio_video'` will extract both audio and video. To process all media types at the highest quality, use `'all'`. When you specify audio or video stategies, the format must be a JSON object. In this case, textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. See examples below. Examples Textual documents only \"fast\" Video documents only { \"video\": \"audio_video\" } Specify multiple document types { \"static\": \"hi_res\", \"audio\": true, \"video\": \"video_only\" } Specify only textual or audio document types { \"static\": \"fast\", \"audio\": true } Highest quality processing for all media types \"all\" """ + r"""Partition strategy for the document. + Different strategies exist for textual, audio and video file types and you can set the strategy you want for + each file type, or just for textual types. + + For textual documents the options are `'hi_res'` or `'fast'`. + When set to `'hi_res'`, images and tables will be extracted from the document. + `'fast'` will only extract text. + `'fast'` may be up to 20x faster than `'hi_res'`. + `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. + Images will always be processed in `hi_res`. + If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. + + For audio files, the options are true or false. True if you want to process audio, false otherwise. + + For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. + `'audio_only'` will extract just the audio part of the video. + `'video_only'` will similarly just extract the video part, ignoring audio. + `'audio_video'` will extract both audio and video. + + To process all media types at the highest quality, use `'all'`. + + When you specify audio or video stategies, the format must be a JSON object. In this case, + textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. + See examples below. + + Examples + + Textual documents only + \"fast\" + + Video documents only + { + \"video\": \"audio_video\" + } + + Specify multiple document types + { + \"static\": \"hi_res\", + \"audio\": true, + \"video\": \"video_only\" + } + + Specify only textual or audio document types + { + \"static\": \"fast\", + \"audio\": true + } + + Highest quality processing for all media types + \"all\" + + Agentic OCR + \"agentic_ocr\" + Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai. + """ class UpdateDocumentFileParams(BaseModel): @@ -151,4 +324,74 @@ class UpdateDocumentFileParams(BaseModel): Optional[UpdateDocumentFileParamsMode], FieldMetadata(multipart=MultipartFormMetadata(json=True)), ] = None - r"""Partition strategy for the document. Different strategies exist for textual, audio and video file types and you can set the strategy you want for each file type, or just for textual types. For textual documents the options are `'hi_res'` or `'fast'`. When set to `'hi_res'`, images and tables will be extracted from the document. `'fast'` will only extract text. `'fast'` may be up to 20x faster than `'hi_res'`. `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. Images will always be processed in `hi_res`. If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. For audio files, the options are true or false. True if you want to process audio, false otherwise. For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. `'audio_only'` will extract just the audio part of the video. `'video_only'` will similarly just extract the video part, ignoring audio. `'audio_video'` will extract both audio and video. To process all media types at the highest quality, use `'all'`. When you specify audio or video stategies, the format must be a JSON object. In this case, textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. See examples below. Examples Textual documents only \"fast\" Video documents only { \"video\": \"audio_video\" } Specify multiple document types { \"static\": \"hi_res\", \"audio\": true, \"video\": \"video_only\" } Specify only textual or audio document types { \"static\": \"fast\", \"audio\": true } Highest quality processing for all media types \"all\" """ + r"""Partition strategy for the document. + Different strategies exist for textual, audio and video file types and you can set the strategy you want for + each file type, or just for textual types. + + For textual documents the options are `'hi_res'` or `'fast'`. + When set to `'hi_res'`, images and tables will be extracted from the document. + `'fast'` will only extract text. + `'fast'` may be up to 20x faster than `'hi_res'`. + `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. + Images will always be processed in `hi_res`. + If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. + + For audio files, the options are true or false. True if you want to process audio, false otherwise. + + For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. + `'audio_only'` will extract just the audio part of the video. + `'video_only'` will similarly just extract the video part, ignoring audio. + `'audio_video'` will extract both audio and video. + + To process all media types at the highest quality, use `'all'`. + + When you specify audio or video stategies, the format must be a JSON object. In this case, + textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. + See examples below. + + Examples + + Textual documents only + \"fast\" + + Video documents only + { + \"video\": \"audio_video\" + } + + Specify multiple document types + { + \"static\": \"hi_res\", + \"audio\": true, + \"video\": \"video_only\" + } + + Specify only textual or audio document types + { + \"static\": \"fast\", + \"audio\": true + } + + Highest quality processing for all media types + \"all\" + + Agentic OCR + \"agentic_ocr\" + Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai. + """ + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["mode"]) + 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/ragie/models/updatedocumentfromurlop.py b/src/ragie/models/updatedocumentfromurlop.py index c778e49..2393f8b 100644 --- a/src/ragie/models/updatedocumentfromurlop.py +++ b/src/ragie/models/updatedocumentfromurlop.py @@ -43,30 +43,25 @@ class UpdateDocumentFromURLRequest(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["partition"] - nullable_fields = ["partition"] - null_default_fields = [] - + optional_fields = set(["partition"]) + nullable_fields = set(["partition"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member + 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 is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/updatedocumentfromurlparams.py b/src/ragie/models/updatedocumentfromurlparams.py index 3b6f970..d87cec2 100644 --- a/src/ragie/models/updatedocumentfromurlparams.py +++ b/src/ragie/models/updatedocumentfromurlparams.py @@ -3,7 +3,8 @@ from __future__ import annotations from .mediamodeparam import MediaModeParam, MediaModeParamTypedDict from enum import Enum -from ragie.types import BaseModel +from pydantic import model_serializer +from ragie.types import BaseModel, UNSET_SENTINEL from typing import Optional, Union from typing_extensions import NotRequired, TypeAliasType, TypedDict @@ -11,27 +12,190 @@ class UpdateDocumentFromURLParamsMode1(str, Enum): HI_RES = "hi_res" FAST = "fast" + AGENTIC_OCR = "agentic_ocr" UpdateDocumentFromURLParamsModeTypedDict = TypeAliasType( "UpdateDocumentFromURLParamsModeTypedDict", Union[MediaModeParamTypedDict, UpdateDocumentFromURLParamsMode1], ) -r"""Partition strategy for the document. Different strategies exist for textual, audio and video file types and you can set the strategy you want for each file type, or just for textual types. For textual documents the options are `'hi_res'` or `'fast'`. When set to `'hi_res'`, images and tables will be extracted from the document. `'fast'` will only extract text. `'fast'` may be up to 20x faster than `'hi_res'`. `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. Images will always be processed in `hi_res`. If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. For audio files, the options are true or false. True if you want to process audio, false otherwise. For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. `'audio_only'` will extract just the audio part of the video. `'video_only'` will similarly just extract the video part, ignoring audio. `'audio_video'` will extract both audio and video. To process all media types at the highest quality, use `'all'`. When you specify audio or video stategies, the format must be a JSON object. In this case, textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. See examples below. Examples Textual documents only \"fast\" Video documents only { \"video\": \"audio_video\" } Specify multiple document types { \"static\": \"hi_res\", \"audio\": true, \"video\": \"video_only\" } Specify only textual or audio document types { \"static\": \"fast\", \"audio\": true } Highest quality processing for all media types \"all\" """ +r"""Partition strategy for the document. +Different strategies exist for textual, audio and video file types and you can set the strategy you want for +each file type, or just for textual types. + +For textual documents the options are `'hi_res'` or `'fast'`. +When set to `'hi_res'`, images and tables will be extracted from the document. +`'fast'` will only extract text. +`'fast'` may be up to 20x faster than `'hi_res'`. +`hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. +Images will always be processed in `hi_res`. +If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. + +For audio files, the options are true or false. True if you want to process audio, false otherwise. + +For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. +`'audio_only'` will extract just the audio part of the video. +`'video_only'` will similarly just extract the video part, ignoring audio. +`'audio_video'` will extract both audio and video. + +To process all media types at the highest quality, use `'all'`. + +When you specify audio or video stategies, the format must be a JSON object. In this case, +textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. +See examples below. + +Examples + +Textual documents only +\"fast\" + +Video documents only +{ +\"video\": \"audio_video\" +} + +Specify multiple document types +{ +\"static\": \"hi_res\", +\"audio\": true, +\"video\": \"video_only\" +} + +Specify only textual or audio document types +{ +\"static\": \"fast\", +\"audio\": true +} + +Highest quality processing for all media types +\"all\" + +Agentic OCR +\"agentic_ocr\" +Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai. +""" UpdateDocumentFromURLParamsMode = TypeAliasType( "UpdateDocumentFromURLParamsMode", Union[MediaModeParam, UpdateDocumentFromURLParamsMode1], ) -r"""Partition strategy for the document. Different strategies exist for textual, audio and video file types and you can set the strategy you want for each file type, or just for textual types. For textual documents the options are `'hi_res'` or `'fast'`. When set to `'hi_res'`, images and tables will be extracted from the document. `'fast'` will only extract text. `'fast'` may be up to 20x faster than `'hi_res'`. `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. Images will always be processed in `hi_res`. If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. For audio files, the options are true or false. True if you want to process audio, false otherwise. For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. `'audio_only'` will extract just the audio part of the video. `'video_only'` will similarly just extract the video part, ignoring audio. `'audio_video'` will extract both audio and video. To process all media types at the highest quality, use `'all'`. When you specify audio or video stategies, the format must be a JSON object. In this case, textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. See examples below. Examples Textual documents only \"fast\" Video documents only { \"video\": \"audio_video\" } Specify multiple document types { \"static\": \"hi_res\", \"audio\": true, \"video\": \"video_only\" } Specify only textual or audio document types { \"static\": \"fast\", \"audio\": true } Highest quality processing for all media types \"all\" """ +r"""Partition strategy for the document. +Different strategies exist for textual, audio and video file types and you can set the strategy you want for +each file type, or just for textual types. + +For textual documents the options are `'hi_res'` or `'fast'`. +When set to `'hi_res'`, images and tables will be extracted from the document. +`'fast'` will only extract text. +`'fast'` may be up to 20x faster than `'hi_res'`. +`hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. +Images will always be processed in `hi_res`. +If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. + +For audio files, the options are true or false. True if you want to process audio, false otherwise. + +For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. +`'audio_only'` will extract just the audio part of the video. +`'video_only'` will similarly just extract the video part, ignoring audio. +`'audio_video'` will extract both audio and video. + +To process all media types at the highest quality, use `'all'`. + +When you specify audio or video stategies, the format must be a JSON object. In this case, +textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. +See examples below. + +Examples + +Textual documents only +\"fast\" + +Video documents only +{ +\"video\": \"audio_video\" +} + +Specify multiple document types +{ +\"static\": \"hi_res\", +\"audio\": true, +\"video\": \"video_only\" +} + +Specify only textual or audio document types +{ +\"static\": \"fast\", +\"audio\": true +} + +Highest quality processing for all media types +\"all\" + +Agentic OCR +\"agentic_ocr\" +Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai. +""" class UpdateDocumentFromURLParamsTypedDict(TypedDict): url: str r"""Url of the file to download. Must be publicly accessible and HTTP or HTTPS scheme.""" mode: NotRequired[UpdateDocumentFromURLParamsModeTypedDict] - r"""Partition strategy for the document. Different strategies exist for textual, audio and video file types and you can set the strategy you want for each file type, or just for textual types. For textual documents the options are `'hi_res'` or `'fast'`. When set to `'hi_res'`, images and tables will be extracted from the document. `'fast'` will only extract text. `'fast'` may be up to 20x faster than `'hi_res'`. `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. Images will always be processed in `hi_res`. If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. For audio files, the options are true or false. True if you want to process audio, false otherwise. For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. `'audio_only'` will extract just the audio part of the video. `'video_only'` will similarly just extract the video part, ignoring audio. `'audio_video'` will extract both audio and video. To process all media types at the highest quality, use `'all'`. When you specify audio or video stategies, the format must be a JSON object. In this case, textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. See examples below. Examples Textual documents only \"fast\" Video documents only { \"video\": \"audio_video\" } Specify multiple document types { \"static\": \"hi_res\", \"audio\": true, \"video\": \"video_only\" } Specify only textual or audio document types { \"static\": \"fast\", \"audio\": true } Highest quality processing for all media types \"all\" """ + r"""Partition strategy for the document. + Different strategies exist for textual, audio and video file types and you can set the strategy you want for + each file type, or just for textual types. + + For textual documents the options are `'hi_res'` or `'fast'`. + When set to `'hi_res'`, images and tables will be extracted from the document. + `'fast'` will only extract text. + `'fast'` may be up to 20x faster than `'hi_res'`. + `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. + Images will always be processed in `hi_res`. + If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. + + For audio files, the options are true or false. True if you want to process audio, false otherwise. + + For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. + `'audio_only'` will extract just the audio part of the video. + `'video_only'` will similarly just extract the video part, ignoring audio. + `'audio_video'` will extract both audio and video. + + To process all media types at the highest quality, use `'all'`. + + When you specify audio or video stategies, the format must be a JSON object. In this case, + textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. + See examples below. + + Examples + + Textual documents only + \"fast\" + + Video documents only + { + \"video\": \"audio_video\" + } + + Specify multiple document types + { + \"static\": \"hi_res\", + \"audio\": true, + \"video\": \"video_only\" + } + + Specify only textual or audio document types + { + \"static\": \"fast\", + \"audio\": true + } + + Highest quality processing for all media types + \"all\" + + Agentic OCR + \"agentic_ocr\" + Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai. + """ class UpdateDocumentFromURLParams(BaseModel): @@ -39,4 +203,74 @@ class UpdateDocumentFromURLParams(BaseModel): r"""Url of the file to download. Must be publicly accessible and HTTP or HTTPS scheme.""" mode: Optional[UpdateDocumentFromURLParamsMode] = None - r"""Partition strategy for the document. Different strategies exist for textual, audio and video file types and you can set the strategy you want for each file type, or just for textual types. For textual documents the options are `'hi_res'` or `'fast'`. When set to `'hi_res'`, images and tables will be extracted from the document. `'fast'` will only extract text. `'fast'` may be up to 20x faster than `'hi_res'`. `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. Images will always be processed in `hi_res`. If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. For audio files, the options are true or false. True if you want to process audio, false otherwise. For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. `'audio_only'` will extract just the audio part of the video. `'video_only'` will similarly just extract the video part, ignoring audio. `'audio_video'` will extract both audio and video. To process all media types at the highest quality, use `'all'`. When you specify audio or video stategies, the format must be a JSON object. In this case, textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. See examples below. Examples Textual documents only \"fast\" Video documents only { \"video\": \"audio_video\" } Specify multiple document types { \"static\": \"hi_res\", \"audio\": true, \"video\": \"video_only\" } Specify only textual or audio document types { \"static\": \"fast\", \"audio\": true } Highest quality processing for all media types \"all\" """ + r"""Partition strategy for the document. + Different strategies exist for textual, audio and video file types and you can set the strategy you want for + each file type, or just for textual types. + + For textual documents the options are `'hi_res'` or `'fast'`. + When set to `'hi_res'`, images and tables will be extracted from the document. + `'fast'` will only extract text. + `'fast'` may be up to 20x faster than `'hi_res'`. + `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. + Images will always be processed in `hi_res`. + If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. + + For audio files, the options are true or false. True if you want to process audio, false otherwise. + + For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. + `'audio_only'` will extract just the audio part of the video. + `'video_only'` will similarly just extract the video part, ignoring audio. + `'audio_video'` will extract both audio and video. + + To process all media types at the highest quality, use `'all'`. + + When you specify audio or video stategies, the format must be a JSON object. In this case, + textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. + See examples below. + + Examples + + Textual documents only + \"fast\" + + Video documents only + { + \"video\": \"audio_video\" + } + + Specify multiple document types + { + \"static\": \"hi_res\", + \"audio\": true, + \"video\": \"video_only\" + } + + Specify only textual or audio document types + { + \"static\": \"fast\", + \"audio\": true + } + + Highest quality processing for all media types + \"all\" + + Agentic OCR + \"agentic_ocr\" + Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai. + """ + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["mode"]) + 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/ragie/models/updatedocumentrawop.py b/src/ragie/models/updatedocumentrawop.py index b3fe86d..d532a7d 100644 --- a/src/ragie/models/updatedocumentrawop.py +++ b/src/ragie/models/updatedocumentrawop.py @@ -43,30 +43,25 @@ class UpdateDocumentRawRequest(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["partition"] - nullable_fields = ["partition"] - null_default_fields = [] - + optional_fields = set(["partition"]) + nullable_fields = set(["partition"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member + 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 is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/updateinstructionparams.py b/src/ragie/models/updateinstructionparams.py deleted file mode 100644 index c151cdb..0000000 --- a/src/ragie/models/updateinstructionparams.py +++ /dev/null @@ -1,15 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from ragie.types import BaseModel -from typing_extensions import TypedDict - - -class UpdateInstructionParamsTypedDict(TypedDict): - active: bool - r"""Whether the instruction is active. Active instructions are applied to documents when they're created or when their file is updated.""" - - -class UpdateInstructionParams(BaseModel): - active: bool - r"""Whether the instruction is active. Active instructions are applied to documents when they're created or when their file is updated.""" diff --git a/src/ragie/models/updatepartitionparams.py b/src/ragie/models/updatepartitionparams.py index 6194a57..ae49375 100644 --- a/src/ragie/models/updatepartitionparams.py +++ b/src/ragie/models/updatepartitionparams.py @@ -44,30 +44,25 @@ class UpdatePartitionParams(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["context_aware", "description", "metadata_schema"] - nullable_fields = ["context_aware", "description", "metadata_schema"] - null_default_fields = [] - + optional_fields = set(["context_aware", "description", "metadata_schema"]) + nullable_fields = set(["context_aware", "description", "metadata_schema"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/updatewebhookendpointpayload.py b/src/ragie/models/updatewebhookendpointpayload.py index a68b30b..835b13d 100644 --- a/src/ragie/models/updatewebhookendpointpayload.py +++ b/src/ragie/models/updatewebhookendpointpayload.py @@ -24,30 +24,25 @@ class UpdateWebhookEndpointPayload(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["name", "url", "active", "partition_pattern"] - nullable_fields = ["name", "url", "active", "partition_pattern"] - null_default_fields = [] - + optional_fields = set(["name", "url", "active", "partition_pattern"]) + nullable_fields = set(["name", "url", "active", "partition_pattern"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + 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/ragie/models/video.py b/src/ragie/models/video.py new file mode 100644 index 0000000..f96cc55 --- /dev/null +++ b/src/ragie/models/video.py @@ -0,0 +1,48 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class VideoTypedDict(TypedDict): + content: str + r"""A description of what the video shows.""" + type: Literal["Video"] + + +class Video(BaseModel): + content: str + r"""A description of what the video shows.""" + + TYPE: Annotated[ + Annotated[Optional[Literal["Video"]], AfterValidator(validate_const("Video"))], + pydantic.Field(alias="type"), + ] = "Video" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + Video.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/videomodalitydata.py b/src/ragie/models/videomodalitydata.py index 5d1c078..d718b78 100644 --- a/src/ragie/models/videomodalitydata.py +++ b/src/ragie/models/videomodalitydata.py @@ -3,8 +3,9 @@ from __future__ import annotations from .wordtimestamp import WordTimestamp, WordTimestampTypedDict import pydantic +from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from ragie.types import BaseModel +from ragie.types import BaseModel, UNSET_SENTINEL from ragie.utils import validate_const from typing import List, Literal, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -22,3 +23,25 @@ class VideoModalityData(BaseModel): ] = "video" word_timestamps: Optional[List[WordTimestamp]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type", "word_timestamps"]) + 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: + VideoModalityData.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/videosegment.py b/src/ragie/models/videosegment.py new file mode 100644 index 0000000..3e99171 --- /dev/null +++ b/src/ragie/models/videosegment.py @@ -0,0 +1,39 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from pydantic import model_serializer +from ragie.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from typing_extensions import NotRequired, TypedDict + + +class VideoSegmentTypedDict(TypedDict): + content: NotRequired[Nullable[str]] + + +class VideoSegment(BaseModel): + content: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["content"]) + nullable_fields = set(["content"]) + 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/ragie/models/watermark.py b/src/ragie/models/watermark.py new file mode 100644 index 0000000..9121216 --- /dev/null +++ b/src/ragie/models/watermark.py @@ -0,0 +1,50 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from ragie.types import BaseModel, UNSET_SENTINEL +from ragie.utils import validate_const +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class WatermarkTypedDict(TypedDict): + content: str + r"""The text content""" + type: Literal["Watermark"] + + +class Watermark(BaseModel): + content: str + r"""The text content""" + + TYPE: Annotated[ + Annotated[ + Optional[Literal["Watermark"]], AfterValidator(validate_const("Watermark")) + ], + pydantic.Field(alias="type"), + ] = "Watermark" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + Watermark.model_rebuild() +except NameError: + pass diff --git a/src/ragie/models/webcrawlerdata.py b/src/ragie/models/webcrawlerdata.py new file mode 100644 index 0000000..ac2c8ab --- /dev/null +++ b/src/ragie/models/webcrawlerdata.py @@ -0,0 +1,49 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from pydantic import model_serializer +from ragie.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class WebcrawlerDataTypedDict(TypedDict): + url: str + restrict_domain: NotRequired[bool] + max_depth: NotRequired[Nullable[int]] + max_pages: NotRequired[Nullable[int]] + + +class WebcrawlerData(BaseModel): + url: str + + restrict_domain: Optional[bool] = True + + max_depth: OptionalNullable[int] = UNSET + + max_pages: OptionalNullable[int] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["restrict_domain", "max_depth", "max_pages"]) + nullable_fields = set(["max_depth", "max_pages"]) + 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/ragie/models/webhookendpoint.py b/src/ragie/models/webhookendpoint.py index 8fb67a2..11e5bc2 100644 --- a/src/ragie/models/webhookendpoint.py +++ b/src/ragie/models/webhookendpoint.py @@ -15,6 +15,7 @@ class WebhookEndpointTypedDict(TypedDict): url: str partition_pattern: Nullable[str] active: bool + secret: str class WebhookEndpoint(BaseModel): @@ -32,32 +33,18 @@ class WebhookEndpoint(BaseModel): active: bool + secret: str + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["partition_pattern"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m diff --git a/src/ragie/models/wordmodality.py b/src/ragie/models/wordmodality.py new file mode 100644 index 0000000..b4db2b0 --- /dev/null +++ b/src/ragie/models/wordmodality.py @@ -0,0 +1,22 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from ragie.types import BaseModel +from typing_extensions import TypedDict + + +class WordModalityTypedDict(TypedDict): + word: str + probability: float + start: float + end: float + + +class WordModality(BaseModel): + word: str + + probability: float + + start: float + + end: float diff --git a/src/ragie/partitions.py b/src/ragie/partitions.py index e622b08..fb46b48 100644 --- a/src/ragie/partitions.py +++ b/src/ragie/partitions.py @@ -630,24 +630,22 @@ async def get_async( raise models.SDKError("Unexpected response received", http_res) - def update( + def delete( self, *, partition_id: str, - update_partition_params: Union[ - models.UpdatePartitionParams, models.UpdatePartitionParamsTypedDict - ], + async_: OptionalNullable[bool] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.PartitionDetail: - r"""Update Partition + ) -> models.ResponseOK: + r"""Delete Partition - Updates a partition. This includes the partition's description and metadata schema. + Deletes a partition and all of its associated data. This includes connections, documents, and partition specific instructions. This operation is irreversible. :param partition_id: - :param update_partition_params: + :param async_: If true, performs partition deletion asynchronously. :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 @@ -663,33 +661,24 @@ def update( else: base_url = self._get_url(base_url, url_variables) - request = models.UpdatePartitionPartitionsPartitionIDPatchRequest( + request = models.DeletePartitionPartitionsPartitionIDDeleteRequest( partition_id=partition_id, - update_partition_params=utils.get_pydantic_model( - update_partition_params, models.UpdatePartitionParams - ), + async_=async_, ) req = self._build_request( - method="PATCH", + method="DELETE", path="/partitions/{partition_id}", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, + 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, - get_serialized_body=lambda: utils.serialize_request_body( - request.update_partition_params, - False, - False, - "json", - models.UpdatePartitionParams, - ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -706,7 +695,7 @@ def update( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="update_partition_partitions__partition_id__patch", + operation_id="delete_partition_partitions__partition_id__delete", oauth2_scopes=None, security_source=self.sdk_configuration.security, ), @@ -716,8 +705,8 @@ def update( ) response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.PartitionDetail, http_res) + if utils.match_response(http_res, ["200", "202"], "application/json"): + return unmarshal_json_response(models.ResponseOK, http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( models.HTTPValidationErrorData, http_res @@ -738,24 +727,22 @@ def update( raise models.SDKError("Unexpected response received", http_res) - async def update_async( + async def delete_async( self, *, partition_id: str, - update_partition_params: Union[ - models.UpdatePartitionParams, models.UpdatePartitionParamsTypedDict - ], + async_: OptionalNullable[bool] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.PartitionDetail: - r"""Update Partition + ) -> models.ResponseOK: + r"""Delete Partition - Updates a partition. This includes the partition's description and metadata schema. + Deletes a partition and all of its associated data. This includes connections, documents, and partition specific instructions. This operation is irreversible. :param partition_id: - :param update_partition_params: + :param async_: If true, performs partition deletion asynchronously. :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 @@ -771,33 +758,24 @@ async def update_async( else: base_url = self._get_url(base_url, url_variables) - request = models.UpdatePartitionPartitionsPartitionIDPatchRequest( + request = models.DeletePartitionPartitionsPartitionIDDeleteRequest( partition_id=partition_id, - update_partition_params=utils.get_pydantic_model( - update_partition_params, models.UpdatePartitionParams - ), + async_=async_, ) req = self._build_request_async( - method="PATCH", + method="DELETE", path="/partitions/{partition_id}", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, + 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, - get_serialized_body=lambda: utils.serialize_request_body( - request.update_partition_params, - False, - False, - "json", - models.UpdatePartitionParams, - ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -814,7 +792,7 @@ async def update_async( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="update_partition_partitions__partition_id__patch", + operation_id="delete_partition_partitions__partition_id__delete", oauth2_scopes=None, security_source=self.sdk_configuration.security, ), @@ -824,8 +802,8 @@ async def update_async( ) response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.PartitionDetail, http_res) + if utils.match_response(http_res, ["200", "202"], "application/json"): + return unmarshal_json_response(models.ResponseOK, http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( models.HTTPValidationErrorData, http_res @@ -846,22 +824,24 @@ async def update_async( raise models.SDKError("Unexpected response received", http_res) - def delete( + def update( self, *, partition_id: str, - async_: OptionalNullable[bool] = UNSET, + update_partition_params: Union[ + models.UpdatePartitionParams, models.UpdatePartitionParamsTypedDict + ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.ResponseOK: - r"""Delete Partition + ) -> models.PartitionDetail: + r"""Update Partition - Deletes a partition and all of its associated data. This includes connections, documents, and partition specific instructions. This operation is irreversible. + Updates a partition. This includes the partition's description and metadata schema. :param partition_id: - :param async_: If true, performs partition deletion asynchronously. + :param update_partition_params: :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 @@ -877,24 +857,33 @@ def delete( else: base_url = self._get_url(base_url, url_variables) - request = models.DeletePartitionPartitionsPartitionIDDeleteRequest( + request = models.UpdatePartitionPartitionsPartitionIDPatchRequest( partition_id=partition_id, - async_=async_, + update_partition_params=utils.get_pydantic_model( + update_partition_params, models.UpdatePartitionParams + ), ) req = self._build_request( - method="DELETE", + method="PATCH", path="/partitions/{partition_id}", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=False, + 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.update_partition_params, + False, + False, + "json", + models.UpdatePartitionParams, + ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -911,7 +900,7 @@ def delete( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="delete_partition_partitions__partition_id__delete", + operation_id="update_partition_partitions__partition_id__patch", oauth2_scopes=None, security_source=self.sdk_configuration.security, ), @@ -921,8 +910,8 @@ def delete( ) response_data: Any = None - if utils.match_response(http_res, ["200", "202"], "application/json"): - return unmarshal_json_response(models.ResponseOK, http_res) + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.PartitionDetail, http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( models.HTTPValidationErrorData, http_res @@ -943,22 +932,24 @@ def delete( raise models.SDKError("Unexpected response received", http_res) - async def delete_async( + async def update_async( self, *, partition_id: str, - async_: OptionalNullable[bool] = UNSET, + update_partition_params: Union[ + models.UpdatePartitionParams, models.UpdatePartitionParamsTypedDict + ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.ResponseOK: - r"""Delete Partition + ) -> models.PartitionDetail: + r"""Update Partition - Deletes a partition and all of its associated data. This includes connections, documents, and partition specific instructions. This operation is irreversible. + Updates a partition. This includes the partition's description and metadata schema. :param partition_id: - :param async_: If true, performs partition deletion asynchronously. + :param update_partition_params: :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 @@ -974,24 +965,33 @@ async def delete_async( else: base_url = self._get_url(base_url, url_variables) - request = models.DeletePartitionPartitionsPartitionIDDeleteRequest( + request = models.UpdatePartitionPartitionsPartitionIDPatchRequest( partition_id=partition_id, - async_=async_, + update_partition_params=utils.get_pydantic_model( + update_partition_params, models.UpdatePartitionParams + ), ) req = self._build_request_async( - method="DELETE", + method="PATCH", path="/partitions/{partition_id}", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=False, + 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.update_partition_params, + False, + False, + "json", + models.UpdatePartitionParams, + ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -1008,7 +1008,7 @@ async def delete_async( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="delete_partition_partitions__partition_id__delete", + operation_id="update_partition_partitions__partition_id__patch", oauth2_scopes=None, security_source=self.sdk_configuration.security, ), @@ -1018,8 +1018,8 @@ async def delete_async( ) response_data: Any = None - if utils.match_response(http_res, ["200", "202"], "application/json"): - return unmarshal_json_response(models.ResponseOK, http_res) + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.PartitionDetail, http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( models.HTTPValidationErrorData, http_res diff --git a/src/ragie/sdk.py b/src/ragie/sdk.py index a562cf9..9708411 100644 --- a/src/ragie/sdk.py +++ b/src/ragie/sdk.py @@ -18,6 +18,7 @@ from ragie.authenticators import Authenticators from ragie.connections import Connections from ragie.documents import Documents + from ragie.elements import Elements from ragie.entities import Entities from ragie.partitions import Partitions from ragie.responses import Responses @@ -34,6 +35,7 @@ class Ragie(BaseSDK): partitions: "Partitions" authenticators: "Authenticators" responses: "Responses" + elements: "Elements" _sub_sdk_map = { "documents": ("ragie.documents", "Documents"), "retrievals": ("ragie.retrievals", "Retrievals"), @@ -43,14 +45,15 @@ class Ragie(BaseSDK): "partitions": ("ragie.partitions", "Partitions"), "authenticators": ("ragie.authenticators", "Authenticators"), "responses": ("ragie.responses", "Responses"), + "elements": ("ragie.elements", "Elements"), } def __init__( self, auth: Union[str, Callable[[], str]], server_idx: Optional[int] = None, - server_url: Optional[str] = None, url_params: Optional[Dict[str, str]] = None, + server_url: Optional[str] = None, client: Optional[HttpClient] = None, async_client: Optional[AsyncHttpClient] = None, retry_config: OptionalNullable[RetryConfig] = UNSET, diff --git a/src/ragie/utils/__init__.py b/src/ragie/utils/__init__.py index 56164cf..0498cb8 100644 --- a/src/ragie/utils/__init__.py +++ b/src/ragie/utils/__init__.py @@ -1,9 +1,17 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from typing import TYPE_CHECKING -from importlib import import_module -import builtins -import sys +from typing import Any, TYPE_CHECKING, Callable, TypeVar +import asyncio + +from .dynamic_imports import lazy_getattr, lazy_dir + +_T = TypeVar("_T") + + +async def run_sync_in_thread(func: Callable[..., _T], *args) -> _T: + """Run a synchronous function in a thread pool to avoid blocking the event loop.""" + return await asyncio.to_thread(func, *args) + if TYPE_CHECKING: from .annotations import get_discriminator @@ -41,7 +49,6 @@ validate_decimal, validate_float, validate_int, - validate_open_enum, ) from .url import generate_url, template_url, remove_suffix from .values import ( @@ -102,7 +109,6 @@ "validate_const", "validate_float", "validate_int", - "validate_open_enum", "cast_partial", ] @@ -155,43 +161,15 @@ "validate_const": ".serializers", "validate_float": ".serializers", "validate_int": ".serializers", - "validate_open_enum": ".serializers", "cast_partial": ".values", } -def dynamic_import(modname, retries=3): - for attempt in range(retries): - try: - return import_module(modname, __package__) - except KeyError: - # Clear any half-initialized module and retry - sys.modules.pop(modname, None) - if attempt == retries - 1: - break - raise KeyError(f"Failed to import module '{modname}' after {retries} attempts") - - -def __getattr__(attr_name: str) -> object: - module_name = _dynamic_imports.get(attr_name) - if module_name is None: - raise AttributeError( - f"no {attr_name} found in _dynamic_imports, module name -> {__name__} " - ) - - try: - module = dynamic_import(module_name) - return getattr(module, attr_name) - except ImportError as e: - raise ImportError( - f"Failed to import {attr_name} from {module_name}: {e}" - ) from e - except AttributeError as e: - raise AttributeError( - f"Failed to get {attr_name} from {module_name}: {e}" - ) from e +def __getattr__(attr_name: str) -> Any: + return lazy_getattr( + attr_name, package=__package__, dynamic_imports=_dynamic_imports + ) def __dir__(): - lazy_attrs = builtins.list(_dynamic_imports.keys()) - return builtins.sorted(lazy_attrs) + return lazy_dir(dynamic_imports=_dynamic_imports) diff --git a/src/ragie/utils/dynamic_imports.py b/src/ragie/utils/dynamic_imports.py new file mode 100644 index 0000000..673edf8 --- /dev/null +++ b/src/ragie/utils/dynamic_imports.py @@ -0,0 +1,54 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from importlib import import_module +import builtins +import sys + + +def dynamic_import(package, modname, retries=3): + """Import a module relative to package, retrying on KeyError from half-initialized modules.""" + for attempt in range(retries): + try: + return import_module(modname, package) + except KeyError: + sys.modules.pop(modname, None) + if attempt == retries - 1: + break + raise KeyError(f"Failed to import module '{modname}' after {retries} attempts") + + +def lazy_getattr(attr_name, *, package, dynamic_imports, sub_packages=None): + """Module-level __getattr__ that lazily loads from a dynamic_imports mapping. + + Args: + attr_name: The attribute being looked up. + package: The caller's __package__ (for relative imports). + dynamic_imports: Dict mapping attribute names to relative module paths. + sub_packages: Optional list of subpackage names to lazy-load. + """ + module_name = dynamic_imports.get(attr_name) + if module_name is not None: + try: + module = dynamic_import(package, module_name) + return getattr(module, attr_name) + except ImportError as e: + raise ImportError( + f"Failed to import {attr_name} from {module_name}: {e}" + ) from e + except AttributeError as e: + raise AttributeError( + f"Failed to get {attr_name} from {module_name}: {e}" + ) from e + + if sub_packages and attr_name in sub_packages: + return import_module(f".{attr_name}", package) + + raise AttributeError(f"module '{package}' has no attribute '{attr_name}'") + + +def lazy_dir(*, dynamic_imports, sub_packages=None): + """Module-level __dir__ that lists lazily-loadable attributes.""" + lazy_attrs = builtins.list(dynamic_imports.keys()) + if sub_packages: + lazy_attrs.extend(sub_packages) + return builtins.sorted(lazy_attrs) diff --git a/src/ragie/utils/enums.py b/src/ragie/utils/enums.py index c3bc13c..3324e1b 100644 --- a/src/ragie/utils/enums.py +++ b/src/ragie/utils/enums.py @@ -2,6 +2,10 @@ import enum import sys +from typing import Any + +from pydantic_core import core_schema + class OpenEnumMeta(enum.EnumMeta): # The __call__ method `boundary` kwarg was added in 3.11 and must be present @@ -72,3 +76,59 @@ def __call__( ) except ValueError: return value + + def __new__(mcs, name, bases, namespace, **kwargs): + cls = super().__new__(mcs, name, bases, namespace, **kwargs) + + # Add __get_pydantic_core_schema__ to make open enums work correctly + # in union discrimination. In strict mode (used by Pydantic for unions), + # only known enum values match. In lax mode, unknown values are accepted. + def __get_pydantic_core_schema__( + cls_inner: Any, _source_type: Any, _handler: Any + ) -> core_schema.CoreSchema: + # Create a validator that only accepts known enum values (for strict mode) + def validate_strict(v: Any) -> Any: + if isinstance(v, cls_inner): + return v + # Use the parent EnumMeta's __call__ which raises ValueError for unknown values + return enum.EnumMeta.__call__(cls_inner, v) + + # Create a lax validator that accepts unknown values + def validate_lax(v: Any) -> Any: + if isinstance(v, cls_inner): + return v + try: + return enum.EnumMeta.__call__(cls_inner, v) + except ValueError: + # Return the raw value for unknown enum values + return v + + # Determine the base type schema (str or int) + is_int_enum = False + for base in cls_inner.__mro__: + if base is int: + is_int_enum = True + break + if base is str: + break + + base_schema = ( + core_schema.int_schema() + if is_int_enum + else core_schema.str_schema() + ) + + # Use lax_or_strict_schema: + # - strict mode: only known enum values match (raises ValueError for unknown) + # - lax mode: accept any value, return enum member or raw value + return core_schema.lax_or_strict_schema( + lax_schema=core_schema.chain_schema( + [base_schema, core_schema.no_info_plain_validator_function(validate_lax)] + ), + strict_schema=core_schema.chain_schema( + [base_schema, core_schema.no_info_plain_validator_function(validate_strict)] + ), + ) + + setattr(cls, "__get_pydantic_core_schema__", classmethod(__get_pydantic_core_schema__)) + return cls diff --git a/src/ragie/utils/eventstreaming.py b/src/ragie/utils/eventstreaming.py index 0969899..3bdcd6d 100644 --- a/src/ragie/utils/eventstreaming.py +++ b/src/ragie/utils/eventstreaming.py @@ -2,7 +2,9 @@ import re import json +from dataclasses import dataclass, asdict from typing import ( + Any, Callable, Generic, TypeVar, @@ -22,6 +24,7 @@ class EventStream(Generic[T]): client_ref: Optional[object] response: httpx.Response generator: Generator[T, None, None] + _closed: bool def __init__( self, @@ -29,21 +32,28 @@ def __init__( decoder: Callable[[str], T], sentinel: Optional[str] = None, client_ref: Optional[object] = None, + data_required: bool = True, ): self.response = response - self.generator = stream_events(response, decoder, sentinel) + self.generator = stream_events( + response, decoder, sentinel, data_required=data_required + ) self.client_ref = client_ref + self._closed = False def __iter__(self): return self def __next__(self): + if self._closed: + raise StopIteration return next(self.generator) def __enter__(self): return self def __exit__(self, exc_type, exc_val, exc_tb): + self._closed = True self.response.close() @@ -53,6 +63,7 @@ class EventStreamAsync(Generic[T]): client_ref: Optional[object] response: httpx.Response generator: AsyncGenerator[T, None] + _closed: bool def __init__( self, @@ -60,53 +71,65 @@ def __init__( decoder: Callable[[str], T], sentinel: Optional[str] = None, client_ref: Optional[object] = None, + data_required: bool = True, ): self.response = response - self.generator = stream_events_async(response, decoder, sentinel) + self.generator = stream_events_async( + response, decoder, sentinel, data_required=data_required + ) self.client_ref = client_ref + self._closed = False def __aiter__(self): return self async def __anext__(self): + if self._closed: + raise StopAsyncIteration return await self.generator.__anext__() async def __aenter__(self): return self async def __aexit__(self, exc_type, exc_val, exc_tb): + self._closed = True await self.response.aclose() +@dataclass class ServerEvent: id: Optional[str] = None event: Optional[str] = None - data: Optional[str] = None + data: Any = None retry: Optional[int] = None MESSAGE_BOUNDARIES = [ b"\r\n\r\n", - b"\n\n", + b"\r\n\r", + b"\r\n\n", + b"\r\r\n", + b"\n\r\n", b"\r\r", + b"\n\r", + b"\n\n", ] +UTF8_BOM = b"\xef\xbb\xbf" + async def stream_events_async( response: httpx.Response, decoder: Callable[[str], T], sentinel: Optional[str] = None, + data_required: bool = True, ) -> AsyncGenerator[T, None]: buffer = bytearray() position = 0 - discard = False + event_id: Optional[str] = None async for chunk in response.aiter_bytes(): - # We've encountered the sentinel value and should no longer process - # incoming data. Instead we throw new data away until the server closes - # the connection. - if discard: - continue - + if len(buffer) == 0 and chunk.startswith(UTF8_BOM): + chunk = chunk[len(UTF8_BOM) :] buffer += chunk for i in range(position, len(buffer)): char = buffer[i : i + 1] @@ -121,15 +144,30 @@ async def stream_events_async( block = buffer[position:i] position = i + len(seq) - event, discard = _parse_event(block, decoder, sentinel) + event, discard, event_id = _parse_event( + raw=block, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, + ) if event is not None: yield event + if discard: + await response.aclose() + return if position > 0: buffer = buffer[position:] position = 0 - event, discard = _parse_event(buffer, decoder, sentinel) + event, discard, _ = _parse_event( + raw=buffer, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, + ) if event is not None: yield event @@ -138,17 +176,14 @@ def stream_events( response: httpx.Response, decoder: Callable[[str], T], sentinel: Optional[str] = None, + data_required: bool = True, ) -> Generator[T, None, None]: buffer = bytearray() position = 0 - discard = False + event_id: Optional[str] = None for chunk in response.iter_bytes(): - # We've encountered the sentinel value and should no longer process - # incoming data. Instead we throw new data away until the server closes - # the connection. - if discard: - continue - + if len(buffer) == 0 and chunk.startswith(UTF8_BOM): + chunk = chunk[len(UTF8_BOM) :] buffer += chunk for i in range(position, len(buffer)): char = buffer[i : i + 1] @@ -163,22 +198,42 @@ def stream_events( block = buffer[position:i] position = i + len(seq) - event, discard = _parse_event(block, decoder, sentinel) + event, discard, event_id = _parse_event( + raw=block, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, + ) if event is not None: yield event + if discard: + response.close() + return if position > 0: buffer = buffer[position:] position = 0 - event, discard = _parse_event(buffer, decoder, sentinel) + event, discard, _ = _parse_event( + raw=buffer, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, + ) if event is not None: yield event def _parse_event( - raw: bytearray, decoder: Callable[[str], T], sentinel: Optional[str] = None -) -> Tuple[Optional[T], bool]: + *, + raw: bytearray, + decoder: Callable[[str], T], + sentinel: Optional[str] = None, + event_id: Optional[str] = None, + data_required: bool = True, +) -> Tuple[Optional[T], bool, Optional[str]]: block = raw.decode() lines = re.split(r"\r?\n|\r", block) publish = False @@ -189,13 +244,16 @@ def _parse_event( continue delim = line.find(":") - if delim <= 0: + if delim == 0: continue - field = line[0:delim] - value = line[delim + 1 :] if delim < len(line) - 1 else "" - if len(value) and value[0] == " ": - value = value[1:] + field = line + value = "" + if delim > 0: + field = line[0:delim] + value = line[delim + 1 :] if delim < len(line) - 1 else "" + if len(value) and value[0] == " ": + value = value[1:] if field == "event": event.event = value @@ -204,37 +262,40 @@ def _parse_event( data += value + "\n" publish = True elif field == "id": - event.id = value publish = True + if "\x00" not in value: + event_id = value elif field == "retry": - event.retry = int(value) if value.isdigit() else None + if value.isdigit(): + event.retry = int(value) publish = True + event.id = event_id + if sentinel and data == f"{sentinel}\n": - return None, True + return None, True, event_id + + # Skip data-less events when data is required + if not data and publish and data_required: + return None, False, event_id if data: data = data[:-1] - event.data = data - - data_is_primitive = ( - data.isnumeric() or data == "true" or data == "false" or data == "null" - ) - data_is_json = ( - data.startswith("{") or data.startswith("[") or data.startswith('"') - ) - - if data_is_primitive or data_is_json: - try: - event.data = json.loads(data) - except Exception: - pass + try: + event.data = json.loads(data) + except json.JSONDecodeError: + event.data = data out = None if publish: - out = decoder(json.dumps(event.__dict__)) - - return out, False + out_dict = { + k: v + for k, v in asdict(event).items() + if v is not None or (k == "data" and data) + } + out = decoder(json.dumps(out_dict)) + + return out, False, event_id def _peek_sequence(position: int, buffer: bytearray, sequence: bytes): diff --git a/src/ragie/utils/requestbodies.py b/src/ragie/utils/requestbodies.py index d5240dd..1de32b6 100644 --- a/src/ragie/utils/requestbodies.py +++ b/src/ragie/utils/requestbodies.py @@ -44,15 +44,15 @@ def serialize_request_body( serialized_request_body = SerializedRequestBody(media_type) - if re.match(r"(application|text)\/.*?\+*json.*", media_type) is not None: + if re.match(r"^(application|text)\/([^+]+\+)*json.*", media_type) is not None: serialized_request_body.content = marshal_json(request_body, request_body_type) - elif re.match(r"multipart\/.*", media_type) is not None: + elif re.match(r"^multipart\/.*", media_type) is not None: ( serialized_request_body.media_type, serialized_request_body.data, serialized_request_body.files, ) = serialize_multipart_form(media_type, request_body) - elif re.match(r"application\/x-www-form-urlencoded.*", media_type) is not None: + elif re.match(r"^application\/x-www-form-urlencoded.*", media_type) is not None: serialized_request_body.data = serialize_form_data(request_body) elif isinstance(request_body, (bytes, bytearray, io.BytesIO, io.BufferedReader)): serialized_request_body.content = request_body diff --git a/src/ragie/utils/retries.py b/src/ragie/utils/retries.py index 88a91b1..af07d4e 100644 --- a/src/ragie/utils/retries.py +++ b/src/ragie/utils/retries.py @@ -144,12 +144,7 @@ def do_request() -> httpx.Response: if res.status_code == parsed_code: raise TemporaryError(res) - except httpx.ConnectError as exception: - if retries.config.retry_connection_errors: - raise - - raise PermanentError(exception) from exception - except httpx.TimeoutException as exception: + except (httpx.NetworkError, httpx.TimeoutException) as exception: if retries.config.retry_connection_errors: raise @@ -193,12 +188,7 @@ async def do_request() -> httpx.Response: if res.status_code == parsed_code: raise TemporaryError(res) - except httpx.ConnectError as exception: - if retries.config.retry_connection_errors: - raise - - raise PermanentError(exception) from exception - except httpx.TimeoutException as exception: + except (httpx.NetworkError, httpx.TimeoutException) as exception: if retries.config.retry_connection_errors: raise diff --git a/src/ragie/utils/security.py b/src/ragie/utils/security.py index 295a3f4..17996bd 100644 --- a/src/ragie/utils/security.py +++ b/src/ragie/utils/security.py @@ -135,6 +135,8 @@ def _parse_security_scheme_value( elif scheme_type == "http": if sub_type == "bearer": headers[header_name] = _apply_bearer(value) + elif sub_type == "basic": + headers[header_name] = value elif sub_type == "custom": return else: diff --git a/src/ragie/utils/serializers.py b/src/ragie/utils/serializers.py index 378a14c..14321eb 100644 --- a/src/ragie/utils/serializers.py +++ b/src/ragie/utils/serializers.py @@ -102,26 +102,6 @@ def validate_int(b): return int(b) -def validate_open_enum(is_int: bool): - def validate(e): - if e is None: - return None - - if isinstance(e, Unset): - return e - - if is_int: - if not isinstance(e, int): - raise ValueError("Expected int") - else: - if not isinstance(e, str): - raise ValueError("Expected string") - - return e - - return validate - - def validate_const(v): def validate(c): # Optional[T] is a Union[T, None] diff --git a/src/ragie/webhook_endpoints.py b/src/ragie/webhook_endpoints.py index 4f4568d..b085ed7 100644 --- a/src/ragie/webhook_endpoints.py +++ b/src/ragie/webhook_endpoints.py @@ -636,25 +636,20 @@ async def get_async( raise models.SDKError("Unexpected response received", http_res) - def update( + def delete( self, *, endpoint_id: str, - update_webhook_endpoint_payload: Union[ - models.UpdateWebhookEndpointPayload, - models.UpdateWebhookEndpointPayloadTypedDict, - ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.WebhookEndpoint: - r"""Update Webhook Endpoint + ) -> models.ResponseOK: + r"""Delete Webhook Endpoint - Update a webhook endpoint's name, URL, or active status. Use this to rotate endpoints or temporarily disable delivery without deleting the endpoint. + Delete a webhook endpoint to stop delivering webhook notifications to its URL. :param endpoint_id: - :param update_webhook_endpoint_payload: :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 @@ -670,33 +665,23 @@ def update( else: base_url = self._get_url(base_url, url_variables) - request = models.UpdateWebhookEndpointRequest( + request = models.DeleteWebhookEndpointRequest( endpoint_id=endpoint_id, - update_webhook_endpoint_payload=utils.get_pydantic_model( - update_webhook_endpoint_payload, models.UpdateWebhookEndpointPayload - ), ) req = self._build_request( - method="PATCH", + method="DELETE", path="/webhook_endpoints/{endpoint_id}", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, + 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, - get_serialized_body=lambda: utils.serialize_request_body( - request.update_webhook_endpoint_payload, - False, - False, - "json", - models.UpdateWebhookEndpointPayload, - ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -713,7 +698,7 @@ def update( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="UpdateWebhookEndpoint", + operation_id="DeleteWebhookEndpoint", oauth2_scopes=None, security_source=self.sdk_configuration.security, ), @@ -724,7 +709,7 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.WebhookEndpoint, http_res) + return unmarshal_json_response(models.ResponseOK, http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( models.HTTPValidationErrorData, http_res @@ -747,25 +732,20 @@ def update( raise models.SDKError("Unexpected response received", http_res) - async def update_async( + async def delete_async( self, *, endpoint_id: str, - update_webhook_endpoint_payload: Union[ - models.UpdateWebhookEndpointPayload, - models.UpdateWebhookEndpointPayloadTypedDict, - ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.WebhookEndpoint: - r"""Update Webhook Endpoint + ) -> models.ResponseOK: + r"""Delete Webhook Endpoint - Update a webhook endpoint's name, URL, or active status. Use this to rotate endpoints or temporarily disable delivery without deleting the endpoint. + Delete a webhook endpoint to stop delivering webhook notifications to its URL. :param endpoint_id: - :param update_webhook_endpoint_payload: :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 @@ -781,33 +761,23 @@ async def update_async( else: base_url = self._get_url(base_url, url_variables) - request = models.UpdateWebhookEndpointRequest( + request = models.DeleteWebhookEndpointRequest( endpoint_id=endpoint_id, - update_webhook_endpoint_payload=utils.get_pydantic_model( - update_webhook_endpoint_payload, models.UpdateWebhookEndpointPayload - ), ) req = self._build_request_async( - method="PATCH", + method="DELETE", path="/webhook_endpoints/{endpoint_id}", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, + 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, - get_serialized_body=lambda: utils.serialize_request_body( - request.update_webhook_endpoint_payload, - False, - False, - "json", - models.UpdateWebhookEndpointPayload, - ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -824,7 +794,7 @@ async def update_async( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="UpdateWebhookEndpoint", + operation_id="DeleteWebhookEndpoint", oauth2_scopes=None, security_source=self.sdk_configuration.security, ), @@ -835,7 +805,7 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.WebhookEndpoint, http_res) + return unmarshal_json_response(models.ResponseOK, http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( models.HTTPValidationErrorData, http_res @@ -858,20 +828,25 @@ async def update_async( raise models.SDKError("Unexpected response received", http_res) - def delete( + def update( self, *, endpoint_id: str, + update_webhook_endpoint_payload: Union[ + models.UpdateWebhookEndpointPayload, + models.UpdateWebhookEndpointPayloadTypedDict, + ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.ResponseOK: - r"""Delete Webhook Endpoint + ) -> models.WebhookEndpoint: + r"""Update Webhook Endpoint - Delete a webhook endpoint to stop delivering webhook notifications to its URL. + Update a webhook endpoint's name, URL, or active status. Use this to rotate endpoints or temporarily disable delivery without deleting the endpoint. :param endpoint_id: + :param update_webhook_endpoint_payload: :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 @@ -887,23 +862,33 @@ def delete( else: base_url = self._get_url(base_url, url_variables) - request = models.DeleteWebhookEndpointRequest( + request = models.UpdateWebhookEndpointRequest( endpoint_id=endpoint_id, + update_webhook_endpoint_payload=utils.get_pydantic_model( + update_webhook_endpoint_payload, models.UpdateWebhookEndpointPayload + ), ) req = self._build_request( - method="DELETE", + method="PATCH", path="/webhook_endpoints/{endpoint_id}", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=False, + 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.update_webhook_endpoint_payload, + False, + False, + "json", + models.UpdateWebhookEndpointPayload, + ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -920,7 +905,7 @@ def delete( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="DeleteWebhookEndpoint", + operation_id="UpdateWebhookEndpoint", oauth2_scopes=None, security_source=self.sdk_configuration.security, ), @@ -931,7 +916,7 @@ def delete( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.ResponseOK, http_res) + return unmarshal_json_response(models.WebhookEndpoint, http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( models.HTTPValidationErrorData, http_res @@ -954,20 +939,25 @@ def delete( raise models.SDKError("Unexpected response received", http_res) - async def delete_async( + async def update_async( self, *, endpoint_id: str, + update_webhook_endpoint_payload: Union[ + models.UpdateWebhookEndpointPayload, + models.UpdateWebhookEndpointPayloadTypedDict, + ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.ResponseOK: - r"""Delete Webhook Endpoint + ) -> models.WebhookEndpoint: + r"""Update Webhook Endpoint - Delete a webhook endpoint to stop delivering webhook notifications to its URL. + Update a webhook endpoint's name, URL, or active status. Use this to rotate endpoints or temporarily disable delivery without deleting the endpoint. :param endpoint_id: + :param update_webhook_endpoint_payload: :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 @@ -983,23 +973,33 @@ async def delete_async( else: base_url = self._get_url(base_url, url_variables) - request = models.DeleteWebhookEndpointRequest( + request = models.UpdateWebhookEndpointRequest( endpoint_id=endpoint_id, + update_webhook_endpoint_payload=utils.get_pydantic_model( + update_webhook_endpoint_payload, models.UpdateWebhookEndpointPayload + ), ) req = self._build_request_async( - method="DELETE", + method="PATCH", path="/webhook_endpoints/{endpoint_id}", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=False, + 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.update_webhook_endpoint_payload, + False, + False, + "json", + models.UpdateWebhookEndpointPayload, + ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -1016,7 +1016,7 @@ async def delete_async( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="DeleteWebhookEndpoint", + operation_id="UpdateWebhookEndpoint", oauth2_scopes=None, security_source=self.sdk_configuration.security, ), @@ -1027,7 +1027,7 @@ async def delete_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.ResponseOK, http_res) + return unmarshal_json_response(models.WebhookEndpoint, http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( models.HTTPValidationErrorData, http_res