diff --git a/.codegen.json b/.codegen.json index 2f429557..3537194a 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "6a7e147", "specHash": "137da0d", "version": "1.2.0" } +{ "engineHash": "c2b0bec", "specHash": "d36b9f0", "version": "1.2.0" } diff --git a/docs/ai.md b/docs/ai.md index c0d79fdb..fdfdd412 100644 --- a/docs/ai.md +++ b/docs/ai.md @@ -2,6 +2,7 @@ - [Send AI question request](#send-ai-question-request) - [Send AI request to generate text](#send-ai-request-to-generate-text) +- [Get AI agent default configuration](#get-ai-agent-default-configuration) ## Send AI question request @@ -95,3 +96,30 @@ await client.ai.createAiTextGen({ This function returns a value of type `AiResponse`. A successful response including the answer from the LLM. + +## Get AI agent default configuration + +Get the AI agent default config + +This operation is performed by calling function `getAiAgentDefault`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/get-ai-agent-default/). + +_Currently we don't have an example for calling `getAiAgentDefault` in integration tests_ + +### Arguments + +- queryParams `GetAiAgentDefaultQueryParams` + - Query parameters of getAiAgentDefault method +- optionalsInput `GetAiAgentDefaultOptionalsInput` + - + +### Returns + +This function returns a value of type `AiAgentAskOrAiAgentTextGen`. + +A successful response including the default agent configuration. +This response can be one of the following two objects: +AI agent for questions and AI agent for text generation. The response +depends on the agent configuration requested in this endpoint. diff --git a/package-lock.json b/package-lock.json index c63e3d65..1b7b4f48 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1117,9 +1117,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.1.tgz", - "integrity": "sha512-lncuC4aHicncmbORnx+dUaAgzee9cm/PbIqgWz1PpXuwc+sa1Ct83tnqUDy/GFKleLiN7ZIeytM6KJ4cAn1SxA==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.19.0.tgz", + "integrity": "sha512-JlPfZ/C7yn5S5p0yKk7uhHTTnFlvTgLetl2VxqE518QgyM7C9bSfFTYvB/Q/ftkq0RIPY4ySxTz+/wKJ/dXC0w==", "cpu": [ "arm" ], @@ -1130,9 +1130,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.1.tgz", - "integrity": "sha512-F/tkdw0WSs4ojqz5Ovrw5r9odqzFjb5LIgHdHZG65dFI1lWTWRVy32KDJLKRISHgJvqUeUhdIvy43fX41znyDg==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.19.0.tgz", + "integrity": "sha512-RDxUSY8D1tWYfn00DDi5myxKgOk6RvWPxhmWexcICt/MEC6yEMr4HNCu1sXXYLw8iAsg0D44NuU+qNq7zVWCrw==", "cpu": [ "arm64" ], @@ -1143,9 +1143,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.1.tgz", - "integrity": "sha512-vk+ma8iC1ebje/ahpxpnrfVQJibTMyHdWpOGZ3JpQ7Mgn/3QNHmPq7YwjZbIE7km73dH5M1e6MRRsnEBW7v5CQ==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.19.0.tgz", + "integrity": "sha512-emvKHL4B15x6nlNTBMtIaC9tLPRpeA5jMvRLXVbl/W9Ie7HhkrE7KQjvgS9uxgatL1HmHWDXk5TTS4IaNJxbAA==", "cpu": [ "arm64" ], @@ -1156,9 +1156,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.1.tgz", - "integrity": "sha512-IgpzXKauRe1Tafcej9STjSSuG0Ghu/xGYH+qG6JwsAUxXrnkvNHcq/NL6nz1+jzvWAnQkuAJ4uIwGB48K9OCGA==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.19.0.tgz", + "integrity": "sha512-fO28cWA1dC57qCd+D0rfLC4VPbh6EOJXrreBmFLWPGI9dpMlER2YwSPZzSGfq11XgcEpPukPTfEVFtw2q2nYJg==", "cpu": [ "x64" ], @@ -1169,9 +1169,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.1.tgz", - "integrity": "sha512-P9bSiAUnSSM7EmyRK+e5wgpqai86QOSv8BwvkGjLwYuOpaeomiZWifEos517CwbG+aZl1T4clSE1YqqH2JRs+g==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.19.0.tgz", + "integrity": "sha512-2Rn36Ubxdv32NUcfm0wB1tgKqkQuft00PtM23VqLuCUR4N5jcNWDoV5iBC9jeGdgS38WK66ElncprqgMUOyomw==", "cpu": [ "arm" ], @@ -1182,9 +1182,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.1.tgz", - "integrity": "sha512-5RnjpACoxtS+aWOI1dURKno11d7krfpGDEn19jI8BuWmSBbUC4ytIADfROM1FZrFhQPSoP+KEa3NlEScznBTyQ==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.19.0.tgz", + "integrity": "sha512-gJuzIVdq/X1ZA2bHeCGCISe0VWqCoNT8BvkQ+BfsixXwTOndhtLUpOg0A1Fcx/+eA6ei6rMBzlOz4JzmiDw7JQ==", "cpu": [ "arm" ], @@ -1195,9 +1195,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.1.tgz", - "integrity": "sha512-8mwmGD668m8WaGbthrEYZ9CBmPug2QPGWxhJxh/vCgBjro5o96gL04WLlg5BA233OCWLqERy4YUzX3bJGXaJgQ==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.19.0.tgz", + "integrity": "sha512-0EkX2HYPkSADo9cfeGFoQ7R0/wTKb7q6DdwI4Yn/ULFE1wuRRCHybxpl2goQrx4c/yzK3I8OlgtBu4xvted0ug==", "cpu": [ "arm64" ], @@ -1208,9 +1208,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.1.tgz", - "integrity": "sha512-dJX9u4r4bqInMGOAQoGYdwDP8lQiisWb9et+T84l2WXk41yEej8v2iGKodmdKimT8cTAYt0jFb+UEBxnPkbXEQ==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.19.0.tgz", + "integrity": "sha512-GlIQRj9px52ISomIOEUq/IojLZqzkvRpdP3cLgIE1wUWaiU5Takwlzpz002q0Nxxr1y2ZgxC2obWxjr13lvxNQ==", "cpu": [ "arm64" ], @@ -1221,9 +1221,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.1.tgz", - "integrity": "sha512-V72cXdTl4EI0x6FNmho4D502sy7ed+LuVW6Ym8aI6DRQ9hQZdp5sj0a2usYOlqvFBNKQnLQGwmYnujo2HvjCxQ==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.19.0.tgz", + "integrity": "sha512-N6cFJzssruDLUOKfEKeovCKiHcdwVYOT1Hs6dovDQ61+Y9n3Ek4zXvtghPPelt6U0AH4aDGnDLb83uiJMkWYzQ==", "cpu": [ "ppc64" ], @@ -1234,9 +1234,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.1.tgz", - "integrity": "sha512-f+pJih7sxoKmbjghrM2RkWo2WHUW8UbfxIQiWo5yeCaCM0TveMEuAzKJte4QskBp1TIinpnRcxkquY+4WuY/tg==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.19.0.tgz", + "integrity": "sha512-2DnD3mkS2uuam/alF+I7M84koGwvn3ZVD7uG+LEWpyzo/bq8+kKnus2EVCkcvh6PlNB8QPNFOz6fWd5N8o1CYg==", "cpu": [ "riscv64" ], @@ -1247,9 +1247,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.1.tgz", - "integrity": "sha512-qb1hMMT3Fr/Qz1OKovCuUM11MUNLUuHeBC2DPPAWUYYUAOFWaxInaTwTQmc7Fl5La7DShTEpmYwgdt2hG+4TEg==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.19.0.tgz", + "integrity": "sha512-D6pkaF7OpE7lzlTOFCB2m3Ngzu2ykw40Nka9WmKGUOTS3xcIieHe82slQlNq69sVB04ch73thKYIWz/Ian8DUA==", "cpu": [ "s390x" ], @@ -1260,9 +1260,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.1.tgz", - "integrity": "sha512-7O5u/p6oKUFYjRbZkL2FLbwsyoJAjyeXHCU3O4ndvzg2OFO2GinFPSJFGbiwFDaCFc+k7gs9CF243PwdPQFh5g==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.19.0.tgz", + "integrity": "sha512-HBndjQLP8OsdJNSxpNIN0einbDmRFg9+UQeZV1eiYupIRuZsDEoeGU43NQsS34Pp166DtwQOnpcbV/zQxM+rWA==", "cpu": [ "x64" ], @@ -1273,9 +1273,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.1.tgz", - "integrity": "sha512-pDLkYITdYrH/9Cv/Vlj8HppDuLMDUBmgsM0+N+xLtFd18aXgM9Nyqupb/Uw+HeidhfYg2lD6CXvz6CjoVOaKjQ==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.19.0.tgz", + "integrity": "sha512-HxfbvfCKJe/RMYJJn0a12eiOI9OOtAUF4G6ozrFUK95BNyoJaSiBjIOHjZskTUffUrB84IPKkFG9H9nEvJGW6A==", "cpu": [ "x64" ], @@ -1286,9 +1286,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.1.tgz", - "integrity": "sha512-W2ZNI323O/8pJdBGil1oCauuCzmVd9lDmWBBqxYZcOqWD6aWqJtVBQ1dFrF4dYpZPks6F+xCZHfzG5hYlSHZ6g==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.19.0.tgz", + "integrity": "sha512-HxDMKIhmcguGTiP5TsLNolwBUK3nGGUEoV/BO9ldUBoMLBssvh4J0X8pf11i1fTV7WShWItB1bKAKjX4RQeYmg==", "cpu": [ "arm64" ], @@ -1299,9 +1299,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.1.tgz", - "integrity": "sha512-ELfEX1/+eGZYMaCIbK4jqLxO1gyTSOIlZr6pbC4SRYFaSIDVKOnZNMdoZ+ON0mrFDp4+H5MhwNC1H/AhE3zQLg==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.19.0.tgz", + "integrity": "sha512-xItlIAZZaiG/u0wooGzRsx11rokP4qyc/79LkAOdznGRAbOFc+SfEdfUOszG1odsHNgwippUJavag/+W/Etc6Q==", "cpu": [ "ia32" ], @@ -1312,9 +1312,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.1.tgz", - "integrity": "sha512-yjk2MAkQmoaPYCSu35RLJ62+dz358nE83VfTePJRp8CG7aMg25mEJYpXFiD+NcevhX8LxD5OP5tktPXnXN7GDw==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.19.0.tgz", + "integrity": "sha512-xNo5fV5ycvCCKqiZcpB65VMR11NJB+StnxHz20jdqRAktfdfzhgjTiJ2doTDQE/7dqGaV5I7ZGqKpgph6lCIag==", "cpu": [ "x64" ], @@ -1877,9 +1877,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001642", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001642.tgz", - "integrity": "sha512-3XQ0DoRgLijXJErLSl+bLnJ+Et4KqV1PY6JJBGAFlsNsz31zeAIncyeZfLCabHK/jtSh+671RM9YMldxjUPZtA==", + "version": "1.0.30001643", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001643.tgz", + "integrity": "sha512-ERgWGNleEilSrHM6iUz/zJNSQTP8Mr21wDWpdgvRwcTXGAq6jMtOUPP4dqFPTdKqZ2wKTdtB+uucZ3MRpAUSmg==", "dev": true, "funding": [ { @@ -2156,9 +2156,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.829", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.829.tgz", - "integrity": "sha512-5qp1N2POAfW0u1qGAxXEtz6P7bO1m6gpZr5hdf5ve6lxpLM7MpiM4jIPz7xcrNlClQMafbyUDDWjlIQZ1Mw0Rw==", + "version": "1.4.832", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.832.tgz", + "integrity": "sha512-cTen3SB0H2SGU7x467NRe1eVcQgcuS6jckKfWJHia2eo0cHIGOqHoAxevIYZD4eRHcWjkvFzo93bi3vJ9W+1lA==", "dev": true }, "node_modules/emittery": { @@ -2579,9 +2579,9 @@ ] }, "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", "dev": true, "dependencies": { "pkg-dir": "^4.2.0", @@ -2815,9 +2815,9 @@ } }, "node_modules/jake": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.1.tgz", - "integrity": "sha512-61btcOHNnLnsOdtLgA5efqQWjnSi/vow5HbI7HMdKKWqvrKR1bLK3BPlJn9gcSaP2ewuamUSMB5XEy76KUIS2w==", + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", + "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", "dev": true, "dependencies": { "async": "^3.2.3", @@ -3786,9 +3786,9 @@ "dev": true }, "node_modules/node-releases": { - "version": "2.0.17", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.17.tgz", - "integrity": "sha512-Ww6ZlOiEQfPfXM45v17oabk77Z7mg5bOt7AjDyzy7RjK9OrLrLC8dyZQoAPEOtFX9SaNf1Tdvr5gRJWdTJj7GA==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", "dev": true }, "node_modules/normalize-path": { @@ -4156,9 +4156,9 @@ } }, "node_modules/rollup": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.1.tgz", - "integrity": "sha512-Elx2UT8lzxxOXMpy5HWQGZqkrQOtrVDDa/bm9l10+U4rQnVzbL/LgZ4NOM1MPIDyHk69W4InuYDF5dzRh4Kw1A==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.19.0.tgz", + "integrity": "sha512-5r7EYSQIowHsK4eTZ0Y81qpZuJz+MUuYeqmmYmRMl1nwhdmbiYqt5jwzf6u7wyOzJgYqtCRMtVRKOtHANBz7rA==", "dev": true, "dependencies": { "@types/estree": "1.0.5" @@ -4171,22 +4171,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.18.1", - "@rollup/rollup-android-arm64": "4.18.1", - "@rollup/rollup-darwin-arm64": "4.18.1", - "@rollup/rollup-darwin-x64": "4.18.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.18.1", - "@rollup/rollup-linux-arm-musleabihf": "4.18.1", - "@rollup/rollup-linux-arm64-gnu": "4.18.1", - "@rollup/rollup-linux-arm64-musl": "4.18.1", - "@rollup/rollup-linux-powerpc64le-gnu": "4.18.1", - "@rollup/rollup-linux-riscv64-gnu": "4.18.1", - "@rollup/rollup-linux-s390x-gnu": "4.18.1", - "@rollup/rollup-linux-x64-gnu": "4.18.1", - "@rollup/rollup-linux-x64-musl": "4.18.1", - "@rollup/rollup-win32-arm64-msvc": "4.18.1", - "@rollup/rollup-win32-ia32-msvc": "4.18.1", - "@rollup/rollup-win32-x64-msvc": "4.18.1", + "@rollup/rollup-android-arm-eabi": "4.19.0", + "@rollup/rollup-android-arm64": "4.19.0", + "@rollup/rollup-darwin-arm64": "4.19.0", + "@rollup/rollup-darwin-x64": "4.19.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.19.0", + "@rollup/rollup-linux-arm-musleabihf": "4.19.0", + "@rollup/rollup-linux-arm64-gnu": "4.19.0", + "@rollup/rollup-linux-arm64-musl": "4.19.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.19.0", + "@rollup/rollup-linux-riscv64-gnu": "4.19.0", + "@rollup/rollup-linux-s390x-gnu": "4.19.0", + "@rollup/rollup-linux-x64-gnu": "4.19.0", + "@rollup/rollup-linux-x64-musl": "4.19.0", + "@rollup/rollup-win32-arm64-msvc": "4.19.0", + "@rollup/rollup-win32-ia32-msvc": "4.19.0", + "@rollup/rollup-win32-x64-msvc": "4.19.0", "fsevents": "~2.3.2" } }, @@ -4496,13 +4496,13 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/ts-jest": { - "version": "29.2.2", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.2.tgz", - "integrity": "sha512-sSW7OooaKT34AAngP6k1VS669a0HdLxkQZnlC7T76sckGCokXFnvJ3yRlQZGRTAoV5K19HfSgCiSwWOSIfcYlg==", + "version": "29.2.3", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.3.tgz", + "integrity": "sha512-yCcfVdiBFngVz9/keHin9EnsrQtQtEu3nRykNy9RVp+FiPFFbPJ3Sg6Qg4+TkmH0vMP5qsTKgXSsk80HRwvdgQ==", "dev": true, "dependencies": { "bs-logger": "0.x", - "ejs": "^3.0.0", + "ejs": "^3.1.10", "fast-json-stable-stringify": "2.x", "jest-util": "^29.0.0", "json5": "^2.2.3", @@ -5592,114 +5592,114 @@ } }, "@rollup/rollup-android-arm-eabi": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.1.tgz", - "integrity": "sha512-lncuC4aHicncmbORnx+dUaAgzee9cm/PbIqgWz1PpXuwc+sa1Ct83tnqUDy/GFKleLiN7ZIeytM6KJ4cAn1SxA==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.19.0.tgz", + "integrity": "sha512-JlPfZ/C7yn5S5p0yKk7uhHTTnFlvTgLetl2VxqE518QgyM7C9bSfFTYvB/Q/ftkq0RIPY4ySxTz+/wKJ/dXC0w==", "dev": true, "optional": true }, "@rollup/rollup-android-arm64": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.1.tgz", - "integrity": "sha512-F/tkdw0WSs4ojqz5Ovrw5r9odqzFjb5LIgHdHZG65dFI1lWTWRVy32KDJLKRISHgJvqUeUhdIvy43fX41znyDg==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.19.0.tgz", + "integrity": "sha512-RDxUSY8D1tWYfn00DDi5myxKgOk6RvWPxhmWexcICt/MEC6yEMr4HNCu1sXXYLw8iAsg0D44NuU+qNq7zVWCrw==", "dev": true, "optional": true }, "@rollup/rollup-darwin-arm64": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.1.tgz", - "integrity": "sha512-vk+ma8iC1ebje/ahpxpnrfVQJibTMyHdWpOGZ3JpQ7Mgn/3QNHmPq7YwjZbIE7km73dH5M1e6MRRsnEBW7v5CQ==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.19.0.tgz", + "integrity": "sha512-emvKHL4B15x6nlNTBMtIaC9tLPRpeA5jMvRLXVbl/W9Ie7HhkrE7KQjvgS9uxgatL1HmHWDXk5TTS4IaNJxbAA==", "dev": true, "optional": true }, "@rollup/rollup-darwin-x64": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.1.tgz", - "integrity": "sha512-IgpzXKauRe1Tafcej9STjSSuG0Ghu/xGYH+qG6JwsAUxXrnkvNHcq/NL6nz1+jzvWAnQkuAJ4uIwGB48K9OCGA==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.19.0.tgz", + "integrity": "sha512-fO28cWA1dC57qCd+D0rfLC4VPbh6EOJXrreBmFLWPGI9dpMlER2YwSPZzSGfq11XgcEpPukPTfEVFtw2q2nYJg==", "dev": true, "optional": true }, "@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.1.tgz", - "integrity": "sha512-P9bSiAUnSSM7EmyRK+e5wgpqai86QOSv8BwvkGjLwYuOpaeomiZWifEos517CwbG+aZl1T4clSE1YqqH2JRs+g==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.19.0.tgz", + "integrity": "sha512-2Rn36Ubxdv32NUcfm0wB1tgKqkQuft00PtM23VqLuCUR4N5jcNWDoV5iBC9jeGdgS38WK66ElncprqgMUOyomw==", "dev": true, "optional": true }, "@rollup/rollup-linux-arm-musleabihf": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.1.tgz", - "integrity": "sha512-5RnjpACoxtS+aWOI1dURKno11d7krfpGDEn19jI8BuWmSBbUC4ytIADfROM1FZrFhQPSoP+KEa3NlEScznBTyQ==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.19.0.tgz", + "integrity": "sha512-gJuzIVdq/X1ZA2bHeCGCISe0VWqCoNT8BvkQ+BfsixXwTOndhtLUpOg0A1Fcx/+eA6ei6rMBzlOz4JzmiDw7JQ==", "dev": true, "optional": true }, "@rollup/rollup-linux-arm64-gnu": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.1.tgz", - "integrity": "sha512-8mwmGD668m8WaGbthrEYZ9CBmPug2QPGWxhJxh/vCgBjro5o96gL04WLlg5BA233OCWLqERy4YUzX3bJGXaJgQ==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.19.0.tgz", + "integrity": "sha512-0EkX2HYPkSADo9cfeGFoQ7R0/wTKb7q6DdwI4Yn/ULFE1wuRRCHybxpl2goQrx4c/yzK3I8OlgtBu4xvted0ug==", "dev": true, "optional": true }, "@rollup/rollup-linux-arm64-musl": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.1.tgz", - "integrity": "sha512-dJX9u4r4bqInMGOAQoGYdwDP8lQiisWb9et+T84l2WXk41yEej8v2iGKodmdKimT8cTAYt0jFb+UEBxnPkbXEQ==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.19.0.tgz", + "integrity": "sha512-GlIQRj9px52ISomIOEUq/IojLZqzkvRpdP3cLgIE1wUWaiU5Takwlzpz002q0Nxxr1y2ZgxC2obWxjr13lvxNQ==", "dev": true, "optional": true }, "@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.1.tgz", - "integrity": "sha512-V72cXdTl4EI0x6FNmho4D502sy7ed+LuVW6Ym8aI6DRQ9hQZdp5sj0a2usYOlqvFBNKQnLQGwmYnujo2HvjCxQ==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.19.0.tgz", + "integrity": "sha512-N6cFJzssruDLUOKfEKeovCKiHcdwVYOT1Hs6dovDQ61+Y9n3Ek4zXvtghPPelt6U0AH4aDGnDLb83uiJMkWYzQ==", "dev": true, "optional": true }, "@rollup/rollup-linux-riscv64-gnu": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.1.tgz", - "integrity": "sha512-f+pJih7sxoKmbjghrM2RkWo2WHUW8UbfxIQiWo5yeCaCM0TveMEuAzKJte4QskBp1TIinpnRcxkquY+4WuY/tg==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.19.0.tgz", + "integrity": "sha512-2DnD3mkS2uuam/alF+I7M84koGwvn3ZVD7uG+LEWpyzo/bq8+kKnus2EVCkcvh6PlNB8QPNFOz6fWd5N8o1CYg==", "dev": true, "optional": true }, "@rollup/rollup-linux-s390x-gnu": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.1.tgz", - "integrity": "sha512-qb1hMMT3Fr/Qz1OKovCuUM11MUNLUuHeBC2DPPAWUYYUAOFWaxInaTwTQmc7Fl5La7DShTEpmYwgdt2hG+4TEg==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.19.0.tgz", + "integrity": "sha512-D6pkaF7OpE7lzlTOFCB2m3Ngzu2ykw40Nka9WmKGUOTS3xcIieHe82slQlNq69sVB04ch73thKYIWz/Ian8DUA==", "dev": true, "optional": true }, "@rollup/rollup-linux-x64-gnu": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.1.tgz", - "integrity": "sha512-7O5u/p6oKUFYjRbZkL2FLbwsyoJAjyeXHCU3O4ndvzg2OFO2GinFPSJFGbiwFDaCFc+k7gs9CF243PwdPQFh5g==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.19.0.tgz", + "integrity": "sha512-HBndjQLP8OsdJNSxpNIN0einbDmRFg9+UQeZV1eiYupIRuZsDEoeGU43NQsS34Pp166DtwQOnpcbV/zQxM+rWA==", "dev": true, "optional": true }, "@rollup/rollup-linux-x64-musl": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.1.tgz", - "integrity": "sha512-pDLkYITdYrH/9Cv/Vlj8HppDuLMDUBmgsM0+N+xLtFd18aXgM9Nyqupb/Uw+HeidhfYg2lD6CXvz6CjoVOaKjQ==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.19.0.tgz", + "integrity": "sha512-HxfbvfCKJe/RMYJJn0a12eiOI9OOtAUF4G6ozrFUK95BNyoJaSiBjIOHjZskTUffUrB84IPKkFG9H9nEvJGW6A==", "dev": true, "optional": true }, "@rollup/rollup-win32-arm64-msvc": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.1.tgz", - "integrity": "sha512-W2ZNI323O/8pJdBGil1oCauuCzmVd9lDmWBBqxYZcOqWD6aWqJtVBQ1dFrF4dYpZPks6F+xCZHfzG5hYlSHZ6g==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.19.0.tgz", + "integrity": "sha512-HxDMKIhmcguGTiP5TsLNolwBUK3nGGUEoV/BO9ldUBoMLBssvh4J0X8pf11i1fTV7WShWItB1bKAKjX4RQeYmg==", "dev": true, "optional": true }, "@rollup/rollup-win32-ia32-msvc": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.1.tgz", - "integrity": "sha512-ELfEX1/+eGZYMaCIbK4jqLxO1gyTSOIlZr6pbC4SRYFaSIDVKOnZNMdoZ+ON0mrFDp4+H5MhwNC1H/AhE3zQLg==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.19.0.tgz", + "integrity": "sha512-xItlIAZZaiG/u0wooGzRsx11rokP4qyc/79LkAOdznGRAbOFc+SfEdfUOszG1odsHNgwippUJavag/+W/Etc6Q==", "dev": true, "optional": true }, "@rollup/rollup-win32-x64-msvc": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.1.tgz", - "integrity": "sha512-yjk2MAkQmoaPYCSu35RLJ62+dz358nE83VfTePJRp8CG7aMg25mEJYpXFiD+NcevhX8LxD5OP5tktPXnXN7GDw==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.19.0.tgz", + "integrity": "sha512-xNo5fV5ycvCCKqiZcpB65VMR11NJB+StnxHz20jdqRAktfdfzhgjTiJ2doTDQE/7dqGaV5I7ZGqKpgph6lCIag==", "dev": true, "optional": true }, @@ -6140,9 +6140,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001642", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001642.tgz", - "integrity": "sha512-3XQ0DoRgLijXJErLSl+bLnJ+Et4KqV1PY6JJBGAFlsNsz31zeAIncyeZfLCabHK/jtSh+671RM9YMldxjUPZtA==", + "version": "1.0.30001643", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001643.tgz", + "integrity": "sha512-ERgWGNleEilSrHM6iUz/zJNSQTP8Mr21wDWpdgvRwcTXGAq6jMtOUPP4dqFPTdKqZ2wKTdtB+uucZ3MRpAUSmg==", "dev": true }, "chalk": { @@ -6326,9 +6326,9 @@ } }, "electron-to-chromium": { - "version": "1.4.829", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.829.tgz", - "integrity": "sha512-5qp1N2POAfW0u1qGAxXEtz6P7bO1m6gpZr5hdf5ve6lxpLM7MpiM4jIPz7xcrNlClQMafbyUDDWjlIQZ1Mw0Rw==", + "version": "1.4.832", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.832.tgz", + "integrity": "sha512-cTen3SB0H2SGU7x467NRe1eVcQgcuS6jckKfWJHia2eo0cHIGOqHoAxevIYZD4eRHcWjkvFzo93bi3vJ9W+1lA==", "dev": true }, "emittery": { @@ -6624,9 +6624,9 @@ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" }, "import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", "dev": true, "requires": { "pkg-dir": "^4.2.0", @@ -6800,9 +6800,9 @@ } }, "jake": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.1.tgz", - "integrity": "sha512-61btcOHNnLnsOdtLgA5efqQWjnSi/vow5HbI7HMdKKWqvrKR1bLK3BPlJn9gcSaP2ewuamUSMB5XEy76KUIS2w==", + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", + "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", "dev": true, "requires": { "async": "^3.2.3", @@ -7547,9 +7547,9 @@ "dev": true }, "node-releases": { - "version": "2.0.17", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.17.tgz", - "integrity": "sha512-Ww6ZlOiEQfPfXM45v17oabk77Z7mg5bOt7AjDyzy7RjK9OrLrLC8dyZQoAPEOtFX9SaNf1Tdvr5gRJWdTJj7GA==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", "dev": true }, "normalize-path": { @@ -7814,27 +7814,27 @@ "dev": true }, "rollup": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.1.tgz", - "integrity": "sha512-Elx2UT8lzxxOXMpy5HWQGZqkrQOtrVDDa/bm9l10+U4rQnVzbL/LgZ4NOM1MPIDyHk69W4InuYDF5dzRh4Kw1A==", - "dev": true, - "requires": { - "@rollup/rollup-android-arm-eabi": "4.18.1", - "@rollup/rollup-android-arm64": "4.18.1", - "@rollup/rollup-darwin-arm64": "4.18.1", - "@rollup/rollup-darwin-x64": "4.18.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.18.1", - "@rollup/rollup-linux-arm-musleabihf": "4.18.1", - "@rollup/rollup-linux-arm64-gnu": "4.18.1", - "@rollup/rollup-linux-arm64-musl": "4.18.1", - "@rollup/rollup-linux-powerpc64le-gnu": "4.18.1", - "@rollup/rollup-linux-riscv64-gnu": "4.18.1", - "@rollup/rollup-linux-s390x-gnu": "4.18.1", - "@rollup/rollup-linux-x64-gnu": "4.18.1", - "@rollup/rollup-linux-x64-musl": "4.18.1", - "@rollup/rollup-win32-arm64-msvc": "4.18.1", - "@rollup/rollup-win32-ia32-msvc": "4.18.1", - "@rollup/rollup-win32-x64-msvc": "4.18.1", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.19.0.tgz", + "integrity": "sha512-5r7EYSQIowHsK4eTZ0Y81qpZuJz+MUuYeqmmYmRMl1nwhdmbiYqt5jwzf6u7wyOzJgYqtCRMtVRKOtHANBz7rA==", + "dev": true, + "requires": { + "@rollup/rollup-android-arm-eabi": "4.19.0", + "@rollup/rollup-android-arm64": "4.19.0", + "@rollup/rollup-darwin-arm64": "4.19.0", + "@rollup/rollup-darwin-x64": "4.19.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.19.0", + "@rollup/rollup-linux-arm-musleabihf": "4.19.0", + "@rollup/rollup-linux-arm64-gnu": "4.19.0", + "@rollup/rollup-linux-arm64-musl": "4.19.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.19.0", + "@rollup/rollup-linux-riscv64-gnu": "4.19.0", + "@rollup/rollup-linux-s390x-gnu": "4.19.0", + "@rollup/rollup-linux-x64-gnu": "4.19.0", + "@rollup/rollup-linux-x64-musl": "4.19.0", + "@rollup/rollup-win32-arm64-msvc": "4.19.0", + "@rollup/rollup-win32-ia32-msvc": "4.19.0", + "@rollup/rollup-win32-x64-msvc": "4.19.0", "@types/estree": "1.0.5", "fsevents": "~2.3.2" } @@ -8069,13 +8069,13 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "ts-jest": { - "version": "29.2.2", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.2.tgz", - "integrity": "sha512-sSW7OooaKT34AAngP6k1VS669a0HdLxkQZnlC7T76sckGCokXFnvJ3yRlQZGRTAoV5K19HfSgCiSwWOSIfcYlg==", + "version": "29.2.3", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.3.tgz", + "integrity": "sha512-yCcfVdiBFngVz9/keHin9EnsrQtQtEu3nRykNy9RVp+FiPFFbPJ3Sg6Qg4+TkmH0vMP5qsTKgXSsk80HRwvdgQ==", "dev": true, "requires": { "bs-logger": "0.x", - "ejs": "^3.0.0", + "ejs": "^3.1.10", "fast-json-stable-stringify": "2.x", "jest-util": "^29.0.0", "json5": "^2.2.3", diff --git a/src/managers/ai.generated.ts b/src/managers/ai.generated.ts index 68a316c1..3bb1f82f 100644 --- a/src/managers/ai.generated.ts +++ b/src/managers/ai.generated.ts @@ -6,10 +6,13 @@ import { serializeAiAsk } from '../schemas/aiAsk.generated.js'; import { deserializeAiAsk } from '../schemas/aiAsk.generated.js'; import { serializeAiTextGen } from '../schemas/aiTextGen.generated.js'; import { deserializeAiTextGen } from '../schemas/aiTextGen.generated.js'; +import { serializeAiAgentAskOrAiAgentTextGen } from '../schemas/aiAgentAskOrAiAgentTextGen.generated.js'; +import { deserializeAiAgentAskOrAiAgentTextGen } from '../schemas/aiAgentAskOrAiAgentTextGen.generated.js'; import { AiResponse } from '../schemas/aiResponse.generated.js'; import { ClientError } from '../schemas/clientError.generated.js'; import { AiAsk } from '../schemas/aiAsk.generated.js'; import { AiTextGen } from '../schemas/aiTextGen.generated.js'; +import { AiAgentAskOrAiAgentTextGen } from '../schemas/aiAgentAskOrAiAgentTextGen.generated.js'; import { Authentication } from '../networking/auth.generated.js'; import { NetworkSession } from '../networking/network.generated.js'; import { prepareParams } from '../internal/utils.js'; @@ -20,6 +23,8 @@ import { FetchOptions } from '../networking/fetch.js'; import { FetchResponse } from '../networking/fetch.js'; import { fetch } from '../networking/fetch.js'; import { SerializedData } from '../serialization/json.js'; +import { sdToJson } from '../serialization/json.js'; +import { BoxSdkError } from '../box/errors.js'; import { sdIsEmpty } from '../serialization/json.js'; import { sdIsBoolean } from '../serialization/json.js'; import { sdIsNumber } from '../serialization/json.js'; @@ -64,6 +69,25 @@ export interface CreateAiTextGenOptionalsInput { readonly headers?: CreateAiTextGenHeaders; readonly cancellationToken?: undefined | CancellationToken; } +export class GetAiAgentDefaultOptionals { + readonly headers: GetAiAgentDefaultHeaders = new GetAiAgentDefaultHeaders({}); + readonly cancellationToken?: CancellationToken = void 0; + constructor( + fields: Omit & + Partial> + ) { + if (fields.headers) { + this.headers = fields.headers; + } + if (fields.cancellationToken) { + this.cancellationToken = fields.cancellationToken; + } + } +} +export interface GetAiAgentDefaultOptionalsInput { + readonly headers?: GetAiAgentDefaultHeaders; + readonly cancellationToken?: undefined | CancellationToken; +} export class CreateAiAskHeaders { readonly extraHeaders?: { readonly [key: string]: undefined | string; @@ -104,13 +128,39 @@ export interface CreateAiTextGenHeadersInput { readonly [key: string]: undefined | string; }; } +export type GetAiAgentDefaultQueryParamsModeField = 'ask' | 'text_gen'; +export interface GetAiAgentDefaultQueryParams { + readonly mode: GetAiAgentDefaultQueryParamsModeField; + readonly language?: string; + readonly model?: string; +} +export class GetAiAgentDefaultHeaders { + readonly extraHeaders?: { + readonly [key: string]: undefined | string; + } = {}; + constructor( + fields: Omit & + Partial> + ) { + if (fields.extraHeaders) { + this.extraHeaders = fields.extraHeaders; + } + } +} +export interface GetAiAgentDefaultHeadersInput { + readonly extraHeaders?: + | undefined + | { + readonly [key: string]: undefined | string; + }; +} export class AiManager { readonly auth?: Authentication; readonly networkSession: NetworkSession = new NetworkSession({}); constructor( fields: Omit< AiManager, - 'networkSession' | 'createAiAsk' | 'createAiTextGen' + 'networkSession' | 'createAiAsk' | 'createAiTextGen' | 'getAiAgentDefault' > & Partial> ) { @@ -180,8 +230,64 @@ export class AiManager { )) as FetchResponse; return deserializeAiResponse(response.data); } + async getAiAgentDefault( + queryParams: GetAiAgentDefaultQueryParams, + optionalsInput: GetAiAgentDefaultOptionalsInput = {} + ): Promise { + const optionals: GetAiAgentDefaultOptionals = + new GetAiAgentDefaultOptionals({ + headers: optionalsInput.headers, + cancellationToken: optionalsInput.cancellationToken, + }); + const headers: any = optionals.headers; + const cancellationToken: any = optionals.cancellationToken; + const queryParamsMap: { + readonly [key: string]: string; + } = prepareParams({ + ['mode']: toString(queryParams.mode) as string, + ['language']: toString(queryParams.language) as string, + ['model']: toString(queryParams.model) as string, + }); + const headersMap: { + readonly [key: string]: string; + } = prepareParams({ ...{}, ...headers.extraHeaders }); + const response: FetchResponse = (await fetch( + ''.concat( + this.networkSession.baseUrls.baseUrl, + '/2.0/ai_agent_default' + ) as string, + { + method: 'GET', + params: queryParamsMap, + headers: headersMap, + responseFormat: 'json', + auth: this.auth, + networkSession: this.networkSession, + cancellationToken: cancellationToken, + } satisfies FetchOptions + )) as FetchResponse; + return deserializeAiAgentAskOrAiAgentTextGen(response.data); + } } export interface AiManagerInput { readonly auth?: Authentication; readonly networkSession?: NetworkSession; } +export function serializeGetAiAgentDefaultQueryParamsModeField( + val: GetAiAgentDefaultQueryParamsModeField +): SerializedData { + return val; +} +export function deserializeGetAiAgentDefaultQueryParamsModeField( + val: SerializedData +): GetAiAgentDefaultQueryParamsModeField { + if (val == 'ask') { + return val; + } + if (val == 'text_gen') { + return val; + } + throw new BoxSdkError({ + message: "Can't deserialize GetAiAgentDefaultQueryParamsModeField", + }); +} diff --git a/src/schemas/aiAgentAsk.generated.ts b/src/schemas/aiAgentAsk.generated.ts new file mode 100644 index 00000000..4f07c49a --- /dev/null +++ b/src/schemas/aiAgentAsk.generated.ts @@ -0,0 +1,87 @@ +import { serializeAiAgentLongTextTool } from './aiAgentLongTextTool.generated.js'; +import { deserializeAiAgentLongTextTool } from './aiAgentLongTextTool.generated.js'; +import { serializeAiAgentBasicTextToolAsk } from './aiAgentBasicTextToolAsk.generated.js'; +import { deserializeAiAgentBasicTextToolAsk } from './aiAgentBasicTextToolAsk.generated.js'; +import { AiAgentLongTextTool } from './aiAgentLongTextTool.generated.js'; +import { AiAgentBasicTextToolAsk } from './aiAgentBasicTextToolAsk.generated.js'; +import { BoxSdkError } from '../box/errors.js'; +import { SerializedData } from '../serialization/json.js'; +import { sdIsEmpty } from '../serialization/json.js'; +import { sdIsBoolean } from '../serialization/json.js'; +import { sdIsNumber } from '../serialization/json.js'; +import { sdIsString } from '../serialization/json.js'; +import { sdIsList } from '../serialization/json.js'; +import { sdIsMap } from '../serialization/json.js'; +export type AiAgentAskTypeField = 'ai_agent_ask'; +export interface AiAgentAsk { + readonly type?: AiAgentAskTypeField; + readonly longText?: AiAgentLongTextTool; + readonly basicText?: AiAgentBasicTextToolAsk; + readonly longTextMulti?: AiAgentLongTextTool; + readonly basicTextMulti?: AiAgentBasicTextToolAsk; +} +export function serializeAiAgentAskTypeField( + val: AiAgentAskTypeField +): SerializedData { + return val; +} +export function deserializeAiAgentAskTypeField( + val: SerializedData +): AiAgentAskTypeField { + if (val == 'ai_agent_ask') { + return val; + } + throw new BoxSdkError({ message: "Can't deserialize AiAgentAskTypeField" }); +} +export function serializeAiAgentAsk(val: AiAgentAsk): SerializedData { + return { + ['type']: + val.type == void 0 ? void 0 : serializeAiAgentAskTypeField(val.type), + ['long_text']: + val.longText == void 0 + ? void 0 + : serializeAiAgentLongTextTool(val.longText), + ['basic_text']: + val.basicText == void 0 + ? void 0 + : serializeAiAgentBasicTextToolAsk(val.basicText), + ['long_text_multi']: + val.longTextMulti == void 0 + ? void 0 + : serializeAiAgentLongTextTool(val.longTextMulti), + ['basic_text_multi']: + val.basicTextMulti == void 0 + ? void 0 + : serializeAiAgentBasicTextToolAsk(val.basicTextMulti), + }; +} +export function deserializeAiAgentAsk(val: SerializedData): AiAgentAsk { + if (!sdIsMap(val)) { + throw new BoxSdkError({ message: 'Expecting a map for "AiAgentAsk"' }); + } + const type: undefined | AiAgentAskTypeField = + val.type == void 0 ? void 0 : deserializeAiAgentAskTypeField(val.type); + const longText: undefined | AiAgentLongTextTool = + val.long_text == void 0 + ? void 0 + : deserializeAiAgentLongTextTool(val.long_text); + const basicText: undefined | AiAgentBasicTextToolAsk = + val.basic_text == void 0 + ? void 0 + : deserializeAiAgentBasicTextToolAsk(val.basic_text); + const longTextMulti: undefined | AiAgentLongTextTool = + val.long_text_multi == void 0 + ? void 0 + : deserializeAiAgentLongTextTool(val.long_text_multi); + const basicTextMulti: undefined | AiAgentBasicTextToolAsk = + val.basic_text_multi == void 0 + ? void 0 + : deserializeAiAgentBasicTextToolAsk(val.basic_text_multi); + return { + type: type, + longText: longText, + basicText: basicText, + longTextMulti: longTextMulti, + basicTextMulti: basicTextMulti, + } satisfies AiAgentAsk; +} diff --git a/src/schemas/aiAgentAskOrAiAgentTextGen.generated.ts b/src/schemas/aiAgentAskOrAiAgentTextGen.generated.ts new file mode 100644 index 00000000..bc101e27 --- /dev/null +++ b/src/schemas/aiAgentAskOrAiAgentTextGen.generated.ts @@ -0,0 +1,42 @@ +import { serializeAiAgentAsk } from './aiAgentAsk.generated.js'; +import { deserializeAiAgentAsk } from './aiAgentAsk.generated.js'; +import { serializeAiAgentTextGen } from './aiAgentTextGen.generated.js'; +import { deserializeAiAgentTextGen } from './aiAgentTextGen.generated.js'; +import { AiAgentAsk } from './aiAgentAsk.generated.js'; +import { AiAgentTextGen } from './aiAgentTextGen.generated.js'; +import { BoxSdkError } from '../box/errors.js'; +import { SerializedData } from '../serialization/json.js'; +import { sdIsEmpty } from '../serialization/json.js'; +import { sdIsBoolean } from '../serialization/json.js'; +import { sdIsNumber } from '../serialization/json.js'; +import { sdIsString } from '../serialization/json.js'; +import { sdIsList } from '../serialization/json.js'; +import { sdIsMap } from '../serialization/json.js'; +export type AiAgentAskOrAiAgentTextGen = AiAgentAsk | AiAgentTextGen; +export function serializeAiAgentAskOrAiAgentTextGen(val: any): SerializedData { + if (val.type == 'ai_agent_ask') { + return serializeAiAgentAsk(val); + } + if (val.type == 'ai_agent_text_gen') { + return serializeAiAgentTextGen(val); + } + throw new BoxSdkError({ message: 'unknown type' }); +} +export function deserializeAiAgentAskOrAiAgentTextGen( + val: SerializedData +): AiAgentAskOrAiAgentTextGen { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "AiAgentAskOrAiAgentTextGen"', + }); + } + if (val.type == 'ai_agent_ask') { + return deserializeAiAgentAsk(val); + } + if (val.type == 'ai_agent_text_gen') { + return deserializeAiAgentTextGen(val); + } + throw new BoxSdkError({ + message: "Can't deserialize AiAgentAskOrAiAgentTextGen", + }); +} diff --git a/src/schemas/aiAgentBasicGenTool.generated.ts b/src/schemas/aiAgentBasicGenTool.generated.ts new file mode 100644 index 00000000..e87ca04c --- /dev/null +++ b/src/schemas/aiAgentBasicGenTool.generated.ts @@ -0,0 +1,113 @@ +import { serializeAiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi } from './aiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi.generated.js'; +import { deserializeAiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi } from './aiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi.generated.js'; +import { serializeAiAgentBasicTextToolTextGen } from './aiAgentBasicTextToolTextGen.generated.js'; +import { deserializeAiAgentBasicTextToolTextGen } from './aiAgentBasicTextToolTextGen.generated.js'; +import { serializeAiAgentLongTextToolEmbeddingsField } from './aiAgentLongTextTool.generated.js'; +import { deserializeAiAgentLongTextToolEmbeddingsField } from './aiAgentLongTextTool.generated.js'; +import { serializeAiAgentLongTextTool } from './aiAgentLongTextTool.generated.js'; +import { deserializeAiAgentLongTextTool } from './aiAgentLongTextTool.generated.js'; +import { AiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi } from './aiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi.generated.js'; +import { AiAgentBasicTextToolTextGen } from './aiAgentBasicTextToolTextGen.generated.js'; +import { AiAgentLongTextToolEmbeddingsField } from './aiAgentLongTextTool.generated.js'; +import { AiAgentLongTextTool } from './aiAgentLongTextTool.generated.js'; +import { BoxSdkError } from '../box/errors.js'; +import { SerializedData } from '../serialization/json.js'; +import { sdIsEmpty } from '../serialization/json.js'; +import { sdIsBoolean } from '../serialization/json.js'; +import { sdIsNumber } from '../serialization/json.js'; +import { sdIsString } from '../serialization/json.js'; +import { sdIsList } from '../serialization/json.js'; +import { sdIsMap } from '../serialization/json.js'; +export type AiAgentBasicGenTool = AiAgentLongTextTool & { + readonly contentTemplate?: string; +}; +export function serializeAiAgentBasicGenTool( + val: AiAgentBasicGenTool +): SerializedData { + const base: any = serializeAiAgentLongTextTool(val); + if (!sdIsMap(base)) { + throw new BoxSdkError({ + message: 'Expecting a map for "AiAgentBasicGenTool"', + }); + } + return { + ...base, + ...{ + ['content_template']: + val.contentTemplate == void 0 ? void 0 : val.contentTemplate, + }, + }; +} +export function deserializeAiAgentBasicGenTool( + val: SerializedData +): AiAgentBasicGenTool { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "AiAgentBasicGenTool"', + }); + } + if (!(val.content_template == void 0) && !sdIsString(val.content_template)) { + throw new BoxSdkError({ + message: + 'Expecting string for "content_template" of type "AiAgentBasicGenTool"', + }); + } + const contentTemplate: undefined | string = + val.content_template == void 0 ? void 0 : val.content_template; + const embeddings: undefined | AiAgentLongTextToolEmbeddingsField = + val.embeddings == void 0 + ? void 0 + : deserializeAiAgentLongTextToolEmbeddingsField(val.embeddings); + if (!(val.model == void 0) && !sdIsString(val.model)) { + throw new BoxSdkError({ + message: 'Expecting string for "model" of type "AiAgentBasicGenTool"', + }); + } + const model: undefined | string = val.model == void 0 ? void 0 : val.model; + if (!(val.system_message == void 0) && !sdIsString(val.system_message)) { + throw new BoxSdkError({ + message: + 'Expecting string for "system_message" of type "AiAgentBasicGenTool"', + }); + } + const systemMessage: undefined | string = + val.system_message == void 0 ? void 0 : val.system_message; + if (!(val.prompt_template == void 0) && !sdIsString(val.prompt_template)) { + throw new BoxSdkError({ + message: + 'Expecting string for "prompt_template" of type "AiAgentBasicGenTool"', + }); + } + const promptTemplate: undefined | string = + val.prompt_template == void 0 ? void 0 : val.prompt_template; + if ( + !(val.num_tokens_for_completion == void 0) && + !sdIsNumber(val.num_tokens_for_completion) + ) { + throw new BoxSdkError({ + message: + 'Expecting number for "num_tokens_for_completion" of type "AiAgentBasicGenTool"', + }); + } + const numTokensForCompletion: undefined | number = + val.num_tokens_for_completion == void 0 + ? void 0 + : val.num_tokens_for_completion; + const llmEndpointParams: + | undefined + | AiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi = + val.llm_endpoint_params == void 0 + ? void 0 + : deserializeAiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi( + val.llm_endpoint_params + ); + return { + contentTemplate: contentTemplate, + embeddings: embeddings, + model: model, + systemMessage: systemMessage, + promptTemplate: promptTemplate, + numTokensForCompletion: numTokensForCompletion, + llmEndpointParams: llmEndpointParams, + } satisfies AiAgentBasicGenTool; +} diff --git a/src/schemas/aiAgentBasicTextToolAsk.generated.ts b/src/schemas/aiAgentBasicTextToolAsk.generated.ts new file mode 100644 index 00000000..a268ff38 --- /dev/null +++ b/src/schemas/aiAgentBasicTextToolAsk.generated.ts @@ -0,0 +1,98 @@ +import { serializeAiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi } from './aiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi.generated.js'; +import { deserializeAiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi } from './aiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi.generated.js'; +import { AiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi } from './aiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi.generated.js'; +import { BoxSdkError } from '../box/errors.js'; +import { SerializedData } from '../serialization/json.js'; +import { sdIsEmpty } from '../serialization/json.js'; +import { sdIsBoolean } from '../serialization/json.js'; +import { sdIsNumber } from '../serialization/json.js'; +import { sdIsString } from '../serialization/json.js'; +import { sdIsList } from '../serialization/json.js'; +import { sdIsMap } from '../serialization/json.js'; +export interface AiAgentBasicTextToolAsk { + readonly model?: string; + readonly systemMessage?: string; + readonly promptTemplate?: string; + readonly numTokensForCompletion?: number; + readonly llmEndpointParams?: AiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi; +} +export function serializeAiAgentBasicTextToolAsk( + val: AiAgentBasicTextToolAsk +): SerializedData { + return { + ['model']: val.model == void 0 ? void 0 : val.model, + ['system_message']: + val.systemMessage == void 0 ? void 0 : val.systemMessage, + ['prompt_template']: + val.promptTemplate == void 0 ? void 0 : val.promptTemplate, + ['num_tokens_for_completion']: + val.numTokensForCompletion == void 0 + ? void 0 + : val.numTokensForCompletion, + ['llm_endpoint_params']: + val.llmEndpointParams == void 0 + ? void 0 + : serializeAiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi( + val.llmEndpointParams + ), + }; +} +export function deserializeAiAgentBasicTextToolAsk( + val: SerializedData +): AiAgentBasicTextToolAsk { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "AiAgentBasicTextToolAsk"', + }); + } + if (!(val.model == void 0) && !sdIsString(val.model)) { + throw new BoxSdkError({ + message: 'Expecting string for "model" of type "AiAgentBasicTextToolAsk"', + }); + } + const model: undefined | string = val.model == void 0 ? void 0 : val.model; + if (!(val.system_message == void 0) && !sdIsString(val.system_message)) { + throw new BoxSdkError({ + message: + 'Expecting string for "system_message" of type "AiAgentBasicTextToolAsk"', + }); + } + const systemMessage: undefined | string = + val.system_message == void 0 ? void 0 : val.system_message; + if (!(val.prompt_template == void 0) && !sdIsString(val.prompt_template)) { + throw new BoxSdkError({ + message: + 'Expecting string for "prompt_template" of type "AiAgentBasicTextToolAsk"', + }); + } + const promptTemplate: undefined | string = + val.prompt_template == void 0 ? void 0 : val.prompt_template; + if ( + !(val.num_tokens_for_completion == void 0) && + !sdIsNumber(val.num_tokens_for_completion) + ) { + throw new BoxSdkError({ + message: + 'Expecting number for "num_tokens_for_completion" of type "AiAgentBasicTextToolAsk"', + }); + } + const numTokensForCompletion: undefined | number = + val.num_tokens_for_completion == void 0 + ? void 0 + : val.num_tokens_for_completion; + const llmEndpointParams: + | undefined + | AiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi = + val.llm_endpoint_params == void 0 + ? void 0 + : deserializeAiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi( + val.llm_endpoint_params + ); + return { + model: model, + systemMessage: systemMessage, + promptTemplate: promptTemplate, + numTokensForCompletion: numTokensForCompletion, + llmEndpointParams: llmEndpointParams, + } satisfies AiAgentBasicTextToolAsk; +} diff --git a/src/schemas/aiAgentBasicTextToolTextGen.generated.ts b/src/schemas/aiAgentBasicTextToolTextGen.generated.ts new file mode 100644 index 00000000..07fc96bd --- /dev/null +++ b/src/schemas/aiAgentBasicTextToolTextGen.generated.ts @@ -0,0 +1,99 @@ +import { serializeAiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi } from './aiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi.generated.js'; +import { deserializeAiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi } from './aiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi.generated.js'; +import { AiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi } from './aiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi.generated.js'; +import { BoxSdkError } from '../box/errors.js'; +import { SerializedData } from '../serialization/json.js'; +import { sdIsEmpty } from '../serialization/json.js'; +import { sdIsBoolean } from '../serialization/json.js'; +import { sdIsNumber } from '../serialization/json.js'; +import { sdIsString } from '../serialization/json.js'; +import { sdIsList } from '../serialization/json.js'; +import { sdIsMap } from '../serialization/json.js'; +export interface AiAgentBasicTextToolTextGen { + readonly model?: string; + readonly systemMessage?: string; + readonly promptTemplate?: string; + readonly numTokensForCompletion?: number; + readonly llmEndpointParams?: AiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi; +} +export function serializeAiAgentBasicTextToolTextGen( + val: AiAgentBasicTextToolTextGen +): SerializedData { + return { + ['model']: val.model == void 0 ? void 0 : val.model, + ['system_message']: + val.systemMessage == void 0 ? void 0 : val.systemMessage, + ['prompt_template']: + val.promptTemplate == void 0 ? void 0 : val.promptTemplate, + ['num_tokens_for_completion']: + val.numTokensForCompletion == void 0 + ? void 0 + : val.numTokensForCompletion, + ['llm_endpoint_params']: + val.llmEndpointParams == void 0 + ? void 0 + : serializeAiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi( + val.llmEndpointParams + ), + }; +} +export function deserializeAiAgentBasicTextToolTextGen( + val: SerializedData +): AiAgentBasicTextToolTextGen { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "AiAgentBasicTextToolTextGen"', + }); + } + if (!(val.model == void 0) && !sdIsString(val.model)) { + throw new BoxSdkError({ + message: + 'Expecting string for "model" of type "AiAgentBasicTextToolTextGen"', + }); + } + const model: undefined | string = val.model == void 0 ? void 0 : val.model; + if (!(val.system_message == void 0) && !sdIsString(val.system_message)) { + throw new BoxSdkError({ + message: + 'Expecting string for "system_message" of type "AiAgentBasicTextToolTextGen"', + }); + } + const systemMessage: undefined | string = + val.system_message == void 0 ? void 0 : val.system_message; + if (!(val.prompt_template == void 0) && !sdIsString(val.prompt_template)) { + throw new BoxSdkError({ + message: + 'Expecting string for "prompt_template" of type "AiAgentBasicTextToolTextGen"', + }); + } + const promptTemplate: undefined | string = + val.prompt_template == void 0 ? void 0 : val.prompt_template; + if ( + !(val.num_tokens_for_completion == void 0) && + !sdIsNumber(val.num_tokens_for_completion) + ) { + throw new BoxSdkError({ + message: + 'Expecting number for "num_tokens_for_completion" of type "AiAgentBasicTextToolTextGen"', + }); + } + const numTokensForCompletion: undefined | number = + val.num_tokens_for_completion == void 0 + ? void 0 + : val.num_tokens_for_completion; + const llmEndpointParams: + | undefined + | AiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi = + val.llm_endpoint_params == void 0 + ? void 0 + : deserializeAiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi( + val.llm_endpoint_params + ); + return { + model: model, + systemMessage: systemMessage, + promptTemplate: promptTemplate, + numTokensForCompletion: numTokensForCompletion, + llmEndpointParams: llmEndpointParams, + } satisfies AiAgentBasicTextToolTextGen; +} diff --git a/src/schemas/aiAgentLongTextTool.generated.ts b/src/schemas/aiAgentLongTextTool.generated.ts new file mode 100644 index 00000000..375b3cd6 --- /dev/null +++ b/src/schemas/aiAgentLongTextTool.generated.ts @@ -0,0 +1,184 @@ +import { serializeAiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi } from './aiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi.generated.js'; +import { deserializeAiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi } from './aiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi.generated.js'; +import { serializeAiAgentBasicTextToolTextGen } from './aiAgentBasicTextToolTextGen.generated.js'; +import { deserializeAiAgentBasicTextToolTextGen } from './aiAgentBasicTextToolTextGen.generated.js'; +import { AiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi } from './aiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi.generated.js'; +import { AiAgentBasicTextToolTextGen } from './aiAgentBasicTextToolTextGen.generated.js'; +import { BoxSdkError } from '../box/errors.js'; +import { SerializedData } from '../serialization/json.js'; +import { sdIsEmpty } from '../serialization/json.js'; +import { sdIsBoolean } from '../serialization/json.js'; +import { sdIsNumber } from '../serialization/json.js'; +import { sdIsString } from '../serialization/json.js'; +import { sdIsList } from '../serialization/json.js'; +import { sdIsMap } from '../serialization/json.js'; +export interface AiAgentLongTextToolEmbeddingsStrategyField { + readonly id?: string; + readonly numTokensPerChunk?: number; +} +export interface AiAgentLongTextToolEmbeddingsField { + readonly model?: string; + readonly strategy?: AiAgentLongTextToolEmbeddingsStrategyField; +} +export type AiAgentLongTextTool = AiAgentBasicTextToolTextGen & { + readonly embeddings?: AiAgentLongTextToolEmbeddingsField; +}; +export function serializeAiAgentLongTextToolEmbeddingsStrategyField( + val: AiAgentLongTextToolEmbeddingsStrategyField +): SerializedData { + return { + ['id']: val.id == void 0 ? void 0 : val.id, + ['num_tokens_per_chunk']: + val.numTokensPerChunk == void 0 ? void 0 : val.numTokensPerChunk, + }; +} +export function deserializeAiAgentLongTextToolEmbeddingsStrategyField( + val: SerializedData +): AiAgentLongTextToolEmbeddingsStrategyField { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: + 'Expecting a map for "AiAgentLongTextToolEmbeddingsStrategyField"', + }); + } + if (!(val.id == void 0) && !sdIsString(val.id)) { + throw new BoxSdkError({ + message: + 'Expecting string for "id" of type "AiAgentLongTextToolEmbeddingsStrategyField"', + }); + } + const id: undefined | string = val.id == void 0 ? void 0 : val.id; + if ( + !(val.num_tokens_per_chunk == void 0) && + !sdIsNumber(val.num_tokens_per_chunk) + ) { + throw new BoxSdkError({ + message: + 'Expecting number for "num_tokens_per_chunk" of type "AiAgentLongTextToolEmbeddingsStrategyField"', + }); + } + const numTokensPerChunk: undefined | number = + val.num_tokens_per_chunk == void 0 ? void 0 : val.num_tokens_per_chunk; + return { + id: id, + numTokensPerChunk: numTokensPerChunk, + } satisfies AiAgentLongTextToolEmbeddingsStrategyField; +} +export function serializeAiAgentLongTextToolEmbeddingsField( + val: AiAgentLongTextToolEmbeddingsField +): SerializedData { + return { + ['model']: val.model == void 0 ? void 0 : val.model, + ['strategy']: + val.strategy == void 0 + ? void 0 + : serializeAiAgentLongTextToolEmbeddingsStrategyField(val.strategy), + }; +} +export function deserializeAiAgentLongTextToolEmbeddingsField( + val: SerializedData +): AiAgentLongTextToolEmbeddingsField { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "AiAgentLongTextToolEmbeddingsField"', + }); + } + if (!(val.model == void 0) && !sdIsString(val.model)) { + throw new BoxSdkError({ + message: + 'Expecting string for "model" of type "AiAgentLongTextToolEmbeddingsField"', + }); + } + const model: undefined | string = val.model == void 0 ? void 0 : val.model; + const strategy: undefined | AiAgentLongTextToolEmbeddingsStrategyField = + val.strategy == void 0 + ? void 0 + : deserializeAiAgentLongTextToolEmbeddingsStrategyField(val.strategy); + return { + model: model, + strategy: strategy, + } satisfies AiAgentLongTextToolEmbeddingsField; +} +export function serializeAiAgentLongTextTool( + val: AiAgentLongTextTool +): SerializedData { + const base: any = serializeAiAgentBasicTextToolTextGen(val); + if (!sdIsMap(base)) { + throw new BoxSdkError({ + message: 'Expecting a map for "AiAgentLongTextTool"', + }); + } + return { + ...base, + ...{ + ['embeddings']: + val.embeddings == void 0 + ? void 0 + : serializeAiAgentLongTextToolEmbeddingsField(val.embeddings), + }, + }; +} +export function deserializeAiAgentLongTextTool( + val: SerializedData +): AiAgentLongTextTool { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "AiAgentLongTextTool"', + }); + } + const embeddings: undefined | AiAgentLongTextToolEmbeddingsField = + val.embeddings == void 0 + ? void 0 + : deserializeAiAgentLongTextToolEmbeddingsField(val.embeddings); + if (!(val.model == void 0) && !sdIsString(val.model)) { + throw new BoxSdkError({ + message: 'Expecting string for "model" of type "AiAgentLongTextTool"', + }); + } + const model: undefined | string = val.model == void 0 ? void 0 : val.model; + if (!(val.system_message == void 0) && !sdIsString(val.system_message)) { + throw new BoxSdkError({ + message: + 'Expecting string for "system_message" of type "AiAgentLongTextTool"', + }); + } + const systemMessage: undefined | string = + val.system_message == void 0 ? void 0 : val.system_message; + if (!(val.prompt_template == void 0) && !sdIsString(val.prompt_template)) { + throw new BoxSdkError({ + message: + 'Expecting string for "prompt_template" of type "AiAgentLongTextTool"', + }); + } + const promptTemplate: undefined | string = + val.prompt_template == void 0 ? void 0 : val.prompt_template; + if ( + !(val.num_tokens_for_completion == void 0) && + !sdIsNumber(val.num_tokens_for_completion) + ) { + throw new BoxSdkError({ + message: + 'Expecting number for "num_tokens_for_completion" of type "AiAgentLongTextTool"', + }); + } + const numTokensForCompletion: undefined | number = + val.num_tokens_for_completion == void 0 + ? void 0 + : val.num_tokens_for_completion; + const llmEndpointParams: + | undefined + | AiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi = + val.llm_endpoint_params == void 0 + ? void 0 + : deserializeAiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi( + val.llm_endpoint_params + ); + return { + embeddings: embeddings, + model: model, + systemMessage: systemMessage, + promptTemplate: promptTemplate, + numTokensForCompletion: numTokensForCompletion, + llmEndpointParams: llmEndpointParams, + } satisfies AiAgentLongTextTool; +} diff --git a/src/schemas/aiAgentTextGen.generated.ts b/src/schemas/aiAgentTextGen.generated.ts new file mode 100644 index 00000000..1bd5803d --- /dev/null +++ b/src/schemas/aiAgentTextGen.generated.ts @@ -0,0 +1,53 @@ +import { serializeAiAgentBasicGenTool } from './aiAgentBasicGenTool.generated.js'; +import { deserializeAiAgentBasicGenTool } from './aiAgentBasicGenTool.generated.js'; +import { AiAgentBasicGenTool } from './aiAgentBasicGenTool.generated.js'; +import { BoxSdkError } from '../box/errors.js'; +import { SerializedData } from '../serialization/json.js'; +import { sdIsEmpty } from '../serialization/json.js'; +import { sdIsBoolean } from '../serialization/json.js'; +import { sdIsNumber } from '../serialization/json.js'; +import { sdIsString } from '../serialization/json.js'; +import { sdIsList } from '../serialization/json.js'; +import { sdIsMap } from '../serialization/json.js'; +export type AiAgentTextGenTypeField = 'ai_agent_text_gen'; +export interface AiAgentTextGen { + readonly type?: AiAgentTextGenTypeField; + readonly basicGen?: AiAgentBasicGenTool; +} +export function serializeAiAgentTextGenTypeField( + val: AiAgentTextGenTypeField +): SerializedData { + return val; +} +export function deserializeAiAgentTextGenTypeField( + val: SerializedData +): AiAgentTextGenTypeField { + if (val == 'ai_agent_text_gen') { + return val; + } + throw new BoxSdkError({ + message: "Can't deserialize AiAgentTextGenTypeField", + }); +} +export function serializeAiAgentTextGen(val: AiAgentTextGen): SerializedData { + return { + ['type']: + val.type == void 0 ? void 0 : serializeAiAgentTextGenTypeField(val.type), + ['basic_gen']: + val.basicGen == void 0 + ? void 0 + : serializeAiAgentBasicGenTool(val.basicGen), + }; +} +export function deserializeAiAgentTextGen(val: SerializedData): AiAgentTextGen { + if (!sdIsMap(val)) { + throw new BoxSdkError({ message: 'Expecting a map for "AiAgentTextGen"' }); + } + const type: undefined | AiAgentTextGenTypeField = + val.type == void 0 ? void 0 : deserializeAiAgentTextGenTypeField(val.type); + const basicGen: undefined | AiAgentBasicGenTool = + val.basic_gen == void 0 + ? void 0 + : deserializeAiAgentBasicGenTool(val.basic_gen); + return { type: type, basicGen: basicGen } satisfies AiAgentTextGen; +} diff --git a/src/schemas/aiAsk.generated.ts b/src/schemas/aiAsk.generated.ts index 9811406d..905a9596 100644 --- a/src/schemas/aiAsk.generated.ts +++ b/src/schemas/aiAsk.generated.ts @@ -1,3 +1,6 @@ +import { serializeAiAgentAsk } from './aiAgentAsk.generated.js'; +import { deserializeAiAgentAsk } from './aiAgentAsk.generated.js'; +import { AiAgentAsk } from './aiAgentAsk.generated.js'; import { BoxSdkError } from '../box/errors.js'; import { SerializedData } from '../serialization/json.js'; import { sdIsEmpty } from '../serialization/json.js'; @@ -36,6 +39,7 @@ export interface AiAsk { readonly mode: AiAskModeField; readonly prompt: string; readonly items: readonly AiAskItemsField[]; + readonly aiAgent?: AiAgentAsk; } export function serializeAiAskModeField(val: AiAskModeField): SerializedData { return val; @@ -152,6 +156,8 @@ export function serializeAiAsk(val: AiAsk): SerializedData { ['items']: val.items.map(function (item: AiAskItemsField): SerializedData { return serializeAiAskItemsField(item); }) as readonly any[], + ['ai_agent']: + val.aiAgent == void 0 ? void 0 : serializeAiAgentAsk(val.aiAgent), }; } export function deserializeAiAsk(val: SerializedData): AiAsk { @@ -190,5 +196,12 @@ export function deserializeAiAsk(val: SerializedData): AiAsk { return deserializeAiAskItemsField(itm); }) as readonly any[]) : []; - return { mode: mode, prompt: prompt, items: items } satisfies AiAsk; + const aiAgent: undefined | AiAgentAsk = + val.ai_agent == void 0 ? void 0 : deserializeAiAgentAsk(val.ai_agent); + return { + mode: mode, + prompt: prompt, + items: items, + aiAgent: aiAgent, + } satisfies AiAsk; } diff --git a/src/schemas/aiLlmEndpointParamsGoogle.generated.ts b/src/schemas/aiLlmEndpointParamsGoogle.generated.ts new file mode 100644 index 00000000..51704159 --- /dev/null +++ b/src/schemas/aiLlmEndpointParamsGoogle.generated.ts @@ -0,0 +1,163 @@ +import { BoxSdkError } from '../box/errors.js'; +import { SerializedData } from '../serialization/json.js'; +import { sdIsEmpty } from '../serialization/json.js'; +import { sdIsBoolean } from '../serialization/json.js'; +import { sdIsNumber } from '../serialization/json.js'; +import { sdIsString } from '../serialization/json.js'; +import { sdIsList } from '../serialization/json.js'; +import { sdIsMap } from '../serialization/json.js'; +export type AiLlmEndpointParamsGoogleTypeField = 'google_params'; +export class AiLlmEndpointParamsGoogle { + readonly type: AiLlmEndpointParamsGoogleTypeField = + 'google_params' as AiLlmEndpointParamsGoogleTypeField; + readonly temperature?: number; + readonly topP?: number; + readonly topK?: number; + constructor( + fields: Omit & + Partial> + ) { + if (fields.type) { + this.type = fields.type; + } + if (fields.temperature) { + this.temperature = fields.temperature; + } + if (fields.topP) { + this.topP = fields.topP; + } + if (fields.topK) { + this.topK = fields.topK; + } + } +} +export interface AiLlmEndpointParamsGoogleInput { + readonly type?: AiLlmEndpointParamsGoogleTypeField; + readonly temperature?: number; + readonly topP?: number; + readonly topK?: number; +} +export function serializeAiLlmEndpointParamsGoogleTypeField( + val: AiLlmEndpointParamsGoogleTypeField +): SerializedData { + return val; +} +export function deserializeAiLlmEndpointParamsGoogleTypeField( + val: SerializedData +): AiLlmEndpointParamsGoogleTypeField { + if (val == 'google_params') { + return val; + } + throw new BoxSdkError({ + message: "Can't deserialize AiLlmEndpointParamsGoogleTypeField", + }); +} +export function serializeAiLlmEndpointParamsGoogle( + val: AiLlmEndpointParamsGoogle +): SerializedData { + return { + ['type']: serializeAiLlmEndpointParamsGoogleTypeField(val.type), + ['temperature']: val.temperature == void 0 ? void 0 : val.temperature, + ['top_p']: val.topP == void 0 ? void 0 : val.topP, + ['top_k']: val.topK == void 0 ? void 0 : val.topK, + }; +} +export function deserializeAiLlmEndpointParamsGoogle( + val: SerializedData +): AiLlmEndpointParamsGoogle { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "AiLlmEndpointParamsGoogle"', + }); + } + if (val.type == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "type" of type "AiLlmEndpointParamsGoogle" to be defined', + }); + } + const type: AiLlmEndpointParamsGoogleTypeField = + deserializeAiLlmEndpointParamsGoogleTypeField(val.type); + if (!(val.temperature == void 0) && !sdIsNumber(val.temperature)) { + throw new BoxSdkError({ + message: + 'Expecting number for "temperature" of type "AiLlmEndpointParamsGoogle"', + }); + } + const temperature: undefined | number = + val.temperature == void 0 ? void 0 : val.temperature; + if (!(val.top_p == void 0) && !sdIsNumber(val.top_p)) { + throw new BoxSdkError({ + message: + 'Expecting number for "top_p" of type "AiLlmEndpointParamsGoogle"', + }); + } + const topP: undefined | number = val.top_p == void 0 ? void 0 : val.top_p; + if (!(val.top_k == void 0) && !sdIsNumber(val.top_k)) { + throw new BoxSdkError({ + message: + 'Expecting number for "top_k" of type "AiLlmEndpointParamsGoogle"', + }); + } + const topK: undefined | number = val.top_k == void 0 ? void 0 : val.top_k; + return { + type: type, + temperature: temperature, + topP: topP, + topK: topK, + } satisfies AiLlmEndpointParamsGoogle; +} +export function serializeAiLlmEndpointParamsGoogleInput( + val: AiLlmEndpointParamsGoogleInput +): SerializedData { + return { + ['type']: + val.type == void 0 + ? void 0 + : serializeAiLlmEndpointParamsGoogleTypeField(val.type), + ['temperature']: val.temperature == void 0 ? void 0 : val.temperature, + ['top_p']: val.topP == void 0 ? void 0 : val.topP, + ['top_k']: val.topK == void 0 ? void 0 : val.topK, + }; +} +export function deserializeAiLlmEndpointParamsGoogleInput( + val: SerializedData +): AiLlmEndpointParamsGoogleInput { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "AiLlmEndpointParamsGoogleInput"', + }); + } + const type: undefined | AiLlmEndpointParamsGoogleTypeField = + val.type == void 0 + ? void 0 + : deserializeAiLlmEndpointParamsGoogleTypeField(val.type); + if (!(val.temperature == void 0) && !sdIsNumber(val.temperature)) { + throw new BoxSdkError({ + message: + 'Expecting number for "temperature" of type "AiLlmEndpointParamsGoogleInput"', + }); + } + const temperature: undefined | number = + val.temperature == void 0 ? void 0 : val.temperature; + if (!(val.top_p == void 0) && !sdIsNumber(val.top_p)) { + throw new BoxSdkError({ + message: + 'Expecting number for "top_p" of type "AiLlmEndpointParamsGoogleInput"', + }); + } + const topP: undefined | number = val.top_p == void 0 ? void 0 : val.top_p; + if (!(val.top_k == void 0) && !sdIsNumber(val.top_k)) { + throw new BoxSdkError({ + message: + 'Expecting number for "top_k" of type "AiLlmEndpointParamsGoogleInput"', + }); + } + const topK: undefined | number = val.top_k == void 0 ? void 0 : val.top_k; + return { + type: type, + temperature: temperature, + topP: topP, + topK: topK, + } satisfies AiLlmEndpointParamsGoogleInput; +} diff --git a/src/schemas/aiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi.generated.ts b/src/schemas/aiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi.generated.ts new file mode 100644 index 00000000..923e4584 --- /dev/null +++ b/src/schemas/aiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi.generated.ts @@ -0,0 +1,48 @@ +import { serializeAiLlmEndpointParamsGoogle } from './aiLlmEndpointParamsGoogle.generated.js'; +import { deserializeAiLlmEndpointParamsGoogle } from './aiLlmEndpointParamsGoogle.generated.js'; +import { serializeAiLlmEndpointParamsOpenAi } from './aiLlmEndpointParamsOpenAi.generated.js'; +import { deserializeAiLlmEndpointParamsOpenAi } from './aiLlmEndpointParamsOpenAi.generated.js'; +import { AiLlmEndpointParamsGoogle } from './aiLlmEndpointParamsGoogle.generated.js'; +import { AiLlmEndpointParamsOpenAi } from './aiLlmEndpointParamsOpenAi.generated.js'; +import { BoxSdkError } from '../box/errors.js'; +import { SerializedData } from '../serialization/json.js'; +import { sdIsEmpty } from '../serialization/json.js'; +import { sdIsBoolean } from '../serialization/json.js'; +import { sdIsNumber } from '../serialization/json.js'; +import { sdIsString } from '../serialization/json.js'; +import { sdIsList } from '../serialization/json.js'; +import { sdIsMap } from '../serialization/json.js'; +export type AiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi = + | AiLlmEndpointParamsGoogle + | AiLlmEndpointParamsOpenAi; +export function serializeAiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi( + val: any +): SerializedData { + if (val.type == 'google_params') { + return serializeAiLlmEndpointParamsGoogle(val); + } + if (val.type == 'openai_params') { + return serializeAiLlmEndpointParamsOpenAi(val); + } + throw new BoxSdkError({ message: 'unknown type' }); +} +export function deserializeAiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi( + val: SerializedData +): AiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: + 'Expecting a map for "AiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi"', + }); + } + if (val.type == 'google_params') { + return deserializeAiLlmEndpointParamsGoogle(val); + } + if (val.type == 'openai_params') { + return deserializeAiLlmEndpointParamsOpenAi(val); + } + throw new BoxSdkError({ + message: + "Can't deserialize AiLlmEndpointParamsGoogleOrAiLlmEndpointParamsOpenAi", + }); +} diff --git a/src/schemas/aiLlmEndpointParamsOpenAi.generated.ts b/src/schemas/aiLlmEndpointParamsOpenAi.generated.ts new file mode 100644 index 00000000..ffe086e9 --- /dev/null +++ b/src/schemas/aiLlmEndpointParamsOpenAi.generated.ts @@ -0,0 +1,223 @@ +import { BoxSdkError } from '../box/errors.js'; +import { SerializedData } from '../serialization/json.js'; +import { sdIsEmpty } from '../serialization/json.js'; +import { sdIsBoolean } from '../serialization/json.js'; +import { sdIsNumber } from '../serialization/json.js'; +import { sdIsString } from '../serialization/json.js'; +import { sdIsList } from '../serialization/json.js'; +import { sdIsMap } from '../serialization/json.js'; +export type AiLlmEndpointParamsOpenAiTypeField = 'openai_params'; +export class AiLlmEndpointParamsOpenAi { + readonly type: AiLlmEndpointParamsOpenAiTypeField = + 'openai_params' as AiLlmEndpointParamsOpenAiTypeField; + readonly temperature?: number; + readonly topP?: number; + readonly frequencyPenalty?: number; + readonly presencePenalty?: number; + readonly stop?: string; + constructor( + fields: Omit & + Partial> + ) { + if (fields.type) { + this.type = fields.type; + } + if (fields.temperature) { + this.temperature = fields.temperature; + } + if (fields.topP) { + this.topP = fields.topP; + } + if (fields.frequencyPenalty) { + this.frequencyPenalty = fields.frequencyPenalty; + } + if (fields.presencePenalty) { + this.presencePenalty = fields.presencePenalty; + } + if (fields.stop) { + this.stop = fields.stop; + } + } +} +export interface AiLlmEndpointParamsOpenAiInput { + readonly type?: AiLlmEndpointParamsOpenAiTypeField; + readonly temperature?: number; + readonly topP?: number; + readonly frequencyPenalty?: number; + readonly presencePenalty?: number; + readonly stop?: string; +} +export function serializeAiLlmEndpointParamsOpenAiTypeField( + val: AiLlmEndpointParamsOpenAiTypeField +): SerializedData { + return val; +} +export function deserializeAiLlmEndpointParamsOpenAiTypeField( + val: SerializedData +): AiLlmEndpointParamsOpenAiTypeField { + if (val == 'openai_params') { + return val; + } + throw new BoxSdkError({ + message: "Can't deserialize AiLlmEndpointParamsOpenAiTypeField", + }); +} +export function serializeAiLlmEndpointParamsOpenAi( + val: AiLlmEndpointParamsOpenAi +): SerializedData { + return { + ['type']: serializeAiLlmEndpointParamsOpenAiTypeField(val.type), + ['temperature']: val.temperature == void 0 ? void 0 : val.temperature, + ['top_p']: val.topP == void 0 ? void 0 : val.topP, + ['frequency_penalty']: + val.frequencyPenalty == void 0 ? void 0 : val.frequencyPenalty, + ['presence_penalty']: + val.presencePenalty == void 0 ? void 0 : val.presencePenalty, + ['stop']: val.stop == void 0 ? void 0 : val.stop, + }; +} +export function deserializeAiLlmEndpointParamsOpenAi( + val: SerializedData +): AiLlmEndpointParamsOpenAi { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "AiLlmEndpointParamsOpenAi"', + }); + } + if (val.type == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "type" of type "AiLlmEndpointParamsOpenAi" to be defined', + }); + } + const type: AiLlmEndpointParamsOpenAiTypeField = + deserializeAiLlmEndpointParamsOpenAiTypeField(val.type); + if (!(val.temperature == void 0) && !sdIsNumber(val.temperature)) { + throw new BoxSdkError({ + message: + 'Expecting number for "temperature" of type "AiLlmEndpointParamsOpenAi"', + }); + } + const temperature: undefined | number = + val.temperature == void 0 ? void 0 : val.temperature; + if (!(val.top_p == void 0) && !sdIsNumber(val.top_p)) { + throw new BoxSdkError({ + message: + 'Expecting number for "top_p" of type "AiLlmEndpointParamsOpenAi"', + }); + } + const topP: undefined | number = val.top_p == void 0 ? void 0 : val.top_p; + if ( + !(val.frequency_penalty == void 0) && + !sdIsNumber(val.frequency_penalty) + ) { + throw new BoxSdkError({ + message: + 'Expecting number for "frequency_penalty" of type "AiLlmEndpointParamsOpenAi"', + }); + } + const frequencyPenalty: undefined | number = + val.frequency_penalty == void 0 ? void 0 : val.frequency_penalty; + if (!(val.presence_penalty == void 0) && !sdIsNumber(val.presence_penalty)) { + throw new BoxSdkError({ + message: + 'Expecting number for "presence_penalty" of type "AiLlmEndpointParamsOpenAi"', + }); + } + const presencePenalty: undefined | number = + val.presence_penalty == void 0 ? void 0 : val.presence_penalty; + if (!(val.stop == void 0) && !sdIsString(val.stop)) { + throw new BoxSdkError({ + message: + 'Expecting string for "stop" of type "AiLlmEndpointParamsOpenAi"', + }); + } + const stop: undefined | string = val.stop == void 0 ? void 0 : val.stop; + return { + type: type, + temperature: temperature, + topP: topP, + frequencyPenalty: frequencyPenalty, + presencePenalty: presencePenalty, + stop: stop, + } satisfies AiLlmEndpointParamsOpenAi; +} +export function serializeAiLlmEndpointParamsOpenAiInput( + val: AiLlmEndpointParamsOpenAiInput +): SerializedData { + return { + ['type']: + val.type == void 0 + ? void 0 + : serializeAiLlmEndpointParamsOpenAiTypeField(val.type), + ['temperature']: val.temperature == void 0 ? void 0 : val.temperature, + ['top_p']: val.topP == void 0 ? void 0 : val.topP, + ['frequency_penalty']: + val.frequencyPenalty == void 0 ? void 0 : val.frequencyPenalty, + ['presence_penalty']: + val.presencePenalty == void 0 ? void 0 : val.presencePenalty, + ['stop']: val.stop == void 0 ? void 0 : val.stop, + }; +} +export function deserializeAiLlmEndpointParamsOpenAiInput( + val: SerializedData +): AiLlmEndpointParamsOpenAiInput { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "AiLlmEndpointParamsOpenAiInput"', + }); + } + const type: undefined | AiLlmEndpointParamsOpenAiTypeField = + val.type == void 0 + ? void 0 + : deserializeAiLlmEndpointParamsOpenAiTypeField(val.type); + if (!(val.temperature == void 0) && !sdIsNumber(val.temperature)) { + throw new BoxSdkError({ + message: + 'Expecting number for "temperature" of type "AiLlmEndpointParamsOpenAiInput"', + }); + } + const temperature: undefined | number = + val.temperature == void 0 ? void 0 : val.temperature; + if (!(val.top_p == void 0) && !sdIsNumber(val.top_p)) { + throw new BoxSdkError({ + message: + 'Expecting number for "top_p" of type "AiLlmEndpointParamsOpenAiInput"', + }); + } + const topP: undefined | number = val.top_p == void 0 ? void 0 : val.top_p; + if ( + !(val.frequency_penalty == void 0) && + !sdIsNumber(val.frequency_penalty) + ) { + throw new BoxSdkError({ + message: + 'Expecting number for "frequency_penalty" of type "AiLlmEndpointParamsOpenAiInput"', + }); + } + const frequencyPenalty: undefined | number = + val.frequency_penalty == void 0 ? void 0 : val.frequency_penalty; + if (!(val.presence_penalty == void 0) && !sdIsNumber(val.presence_penalty)) { + throw new BoxSdkError({ + message: + 'Expecting number for "presence_penalty" of type "AiLlmEndpointParamsOpenAiInput"', + }); + } + const presencePenalty: undefined | number = + val.presence_penalty == void 0 ? void 0 : val.presence_penalty; + if (!(val.stop == void 0) && !sdIsString(val.stop)) { + throw new BoxSdkError({ + message: + 'Expecting string for "stop" of type "AiLlmEndpointParamsOpenAiInput"', + }); + } + const stop: undefined | string = val.stop == void 0 ? void 0 : val.stop; + return { + type: type, + temperature: temperature, + topP: topP, + frequencyPenalty: frequencyPenalty, + presencePenalty: presencePenalty, + stop: stop, + } satisfies AiLlmEndpointParamsOpenAiInput; +} diff --git a/src/schemas/aiTextGen.generated.ts b/src/schemas/aiTextGen.generated.ts index 3cfa504b..7263e88f 100644 --- a/src/schemas/aiTextGen.generated.ts +++ b/src/schemas/aiTextGen.generated.ts @@ -1,5 +1,8 @@ +import { serializeAiAgentTextGen } from './aiAgentTextGen.generated.js'; +import { deserializeAiAgentTextGen } from './aiAgentTextGen.generated.js'; import { serializeDateTime } from '../internal/utils.js'; import { deserializeDateTime } from '../internal/utils.js'; +import { AiAgentTextGen } from './aiAgentTextGen.generated.js'; import { DateTime } from '../internal/utils.js'; import { BoxSdkError } from '../box/errors.js'; import { SerializedData } from '../serialization/json.js'; @@ -24,6 +27,7 @@ export interface AiTextGen { readonly prompt: string; readonly items: readonly AiTextGenItemsField[]; readonly dialogueHistory?: readonly AiTextGenDialogueHistoryField[]; + readonly aiAgent?: AiAgentTextGen; } export function serializeAiTextGenItemsTypeField( val: AiTextGenItemsTypeField @@ -137,6 +141,8 @@ export function serializeAiTextGen(val: AiTextGen): SerializedData { ): SerializedData { return serializeAiTextGenDialogueHistoryField(item); }) as readonly any[]), + ['ai_agent']: + val.aiAgent == void 0 ? void 0 : serializeAiAgentTextGen(val.aiAgent), }; } export function deserializeAiTextGen(val: SerializedData): AiTextGen { @@ -184,9 +190,12 @@ export function deserializeAiTextGen(val: SerializedData): AiTextGen { return deserializeAiTextGenDialogueHistoryField(itm); }) as readonly any[]) : []; + const aiAgent: undefined | AiAgentTextGen = + val.ai_agent == void 0 ? void 0 : deserializeAiAgentTextGen(val.ai_agent); return { prompt: prompt, items: items, dialogueHistory: dialogueHistory, + aiAgent: aiAgent, } satisfies AiTextGen; }