From 1eea50daa3e6f59cbaa70be323c61eec87f67863 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Fri, 13 Nov 2026 04:59:11 +0000 Subject: [PATCH 1/2] =?UTF-8?q?##=20Typescript=20SDK=20Changes:=20*=20`gle?= =?UTF-8?q?an.chat.create()`:=20=20=20*=20=20`request.text`=20**Removed**?= =?UTF-8?q?=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20=20=20*=20=20`response.out?= =?UTF-8?q?put[].content[].structuredOutput`=20**Removed**=20(Breaking=20?= =?UTF-8?q?=E2=9A=A0=EF=B8=8F)=20*=20`glean.chat.createStream()`:=20=20=20?= =?UTF-8?q?*=20=20`request.text`=20**Removed**=20(Breaking=20=E2=9A=A0?= =?UTF-8?q?=EF=B8=8F)=20=20=20*=20=20`response.[].union(RESPONSE=5FCOMPLET?= =?UTF-8?q?ED).data.response.output[].content[].structuredOutput`=20**Remo?= =?UTF-8?q?ved**=20(Breaking=20=E2=9A=A0=EF=B8=8F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .speakeasy/gen.lock | 125 ++++++------------ .speakeasy/gen.yaml | 2 +- .speakeasy/glean-merged-spec.yaml | 83 +----------- .speakeasy/tests.arazzo.yaml | 17 +-- .speakeasy/workflow.lock | 10 +- README.md | 24 +--- RELEASES.md | 12 +- .../platformchatjsonschemaformat.md | 29 ---- .../platformchatoutputtextcontent.md | 11 +- .../components/platformchattextformat.md | 19 --- docs/models/components/structuredoutput.md | 17 --- .../operations/platformchatcreateformat.md | 30 ----- .../operations/platformchatcreaterequest.md | 37 +----- .../platformchatcreatestreamformat.md | 30 ----- .../platformchatcreatestreamrequest.md | 37 +----- .../platformchatcreatestreamtext.md | 18 --- .../operations/platformchatcreatetext.md | 18 --- docs/sdks/chat/README.md | 96 +------------- examples/package-lock.json | 2 +- jsr.json | 2 +- package-lock.json | 4 +- package.json | 2 +- src/__tests__/chat.test.ts | 24 +--- .../platformchatjsonschemaformat.go | 95 ------------- .../platformchatoutputtextcontent.go | 32 +---- .../components/platformchattextformat.go | 58 -------- .../models/operations/platformchatcreate.go | 125 ------------------ .../operations/platformchatcreatestream.go | 125 ------------------ src/__tests__/summarize.test.ts | 7 +- src/lib/config.ts | 4 +- src/models/components/index.ts | 2 - .../platformchatjsonschemaformat.ts | 66 --------- .../platformchatoutputtextcontent.ts | 32 ----- .../components/platformchattextformat.ts | 38 ------ src/models/operations/platformchatcreate.ts | 85 ------------ .../operations/platformchatcreatestream.ts | 89 ------------- 36 files changed, 101 insertions(+), 1306 deletions(-) delete mode 100644 docs/models/components/platformchatjsonschemaformat.md delete mode 100644 docs/models/components/platformchattextformat.md delete mode 100644 docs/models/components/structuredoutput.md delete mode 100644 docs/models/operations/platformchatcreateformat.md delete mode 100644 docs/models/operations/platformchatcreatestreamformat.md delete mode 100644 docs/models/operations/platformchatcreatestreamtext.md delete mode 100644 docs/models/operations/platformchatcreatetext.md delete mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformchatjsonschemaformat.go delete mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformchattextformat.go delete mode 100644 src/models/components/platformchatjsonschemaformat.ts delete mode 100644 src/models/components/platformchattextformat.ts diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index d28646596..abc9fb99a 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 664aaca5-a41f-4434-8f2a-642dba92fe68 management: - docChecksum: de30adaa45770c1a3dd4fee14b4cc346 + docChecksum: 7db0ead9bec260217a64b6c0e4af16af docVersion: 0.9.0 speakeasyVersion: 1.808.1 generationVersion: 2.960.8 - releaseVersion: 0.20.22 - configChecksum: 915bf000cb30d29253095a408e6c04aa + releaseVersion: 0.20.23 + configChecksum: 5d2bcb1eb111011d9b5152c7ec768d7f repoURL: https://github.com/gleanwork/api-client-typescript.git installationURL: https://github.com/gleanwork/api-client-typescript published: true persistentEdits: - generation_id: 6b00c5fb-6086-40aa-ad67-21daa8682bfc - pristine_commit_hash: e61a576303a1489a6b2a13128e860af8f20b3a0c - pristine_tree_hash: b1b0b0c8a3f96e4cd0ce2f25b2b62e6d6fe74b9c + generation_id: b9726775-a0a5-4ee4-8d7d-501ab54401c3 + pristine_commit_hash: 91470c12c429815a6c240a9534b859f826c87d55 + pristine_tree_hash: 1b29743032bc96d15d89b8fbc8dadb90d28d9680 features: typescript: acceptHeaders: 2.81.2 @@ -2137,10 +2137,6 @@ trackedFiles: id: d433e7bbef35 last_write_checksum: sha1:0b361bb9d55596a0022878ef1aa91c9e782c5870 pristine_git_object: 137d0c8608eb32b8672c234a91b6f18739ed2d21 - docs/models/components/platformchatjsonschemaformat.md: - id: 2c0f3b566ae6 - last_write_checksum: sha1:0ce9c5daa0a08fbff9e96e0d76e4f094c8430461 - pristine_git_object: d84f3bb520d168fd3891ee4e16c0dad02f4da3db docs/models/components/platformchatoutputmessage.md: id: 06f5e11e058a last_write_checksum: sha1:1be8e49ede9b8bc5cd2e0c6147a7a39384a61dda @@ -2155,8 +2151,8 @@ trackedFiles: pristine_git_object: c8d864be2b9327f48625725498c435ca5d7c69f6 docs/models/components/platformchatoutputtextcontent.md: id: 41ecc87e478f - last_write_checksum: sha1:76804e184de2f993af939bb93ba7e9b61db50732 - pristine_git_object: c2c05ca27928f89ce74931bb774701f903c6b801 + last_write_checksum: sha1:0cf363611390743f1e05a653e3a1f8a0e12705f8 + pristine_git_object: 9f1c7036acde7a2301713719d83e7240e677a73c docs/models/components/platformchatoutputtextcontenttype.md: id: 12dc2e11fdf6 last_write_checksum: sha1:e7a572736c4dd5b42dbb316dd1760f90cd779f7f @@ -2245,10 +2241,6 @@ trackedFiles: id: 2d12925cd635 last_write_checksum: sha1:a6742572666ef27e241ac6e9b503019c0f64f9aa pristine_git_object: 9913c75af077b020de46d856843c3cf0d5649903 - docs/models/components/platformchattextformat.md: - id: e5fc35b91179 - last_write_checksum: sha1:e4c6abd1a72983bc011729993041ad7fbb9c1b21 - pristine_git_object: 9b27fffc86c2184e2a1e551e281616f534d32009 docs/models/components/platformchatupdaterequest.md: id: bcf2be5fe851 last_write_checksum: sha1:1cf338623858089a1672c7f04e4e7e5ba5ace307 @@ -3149,10 +3141,6 @@ trackedFiles: id: 6f79f182392b last_write_checksum: sha1:1b5ac4410857b43ab7ec47d69a452dc5f2d0143c pristine_git_object: 36c4253cfbae64bbb6875faf2e8dbc3d7d042b50 - docs/models/components/structuredoutput.md: - id: ca8639e22ee5 - last_write_checksum: sha1:f32b3aee80df4be0f6309f7e8f6e11e0eaa18903 - pristine_git_object: fa655cfa3b2f3058bcff0c8ebf546bb3146b5112 docs/models/components/structuredresult.md: id: e48e5e4cdd13 last_write_checksum: sha1:14bee5629983464513a82e8aa7a5ff60a2b3ba65 @@ -3909,38 +3897,22 @@ trackedFiles: id: 58d615b7c78f last_write_checksum: sha1:fb7d9247173ad2c3f07def425cb55ad447f31006 pristine_git_object: 8afdfa5959f9d40e6bfae72293d9485fdd5f143a - docs/models/operations/platformchatcreateformat.md: - id: f472fd6ab7ef - last_write_checksum: sha1:7838c78255e048cf30bca1f202f1e6ec44e64a55 - pristine_git_object: 0079624bed9dc67e57488ea569647fc5e4a8911a docs/models/operations/platformchatcreateinput.md: id: 30dd49c63c34 last_write_checksum: sha1:b84e23b26eb042cfca1bcd894a12b11c4b7e9dd0 pristine_git_object: 50ceb94725f4ee275ef5430f8e6b756f44b2947a docs/models/operations/platformchatcreaterequest.md: id: e3b4683f75d8 - last_write_checksum: sha1:a805db02b7381859e005b51249066959f5df8418 - pristine_git_object: 6e7d38f1a7baecb7d468028ef6cfd5c8cf255483 - docs/models/operations/platformchatcreatestreamformat.md: - id: 9f0d72f05096 - last_write_checksum: sha1:bb4c3a598166fe6dd7996d135775af8b014a1d3c - pristine_git_object: acb9a86b99922381c5b3c2f3f3dedaba756a7bf5 + last_write_checksum: sha1:c74ac7dfa873b22a90428ab017cd47afcb38ab55 + pristine_git_object: 843bd336e3a24df84b7ef4c373901913724c9a88 docs/models/operations/platformchatcreatestreaminput.md: id: 4282b848314f last_write_checksum: sha1:c31769fe4d329e12861cf4d51567973b0271d8b2 pristine_git_object: a23ee7f283a439cf260082064534773e5eb7b99f docs/models/operations/platformchatcreatestreamrequest.md: id: bf073c591777 - last_write_checksum: sha1:d4e07acdfdcb1ab0ffa45d75efdb197208048740 - pristine_git_object: d06e7dadb8b87b1dc18da225f993430555fd785a - docs/models/operations/platformchatcreatestreamtext.md: - id: 5e6e2b9eeb59 - last_write_checksum: sha1:47fd813260b23400ad20f0c9690ef985a33f60bc - pristine_git_object: f7c9444fbc25717456347aeb3a84c707151b37d6 - docs/models/operations/platformchatcreatetext.md: - id: 419ceefc2ea7 - last_write_checksum: sha1:e9415f5cd77710ec94f691837c1026bd042ae477 - pristine_git_object: 9e53fb99223c8c53acbaa2a3187c526536e7bd97 + last_write_checksum: sha1:b40ffc56fa3db69ebab383917ff84a3c4317524d + pristine_git_object: 3bd03c23a921cd37442b3c577572b08a2ca473b4 docs/models/operations/platformchatupdaterequest.md: id: 4f2af29acf06 last_write_checksum: sha1:1343b1ef3856528c67cd08c4c418f0ee95bc1ec4 @@ -4179,8 +4151,8 @@ trackedFiles: pristine_git_object: fdf6d04776ed5c3336dbaf84813a783e3d7b5620 docs/sdks/chat/README.md: id: 393193527c2c - last_write_checksum: sha1:8d5cce0a571021bbd2b909826b8b5766cf3ea57e - pristine_git_object: 44ed532c17013756d09d88be0366795569e35be2 + last_write_checksum: sha1:f82c01a15a17ee3ee3dfb3e13d41522d4b4302ba + pristine_git_object: c4938aa0d7c450ea04bb6aa6825189650b4dd224 docs/sdks/clientagents/README.md: id: 8e00e6d6b64e last_write_checksum: sha1:abbda5fa02447e90a47f933b543666bf94f3ed97 @@ -4343,12 +4315,12 @@ trackedFiles: pristine_git_object: 5a2797590d4be351d62915017d5b2a0f853537c8 jsr.json: id: 7f6ab7767282 - last_write_checksum: sha1:539f052e0c4efcb6a2c1c8a053c3dee5fbdc398f - pristine_git_object: c20719967e020164a2265f521bccedb42e077297 + last_write_checksum: sha1:fa67d99463a0042de33e720108948d6e017f147d + pristine_git_object: 9c0989432fc5602d173ebaf9ae32f79d1fb8bc0e package.json: id: 7030d0b2f71b - last_write_checksum: sha1:9e4cb99f63defbf3f60f1d1386afaf24358bd004 - pristine_git_object: 24feadd04760d5b7a44c6c711e20daa4fc0815f6 + last_write_checksum: sha1:c6a257a8572423ce64cf9434520e13f400544512 + pristine_git_object: 30f1c410489d867843ed09e382c8a033813037ea src/__tests__/activities.test.ts: id: 65fa859b8f59 last_write_checksum: sha1:756bc40095f4495bbf62739b8218bb4a559a24f2 @@ -4379,8 +4351,8 @@ trackedFiles: pristine_git_object: fa4dad795dadc97500b9b2c5971bfc00b040b7e4 src/__tests__/chat.test.ts: id: bf83434eb7e7 - last_write_checksum: sha1:0baf22e1c6c3f4fee2e0bdca73db26878b2d4087 - pristine_git_object: fd4c0ceabdcd6898b1129c5161f618005b097bb2 + last_write_checksum: sha1:dbe2b40bc78aa3e7ceb71c4c2041bbb1238949c0 + pristine_git_object: d597d24bdd38ed839292fc9991083c841cdbd1a0 src/__tests__/clientactivity.test.ts: id: 763dd50c7493 last_write_checksum: sha1:ba2524258d92b2768d107c5f3492552e317ff471 @@ -6757,18 +6729,14 @@ trackedFiles: id: 3073b8cf092d last_write_checksum: sha1:6340f73e5bffac9a724f8eb9f6a73082273cf080 pristine_git_object: 27fa64cbf8a93a7d9825b49f1637ae119e78315e - src/__tests__/mockserver/internal/sdk/models/components/platformchatjsonschemaformat.go: - id: 894f1f95fef3 - last_write_checksum: sha1:10e586048b7f30b47bc97cee22dd28bfca02e371 - pristine_git_object: af91cf875d24c490c927294bf3b4f5b97cc01bb8 src/__tests__/mockserver/internal/sdk/models/components/platformchatoutputmessage.go: id: b4782e0cffe9 last_write_checksum: sha1:c28b34c8f32a7306dfd8521ec87741281c09d13c pristine_git_object: 39e8b75049e28450aee57a7e7655d2cd254330e4 src/__tests__/mockserver/internal/sdk/models/components/platformchatoutputtextcontent.go: id: 3bd4856d4753 - last_write_checksum: sha1:75dab771147cd287c989446ce8955714e6002b55 - pristine_git_object: 94d84904ce58f8066e0bdbc4a4a2c20689f805e7 + last_write_checksum: sha1:5880a1f9527a41dd0d8b1f91ded48bad9e7f932f + pristine_git_object: 7b5437eb4ffb05b35d98d706bd6896089def9771 src/__tests__/mockserver/internal/sdk/models/components/platformchatpersonsource.go: id: 3b8c301f9600 last_write_checksum: sha1:9e5f72c1a5d130516f17326db5ea40100385e413 @@ -6829,10 +6797,6 @@ trackedFiles: id: d479ff5cdb9b last_write_checksum: sha1:d8d94a820f7d0ad33d97f08745ecebc525649491 pristine_git_object: c237c010741a1d07f7b0ee645761232f9967e2d8 - src/__tests__/mockserver/internal/sdk/models/components/platformchattextformat.go: - id: 26e47a3c7596 - last_write_checksum: sha1:e3d5de0a1aad36226a8a852a8c07f4d4b962b85e - pristine_git_object: 580903ad493bf182419fe34ec942ab2c7147f1ef src/__tests__/mockserver/internal/sdk/models/components/platformchatupdaterequest.go: id: 76007746f32b last_write_checksum: sha1:bf4fbeec58f415517ff29e0042dc5cac5758d04b @@ -8255,12 +8219,12 @@ trackedFiles: pristine_git_object: 400797ac0ae0d3518c1e2fd0e75fad70ad0e9373 src/__tests__/mockserver/internal/sdk/models/operations/platformchatcreate.go: id: d7591a37d7a3 - last_write_checksum: sha1:7a009b5742642df30ca9511fae5ec1b59d9ce877 - pristine_git_object: 12c116d75651b774880c630d995425300d6b544d + last_write_checksum: sha1:090ca9e2b300412ae5bb0a992896767786572a53 + pristine_git_object: 439b883ac06eecea9bc1b9915c423577c8034842 src/__tests__/mockserver/internal/sdk/models/operations/platformchatcreatestream.go: id: cb5c539bf53d - last_write_checksum: sha1:5ef470df5c006a512a3f9281cae9be175dadc1e8 - pristine_git_object: 68b74befa78b34fe9bc9deefdf0b8a6545c07ecf + last_write_checksum: sha1:876a7bb48f2e7b1f1c302b114ff98b03dccb6d45 + pristine_git_object: b4b32f8fbcdbb138a0d340ba8dda8c46abff392e src/__tests__/mockserver/internal/sdk/models/operations/platformchatupdate.go: id: 9ba6814ed166 last_write_checksum: sha1:ce75695ea200db5a3bef226ec003b1a23f41b529 @@ -8767,8 +8731,8 @@ trackedFiles: pristine_git_object: 80853fce6d86d20766336fb2fd27c8669cd12ca8 src/__tests__/summarize.test.ts: id: 3105d6ebc7eb - last_write_checksum: sha1:37097d218fbcf2407d7b826a42bf5bad00e4078e - pristine_git_object: 140c6a17e1b4efaba2c8ef51dab0089d3ce42b60 + last_write_checksum: sha1:4ecfa0d27d45cc33752a1b6a5e8839fc3da2db0d + pristine_git_object: f400cda3583ed7ac516dc3b8f7397ec51d4d0ecb src/__tests__/testclient.ts: id: f142c080bff8 last_write_checksum: sha1:3a38647391f52221c009a9273eebf90793b3d430 @@ -9559,8 +9523,8 @@ trackedFiles: pristine_git_object: 42d9739ab67c2fec0689f83777ffa5e1f875e5d5 src/lib/config.ts: id: 320761608fb3 - last_write_checksum: sha1:0a454b170c40e39fec6e746baffd66fd21fd0a94 - pristine_git_object: 3db1b4249d87f2f1f57cb909ccdace9455d699f3 + last_write_checksum: sha1:19e628ca1a8ad309b27c32acfce33b1597b2b635 + pristine_git_object: 95efc271bcedebf1fede756107a8e7b9fd9644bd src/lib/encodings.ts: id: 3bd8ead98afd last_write_checksum: sha1:d1917169abb226ccb0d2e93fd211a1d2987822b4 @@ -10783,8 +10747,8 @@ trackedFiles: pristine_git_object: dcb8bad1c6e1addd393690e78a63631baa47f7be src/models/components/index.ts: id: 0aa842dce54d - last_write_checksum: sha1:25ea346e93020306f54efdb4758456bd01539eca - pristine_git_object: 1f33f00ca23cad4a501e3d0876852cfa6ee3bc22 + last_write_checksum: sha1:86f01285f9b73ba3960697c081e283fa3bb1ce7e + pristine_git_object: 0d5f1769d87aab961216cd5d42413578bc88ebbe src/models/components/indexdocumentrequest.ts: id: deb13e2cdc65 last_write_checksum: sha1:33e2093c7fcdd3c90ef45c48e7b79c4cb2aea6e5 @@ -11181,18 +11145,14 @@ trackedFiles: id: 3cfc29b0d268 last_write_checksum: sha1:469269643f005fe9038eb96ce7122acc34a9795e pristine_git_object: 1705d965980a233631e8aa0cfadc750cbf2bc92f - src/models/components/platformchatjsonschemaformat.ts: - id: c7086d714c13 - last_write_checksum: sha1:207d4424bd93bc927c12b5601edda6bde0ae0023 - pristine_git_object: e620df58caee56b51cf50c47d9f4c4aa39019bd0 src/models/components/platformchatoutputmessage.ts: id: 99912ae2c54e last_write_checksum: sha1:a318403ec231b9664f318bcbd1f9d9238f303cfc pristine_git_object: ee68330ac7c2f750966d893ff0c78b60a2557191 src/models/components/platformchatoutputtextcontent.ts: id: aef245149405 - last_write_checksum: sha1:21ad531df92141e2609250c4b55d192c43de4e2b - pristine_git_object: 02f6a05c0a65a1ae09b2df60f8d11aac628576c4 + last_write_checksum: sha1:a5dbe41374fc347e2fb7d79844128425c5c098d6 + pristine_git_object: fef0736f1c1e63f44de0703246d5c2aca6967850 src/models/components/platformchatpersonsource.ts: id: 9e78924ff10b last_write_checksum: sha1:6923603f31b0958784cbb488d30f338a647b74d4 @@ -11253,10 +11213,6 @@ trackedFiles: id: bd824a2d14c5 last_write_checksum: sha1:f58efc8e0f817bf68a2f2c77f90e9811de06f9cd pristine_git_object: 6982973162a59ae209ee7b8558608826463d1de1 - src/models/components/platformchattextformat.ts: - id: 6dad34f1fc6d - last_write_checksum: sha1:81df9379ed107b5d358bfa84d911ad24fe5db19d - pristine_git_object: f76809c9f884f886334e20d2c752173cccb52ca8 src/models/components/platformchatupdaterequest.ts: id: f2177316b022 last_write_checksum: sha1:3691dd012738f7ff452b2f79c1b4e4d6175759dc @@ -12699,12 +12655,12 @@ trackedFiles: pristine_git_object: 69bd1349edebd305537e0ec66afbe70db4e9aa14 src/models/operations/platformchatcreate.ts: id: 61f71943248c - last_write_checksum: sha1:d3244864e0902598b85daa1f50f1aa9dd2d2d797 - pristine_git_object: abdc52608f4df3e1fa0d4e9542efc6786c8e4295 + last_write_checksum: sha1:d7ad67c4d2e69fe5bb895fc673f6bea5da3fe8b5 + pristine_git_object: c78b6a8a106faab54a2b3f105c9550eb70a61d77 src/models/operations/platformchatcreatestream.ts: id: 7b911127469b - last_write_checksum: sha1:b52047d6e39ad9d833c4b68b257f910da7c25591 - pristine_git_object: 3b1f8a1721afd5c7c8940117c1a22ae94073f1a2 + last_write_checksum: sha1:6530528ad97a315746ac9fb44940e3e92cddbcef + pristine_git_object: c06337a78b72bb729bb64238ee910c997610e5eb src/models/operations/platformchatupdate.ts: id: d0729eeda542 last_write_checksum: sha1:c4c742a2803e570eb97a9b47460406e9438da8b6 @@ -15222,7 +15178,7 @@ examples: platform-chat-create: speakeasy-default-platform-chat-create: requestBody: - application/json: {"input": "Summarize our parental leave policy as JSON.", "stream": false, "store": true, "text": {"format": {"type": "JSON_SCHEMA", "name": "policy_summary", "schema": {"type": "object", "properties": {"eligible_employees": {"type": "string"}, "duration_weeks": {"type": "integer"}}, "required": ["eligible_employees", "duration_weeks"]}, "strict": true}}} + application/json: {"input": "Summarize our parental leave policy.", "stream": false, "store": true} responses: "200": application/json: {"id": "", "object": "RESPONSE", "created_at": "2026-05-19T05:32:52.505Z", "status": "COMPLETED", "output": [{"type": "MESSAGE", "role": "ASSISTANT", "content": [{"type": "OUTPUT_TEXT", "text": ""}]}], "store": false, "request_id": ""} @@ -15457,7 +15413,7 @@ examples: platform-chat-create-stream: speakeasy-default-platform-chat-create-stream: requestBody: - application/json: {"input": "Summarize our parental leave policy as JSON.", "stream": true, "store": true, "text": {"format": {"type": "JSON_SCHEMA", "name": "policy_summary", "schema": {"type": "object", "properties": {"eligible_employees": {"type": "string"}, "duration_weeks": {"type": "integer"}}, "required": ["eligible_employees", "duration_weeks"]}, "strict": true}}} + application/json: {"input": "Summarize our parental leave policy.", "stream": true, "store": true} responses: "400": application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} @@ -15908,6 +15864,7 @@ generatedTests: platform-documents-get-by-url: "2026-11-06T19:47:41Z" platform-documents-get: "2026-11-06T19:47:41Z" platform-documents-batch: "2026-11-06T19:47:41Z" +releaseNotes: "## Typescript SDK Changes:\n* `glean.chat.create()`: \n * `request.text` **Removed** (Breaking ⚠️)\n * `response.output[].content[].structuredOutput` **Removed** (Breaking ⚠️)\n* `glean.chat.createStream()`: \n * `request.text` **Removed** (Breaking ⚠️)\n * `response.[].union(RESPONSE_COMPLETED).data.response.output[].content[].structuredOutput` **Removed** (Breaking ⚠️)\n" generatedFiles: - .devcontainer/README.md - .devcontainer/devcontainer.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 591fea7be..d8fe82239 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: true typescript: - version: 0.20.22 + version: 0.20.23 acceptHeaderEnum: true additionalDependencies: dependencies: {} diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index 58ef91e23..a8ede817a 100644 --- a/.speakeasy/glean-merged-spec.yaml +++ b/.speakeasy/glean-merged-spec.yaml @@ -2,8 +2,8 @@ openapi: 3.1.0 info: version: "0.9.0" title: Glean API - x-source-commit-sha: 77999be6fb7bac7ce1b740a5f554037282298b5d - x-open-api-commit-sha: ea654b06c64649ac0076b89cdcea6e0792daec11 + x-source-commit-sha: d0dbc7b464c50db93861cf4f3c0d374c0c8b1a39 + x-open-api-commit-sha: aafc9eb0a47add94983a44ca92a52f31e24ea7ed description: | # Introduction In addition to the data sources that Glean has built-in support for, Glean also provides a REST API that enables customers to put arbitrary content in the search index. This is useful, for example, for doing permissions-aware search over content in internal tools that reside on-prem as well as for searching over applications that Glean does not currently support first class. In addition these APIs allow the customer to push organization data (people info, organization structure etc) into Glean. @@ -9840,72 +9840,13 @@ components: content: type: string minLength: 1 - PlatformChatTextFormat: - type: object - additionalProperties: false - description: Unconstrained plain-text assistant output. - required: - - type - properties: - type: - type: string - description: Discriminator. Must be TEXT. - enum: - - TEXT - PlatformChatJsonSchemaFormat: - type: object - additionalProperties: false - description: Constrains the assistant response to a caller-supplied JSON Schema. - required: - - type - - name - - schema - properties: - type: - type: string - description: Discriminator. Must be JSON_SCHEMA. - enum: - - JSON_SCHEMA - name: - type: string - minLength: 1 - maxLength: 64 - description: A stable identifier for the schema. - description: - type: string - maxLength: 1024 - description: An optional human-readable description of the schema. - schema: - type: object - additionalProperties: true - description: A JSON Schema object describing the desired output shape. - strict: - type: boolean - default: true - description: | - When true, the provider validates the response against the schema. Unsupported by some providers; defaults to true. PlatformChatCreateRequest: type: object additionalProperties: false required: - input example: - input: Summarize our parental leave policy as JSON. - text: - format: - type: JSON_SCHEMA - name: policy_summary - schema: - type: object - properties: - eligible_employees: - type: string - duration_weeks: - type: integer - required: - - eligible_employees - - duration_weeks - strict: true + input: Summarize our parental leave policy. properties: input: description: | @@ -9932,18 +9873,6 @@ components: minLength: 1 description: | Continue an existing stored conversation. Incompatible with message-array `input` and with `store: false`. - text: - type: object - additionalProperties: false - description: | - Optional configuration for the assistant's text response. When `format.type` is `JSON_SCHEMA`, the response is constrained to the supplied JSON schema and returned in `output[*].content[*].structured_output`. Structured output is not supported when `stream` is true. - properties: - format: - description: | - Output format for the assistant text. TEXT is unconstrained. JSON_SCHEMA constrains the response to the supplied schema. - oneOf: - - $ref: "#/components/schemas/PlatformChatTextFormat" - - $ref: "#/components/schemas/PlatformChatJsonSchemaFormat" PlatformChatStreamResponseId: type: string minLength: 1 @@ -9963,12 +9892,6 @@ components: - OUTPUT_TEXT text: type: string - structured_output: - type: - - object - - "null" - description: | - Parsed and validated JSON object when structured output was requested. Present only when the request included `text.format.type: JSON_SCHEMA`. annotations: type: array items: diff --git a/.speakeasy/tests.arazzo.yaml b/.speakeasy/tests.arazzo.yaml index a63fecee4..c5168b206 100644 --- a/.speakeasy/tests.arazzo.yaml +++ b/.speakeasy/tests.arazzo.yaml @@ -164941,24 +164941,9 @@ workflows: requestBody: contentType: application/json payload: - input: Summarize our parental leave policy as JSON. + input: Summarize our parental leave policy. store: true stream: false - text: - format: - name: policy_summary - schema: - properties: - duration_weeks: - type: integer - eligible_employees: - type: string - required: - - eligible_employees - - duration_weeks - type: object - strict: true - type: JSON_SCHEMA successCriteria: - condition: $statusCode == 200 - condition: $response.header.Content-Type == application/json diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 4c0bb8a49..ba7cc71f4 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.808.1 sources: Glean API: sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:509e25a8ae0bbaf6e23c95c58de651349216086a13278a3792b2e3f8be68fc6b - sourceBlobDigest: sha256:15ce4e757fd8eb3c2a3857cb15740c718b57c969342223ccc0de7437748a8609 + sourceRevisionDigest: sha256:944e067962243f50e69e5d92bc4f12480dcfe9ef75cb4ad0894367e1c0c6dbd0 + sourceBlobDigest: sha256:a801af72fad0680a940fa6819af3d54251e473e961254ab1f0a918332f725cd5 tags: - latest Glean Client API: @@ -17,10 +17,10 @@ targets: glean: source: Glean API sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:509e25a8ae0bbaf6e23c95c58de651349216086a13278a3792b2e3f8be68fc6b - sourceBlobDigest: sha256:15ce4e757fd8eb3c2a3857cb15740c718b57c969342223ccc0de7437748a8609 + sourceRevisionDigest: sha256:944e067962243f50e69e5d92bc4f12480dcfe9ef75cb4ad0894367e1c0c6dbd0 + sourceBlobDigest: sha256:a801af72fad0680a940fa6819af3d54251e473e961254ab1f0a918332f725cd5 codeSamplesNamespace: glean-api-specs-typescript-code-samples - codeSamplesRevisionDigest: sha256:afa74f964f8738e3e77ad38f0945241ac4840ba055c56c9f7b2b62275020937d + codeSamplesRevisionDigest: sha256:ae15d2c55ab7ffd0c08ac0d950c4ce3c68e51dffd72019efb3ab1c1afefc637f workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 3a948e942..018644545 100644 --- a/README.md +++ b/README.md @@ -1013,29 +1013,7 @@ const glean = new Glean({ async function run() { const result = await glean.chat.createStream({ - input: "Summarize our parental leave policy as JSON.", - text: { - format: { - type: "JSON_SCHEMA", - name: "policy_summary", - schema: { - "type": "object", - "properties": { - "eligible_employees": { - "type": "string", - }, - "duration_weeks": { - "type": "integer", - }, - }, - "required": [ - "eligible_employees", - "duration_weeks", - ], - }, - strict: true, - }, - }, + input: "Summarize our parental leave policy.", }); for await (const event of result) { diff --git a/RELEASES.md b/RELEASES.md index dc5e4e628..72cd27f2b 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1108,4 +1108,14 @@ Based on: ### Generated - [typescript v0.20.22] . ### Releases -- [NPM v0.20.22] https://www.npmjs.com/package/@gleanwork/api-client/v/0.20.22 - . \ No newline at end of file +- [NPM v0.20.22] https://www.npmjs.com/package/@gleanwork/api-client/v/0.20.22 - . + +## 2026-11-13 04:51:57 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.808.1 (2.960.8) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.20.23] . +### Releases +- [NPM v0.20.23] https://www.npmjs.com/package/@gleanwork/api-client/v/0.20.23 - . \ No newline at end of file diff --git a/docs/models/components/platformchatjsonschemaformat.md b/docs/models/components/platformchatjsonschemaformat.md deleted file mode 100644 index d84f3bb52..000000000 --- a/docs/models/components/platformchatjsonschemaformat.md +++ /dev/null @@ -1,29 +0,0 @@ -# PlatformChatJsonSchemaFormat - -Constrains the assistant response to a caller-supplied JSON Schema. - -## Example Usage - -```typescript -import { PlatformChatJsonSchemaFormat } from "@gleanwork/api-client/models/components"; - -let value: PlatformChatJsonSchemaFormat = { - type: "JSON_SCHEMA", - name: "", - schema: { - "key": "", - "key1": "", - "key2": "", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `type` | *"JSON_SCHEMA"* | :heavy_check_mark: | Discriminator. Must be JSON_SCHEMA. | -| `name` | *string* | :heavy_check_mark: | A stable identifier for the schema. | -| `description` | *string* | :heavy_minus_sign: | An optional human-readable description of the schema. | -| `schema` | Record | :heavy_check_mark: | A JSON Schema object describing the desired output shape. | -| `strict` | *boolean* | :heavy_minus_sign: | When true, the provider validates the response against the schema. Unsupported by some providers; defaults to true.
| \ No newline at end of file diff --git a/docs/models/components/platformchatoutputtextcontent.md b/docs/models/components/platformchatoutputtextcontent.md index c2c05ca27..9f1c7036a 100644 --- a/docs/models/components/platformchatoutputtextcontent.md +++ b/docs/models/components/platformchatoutputtextcontent.md @@ -13,9 +13,8 @@ let value: PlatformChatOutputTextContent = { ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [components.PlatformChatOutputTextContentType](../../models/components/platformchatoutputtextcontenttype.md) | :heavy_check_mark: | N/A | -| `text` | *string* | :heavy_check_mark: | N/A | -| `structuredOutput` | [components.StructuredOutput](../../models/components/structuredoutput.md) | :heavy_minus_sign: | Parsed and validated JSON object when structured output was requested. Present only when the request included `text.format.type: JSON_SCHEMA`.
| -| `annotations` | [components.PlatformChatCitationAnnotation](../../models/components/platformchatcitationannotation.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `type` | [components.PlatformChatOutputTextContentType](../../models/components/platformchatoutputtextcontenttype.md) | :heavy_check_mark: | N/A | +| `text` | *string* | :heavy_check_mark: | N/A | +| `annotations` | [components.PlatformChatCitationAnnotation](../../models/components/platformchatcitationannotation.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/platformchattextformat.md b/docs/models/components/platformchattextformat.md deleted file mode 100644 index 9b27fffc8..000000000 --- a/docs/models/components/platformchattextformat.md +++ /dev/null @@ -1,19 +0,0 @@ -# PlatformChatTextFormat - -Unconstrained plain-text assistant output. - -## Example Usage - -```typescript -import { PlatformChatTextFormat } from "@gleanwork/api-client/models/components"; - -let value: PlatformChatTextFormat = { - type: "TEXT", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | -| `type` | *"TEXT"* | :heavy_check_mark: | Discriminator. Must be TEXT. | \ No newline at end of file diff --git a/docs/models/components/structuredoutput.md b/docs/models/components/structuredoutput.md deleted file mode 100644 index fa655cfa3..000000000 --- a/docs/models/components/structuredoutput.md +++ /dev/null @@ -1,17 +0,0 @@ -# StructuredOutput - -Parsed and validated JSON object when structured output was requested. Present only when the request included `text.format.type: JSON_SCHEMA`. - - -## Example Usage - -```typescript -import { StructuredOutput } from "@gleanwork/api-client/models/components"; - -let value: StructuredOutput = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/platformchatcreateformat.md b/docs/models/operations/platformchatcreateformat.md deleted file mode 100644 index 0079624be..000000000 --- a/docs/models/operations/platformchatcreateformat.md +++ /dev/null @@ -1,30 +0,0 @@ -# PlatformChatCreateFormat - -Output format for the assistant text. TEXT is unconstrained. JSON_SCHEMA constrains the response to the supplied schema. - - - -## Supported Types - -### `components.PlatformChatTextFormat` - -```typescript -const value: components.PlatformChatTextFormat = { - type: "TEXT", -}; -``` - -### `components.PlatformChatJsonSchemaFormat` - -```typescript -const value: components.PlatformChatJsonSchemaFormat = { - type: "JSON_SCHEMA", - name: "", - schema: { - "key": "", - "key1": "", - "key2": "", - }, -}; -``` - diff --git a/docs/models/operations/platformchatcreaterequest.md b/docs/models/operations/platformchatcreaterequest.md index 6e7d38f1a..843bd336e 100644 --- a/docs/models/operations/platformchatcreaterequest.md +++ b/docs/models/operations/platformchatcreaterequest.md @@ -6,38 +6,15 @@ import { PlatformChatCreateRequest } from "@gleanwork/api-client/models/operations"; let value: PlatformChatCreateRequest = { - input: "Summarize our parental leave policy as JSON.", - text: { - format: { - type: "JSON_SCHEMA", - name: "policy_summary", - schema: { - "type": "object", - "properties": { - "eligible_employees": { - "type": "string", - }, - "duration_weeks": { - "type": "integer", - }, - }, - "required": [ - "eligible_employees", - "duration_weeks", - ], - }, - strict: true, - }, - }, + input: "Summarize our parental leave policy.", }; ``` ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `input` | *operations.PlatformChatCreateInput* | :heavy_check_mark: | Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`.
| -| `stream` | *false* | :heavy_minus_sign: | N/A | -| `store` | *boolean* | :heavy_minus_sign: | When true (default), persist the interaction and return a `conversation_id`. When false, run ephemerally with no persistence.
| -| `conversationId` | *string* | :heavy_minus_sign: | Continue an existing stored conversation. Incompatible with message-array `input` and with `store: false`.
| -| `text` | [operations.PlatformChatCreateText](../../models/operations/platformchatcreatetext.md) | :heavy_minus_sign: | Optional configuration for the assistant's text response. When `format.type` is `JSON_SCHEMA`, the response is constrained to the supplied JSON schema and returned in `output[*].content[*].structured_output`. Structured output is not supported when `stream` is true.
| \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | +| `input` | *operations.PlatformChatCreateInput* | :heavy_check_mark: | Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`.
| +| `stream` | *false* | :heavy_minus_sign: | N/A | +| `store` | *boolean* | :heavy_minus_sign: | When true (default), persist the interaction and return a `conversation_id`. When false, run ephemerally with no persistence.
| +| `conversationId` | *string* | :heavy_minus_sign: | Continue an existing stored conversation. Incompatible with message-array `input` and with `store: false`.
| \ No newline at end of file diff --git a/docs/models/operations/platformchatcreatestreamformat.md b/docs/models/operations/platformchatcreatestreamformat.md deleted file mode 100644 index acb9a86b9..000000000 --- a/docs/models/operations/platformchatcreatestreamformat.md +++ /dev/null @@ -1,30 +0,0 @@ -# PlatformChatCreateStreamFormat - -Output format for the assistant text. TEXT is unconstrained. JSON_SCHEMA constrains the response to the supplied schema. - - - -## Supported Types - -### `components.PlatformChatTextFormat` - -```typescript -const value: components.PlatformChatTextFormat = { - type: "TEXT", -}; -``` - -### `components.PlatformChatJsonSchemaFormat` - -```typescript -const value: components.PlatformChatJsonSchemaFormat = { - type: "JSON_SCHEMA", - name: "", - schema: { - "key": "", - "key1": "", - "key2": "", - }, -}; -``` - diff --git a/docs/models/operations/platformchatcreatestreamrequest.md b/docs/models/operations/platformchatcreatestreamrequest.md index d06e7dadb..3bd03c23a 100644 --- a/docs/models/operations/platformchatcreatestreamrequest.md +++ b/docs/models/operations/platformchatcreatestreamrequest.md @@ -6,38 +6,15 @@ import { PlatformChatCreateStreamRequest } from "@gleanwork/api-client/models/operations"; let value: PlatformChatCreateStreamRequest = { - input: "Summarize our parental leave policy as JSON.", - text: { - format: { - type: "JSON_SCHEMA", - name: "policy_summary", - schema: { - "type": "object", - "properties": { - "eligible_employees": { - "type": "string", - }, - "duration_weeks": { - "type": "integer", - }, - }, - "required": [ - "eligible_employees", - "duration_weeks", - ], - }, - strict: true, - }, - }, + input: "Summarize our parental leave policy.", }; ``` ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `input` | *operations.PlatformChatCreateStreamInput* | :heavy_check_mark: | Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`.
| -| `stream` | *true* | :heavy_minus_sign: | N/A | -| `store` | *boolean* | :heavy_minus_sign: | When true (default), persist the interaction and return a `conversation_id`. When false, run ephemerally with no persistence.
| -| `conversationId` | *string* | :heavy_minus_sign: | Continue an existing stored conversation. Incompatible with message-array `input` and with `store: false`.
| -| `text` | [operations.PlatformChatCreateStreamText](../../models/operations/platformchatcreatestreamtext.md) | :heavy_minus_sign: | Optional configuration for the assistant's text response. When `format.type` is `JSON_SCHEMA`, the response is constrained to the supplied JSON schema and returned in `output[*].content[*].structured_output`. Structured output is not supported when `stream` is true.
| \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | +| `input` | *operations.PlatformChatCreateStreamInput* | :heavy_check_mark: | Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`.
| +| `stream` | *true* | :heavy_minus_sign: | N/A | +| `store` | *boolean* | :heavy_minus_sign: | When true (default), persist the interaction and return a `conversation_id`. When false, run ephemerally with no persistence.
| +| `conversationId` | *string* | :heavy_minus_sign: | Continue an existing stored conversation. Incompatible with message-array `input` and with `store: false`.
| \ No newline at end of file diff --git a/docs/models/operations/platformchatcreatestreamtext.md b/docs/models/operations/platformchatcreatestreamtext.md deleted file mode 100644 index f7c9444fb..000000000 --- a/docs/models/operations/platformchatcreatestreamtext.md +++ /dev/null @@ -1,18 +0,0 @@ -# PlatformChatCreateStreamText - -Optional configuration for the assistant's text response. When `format.type` is `JSON_SCHEMA`, the response is constrained to the supplied JSON schema and returned in `output[*].content[*].structured_output`. Structured output is not supported when `stream` is true. - - -## Example Usage - -```typescript -import { PlatformChatCreateStreamText } from "@gleanwork/api-client/models/operations"; - -let value: PlatformChatCreateStreamText = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | -| `format` | *operations.PlatformChatCreateStreamFormat* | :heavy_minus_sign: | Output format for the assistant text. TEXT is unconstrained. JSON_SCHEMA constrains the response to the supplied schema.
| \ No newline at end of file diff --git a/docs/models/operations/platformchatcreatetext.md b/docs/models/operations/platformchatcreatetext.md deleted file mode 100644 index 9e53fb992..000000000 --- a/docs/models/operations/platformchatcreatetext.md +++ /dev/null @@ -1,18 +0,0 @@ -# PlatformChatCreateText - -Optional configuration for the assistant's text response. When `format.type` is `JSON_SCHEMA`, the response is constrained to the supplied JSON schema and returned in `output[*].content[*].structured_output`. Structured output is not supported when `stream` is true. - - -## Example Usage - -```typescript -import { PlatformChatCreateText } from "@gleanwork/api-client/models/operations"; - -let value: PlatformChatCreateText = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | -| `format` | *operations.PlatformChatCreateFormat* | :heavy_minus_sign: | Output format for the assistant text. TEXT is unconstrained. JSON_SCHEMA constrains the response to the supplied schema.
| \ No newline at end of file diff --git a/docs/sdks/chat/README.md b/docs/sdks/chat/README.md index 44ed532c1..c4938aa0d 100644 --- a/docs/sdks/chat/README.md +++ b/docs/sdks/chat/README.md @@ -25,29 +25,7 @@ const glean = new Glean({ async function run() { const result = await glean.chat.create({ - input: "Summarize our parental leave policy as JSON.", - text: { - format: { - type: "JSON_SCHEMA", - name: "policy_summary", - schema: { - "type": "object", - "properties": { - "eligible_employees": { - "type": "string", - }, - "duration_weeks": { - "type": "integer", - }, - }, - "required": [ - "eligible_employees", - "duration_weeks", - ], - }, - strict: true, - }, - }, + input: "Summarize our parental leave policy.", }); console.log(result); @@ -72,29 +50,7 @@ const glean = new GleanCore({ async function run() { const res = await chatCreate(glean, { - input: "Summarize our parental leave policy as JSON.", - text: { - format: { - type: "JSON_SCHEMA", - name: "policy_summary", - schema: { - "type": "object", - "properties": { - "eligible_employees": { - "type": "string", - }, - "duration_weeks": { - "type": "integer", - }, - }, - "required": [ - "eligible_employees", - "duration_weeks", - ], - }, - strict: true, - }, - }, + input: "Summarize our parental leave policy.", }); if (res.ok) { const { value: result } = res; @@ -255,29 +211,7 @@ const glean = new Glean({ async function run() { const result = await glean.chat.createStream({ - input: "Summarize our parental leave policy as JSON.", - text: { - format: { - type: "JSON_SCHEMA", - name: "policy_summary", - schema: { - "type": "object", - "properties": { - "eligible_employees": { - "type": "string", - }, - "duration_weeks": { - "type": "integer", - }, - }, - "required": [ - "eligible_employees", - "duration_weeks", - ], - }, - strict: true, - }, - }, + input: "Summarize our parental leave policy.", }); for await (const event of result) { @@ -304,29 +238,7 @@ const glean = new GleanCore({ async function run() { const res = await chatCreateStream(glean, { - input: "Summarize our parental leave policy as JSON.", - text: { - format: { - type: "JSON_SCHEMA", - name: "policy_summary", - schema: { - "type": "object", - "properties": { - "eligible_employees": { - "type": "string", - }, - "duration_weeks": { - "type": "integer", - }, - }, - "required": [ - "eligible_employees", - "duration_weeks", - ], - }, - strict: true, - }, - }, + input: "Summarize our parental leave policy.", }); if (res.ok) { const { value: result } = res; diff --git a/examples/package-lock.json b/examples/package-lock.json index 9f8c0b04e..f378e0c40 100644 --- a/examples/package-lock.json +++ b/examples/package-lock.json @@ -18,7 +18,7 @@ }, "..": { "name": "@gleanwork/api-client", - "version": "0.20.22", + "version": "0.20.23", "dependencies": { "zod": "^3.25.0 || ^4.6.6" }, diff --git a/jsr.json b/jsr.json index c20719967..9c0989432 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@gleanwork/api-client", - "version": "0.20.22", + "version": "0.20.23", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index 7aa30fe63..f7110462e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@gleanwork/api-client", - "version": "0.20.22", + "version": "0.20.23", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@gleanwork/api-client", - "version": "0.20.22", + "version": "0.20.23", "dependencies": { "zod": "^3.25.0 || ^4.6.6" }, diff --git a/package.json b/package.json index 24feadd04..30f1c4104 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gleanwork/api-client", - "version": "0.20.22", + "version": "0.20.23", "author": "Speakeasy", "tshy": { "sourceDialects": [ diff --git a/src/__tests__/chat.test.ts b/src/__tests__/chat.test.ts index fd4c0ceab..d597d24bd 100644 --- a/src/__tests__/chat.test.ts +++ b/src/__tests__/chat.test.ts @@ -17,29 +17,7 @@ test("Chat Platform Chat Create", async () => { }); const result = await glean.chat.create({ - input: "Summarize our parental leave policy as JSON.", - text: { - format: { - type: "JSON_SCHEMA", - name: "policy_summary", - schema: { - "properties": { - "duration_weeks": { - "type": "integer", - }, - "eligible_employees": { - "type": "string", - }, - }, - "required": [ - "eligible_employees", - "duration_weeks", - ], - "type": "object", - }, - strict: true, - }, - }, + input: "Summarize our parental leave policy.", }); expect(result).toBeDefined(); }); diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformchatjsonschemaformat.go b/src/__tests__/mockserver/internal/sdk/models/components/platformchatjsonschemaformat.go deleted file mode 100644 index af91cf875..000000000 --- a/src/__tests__/mockserver/internal/sdk/models/components/platformchatjsonschemaformat.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. -// @generated-id: 894f1f95fef3 - -package components - -import ( - "encoding/json" - "fmt" - "mockserver/internal/sdk/utils" -) - -// PlatformChatJSONSchemaFormatType - Discriminator. Must be JSON_SCHEMA. -type PlatformChatJSONSchemaFormatType string - -const ( - PlatformChatJSONSchemaFormatTypeJSONSchema PlatformChatJSONSchemaFormatType = "JSON_SCHEMA" -) - -func (e PlatformChatJSONSchemaFormatType) ToPointer() *PlatformChatJSONSchemaFormatType { - return &e -} -func (e *PlatformChatJSONSchemaFormatType) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "JSON_SCHEMA": - *e = PlatformChatJSONSchemaFormatType(v) - return nil - default: - return fmt.Errorf("invalid value for PlatformChatJSONSchemaFormatType: %v", v) - } -} - -// PlatformChatJSONSchemaFormat - Constrains the assistant response to a caller-supplied JSON Schema. -type PlatformChatJSONSchemaFormat struct { - // Discriminator. Must be JSON_SCHEMA. - Type PlatformChatJSONSchemaFormatType `json:"type"` - // A stable identifier for the schema. - Name string `json:"name"` - // An optional human-readable description of the schema. - Description *string `json:"description,omitempty"` - // A JSON Schema object describing the desired output shape. - Schema map[string]any `json:"schema"` - // When true, the provider validates the response against the schema. Unsupported by some providers; defaults to true. - // - Strict *bool `default:"true" json:"strict"` -} - -func (p PlatformChatJSONSchemaFormat) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(p, "", false) -} - -func (p *PlatformChatJSONSchemaFormat) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &p, "", false, []string{"type", "name", "schema"}); err != nil { - return err - } - return nil -} - -func (o *PlatformChatJSONSchemaFormat) GetType() PlatformChatJSONSchemaFormatType { - if o == nil { - return PlatformChatJSONSchemaFormatType("") - } - return o.Type -} - -func (o *PlatformChatJSONSchemaFormat) GetName() string { - if o == nil { - return "" - } - return o.Name -} - -func (o *PlatformChatJSONSchemaFormat) GetDescription() *string { - if o == nil { - return nil - } - return o.Description -} - -func (o *PlatformChatJSONSchemaFormat) GetSchema() map[string]any { - if o == nil { - return map[string]any{} - } - return o.Schema -} - -func (o *PlatformChatJSONSchemaFormat) GetStrict() *bool { - if o == nil { - return nil - } - return o.Strict -} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformchatoutputtextcontent.go b/src/__tests__/mockserver/internal/sdk/models/components/platformchatoutputtextcontent.go index 94d84904c..7b5437eb4 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/platformchatoutputtextcontent.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformchatoutputtextcontent.go @@ -6,7 +6,6 @@ package components import ( "encoding/json" "fmt" - "mockserver/internal/sdk/optionalnullable" "mockserver/internal/sdk/utils" ) @@ -33,28 +32,10 @@ func (e *PlatformChatOutputTextContentType) UnmarshalJSON(data []byte) error { } } -// StructuredOutput - Parsed and validated JSON object when structured output was requested. Present only when the request included `text.format.type: JSON_SCHEMA`. -type StructuredOutput struct { -} - -func (s StructuredOutput) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(s, "", false) -} - -func (s *StructuredOutput) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &s, "", false, nil); err != nil { - return err - } - return nil -} - type PlatformChatOutputTextContent struct { - Type PlatformChatOutputTextContentType `json:"type"` - Text string `json:"text"` - // Parsed and validated JSON object when structured output was requested. Present only when the request included `text.format.type: JSON_SCHEMA`. - // - StructuredOutput optionalnullable.OptionalNullable[StructuredOutput] `json:"structured_output,omitempty"` - Annotations []PlatformChatCitationAnnotation `json:"annotations,omitempty"` + Type PlatformChatOutputTextContentType `json:"type"` + Text string `json:"text"` + Annotations []PlatformChatCitationAnnotation `json:"annotations,omitempty"` } func (p PlatformChatOutputTextContent) MarshalJSON() ([]byte, error) { @@ -82,13 +63,6 @@ func (o *PlatformChatOutputTextContent) GetText() string { return o.Text } -func (o *PlatformChatOutputTextContent) GetStructuredOutput() optionalnullable.OptionalNullable[StructuredOutput] { - if o == nil { - return nil - } - return o.StructuredOutput -} - func (o *PlatformChatOutputTextContent) GetAnnotations() []PlatformChatCitationAnnotation { if o == nil { return nil diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformchattextformat.go b/src/__tests__/mockserver/internal/sdk/models/components/platformchattextformat.go deleted file mode 100644 index 580903ad4..000000000 --- a/src/__tests__/mockserver/internal/sdk/models/components/platformchattextformat.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. -// @generated-id: 26e47a3c7596 - -package components - -import ( - "encoding/json" - "fmt" - "mockserver/internal/sdk/utils" -) - -// PlatformChatTextFormatType - Discriminator. Must be TEXT. -type PlatformChatTextFormatType string - -const ( - PlatformChatTextFormatTypeText PlatformChatTextFormatType = "TEXT" -) - -func (e PlatformChatTextFormatType) ToPointer() *PlatformChatTextFormatType { - return &e -} -func (e *PlatformChatTextFormatType) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "TEXT": - *e = PlatformChatTextFormatType(v) - return nil - default: - return fmt.Errorf("invalid value for PlatformChatTextFormatType: %v", v) - } -} - -// PlatformChatTextFormat - Unconstrained plain-text assistant output. -type PlatformChatTextFormat struct { - // Discriminator. Must be TEXT. - Type PlatformChatTextFormatType `json:"type"` -} - -func (p PlatformChatTextFormat) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(p, "", false) -} - -func (p *PlatformChatTextFormat) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &p, "", false, []string{"type"}); err != nil { - return err - } - return nil -} - -func (o *PlatformChatTextFormat) GetType() PlatformChatTextFormatType { - if o == nil { - return PlatformChatTextFormatType("") - } - return o.Type -} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/platformchatcreate.go b/src/__tests__/mockserver/internal/sdk/models/operations/platformchatcreate.go index 12c116d75..439b883ac 100644 --- a/src/__tests__/mockserver/internal/sdk/models/operations/platformchatcreate.go +++ b/src/__tests__/mockserver/internal/sdk/models/operations/platformchatcreate.go @@ -4,7 +4,6 @@ package operations import ( - "encoding/json" "errors" "fmt" "mockserver/internal/sdk/models/components" @@ -76,120 +75,6 @@ func (u PlatformChatCreateInput) MarshalJSON() ([]byte, error) { return nil, errors.New("could not marshal union type PlatformChatCreateInput: all fields are null") } -type PlatformChatCreateFormatType string - -const ( - PlatformChatCreateFormatTypeText PlatformChatCreateFormatType = "TEXT" - PlatformChatCreateFormatTypeJSONSchema PlatformChatCreateFormatType = "JSON_SCHEMA" -) - -// PlatformChatCreateFormat - Output format for the assistant text. TEXT is unconstrained. JSON_SCHEMA constrains the response to the supplied schema. -type PlatformChatCreateFormat struct { - PlatformChatTextFormat *components.PlatformChatTextFormat `queryParam:"inline"` - PlatformChatJSONSchemaFormat *components.PlatformChatJSONSchemaFormat `queryParam:"inline"` - - Type PlatformChatCreateFormatType -} - -func CreatePlatformChatCreateFormatText(text components.PlatformChatTextFormat) PlatformChatCreateFormat { - typ := PlatformChatCreateFormatTypeText - - typStr := components.PlatformChatTextFormatType(typ) - text.Type = typStr - - return PlatformChatCreateFormat{ - PlatformChatTextFormat: &text, - Type: typ, - } -} - -func CreatePlatformChatCreateFormatJSONSchema(jsonSchema components.PlatformChatJSONSchemaFormat) PlatformChatCreateFormat { - typ := PlatformChatCreateFormatTypeJSONSchema - - typStr := components.PlatformChatJSONSchemaFormatType(typ) - jsonSchema.Type = typStr - - return PlatformChatCreateFormat{ - PlatformChatJSONSchemaFormat: &jsonSchema, - Type: typ, - } -} - -func (u *PlatformChatCreateFormat) UnmarshalJSON(data []byte) error { - - type discriminator struct { - Type string `json:"type"` - } - - dis := new(discriminator) - if err := json.Unmarshal(data, &dis); err != nil { - return fmt.Errorf("could not unmarshal discriminator: %w", err) - } - - switch dis.Type { - case "TEXT": - platformChatTextFormat := new(components.PlatformChatTextFormat) - if err := utils.UnmarshalJSON(data, &platformChatTextFormat, "", true, nil); err != nil { - return fmt.Errorf("could not unmarshal `%s` into expected (Type == TEXT) type components.PlatformChatTextFormat within PlatformChatCreateFormat: %w", string(data), err) - } - - u.PlatformChatTextFormat = platformChatTextFormat - u.Type = PlatformChatCreateFormatTypeText - return nil - case "JSON_SCHEMA": - platformChatJSONSchemaFormat := new(components.PlatformChatJSONSchemaFormat) - if err := utils.UnmarshalJSON(data, &platformChatJSONSchemaFormat, "", true, nil); err != nil { - return fmt.Errorf("could not unmarshal `%s` into expected (Type == JSON_SCHEMA) type components.PlatformChatJSONSchemaFormat within PlatformChatCreateFormat: %w", string(data), err) - } - - u.PlatformChatJSONSchemaFormat = platformChatJSONSchemaFormat - u.Type = PlatformChatCreateFormatTypeJSONSchema - return nil - } - - return fmt.Errorf("could not unmarshal `%s` into any supported union types for PlatformChatCreateFormat", string(data)) -} - -func (u PlatformChatCreateFormat) MarshalJSON() ([]byte, error) { - if u.PlatformChatTextFormat != nil { - return utils.MarshalJSON(u.PlatformChatTextFormat, "", true) - } - - if u.PlatformChatJSONSchemaFormat != nil { - return utils.MarshalJSON(u.PlatformChatJSONSchemaFormat, "", true) - } - - return nil, errors.New("could not marshal union type PlatformChatCreateFormat: all fields are null") -} - -// PlatformChatCreateText - Optional configuration for the assistant's text response. When `format.type` is `JSON_SCHEMA`, the response is constrained to the supplied JSON schema and returned in `output[*].content[*].structured_output`. Structured output is not supported when `stream` is true. -type PlatformChatCreateText struct { - // Output format for the assistant text. TEXT is unconstrained. JSON_SCHEMA constrains the response to the supplied schema. - // - Format *PlatformChatCreateFormat `json:"format,omitempty"` -} - -func (o *PlatformChatCreateText) GetFormat() *PlatformChatCreateFormat { - if o == nil { - return nil - } - return o.Format -} - -func (o *PlatformChatCreateText) GetFormatText() *components.PlatformChatTextFormat { - if v := o.GetFormat(); v != nil { - return v.PlatformChatTextFormat - } - return nil -} - -func (o *PlatformChatCreateText) GetFormatJSONSchema() *components.PlatformChatJSONSchemaFormat { - if v := o.GetFormat(); v != nil { - return v.PlatformChatJSONSchemaFormat - } - return nil -} - type PlatformChatCreateRequest struct { // Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`. // @@ -201,9 +86,6 @@ type PlatformChatCreateRequest struct { // Continue an existing stored conversation. Incompatible with message-array `input` and with `store: false`. // ConversationID *string `json:"conversation_id,omitempty"` - // Optional configuration for the assistant's text response. When `format.type` is `JSON_SCHEMA`, the response is constrained to the supplied JSON schema and returned in `output[*].content[*].structured_output`. Structured output is not supported when `stream` is true. - // - Text *PlatformChatCreateText `json:"text,omitempty"` } func (p PlatformChatCreateRequest) MarshalJSON() ([]byte, error) { @@ -242,13 +124,6 @@ func (o *PlatformChatCreateRequest) GetConversationID() *string { return o.ConversationID } -func (o *PlatformChatCreateRequest) GetText() *PlatformChatCreateText { - if o == nil { - return nil - } - return o.Text -} - type PlatformChatCreateResponse struct { HTTPMeta components.HTTPMetadata `json:"-"` // Successful response. diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/platformchatcreatestream.go b/src/__tests__/mockserver/internal/sdk/models/operations/platformchatcreatestream.go index 68b74befa..b4b32f8fb 100644 --- a/src/__tests__/mockserver/internal/sdk/models/operations/platformchatcreatestream.go +++ b/src/__tests__/mockserver/internal/sdk/models/operations/platformchatcreatestream.go @@ -4,7 +4,6 @@ package operations import ( - "encoding/json" "errors" "fmt" "mockserver/internal/sdk/models/components" @@ -77,120 +76,6 @@ func (u PlatformChatCreateStreamInput) MarshalJSON() ([]byte, error) { return nil, errors.New("could not marshal union type PlatformChatCreateStreamInput: all fields are null") } -type PlatformChatCreateStreamFormatType string - -const ( - PlatformChatCreateStreamFormatTypeText PlatformChatCreateStreamFormatType = "TEXT" - PlatformChatCreateStreamFormatTypeJSONSchema PlatformChatCreateStreamFormatType = "JSON_SCHEMA" -) - -// PlatformChatCreateStreamFormat - Output format for the assistant text. TEXT is unconstrained. JSON_SCHEMA constrains the response to the supplied schema. -type PlatformChatCreateStreamFormat struct { - PlatformChatTextFormat *components.PlatformChatTextFormat `queryParam:"inline"` - PlatformChatJSONSchemaFormat *components.PlatformChatJSONSchemaFormat `queryParam:"inline"` - - Type PlatformChatCreateStreamFormatType -} - -func CreatePlatformChatCreateStreamFormatText(text components.PlatformChatTextFormat) PlatformChatCreateStreamFormat { - typ := PlatformChatCreateStreamFormatTypeText - - typStr := components.PlatformChatTextFormatType(typ) - text.Type = typStr - - return PlatformChatCreateStreamFormat{ - PlatformChatTextFormat: &text, - Type: typ, - } -} - -func CreatePlatformChatCreateStreamFormatJSONSchema(jsonSchema components.PlatformChatJSONSchemaFormat) PlatformChatCreateStreamFormat { - typ := PlatformChatCreateStreamFormatTypeJSONSchema - - typStr := components.PlatformChatJSONSchemaFormatType(typ) - jsonSchema.Type = typStr - - return PlatformChatCreateStreamFormat{ - PlatformChatJSONSchemaFormat: &jsonSchema, - Type: typ, - } -} - -func (u *PlatformChatCreateStreamFormat) UnmarshalJSON(data []byte) error { - - type discriminator struct { - Type string `json:"type"` - } - - dis := new(discriminator) - if err := json.Unmarshal(data, &dis); err != nil { - return fmt.Errorf("could not unmarshal discriminator: %w", err) - } - - switch dis.Type { - case "TEXT": - platformChatTextFormat := new(components.PlatformChatTextFormat) - if err := utils.UnmarshalJSON(data, &platformChatTextFormat, "", true, nil); err != nil { - return fmt.Errorf("could not unmarshal `%s` into expected (Type == TEXT) type components.PlatformChatTextFormat within PlatformChatCreateStreamFormat: %w", string(data), err) - } - - u.PlatformChatTextFormat = platformChatTextFormat - u.Type = PlatformChatCreateStreamFormatTypeText - return nil - case "JSON_SCHEMA": - platformChatJSONSchemaFormat := new(components.PlatformChatJSONSchemaFormat) - if err := utils.UnmarshalJSON(data, &platformChatJSONSchemaFormat, "", true, nil); err != nil { - return fmt.Errorf("could not unmarshal `%s` into expected (Type == JSON_SCHEMA) type components.PlatformChatJSONSchemaFormat within PlatformChatCreateStreamFormat: %w", string(data), err) - } - - u.PlatformChatJSONSchemaFormat = platformChatJSONSchemaFormat - u.Type = PlatformChatCreateStreamFormatTypeJSONSchema - return nil - } - - return fmt.Errorf("could not unmarshal `%s` into any supported union types for PlatformChatCreateStreamFormat", string(data)) -} - -func (u PlatformChatCreateStreamFormat) MarshalJSON() ([]byte, error) { - if u.PlatformChatTextFormat != nil { - return utils.MarshalJSON(u.PlatformChatTextFormat, "", true) - } - - if u.PlatformChatJSONSchemaFormat != nil { - return utils.MarshalJSON(u.PlatformChatJSONSchemaFormat, "", true) - } - - return nil, errors.New("could not marshal union type PlatformChatCreateStreamFormat: all fields are null") -} - -// PlatformChatCreateStreamText - Optional configuration for the assistant's text response. When `format.type` is `JSON_SCHEMA`, the response is constrained to the supplied JSON schema and returned in `output[*].content[*].structured_output`. Structured output is not supported when `stream` is true. -type PlatformChatCreateStreamText struct { - // Output format for the assistant text. TEXT is unconstrained. JSON_SCHEMA constrains the response to the supplied schema. - // - Format *PlatformChatCreateStreamFormat `json:"format,omitempty"` -} - -func (o *PlatformChatCreateStreamText) GetFormat() *PlatformChatCreateStreamFormat { - if o == nil { - return nil - } - return o.Format -} - -func (o *PlatformChatCreateStreamText) GetFormatText() *components.PlatformChatTextFormat { - if v := o.GetFormat(); v != nil { - return v.PlatformChatTextFormat - } - return nil -} - -func (o *PlatformChatCreateStreamText) GetFormatJSONSchema() *components.PlatformChatJSONSchemaFormat { - if v := o.GetFormat(); v != nil { - return v.PlatformChatJSONSchemaFormat - } - return nil -} - type PlatformChatCreateStreamRequest struct { // Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`. // @@ -202,9 +87,6 @@ type PlatformChatCreateStreamRequest struct { // Continue an existing stored conversation. Incompatible with message-array `input` and with `store: false`. // ConversationID *string `json:"conversation_id,omitempty"` - // Optional configuration for the assistant's text response. When `format.type` is `JSON_SCHEMA`, the response is constrained to the supplied JSON schema and returned in `output[*].content[*].structured_output`. Structured output is not supported when `stream` is true. - // - Text *PlatformChatCreateStreamText `json:"text,omitempty"` } func (p PlatformChatCreateStreamRequest) MarshalJSON() ([]byte, error) { @@ -243,13 +125,6 @@ func (o *PlatformChatCreateStreamRequest) GetConversationID() *string { return o.ConversationID } -func (o *PlatformChatCreateStreamRequest) GetText() *PlatformChatCreateStreamText { - if o == nil { - return nil - } - return o.Text -} - type PlatformChatCreateStreamResponse struct { HTTPMeta components.HTTPMetadata `json:"-"` // Successful response. diff --git a/src/__tests__/summarize.test.ts b/src/__tests__/summarize.test.ts index 140c6a17e..f400cda35 100644 --- a/src/__tests__/summarize.test.ts +++ b/src/__tests__/summarize.test.ts @@ -19,11 +19,12 @@ test("Summarize Summarize", async () => { const result = await glean.client.documents.summarize({ documentSpecs: [ { - ugcType: "ANNOUNCEMENTS", - contentId: 634958, + ugcType: "CHATS", + contentId: 735985, }, { - url: "https://internal-sustenance.info/", + ugcType: "CHATS", + contentId: 735985, }, ], }); diff --git a/src/lib/config.ts b/src/lib/config.ts index 986a1711c..63a4a0218 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -73,8 +73,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "0.9.0", - sdkVersion: "0.20.22", + sdkVersion: "0.20.23", genVersion: "2.960.8", userAgent: - "speakeasy-sdk/typescript 0.20.22 2.960.8 0.9.0 @gleanwork/api-client", + "speakeasy-sdk/typescript 0.20.23 2.960.8 0.9.0 @gleanwork/api-client", } as const; diff --git a/src/models/components/index.ts b/src/models/components/index.ts index 1f33f00ca..0d5f1769d 100644 --- a/src/models/components/index.ts +++ b/src/models/components/index.ts @@ -392,7 +392,6 @@ export * from "./platformchatdocumentsource.js"; export * from "./platformchatfailedresponse.js"; export * from "./platformchatfilesource.js"; export * from "./platformchatinputmessage.js"; -export * from "./platformchatjsonschemaformat.js"; export * from "./platformchatoutputmessage.js"; export * from "./platformchatoutputtextcontent.js"; export * from "./platformchatpersonsource.js"; @@ -410,7 +409,6 @@ export * from "./platformchatstreamresponsecreated.js"; export * from "./platformchatstreamresponsecreatedserversentevent.js"; export * from "./platformchatstreamresponsefailed.js"; export * from "./platformchatstreamresponsefailedserversentevent.js"; -export * from "./platformchattextformat.js"; export * from "./platformchatupdaterequest.js"; export * from "./platformchatupdateresponse.js"; export * from "./platformcontentschedulewebhookevent.js"; diff --git a/src/models/components/platformchatjsonschemaformat.ts b/src/models/components/platformchatjsonschemaformat.ts deleted file mode 100644 index e620df58c..000000000 --- a/src/models/components/platformchatjsonschemaformat.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: c7086d714c13 - */ - -import * as z from "zod/v3"; - -/** - * Constrains the assistant response to a caller-supplied JSON Schema. - */ -export type PlatformChatJsonSchemaFormat = { - /** - * Discriminator. Must be JSON_SCHEMA. - */ - type: "JSON_SCHEMA"; - /** - * A stable identifier for the schema. - */ - name: string; - /** - * An optional human-readable description of the schema. - */ - description?: string | undefined; - /** - * A JSON Schema object describing the desired output shape. - */ - schema: { [k: string]: any }; - /** - * When true, the provider validates the response against the schema. Unsupported by some providers; defaults to true. - * - * @remarks - */ - strict?: boolean | undefined; -}; - -/** @internal */ -export type PlatformChatJsonSchemaFormat$Outbound = { - type: "JSON_SCHEMA"; - name: string; - description?: string | undefined; - schema: { [k: string]: any }; - strict: boolean; -}; - -/** @internal */ -export const PlatformChatJsonSchemaFormat$outboundSchema: z.ZodType< - PlatformChatJsonSchemaFormat$Outbound, - z.ZodTypeDef, - PlatformChatJsonSchemaFormat -> = z.object({ - type: z.literal("JSON_SCHEMA"), - name: z.string(), - description: z.string().optional(), - schema: z.record(z.any()), - strict: z.boolean().default(true), -}); - -export function platformChatJsonSchemaFormatToJSON( - platformChatJsonSchemaFormat: PlatformChatJsonSchemaFormat, -): string { - return JSON.stringify( - PlatformChatJsonSchemaFormat$outboundSchema.parse( - platformChatJsonSchemaFormat, - ), - ); -} diff --git a/src/models/components/platformchatoutputtextcontent.ts b/src/models/components/platformchatoutputtextcontent.ts index 02f6a05c0..fef0736f1 100644 --- a/src/models/components/platformchatoutputtextcontent.ts +++ b/src/models/components/platformchatoutputtextcontent.ts @@ -20,22 +20,9 @@ export type PlatformChatOutputTextContentType = ClosedEnum< typeof PlatformChatOutputTextContentType >; -/** - * Parsed and validated JSON object when structured output was requested. Present only when the request included `text.format.type: JSON_SCHEMA`. - * - * @remarks - */ -export type StructuredOutput = {}; - export type PlatformChatOutputTextContent = { type: PlatformChatOutputTextContentType; text: string; - /** - * Parsed and validated JSON object when structured output was requested. Present only when the request included `text.format.type: JSON_SCHEMA`. - * - * @remarks - */ - structured_output?: StructuredOutput | null | undefined; annotations?: Array | undefined; }; @@ -44,23 +31,6 @@ export const PlatformChatOutputTextContentType$inboundSchema: z.ZodNativeEnum< typeof PlatformChatOutputTextContentType > = z.nativeEnum(PlatformChatOutputTextContentType); -/** @internal */ -export const StructuredOutput$inboundSchema: z.ZodType< - StructuredOutput, - z.ZodTypeDef, - unknown -> = z.object({}); - -export function structuredOutputFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => StructuredOutput$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StructuredOutput' from JSON`, - ); -} - /** @internal */ export const PlatformChatOutputTextContent$inboundSchema: z.ZodType< PlatformChatOutputTextContent, @@ -69,8 +39,6 @@ export const PlatformChatOutputTextContent$inboundSchema: z.ZodType< > = z.object({ type: PlatformChatOutputTextContentType$inboundSchema, text: z.string(), - structured_output: z.nullable(z.lazy(() => StructuredOutput$inboundSchema)) - .optional(), annotations: z.array(PlatformChatCitationAnnotation$inboundSchema).optional(), }); diff --git a/src/models/components/platformchattextformat.ts b/src/models/components/platformchattextformat.ts deleted file mode 100644 index f76809c9f..000000000 --- a/src/models/components/platformchattextformat.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: 6dad34f1fc6d - */ - -import * as z from "zod/v3"; - -/** - * Unconstrained plain-text assistant output. - */ -export type PlatformChatTextFormat = { - /** - * Discriminator. Must be TEXT. - */ - type: "TEXT"; -}; - -/** @internal */ -export type PlatformChatTextFormat$Outbound = { - type: "TEXT"; -}; - -/** @internal */ -export const PlatformChatTextFormat$outboundSchema: z.ZodType< - PlatformChatTextFormat$Outbound, - z.ZodTypeDef, - PlatformChatTextFormat -> = z.object({ - type: z.literal("TEXT"), -}); - -export function platformChatTextFormatToJSON( - platformChatTextFormat: PlatformChatTextFormat, -): string { - return JSON.stringify( - PlatformChatTextFormat$outboundSchema.parse(platformChatTextFormat), - ); -} diff --git a/src/models/operations/platformchatcreate.ts b/src/models/operations/platformchatcreate.ts index abdc52608..c78b6a8a1 100644 --- a/src/models/operations/platformchatcreate.ts +++ b/src/models/operations/platformchatcreate.ts @@ -15,32 +15,6 @@ export type PlatformChatCreateInput = | string | Array; -/** - * Output format for the assistant text. TEXT is unconstrained. JSON_SCHEMA constrains the response to the supplied schema. - * - * @remarks - */ -export type PlatformChatCreateFormat = - | components.PlatformChatTextFormat - | components.PlatformChatJsonSchemaFormat; - -/** - * Optional configuration for the assistant's text response. When `format.type` is `JSON_SCHEMA`, the response is constrained to the supplied JSON schema and returned in `output[*].content[*].structured_output`. Structured output is not supported when `stream` is true. - * - * @remarks - */ -export type PlatformChatCreateText = { - /** - * Output format for the assistant text. TEXT is unconstrained. JSON_SCHEMA constrains the response to the supplied schema. - * - * @remarks - */ - format?: - | components.PlatformChatTextFormat - | components.PlatformChatJsonSchemaFormat - | undefined; -}; - export type PlatformChatCreateRequest = { /** * Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`. @@ -61,12 +35,6 @@ export type PlatformChatCreateRequest = { * @remarks */ conversation_id?: string | undefined; - /** - * Optional configuration for the assistant's text response. When `format.type` is `JSON_SCHEMA`, the response is constrained to the supplied JSON schema and returned in `output[*].content[*].structured_output`. Structured output is not supported when `stream` is true. - * - * @remarks - */ - text?: PlatformChatCreateText | undefined; }; /** @internal */ @@ -92,64 +60,12 @@ export function platformChatCreateInputToJSON( ); } -/** @internal */ -export type PlatformChatCreateFormat$Outbound = - | components.PlatformChatTextFormat$Outbound - | components.PlatformChatJsonSchemaFormat$Outbound; - -/** @internal */ -export const PlatformChatCreateFormat$outboundSchema: z.ZodType< - PlatformChatCreateFormat$Outbound, - z.ZodTypeDef, - PlatformChatCreateFormat -> = z.union([ - components.PlatformChatTextFormat$outboundSchema, - components.PlatformChatJsonSchemaFormat$outboundSchema, -]); - -export function platformChatCreateFormatToJSON( - platformChatCreateFormat: PlatformChatCreateFormat, -): string { - return JSON.stringify( - PlatformChatCreateFormat$outboundSchema.parse(platformChatCreateFormat), - ); -} - -/** @internal */ -export type PlatformChatCreateText$Outbound = { - format?: - | components.PlatformChatTextFormat$Outbound - | components.PlatformChatJsonSchemaFormat$Outbound - | undefined; -}; - -/** @internal */ -export const PlatformChatCreateText$outboundSchema: z.ZodType< - PlatformChatCreateText$Outbound, - z.ZodTypeDef, - PlatformChatCreateText -> = z.object({ - format: z.union([ - components.PlatformChatTextFormat$outboundSchema, - components.PlatformChatJsonSchemaFormat$outboundSchema, - ]).optional(), -}); - -export function platformChatCreateTextToJSON( - platformChatCreateText: PlatformChatCreateText, -): string { - return JSON.stringify( - PlatformChatCreateText$outboundSchema.parse(platformChatCreateText), - ); -} - /** @internal */ export type PlatformChatCreateRequest$Outbound = { input: string | Array; stream: false; store: boolean; conversation_id?: string | undefined; - text?: PlatformChatCreateText$Outbound | undefined; }; /** @internal */ @@ -165,7 +81,6 @@ export const PlatformChatCreateRequest$outboundSchema: z.ZodType< stream: z.literal(false).default(false as const), store: z.boolean().default(true), conversation_id: z.string().optional(), - text: z.lazy(() => PlatformChatCreateText$outboundSchema).optional(), }); export function platformChatCreateRequestToJSON( diff --git a/src/models/operations/platformchatcreatestream.ts b/src/models/operations/platformchatcreatestream.ts index 3b1f8a172..c06337a78 100644 --- a/src/models/operations/platformchatcreatestream.ts +++ b/src/models/operations/platformchatcreatestream.ts @@ -15,32 +15,6 @@ export type PlatformChatCreateStreamInput = | string | Array; -/** - * Output format for the assistant text. TEXT is unconstrained. JSON_SCHEMA constrains the response to the supplied schema. - * - * @remarks - */ -export type PlatformChatCreateStreamFormat = - | components.PlatformChatTextFormat - | components.PlatformChatJsonSchemaFormat; - -/** - * Optional configuration for the assistant's text response. When `format.type` is `JSON_SCHEMA`, the response is constrained to the supplied JSON schema and returned in `output[*].content[*].structured_output`. Structured output is not supported when `stream` is true. - * - * @remarks - */ -export type PlatformChatCreateStreamText = { - /** - * Output format for the assistant text. TEXT is unconstrained. JSON_SCHEMA constrains the response to the supplied schema. - * - * @remarks - */ - format?: - | components.PlatformChatTextFormat - | components.PlatformChatJsonSchemaFormat - | undefined; -}; - export type PlatformChatCreateStreamRequest = { /** * Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`. @@ -61,12 +35,6 @@ export type PlatformChatCreateStreamRequest = { * @remarks */ conversation_id?: string | undefined; - /** - * Optional configuration for the assistant's text response. When `format.type` is `JSON_SCHEMA`, the response is constrained to the supplied JSON schema and returned in `output[*].content[*].structured_output`. Structured output is not supported when `stream` is true. - * - * @remarks - */ - text?: PlatformChatCreateStreamText | undefined; }; /** @internal */ @@ -94,68 +62,12 @@ export function platformChatCreateStreamInputToJSON( ); } -/** @internal */ -export type PlatformChatCreateStreamFormat$Outbound = - | components.PlatformChatTextFormat$Outbound - | components.PlatformChatJsonSchemaFormat$Outbound; - -/** @internal */ -export const PlatformChatCreateStreamFormat$outboundSchema: z.ZodType< - PlatformChatCreateStreamFormat$Outbound, - z.ZodTypeDef, - PlatformChatCreateStreamFormat -> = z.union([ - components.PlatformChatTextFormat$outboundSchema, - components.PlatformChatJsonSchemaFormat$outboundSchema, -]); - -export function platformChatCreateStreamFormatToJSON( - platformChatCreateStreamFormat: PlatformChatCreateStreamFormat, -): string { - return JSON.stringify( - PlatformChatCreateStreamFormat$outboundSchema.parse( - platformChatCreateStreamFormat, - ), - ); -} - -/** @internal */ -export type PlatformChatCreateStreamText$Outbound = { - format?: - | components.PlatformChatTextFormat$Outbound - | components.PlatformChatJsonSchemaFormat$Outbound - | undefined; -}; - -/** @internal */ -export const PlatformChatCreateStreamText$outboundSchema: z.ZodType< - PlatformChatCreateStreamText$Outbound, - z.ZodTypeDef, - PlatformChatCreateStreamText -> = z.object({ - format: z.union([ - components.PlatformChatTextFormat$outboundSchema, - components.PlatformChatJsonSchemaFormat$outboundSchema, - ]).optional(), -}); - -export function platformChatCreateStreamTextToJSON( - platformChatCreateStreamText: PlatformChatCreateStreamText, -): string { - return JSON.stringify( - PlatformChatCreateStreamText$outboundSchema.parse( - platformChatCreateStreamText, - ), - ); -} - /** @internal */ export type PlatformChatCreateStreamRequest$Outbound = { input: string | Array; stream: true; store: boolean; conversation_id?: string | undefined; - text?: PlatformChatCreateStreamText$Outbound | undefined; }; /** @internal */ @@ -171,7 +83,6 @@ export const PlatformChatCreateStreamRequest$outboundSchema: z.ZodType< stream: z.literal(true).default(true as const), store: z.boolean().default(true), conversation_id: z.string().optional(), - text: z.lazy(() => PlatformChatCreateStreamText$outboundSchema).optional(), }); export function platformChatCreateStreamRequestToJSON( From 716ec8b6230eaddcb99c2c0d8a977915a1ef70f3 Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Fri, 13 Nov 2026 04:59:19 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow