diff --git a/sdks/ts/openapi-ts.config.ts b/sdks/ts/openapi-ts.config.ts new file mode 100644 index 000000000..9aa7c118d --- /dev/null +++ b/sdks/ts/openapi-ts.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from "@hey-api/openapi-ts"; + +export default defineConfig({ + client: "@hey-api/client-fetch", + input: "../../openapi.yaml", + output: "src/api-ts", +}); diff --git a/sdks/ts/package-lock.json b/sdks/ts/package-lock.json index 4ea860439..ed7b20532 100644 --- a/sdks/ts/package-lock.json +++ b/sdks/ts/package-lock.json @@ -9,6 +9,7 @@ "version": "0.3.8", "license": "ISC", "dependencies": { + "@hey-api/client-fetch": "^0.2.4", "@rollup/plugin-typescript": "^11.1.6", "@types/lodash": "^4.17.0", "debug": "^4.3.4", @@ -26,6 +27,7 @@ "uuid": "^9.0.1" }, "devDependencies": { + "@hey-api/openapi-ts": "^0.53.0", "@jest/globals": "^29.7.0", "@optimize-lodash/rollup-plugin": "^4.0.4", "@rollup/plugin-auto-install": "^3.0.5", @@ -726,6 +728,76 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@hey-api/client-fetch": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@hey-api/client-fetch/-/client-fetch-0.2.4.tgz", + "integrity": "sha512-SGTVAVw3PlKDLw+IyhNhb/jCH3P1P2xJzLxA8Kyz1g95HrkYOJdRpl9F5I7LLwo9aCIB7nwR2NrSeX7QaQD7vQ==" + }, + "node_modules/@hey-api/openapi-ts": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@hey-api/openapi-ts/-/openapi-ts-0.53.0.tgz", + "integrity": "sha512-5pDd/s0yHJniruYyKYmEsAMbY10Nh/EwhHlgIrdpQ1KZWQdyTbH/tn8rVHT5Mopr1dMuYX0kq0TzpjcNlvrROQ==", + "dev": true, + "dependencies": { + "@apidevtools/json-schema-ref-parser": "11.7.0", + "c12": "1.11.1", + "commander": "12.1.0", + "handlebars": "4.7.8" + }, + "bin": { + "openapi-ts": "bin/index.cjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "typescript": "^5.x" + } + }, + "node_modules/@hey-api/openapi-ts/node_modules/@apidevtools/json-schema-ref-parser": { + "version": "11.7.0", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.7.0.tgz", + "integrity": "sha512-pRrmXMCwnmrkS3MLgAIW5dXRzeTv6GLjkjb4HmxNnvAKXN1Nfzp4KmGADBQvlVUcqi+a5D+hfGDLLnd5NnYxog==", + "dev": true, + "dependencies": { + "@jsdevtools/ono": "^7.1.3", + "@types/json-schema": "^7.0.15", + "js-yaml": "^4.1.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/philsturgeon" + } + }, + "node_modules/@hey-api/openapi-ts/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/@hey-api/openapi-ts/node_modules/commander": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "dev": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@hey-api/openapi-ts/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -1892,6 +1964,18 @@ } ] }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", @@ -2017,6 +2101,34 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/c12": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/c12/-/c12-1.11.1.tgz", + "integrity": "sha512-KDU0TvSvVdaYcQKQ6iPHATGz/7p/KiVjPg4vQrB6Jg/wX9R0yl5RZxWm9IoZqaIHD2+6PZd81+KMGwRr/lRIUg==", + "dev": true, + "dependencies": { + "chokidar": "^3.6.0", + "confbox": "^0.1.7", + "defu": "^6.1.4", + "dotenv": "^16.4.5", + "giget": "^1.2.3", + "jiti": "^1.21.6", + "mlly": "^1.7.1", + "ohash": "^1.1.3", + "pathe": "^1.1.2", + "perfect-debounce": "^1.0.0", + "pkg-types": "^1.1.1", + "rc9": "^2.1.2" + }, + "peerDependencies": { + "magicast": "^0.3.4" + }, + "peerDependenciesMeta": { + "magicast": { + "optional": true + } + } + }, "node_modules/call-bind": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", @@ -2129,6 +2241,39 @@ "node": "*" } }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/ci-info": { "version": "3.9.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", @@ -2144,6 +2289,15 @@ "node": ">=8" } }, + "node_modules/citty": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/citty/-/citty-0.1.6.tgz", + "integrity": "sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==", + "dev": true, + "dependencies": { + "consola": "^3.2.3" + } + }, "node_modules/cjs-module-lexer": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", @@ -2280,6 +2434,21 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "node_modules/confbox": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.7.tgz", + "integrity": "sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==", + "dev": true + }, + "node_modules/consola": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/consola/-/consola-3.2.3.tgz", + "integrity": "sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==", + "dev": true, + "engines": { + "node": "^14.18.0 || >=16.10.0" + } + }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -2406,6 +2575,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/defu": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz", + "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==", + "dev": true + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -2414,6 +2589,12 @@ "node": ">=0.4.0" } }, + "node_modules/destr": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.3.tgz", + "integrity": "sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ==", + "dev": true + }, "node_modules/detect-newline": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", @@ -2774,12 +2955,55 @@ "node": ">=14.14" } }, + "node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs-minipass/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -2845,6 +3069,25 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/giget": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/giget/-/giget-1.2.3.tgz", + "integrity": "sha512-8EHPljDvs7qKykr6uw8b+lqLiUc/vUg+KVTI0uND4s63TdsZM2Xus3mflvF0DDG9SiM4RlCkFGL+7aAjRmV7KA==", + "dev": true, + "dependencies": { + "citty": "^0.1.6", + "consola": "^3.2.3", + "defu": "^6.1.4", + "node-fetch-native": "^1.6.3", + "nypm": "^0.3.8", + "ohash": "^1.1.3", + "pathe": "^1.1.2", + "tar": "^6.2.0" + }, + "bin": { + "giget": "dist/cli.mjs" + } + }, "node_modules/glob": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", @@ -2864,6 +3107,18 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/global-prefix": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", @@ -3143,6 +3398,18 @@ "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", "dev": true }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", @@ -3174,6 +3441,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -3191,6 +3467,18 @@ "node": ">=6" } }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-interactive": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", @@ -4053,6 +4341,15 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/jiti": { + "version": "1.21.6", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.6.tgz", + "integrity": "sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==", + "dev": true, + "bin": { + "jiti": "bin/jiti.js" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -4374,6 +4671,70 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mlly": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.1.tgz", + "integrity": "sha512-rrVRZRELyQzrIUAVMHxP97kv+G786pHmOKzuFII8zDYahFBS7qnHh2AlYSl1GAHhaMPCz6/oHjVMcfFYgFYHgA==", + "dev": true, + "dependencies": { + "acorn": "^8.11.3", + "pathe": "^1.1.2", + "pkg-types": "^1.1.1", + "ufo": "^1.5.3" + } + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -4433,6 +4794,12 @@ } } }, + "node_modules/node-fetch-native": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.4.tgz", + "integrity": "sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ==", + "dev": true + }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -4466,6 +4833,160 @@ "node": ">=8" } }, + "node_modules/nypm": { + "version": "0.3.11", + "resolved": "https://registry.npmjs.org/nypm/-/nypm-0.3.11.tgz", + "integrity": "sha512-E5GqaAYSnbb6n1qZyik2wjPDZON43FqOJO59+3OkWrnmQtjggrMOVnsyzfjxp/tS6nlYJBA4zRA5jSM2YaadMg==", + "dev": true, + "dependencies": { + "citty": "^0.1.6", + "consola": "^3.2.3", + "execa": "^8.0.1", + "pathe": "^1.1.2", + "pkg-types": "^1.2.0", + "ufo": "^1.5.4" + }, + "bin": { + "nypm": "dist/cli.mjs" + }, + "engines": { + "node": "^14.16.0 || >=16.10.0" + } + }, + "node_modules/nypm/node_modules/execa": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/nypm/node_modules/get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "dev": true, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/nypm/node_modules/human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "dev": true, + "engines": { + "node": ">=16.17.0" + } + }, + "node_modules/nypm/node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/nypm/node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/nypm/node_modules/npm-run-path": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", + "dev": true, + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/nypm/node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/nypm/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/nypm/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/nypm/node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/object-inspect": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", @@ -4474,6 +4995,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/ohash": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/ohash/-/ohash-1.1.3.tgz", + "integrity": "sha512-zuHHiGTYTA1sYJ/wZN+t5HKZaH23i4yI1HMwbuXm24Nid7Dv0KcuRlKoNKS9UNfAVSBlnGLcuQrnOKWOZoEGaw==", + "dev": true + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -4699,6 +5226,18 @@ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, + "node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", + "dev": true + }, + "node_modules/perfect-debounce": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-1.0.0.tgz", + "integrity": "sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==", + "dev": true + }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -4736,6 +5275,17 @@ "node": ">=8" } }, + "node_modules/pkg-types": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.2.0.tgz", + "integrity": "sha512-+ifYuSSqOQ8CqP4MbZA5hDpb97n3E8SVWdJe+Wms9kj745lmd3b7EZJiqvmLwAlmRfjrI7Hi5z3kdBJ93lFNPA==", + "dev": true, + "dependencies": { + "confbox": "^0.1.7", + "mlly": "^1.7.1", + "pathe": "^1.1.2" + } + }, "node_modules/prettier": { "version": "3.2.5", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", @@ -4838,6 +5388,16 @@ "node": ">=4" } }, + "node_modules/rc9": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/rc9/-/rc9-2.1.2.tgz", + "integrity": "sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg==", + "dev": true, + "dependencies": { + "defu": "^6.1.4", + "destr": "^2.0.3" + } + }, "node_modules/react-is": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", @@ -4857,6 +5417,18 @@ "node": ">= 6" } }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, "node_modules/repeat-string": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", @@ -5310,6 +5882,29 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/tar": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", + "dev": true, + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tar/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -5674,6 +6269,12 @@ "node": ">=14" } }, + "node_modules/ufo": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.4.tgz", + "integrity": "sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==", + "dev": true + }, "node_modules/uglify-js": { "version": "3.17.4", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", diff --git a/sdks/ts/package.json b/sdks/ts/package.json index 21d46084a..033cfce9d 100644 --- a/sdks/ts/package.json +++ b/sdks/ts/package.json @@ -28,6 +28,7 @@ "browser": "./dist/browser/index.js", "bundle": "./dist/bundle.js", "dependencies": { + "@hey-api/client-fetch": "^0.2.4", "@rollup/plugin-typescript": "^11.1.6", "@types/lodash": "^4.17.0", "debug": "^4.3.4", @@ -45,6 +46,7 @@ "uuid": "^9.0.1" }, "devDependencies": { + "@hey-api/openapi-ts": "^0.53.0", "@jest/globals": "^29.7.0", "@optimize-lodash/rollup-plugin": "^4.0.4", "@rollup/plugin-auto-install": "^3.0.5", @@ -76,6 +78,7 @@ "format": "prettier -w .", "openapi-codegen": "bash -c 'openapi -c axios --name JulepApiClient --useOptions --indent 2 -i <(yq -o=json \".\" ../../openapi.yaml) -o src/api --exportSchemas true --useUnionTypes true'", "codegen": "npm run openapi-codegen && npm run format", + "codegen-ts": "openapi-ts && npm run format", "generate-docs": "typedoc --plugin typedoc-plugin-markdown --out ../../docs/js-sdk-docs src/**/*.ts", "test-inspect": "node --inspect-brk node_modules/.bin/jest --runInBand", "prepublishOnly": "npm run build", diff --git a/sdks/ts/src/agents.ts b/sdks/ts/src/agents.ts index fbc78151f..10b66977b 100644 --- a/sdks/ts/src/agents.ts +++ b/sdks/ts/src/agents.ts @@ -11,12 +11,27 @@ import { Docs_CreateDocRequest, Tools_PatchToolRequest, Tools_UpdateToolRequest, + agentsRouteList, + agentsRouteCreate, + agentsRouteCreateOrUpdate, + agentsRouteDelete, + agentsRouteGet, + agentsRoutePatch, + agentsRouteUpdate, + agentsDocsSearchRouteSearch, + agentDocsRouteCreate, + agentDocsRouteList, + agentToolsRouteCreate, + agentToolsRouteDelete, + agentToolsRouteList, + agentToolsRoutePatch, + agentToolsRouteUpdate, + agentDocsRouteDelete, } from "./api"; -import { BaseRoutes } from "./baseRoutes"; -export class AgentsRoutes extends BaseRoutes { +export class AgentsRoutes { async create({ requestBody }: { requestBody: Agents_CreateAgentRequest }) { - return await this.apiClient.default.agentsRouteCreate({ requestBody }); + return await agentsRouteCreate({ body: requestBody }); } async createOrUpdate({ @@ -26,18 +41,18 @@ export class AgentsRoutes extends BaseRoutes { id: Common_uuid; requestBody: Agents_UpdateAgentRequest; }) { - return await this.apiClient.default.agentsRouteCreateOrUpdate({ - id, - requestBody, + return await agentsRouteCreateOrUpdate({ + path: { id }, + body: requestBody, }); } async delete({ id }: { id: Common_uuid }) { - return await this.apiClient.default.agentsRouteDelete({ id }); + return await agentsRouteDelete({ path: { id } }); } async get({ id }: { id: Common_uuid }) { - return await this.apiClient.default.agentsRouteGet({ id }); + return await agentsRouteGet({ path: { id } }); } async list({ @@ -53,12 +68,14 @@ export class AgentsRoutes extends BaseRoutes { direction?: "asc" | "desc"; metadataFilter?: string; }) { - return await this.apiClient.default.agentsRouteList({ - limit, - offset, - sortBy, - direction, - metadataFilter, + return await agentsRouteList({ + query: { + offset, + direction, + limit, + sort_by: sortBy, + metadata_filter: metadataFilter, + }, }); } @@ -69,7 +86,7 @@ export class AgentsRoutes extends BaseRoutes { id: Common_uuid; requestBody: Agents_PatchAgentRequest; }) { - return await this.apiClient.default.agentsRoutePatch({ id, requestBody }); + return await agentsRoutePatch({ path: { id }, body: requestBody }); } async update({ @@ -79,7 +96,7 @@ export class AgentsRoutes extends BaseRoutes { id: Common_uuid; requestBody: Agents_UpdateAgentRequest; }) { - return await this.apiClient.default.agentsRouteUpdate({ id, requestBody }); + return await agentsRouteUpdate({ path: { id }, body: requestBody }); } async searchDocs({ @@ -94,9 +111,9 @@ export class AgentsRoutes extends BaseRoutes { | Docs_HybridDocSearchRequest; }; }) { - return await this.apiClient.default.agentsDocsSearchRouteSearch({ - id, - requestBody, + return await agentsDocsSearchRouteSearch({ + path: { id }, + body: requestBody, }); } @@ -107,9 +124,9 @@ export class AgentsRoutes extends BaseRoutes { id: Common_uuid; requestBody: Docs_CreateDocRequest; }) { - return await this.apiClient.default.agentDocsRouteCreate({ - id, - requestBody, + return await agentDocsRouteCreate({ + path: { id }, + body: requestBody, }); } @@ -128,13 +145,15 @@ export class AgentsRoutes extends BaseRoutes { direction?: "asc" | "desc"; metadataFilter?: string; }) { - return await this.apiClient.default.agentDocsRouteList({ - id, - limit, - offset, - sortBy, - direction, - metadataFilter, + return await agentDocsRouteList({ + path: { id }, + query: { + limit, + offset, + sort_by: sortBy, + direction, + metadata_filter: metadataFilter, + }, }); } @@ -145,14 +164,14 @@ export class AgentsRoutes extends BaseRoutes { id: Common_uuid; requestBody: Agents_CreateAgentRequest; }) { - return await this.apiClient.default.agentToolsRouteCreate({ - id, - requestBody, + return await agentToolsRouteCreate({ + path: { id }, + body: requestBody, }); } async deleteTool({ id, childId }: { id: Common_uuid; childId: Common_uuid }) { - return await this.apiClient.default.agentToolsRouteDelete({ id, childId }); + return await agentToolsRouteDelete({ path: { id, child_id: childId } }); } async listTools({ @@ -170,13 +189,15 @@ export class AgentsRoutes extends BaseRoutes { direction?: "asc" | "desc"; metadataFilter?: string; }) { - return await this.apiClient.default.agentToolsRouteList({ - id, - limit, - offset, - sortBy, - direction, - metadataFilter, + return await agentToolsRouteList({ + path: { id }, + query: { + limit, + offset, + sort_by: sortBy, + direction, + metadata_filter: metadataFilter, + }, }); } @@ -189,10 +210,12 @@ export class AgentsRoutes extends BaseRoutes { childId: Common_uuid; requestBody: Tools_PatchToolRequest; }) { - return await this.apiClient.default.agentToolsRoutePatch({ - id, - childId, - requestBody, + return await agentToolsRoutePatch({ + path: { + id, + child_id: childId, + }, + body: requestBody, }); } @@ -205,14 +228,13 @@ export class AgentsRoutes extends BaseRoutes { childId: Common_uuid; requestBody: Tools_UpdateToolRequest; }) { - return await this.apiClient.default.agentToolsRouteUpdate({ - id, - childId, - requestBody, + return await agentToolsRouteUpdate({ + path: { id, child_id: childId }, + body: requestBody, }); } async deleteDoc({ id, childId }: { id: Common_uuid; childId: Common_uuid }) { - return await this.apiClient.default.agentDocsRouteDelete({ id, childId }); + return await agentDocsRouteDelete({ path: { id, child_id: childId } }); } } diff --git a/sdks/ts/src/api/JulepApiClient.ts b/sdks/ts/src/api/JulepApiClient.ts deleted file mode 100644 index 03bf1cc0d..000000000 --- a/sdks/ts/src/api/JulepApiClient.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { BaseHttpRequest } from "./core/BaseHttpRequest"; -import type { OpenAPIConfig } from "./core/OpenAPI"; -import { AxiosHttpRequest } from "./core/AxiosHttpRequest"; -import { DefaultService } from "./services/DefaultService"; -type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest; -export class JulepApiClient { - public readonly default: DefaultService; - public readonly request: BaseHttpRequest; - constructor( - config?: Partial, - HttpRequest: HttpRequestConstructor = AxiosHttpRequest, - ) { - this.request = new HttpRequest({ - BASE: config?.BASE ?? "https://api-alpha.julep.ai/api", - VERSION: config?.VERSION ?? "0.4.0", - WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false, - CREDENTIALS: config?.CREDENTIALS ?? "include", - TOKEN: config?.TOKEN, - USERNAME: config?.USERNAME, - PASSWORD: config?.PASSWORD, - HEADERS: config?.HEADERS, - ENCODE_PATH: config?.ENCODE_PATH, - }); - this.default = new DefaultService(this.request); - } -} diff --git a/sdks/ts/src/api/core/ApiError.ts b/sdks/ts/src/api/core/ApiError.ts deleted file mode 100644 index ebc11612f..000000000 --- a/sdks/ts/src/api/core/ApiError.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { ApiRequestOptions } from "./ApiRequestOptions"; -import type { ApiResult } from "./ApiResult"; - -export class ApiError extends Error { - public readonly url: string; - public readonly status: number; - public readonly statusText: string; - public readonly body: any; - public readonly request: ApiRequestOptions; - - constructor( - request: ApiRequestOptions, - response: ApiResult, - message: string, - ) { - super(message); - - this.name = "ApiError"; - this.url = response.url; - this.status = response.status; - this.statusText = response.statusText; - this.body = response.body; - this.request = request; - } -} diff --git a/sdks/ts/src/api/core/ApiRequestOptions.ts b/sdks/ts/src/api/core/ApiRequestOptions.ts deleted file mode 100644 index ac9a2ca2f..000000000 --- a/sdks/ts/src/api/core/ApiRequestOptions.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type ApiRequestOptions = { - readonly method: - | "GET" - | "PUT" - | "POST" - | "DELETE" - | "OPTIONS" - | "HEAD" - | "PATCH"; - readonly url: string; - readonly path?: Record; - readonly cookies?: Record; - readonly headers?: Record; - readonly query?: Record; - readonly formData?: Record; - readonly body?: any; - readonly mediaType?: string; - readonly responseHeader?: string; - readonly errors?: Record; -}; diff --git a/sdks/ts/src/api/core/ApiResult.ts b/sdks/ts/src/api/core/ApiResult.ts deleted file mode 100644 index 63ed6c447..000000000 --- a/sdks/ts/src/api/core/ApiResult.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type ApiResult = { - readonly url: string; - readonly ok: boolean; - readonly status: number; - readonly statusText: string; - readonly body: any; -}; diff --git a/sdks/ts/src/api/core/AxiosHttpRequest.ts b/sdks/ts/src/api/core/AxiosHttpRequest.ts deleted file mode 100644 index f2bc92654..000000000 --- a/sdks/ts/src/api/core/AxiosHttpRequest.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { ApiRequestOptions } from "./ApiRequestOptions"; -import { BaseHttpRequest } from "./BaseHttpRequest"; -import type { CancelablePromise } from "./CancelablePromise"; -import type { OpenAPIConfig } from "./OpenAPI"; -import { request as __request } from "./request"; - -export class AxiosHttpRequest extends BaseHttpRequest { - constructor(config: OpenAPIConfig) { - super(config); - } - - /** - * Request method - * @param options The request options from the service - * @returns CancelablePromise - * @throws ApiError - */ - public override request(options: ApiRequestOptions): CancelablePromise { - return __request(this.config, options); - } -} diff --git a/sdks/ts/src/api/core/BaseHttpRequest.ts b/sdks/ts/src/api/core/BaseHttpRequest.ts deleted file mode 100644 index f07811512..000000000 --- a/sdks/ts/src/api/core/BaseHttpRequest.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { ApiRequestOptions } from "./ApiRequestOptions"; -import type { CancelablePromise } from "./CancelablePromise"; -import type { OpenAPIConfig } from "./OpenAPI"; - -export abstract class BaseHttpRequest { - constructor(public readonly config: OpenAPIConfig) {} - - public abstract request(options: ApiRequestOptions): CancelablePromise; -} diff --git a/sdks/ts/src/api/core/CancelablePromise.ts b/sdks/ts/src/api/core/CancelablePromise.ts deleted file mode 100644 index b9701ddf9..000000000 --- a/sdks/ts/src/api/core/CancelablePromise.ts +++ /dev/null @@ -1,130 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export class CancelError extends Error { - constructor(message: string) { - super(message); - this.name = "CancelError"; - } - - public get isCancelled(): boolean { - return true; - } -} - -export interface OnCancel { - readonly isResolved: boolean; - readonly isRejected: boolean; - readonly isCancelled: boolean; - - (cancelHandler: () => void): void; -} - -export class CancelablePromise implements Promise { - #isResolved: boolean; - #isRejected: boolean; - #isCancelled: boolean; - readonly #cancelHandlers: (() => void)[]; - readonly #promise: Promise; - #resolve?: (value: T | PromiseLike) => void; - #reject?: (reason?: any) => void; - - constructor( - executor: ( - resolve: (value: T | PromiseLike) => void, - reject: (reason?: any) => void, - onCancel: OnCancel, - ) => void, - ) { - this.#isResolved = false; - this.#isRejected = false; - this.#isCancelled = false; - this.#cancelHandlers = []; - this.#promise = new Promise((resolve, reject) => { - this.#resolve = resolve; - this.#reject = reject; - - const onResolve = (value: T | PromiseLike): void => { - if (this.#isResolved || this.#isRejected || this.#isCancelled) { - return; - } - this.#isResolved = true; - if (this.#resolve) this.#resolve(value); - }; - - const onReject = (reason?: any): void => { - if (this.#isResolved || this.#isRejected || this.#isCancelled) { - return; - } - this.#isRejected = true; - if (this.#reject) this.#reject(reason); - }; - - const onCancel = (cancelHandler: () => void): void => { - if (this.#isResolved || this.#isRejected || this.#isCancelled) { - return; - } - this.#cancelHandlers.push(cancelHandler); - }; - - Object.defineProperty(onCancel, "isResolved", { - get: (): boolean => this.#isResolved, - }); - - Object.defineProperty(onCancel, "isRejected", { - get: (): boolean => this.#isRejected, - }); - - Object.defineProperty(onCancel, "isCancelled", { - get: (): boolean => this.#isCancelled, - }); - - return executor(onResolve, onReject, onCancel as OnCancel); - }); - } - - get [Symbol.toStringTag]() { - return "Cancellable Promise"; - } - - public then( - onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, - onRejected?: ((reason: any) => TResult2 | PromiseLike) | null, - ): Promise { - return this.#promise.then(onFulfilled, onRejected); - } - - public catch( - onRejected?: ((reason: any) => TResult | PromiseLike) | null, - ): Promise { - return this.#promise.catch(onRejected); - } - - public finally(onFinally?: (() => void) | null): Promise { - return this.#promise.finally(onFinally); - } - - public cancel(): void { - if (this.#isResolved || this.#isRejected || this.#isCancelled) { - return; - } - this.#isCancelled = true; - if (this.#cancelHandlers.length) { - try { - for (const cancelHandler of this.#cancelHandlers) { - cancelHandler(); - } - } catch (error) { - console.warn("Cancellation threw an error", error); - return; - } - } - this.#cancelHandlers.length = 0; - if (this.#reject) this.#reject(new CancelError("Request aborted")); - } - - public get isCancelled(): boolean { - return this.#isCancelled; - } -} diff --git a/sdks/ts/src/api/core/OpenAPI.ts b/sdks/ts/src/api/core/OpenAPI.ts deleted file mode 100644 index 9ffb201ab..000000000 --- a/sdks/ts/src/api/core/OpenAPI.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { ApiRequestOptions } from "./ApiRequestOptions"; - -type Resolver = (options: ApiRequestOptions) => Promise; -type Headers = Record; - -export type OpenAPIConfig = { - BASE: string; - VERSION: string; - WITH_CREDENTIALS: boolean; - CREDENTIALS: "include" | "omit" | "same-origin"; - TOKEN?: string | Resolver | undefined; - USERNAME?: string | Resolver | undefined; - PASSWORD?: string | Resolver | undefined; - HEADERS?: Headers | Resolver | undefined; - ENCODE_PATH?: ((path: string) => string) | undefined; -}; - -export const OpenAPI: OpenAPIConfig = { - BASE: "https://api-alpha.julep.ai/api", - VERSION: "0.4.0", - WITH_CREDENTIALS: false, - CREDENTIALS: "include", - TOKEN: undefined, - USERNAME: undefined, - PASSWORD: undefined, - HEADERS: undefined, - ENCODE_PATH: undefined, -}; diff --git a/sdks/ts/src/api/core/request.ts b/sdks/ts/src/api/core/request.ts deleted file mode 100644 index 534f264f8..000000000 --- a/sdks/ts/src/api/core/request.ts +++ /dev/null @@ -1,367 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import axios from "axios"; -import type { - AxiosError, - AxiosRequestConfig, - AxiosResponse, - AxiosInstance, -} from "axios"; -import FormData from "form-data"; - -import { ApiError } from "./ApiError"; -import type { ApiRequestOptions } from "./ApiRequestOptions"; -import type { ApiResult } from "./ApiResult"; -import { CancelablePromise } from "./CancelablePromise"; -import type { OnCancel } from "./CancelablePromise"; -import type { OpenAPIConfig } from "./OpenAPI"; - -export const isDefined = ( - value: T | null | undefined, -): value is Exclude => { - return value !== undefined && value !== null; -}; - -export const isString = (value: any): value is string => { - return typeof value === "string"; -}; - -export const isStringWithValue = (value: any): value is string => { - return isString(value) && value !== ""; -}; - -export const isBlob = (value: any): value is Blob => { - return ( - typeof value === "object" && - typeof value.type === "string" && - typeof value.stream === "function" && - typeof value.arrayBuffer === "function" && - typeof value.constructor === "function" && - typeof value.constructor.name === "string" && - /^(Blob|File)$/.test(value.constructor.name) && - /^(Blob|File)$/.test(value[Symbol.toStringTag]) - ); -}; - -export const isFormData = (value: any): value is FormData => { - return value instanceof FormData; -}; - -export const isSuccess = (status: number): boolean => { - return status >= 200 && status < 300; -}; - -export const base64 = (str: string): string => { - try { - return btoa(str); - } catch (err) { - // @ts-ignore - return Buffer.from(str).toString("base64"); - } -}; - -export const getQueryString = (params: Record): string => { - const qs: string[] = []; - - const append = (key: string, value: any) => { - qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); - }; - - const process = (key: string, value: any) => { - if (isDefined(value)) { - if (Array.isArray(value)) { - value.forEach((v) => { - process(key, v); - }); - } else if (typeof value === "object") { - Object.entries(value).forEach(([k, v]) => { - process(`${key}[${k}]`, v); - }); - } else { - append(key, value); - } - } - }; - - Object.entries(params).forEach(([key, value]) => { - process(key, value); - }); - - if (qs.length > 0) { - return `?${qs.join("&")}`; - } - - return ""; -}; - -const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => { - const encoder = config.ENCODE_PATH || encodeURI; - - const path = options.url - .replace("{api-version}", config.VERSION) - .replace(/{(.*?)}/g, (substring: string, group: string) => { - if (options.path?.hasOwnProperty(group)) { - return encoder(String(options.path[group])); - } - return substring; - }); - - const url = `${config.BASE}${path}`; - if (options.query) { - return `${url}${getQueryString(options.query)}`; - } - return url; -}; - -export const getFormData = ( - options: ApiRequestOptions, -): FormData | undefined => { - if (options.formData) { - const formData = new FormData(); - - const process = (key: string, value: any) => { - if (isString(value) || isBlob(value)) { - formData.append(key, value); - } else { - formData.append(key, JSON.stringify(value)); - } - }; - - Object.entries(options.formData) - .filter(([_, value]) => isDefined(value)) - .forEach(([key, value]) => { - if (Array.isArray(value)) { - value.forEach((v) => process(key, v)); - } else { - process(key, value); - } - }); - - return formData; - } - return undefined; -}; - -type Resolver = (options: ApiRequestOptions) => Promise; - -export const resolve = async ( - options: ApiRequestOptions, - resolver?: T | Resolver, -): Promise => { - if (typeof resolver === "function") { - return (resolver as Resolver)(options); - } - return resolver; -}; - -export const getHeaders = async ( - config: OpenAPIConfig, - options: ApiRequestOptions, - formData?: FormData, -): Promise> => { - const [token, username, password, additionalHeaders] = await Promise.all([ - resolve(options, config.TOKEN), - resolve(options, config.USERNAME), - resolve(options, config.PASSWORD), - resolve(options, config.HEADERS), - ]); - - const formHeaders = - (typeof formData?.getHeaders === "function" && formData?.getHeaders()) || - {}; - - const headers = Object.entries({ - Accept: "application/json", - ...additionalHeaders, - ...options.headers, - ...formHeaders, - }) - .filter(([_, value]) => isDefined(value)) - .reduce( - (headers, [key, value]) => ({ - ...headers, - [key]: String(value), - }), - {} as Record, - ); - - if (isStringWithValue(token)) { - headers["Authorization"] = `Bearer ${token}`; - } - - if (isStringWithValue(username) && isStringWithValue(password)) { - const credentials = base64(`${username}:${password}`); - headers["Authorization"] = `Basic ${credentials}`; - } - - if (options.body) { - if (options.mediaType) { - headers["Content-Type"] = options.mediaType; - } else if (isBlob(options.body)) { - headers["Content-Type"] = options.body.type || "application/octet-stream"; - } else if (isString(options.body)) { - headers["Content-Type"] = "text/plain"; - } else if (!isFormData(options.body)) { - headers["Content-Type"] = "application/json"; - } - } - - return headers; -}; - -export const getRequestBody = (options: ApiRequestOptions): any => { - if (options.body) { - return options.body; - } - return undefined; -}; - -export const sendRequest = async ( - config: OpenAPIConfig, - options: ApiRequestOptions, - url: string, - body: any, - formData: FormData | undefined, - headers: Record, - onCancel: OnCancel, - axiosClient: AxiosInstance, -): Promise> => { - const source = axios.CancelToken.source(); - - const requestConfig: AxiosRequestConfig = { - url, - headers, - data: body ?? formData, - method: options.method, - withCredentials: config.WITH_CREDENTIALS, - cancelToken: source.token, - }; - - onCancel(() => source.cancel("The user aborted a request.")); - - try { - return await axiosClient.request(requestConfig); - } catch (error) { - const axiosError = error as AxiosError; - if (axiosError.response) { - return axiosError.response; - } - throw error; - } -}; - -export const getResponseHeader = ( - response: AxiosResponse, - responseHeader?: string, -): string | undefined => { - if (responseHeader) { - const content = response.headers[responseHeader]; - if (isString(content)) { - return content; - } - } - return undefined; -}; - -export const getResponseBody = (response: AxiosResponse): any => { - if (response.status !== 204) { - return response.data; - } - return undefined; -}; - -export const catchErrorCodes = ( - options: ApiRequestOptions, - result: ApiResult, -): void => { - const errors: Record = { - 400: "Bad Request", - 401: "Unauthorized", - 403: "Forbidden", - 404: "Not Found", - 500: "Internal Server Error", - 502: "Bad Gateway", - 503: "Service Unavailable", - ...options.errors, - }; - - const error = errors[result.status]; - if (error) { - throw new ApiError(options, result, error); - } - - if (!result.ok) { - const errorStatus = result.status ?? "unknown"; - const errorStatusText = result.statusText ?? "unknown"; - const errorBody = (() => { - try { - return JSON.stringify(result.body, null, 2); - } catch (e) { - return undefined; - } - })(); - - throw new ApiError( - options, - result, - `Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}`, - ); - } -}; - -/** - * Request method - * @param config The OpenAPI configuration object - * @param options The request options from the service - * @param axiosClient The axios client instance to use - * @returns CancelablePromise - * @throws ApiError - */ -export const request = ( - config: OpenAPIConfig, - options: ApiRequestOptions, - axiosClient: AxiosInstance = axios, -): CancelablePromise => { - return new CancelablePromise(async (resolve, reject, onCancel) => { - try { - const url = getUrl(config, options); - const formData = getFormData(options); - const body = getRequestBody(options); - const headers = await getHeaders(config, options, formData); - - if (!onCancel.isCancelled) { - const response = await sendRequest( - config, - options, - url, - body, - formData, - headers, - onCancel, - axiosClient, - ); - const responseBody = getResponseBody(response); - const responseHeader = getResponseHeader( - response, - options.responseHeader, - ); - - const result: ApiResult = { - url, - ok: isSuccess(response.status), - status: response.status, - statusText: response.statusText, - body: responseHeader ?? responseBody, - }; - - catchErrorCodes(options, result); - - resolve(result.body); - } - } catch (error) { - reject(error); - } - }); -}; diff --git a/sdks/ts/src/api/index.ts b/sdks/ts/src/api/index.ts index 81b0feb84..1cb041de5 100644 --- a/sdks/ts/src/api/index.ts +++ b/sdks/ts/src/api/index.ts @@ -1,265 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export { JulepApiClient } from "./JulepApiClient"; - -export { ApiError } from "./core/ApiError"; -export { BaseHttpRequest } from "./core/BaseHttpRequest"; -export { CancelablePromise, CancelError } from "./core/CancelablePromise"; -export { OpenAPI } from "./core/OpenAPI"; -export type { OpenAPIConfig } from "./core/OpenAPI"; - -export type { Agents_Agent } from "./models/Agents_Agent"; -export type { Agents_CreateAgentRequest } from "./models/Agents_CreateAgentRequest"; -export type { Agents_CreateOrUpdateAgentRequest } from "./models/Agents_CreateOrUpdateAgentRequest"; -export type { Agents_CreateOrUpdateAgentRequest_id } from "./models/Agents_CreateOrUpdateAgentRequest_id"; -export type { Agents_PatchAgentRequest } from "./models/Agents_PatchAgentRequest"; -export type { Agents_UpdateAgentRequest } from "./models/Agents_UpdateAgentRequest"; -export type { Chat_BaseChatOutput } from "./models/Chat_BaseChatOutput"; -export type { Chat_BaseChatResponse } from "./models/Chat_BaseChatResponse"; -export type { Chat_BaseTokenLogProb } from "./models/Chat_BaseTokenLogProb"; -export type { Chat_ChatInput } from "./models/Chat_ChatInput"; -export type { Chat_ChatInputData } from "./models/Chat_ChatInputData"; -export type { Chat_ChatOutputChunk } from "./models/Chat_ChatOutputChunk"; -export type { Chat_ChatSettings } from "./models/Chat_ChatSettings"; -export type { Chat_ChunkChatResponse } from "./models/Chat_ChunkChatResponse"; -export type { Chat_CompetionUsage } from "./models/Chat_CompetionUsage"; -export type { Chat_CompletionResponseFormat } from "./models/Chat_CompletionResponseFormat"; -export type { Chat_DefaultChatSettings } from "./models/Chat_DefaultChatSettings"; -export type { Chat_FinishReason } from "./models/Chat_FinishReason"; -export type { Chat_LogProbResponse } from "./models/Chat_LogProbResponse"; -export type { Chat_MessageChatResponse } from "./models/Chat_MessageChatResponse"; -export type { Chat_MultipleChatOutput } from "./models/Chat_MultipleChatOutput"; -export type { Chat_OpenAISettings } from "./models/Chat_OpenAISettings"; -export type { Chat_SingleChatOutput } from "./models/Chat_SingleChatOutput"; -export type { Chat_TokenLogProb } from "./models/Chat_TokenLogProb"; -export type { Common_identifierSafeUnicode } from "./models/Common_identifierSafeUnicode"; -export type { Common_JinjaTemplate } from "./models/Common_JinjaTemplate"; -export type { Common_limit } from "./models/Common_limit"; -export type { Common_logit_bias } from "./models/Common_logit_bias"; -export type { Common_offset } from "./models/Common_offset"; -export type { Common_PaginationOptions_direction } from "./models/Common_PaginationOptions_direction"; -export type { Common_PaginationOptions_limit } from "./models/Common_PaginationOptions_limit"; -export type { Common_PaginationOptions_metadata_filter } from "./models/Common_PaginationOptions_metadata_filter"; -export type { Common_PaginationOptions_offset } from "./models/Common_PaginationOptions_offset"; -export type { Common_PaginationOptions_sort_by } from "./models/Common_PaginationOptions_sort_by"; -export type { Common_PyExpression } from "./models/Common_PyExpression"; -export type { Common_ResourceCreatedResponse } from "./models/Common_ResourceCreatedResponse"; -export type { Common_ResourceDeletedResponse } from "./models/Common_ResourceDeletedResponse"; -export type { Common_ResourceUpdatedResponse } from "./models/Common_ResourceUpdatedResponse"; -export type { Common_toolRef } from "./models/Common_toolRef"; -export type { Common_uuid } from "./models/Common_uuid"; -export type { Common_validPythonIdentifier } from "./models/Common_validPythonIdentifier"; -export type { Docs_BaseDocSearchRequest } from "./models/Docs_BaseDocSearchRequest"; -export type { Docs_CreateDocRequest } from "./models/Docs_CreateDocRequest"; -export type { Docs_Doc } from "./models/Docs_Doc"; -export type { Docs_DocOwner } from "./models/Docs_DocOwner"; -export type { Docs_DocReference } from "./models/Docs_DocReference"; -export type { Docs_DocSearchResponse } from "./models/Docs_DocSearchResponse"; -export type { Docs_EmbedQueryRequest } from "./models/Docs_EmbedQueryRequest"; -export type { Docs_EmbedQueryResponse } from "./models/Docs_EmbedQueryResponse"; -export type { Docs_HybridDocSearchRequest } from "./models/Docs_HybridDocSearchRequest"; -export type { Docs_Snippet } from "./models/Docs_Snippet"; -export type { Docs_TextOnlyDocSearchRequest } from "./models/Docs_TextOnlyDocSearchRequest"; -export type { Docs_VectorDocSearchRequest } from "./models/Docs_VectorDocSearchRequest"; -export type { Entries_BaseEntry } from "./models/Entries_BaseEntry"; -export type { Entries_ChatMLRole } from "./models/Entries_ChatMLRole"; -export type { Entries_Entry } from "./models/Entries_Entry"; -export type { Entries_History } from "./models/Entries_History"; -export type { Entries_ImageDetail } from "./models/Entries_ImageDetail"; -export type { Entries_Relation } from "./models/Entries_Relation"; -export type { Executions_CreateExecutionRequest } from "./models/Executions_CreateExecutionRequest"; -export type { Executions_Execution } from "./models/Executions_Execution"; -export type { Executions_ResumeExecutionRequest } from "./models/Executions_ResumeExecutionRequest"; -export type { Executions_StopExecutionRequest } from "./models/Executions_StopExecutionRequest"; -export type { Executions_TaskTokenResumeExecutionRequest } from "./models/Executions_TaskTokenResumeExecutionRequest"; -export type { Executions_Transition } from "./models/Executions_Transition"; -export type { Executions_TransitionTarget } from "./models/Executions_TransitionTarget"; -export type { Executions_UpdateExecutionRequest } from "./models/Executions_UpdateExecutionRequest"; -export type { Jobs_JobState } from "./models/Jobs_JobState"; -export type { Jobs_JobStatus } from "./models/Jobs_JobStatus"; -export type { Sessions_ContextOverflowType } from "./models/Sessions_ContextOverflowType"; -export type { Sessions_CreateOrUpdateSessionRequest } from "./models/Sessions_CreateOrUpdateSessionRequest"; -export type { Sessions_CreateOrUpdateSessionRequest_id } from "./models/Sessions_CreateOrUpdateSessionRequest_id"; -export type { Sessions_CreateSessionRequest } from "./models/Sessions_CreateSessionRequest"; -export type { Sessions_MultiAgentMultiUserSession } from "./models/Sessions_MultiAgentMultiUserSession"; -export type { Sessions_MultiAgentNoUserSession } from "./models/Sessions_MultiAgentNoUserSession"; -export type { Sessions_MultiAgentSingleUserSession } from "./models/Sessions_MultiAgentSingleUserSession"; -export type { Sessions_PatchSessionRequest } from "./models/Sessions_PatchSessionRequest"; -export type { Sessions_Session } from "./models/Sessions_Session"; -export type { Sessions_SingleAgentMultiUserSession } from "./models/Sessions_SingleAgentMultiUserSession"; -export type { Sessions_SingleAgentNoUserSession } from "./models/Sessions_SingleAgentNoUserSession"; -export type { Sessions_SingleAgentSingleUserSession } from "./models/Sessions_SingleAgentSingleUserSession"; -export type { Sessions_UpdateSessionRequest } from "./models/Sessions_UpdateSessionRequest"; -export type { Tasks_CaseThen } from "./models/Tasks_CaseThen"; -export type { Tasks_CreateOrUpdateTaskRequest_id } from "./models/Tasks_CreateOrUpdateTaskRequest_id"; -export type { Tasks_CreateTaskRequest } from "./models/Tasks_CreateTaskRequest"; -export type { Tasks_EmbedStep } from "./models/Tasks_EmbedStep"; -export type { Tasks_ErrorWorkflowStep } from "./models/Tasks_ErrorWorkflowStep"; -export type { Tasks_EvaluateStep } from "./models/Tasks_EvaluateStep"; -export type { Tasks_ForeachDo } from "./models/Tasks_ForeachDo"; -export type { Tasks_ForeachStep } from "./models/Tasks_ForeachStep"; -export type { Tasks_GetStep } from "./models/Tasks_GetStep"; -export type { Tasks_IfElseWorkflowStep } from "./models/Tasks_IfElseWorkflowStep"; -export type { Tasks_LogStep } from "./models/Tasks_LogStep"; -export type { Tasks_ParallelStep } from "./models/Tasks_ParallelStep"; -export type { Tasks_PatchTaskRequest } from "./models/Tasks_PatchTaskRequest"; -export type { Tasks_PromptStep } from "./models/Tasks_PromptStep"; -export type { Tasks_ReturnStep } from "./models/Tasks_ReturnStep"; -export type { Tasks_SearchStep } from "./models/Tasks_SearchStep"; -export type { Tasks_SetKey } from "./models/Tasks_SetKey"; -export type { Tasks_SetStep } from "./models/Tasks_SetStep"; -export type { Tasks_SleepFor } from "./models/Tasks_SleepFor"; -export type { Tasks_SleepStep } from "./models/Tasks_SleepStep"; -export type { Tasks_SwitchStep } from "./models/Tasks_SwitchStep"; -export type { Tasks_Task } from "./models/Tasks_Task"; -export type { Tasks_TaskTool } from "./models/Tasks_TaskTool"; -export type { Tasks_ToolCallStep } from "./models/Tasks_ToolCallStep"; -export type { Tasks_UpdateTaskRequest } from "./models/Tasks_UpdateTaskRequest"; -export type { Tasks_WaitForInputInfo } from "./models/Tasks_WaitForInputInfo"; -export type { Tasks_WaitForInputStep } from "./models/Tasks_WaitForInputStep"; -export type { Tasks_YieldStep } from "./models/Tasks_YieldStep"; -export type { Tools_ChosenToolCall } from "./models/Tools_ChosenToolCall"; -export type { Tools_CreateToolRequest } from "./models/Tools_CreateToolRequest"; -export type { Tools_FunctionCallOption } from "./models/Tools_FunctionCallOption"; -export type { Tools_FunctionDef } from "./models/Tools_FunctionDef"; -export type { Tools_NamedToolChoice } from "./models/Tools_NamedToolChoice"; -export type { Tools_PatchToolRequest } from "./models/Tools_PatchToolRequest"; -export type { Tools_Tool } from "./models/Tools_Tool"; -export type { Tools_ToolResponse } from "./models/Tools_ToolResponse"; -export type { Tools_ToolType } from "./models/Tools_ToolType"; -export type { Tools_UpdateToolRequest } from "./models/Tools_UpdateToolRequest"; -export type { Users_CreateOrUpdateUserRequest } from "./models/Users_CreateOrUpdateUserRequest"; -export type { Users_CreateUserRequest } from "./models/Users_CreateUserRequest"; -export type { Users_PatchUserRequest } from "./models/Users_PatchUserRequest"; -export type { Users_UpdateUserRequest } from "./models/Users_UpdateUserRequest"; -export type { Users_User } from "./models/Users_User"; - -export { $Agents_Agent } from "./schemas/$Agents_Agent"; -export { $Agents_CreateAgentRequest } from "./schemas/$Agents_CreateAgentRequest"; -export { $Agents_CreateOrUpdateAgentRequest } from "./schemas/$Agents_CreateOrUpdateAgentRequest"; -export { $Agents_CreateOrUpdateAgentRequest_id } from "./schemas/$Agents_CreateOrUpdateAgentRequest_id"; -export { $Agents_PatchAgentRequest } from "./schemas/$Agents_PatchAgentRequest"; -export { $Agents_UpdateAgentRequest } from "./schemas/$Agents_UpdateAgentRequest"; -export { $Chat_BaseChatOutput } from "./schemas/$Chat_BaseChatOutput"; -export { $Chat_BaseChatResponse } from "./schemas/$Chat_BaseChatResponse"; -export { $Chat_BaseTokenLogProb } from "./schemas/$Chat_BaseTokenLogProb"; -export { $Chat_ChatInput } from "./schemas/$Chat_ChatInput"; -export { $Chat_ChatInputData } from "./schemas/$Chat_ChatInputData"; -export { $Chat_ChatOutputChunk } from "./schemas/$Chat_ChatOutputChunk"; -export { $Chat_ChatSettings } from "./schemas/$Chat_ChatSettings"; -export { $Chat_ChunkChatResponse } from "./schemas/$Chat_ChunkChatResponse"; -export { $Chat_CompetionUsage } from "./schemas/$Chat_CompetionUsage"; -export { $Chat_CompletionResponseFormat } from "./schemas/$Chat_CompletionResponseFormat"; -export { $Chat_DefaultChatSettings } from "./schemas/$Chat_DefaultChatSettings"; -export { $Chat_FinishReason } from "./schemas/$Chat_FinishReason"; -export { $Chat_LogProbResponse } from "./schemas/$Chat_LogProbResponse"; -export { $Chat_MessageChatResponse } from "./schemas/$Chat_MessageChatResponse"; -export { $Chat_MultipleChatOutput } from "./schemas/$Chat_MultipleChatOutput"; -export { $Chat_OpenAISettings } from "./schemas/$Chat_OpenAISettings"; -export { $Chat_SingleChatOutput } from "./schemas/$Chat_SingleChatOutput"; -export { $Chat_TokenLogProb } from "./schemas/$Chat_TokenLogProb"; -export { $Common_identifierSafeUnicode } from "./schemas/$Common_identifierSafeUnicode"; -export { $Common_JinjaTemplate } from "./schemas/$Common_JinjaTemplate"; -export { $Common_limit } from "./schemas/$Common_limit"; -export { $Common_logit_bias } from "./schemas/$Common_logit_bias"; -export { $Common_offset } from "./schemas/$Common_offset"; -export { $Common_PaginationOptions_direction } from "./schemas/$Common_PaginationOptions_direction"; -export { $Common_PaginationOptions_limit } from "./schemas/$Common_PaginationOptions_limit"; -export { $Common_PaginationOptions_metadata_filter } from "./schemas/$Common_PaginationOptions_metadata_filter"; -export { $Common_PaginationOptions_offset } from "./schemas/$Common_PaginationOptions_offset"; -export { $Common_PaginationOptions_sort_by } from "./schemas/$Common_PaginationOptions_sort_by"; -export { $Common_PyExpression } from "./schemas/$Common_PyExpression"; -export { $Common_ResourceCreatedResponse } from "./schemas/$Common_ResourceCreatedResponse"; -export { $Common_ResourceDeletedResponse } from "./schemas/$Common_ResourceDeletedResponse"; -export { $Common_ResourceUpdatedResponse } from "./schemas/$Common_ResourceUpdatedResponse"; -export { $Common_toolRef } from "./schemas/$Common_toolRef"; -export { $Common_uuid } from "./schemas/$Common_uuid"; -export { $Common_validPythonIdentifier } from "./schemas/$Common_validPythonIdentifier"; -export { $Docs_BaseDocSearchRequest } from "./schemas/$Docs_BaseDocSearchRequest"; -export { $Docs_CreateDocRequest } from "./schemas/$Docs_CreateDocRequest"; -export { $Docs_Doc } from "./schemas/$Docs_Doc"; -export { $Docs_DocOwner } from "./schemas/$Docs_DocOwner"; -export { $Docs_DocReference } from "./schemas/$Docs_DocReference"; -export { $Docs_DocSearchResponse } from "./schemas/$Docs_DocSearchResponse"; -export { $Docs_EmbedQueryRequest } from "./schemas/$Docs_EmbedQueryRequest"; -export { $Docs_EmbedQueryResponse } from "./schemas/$Docs_EmbedQueryResponse"; -export { $Docs_HybridDocSearchRequest } from "./schemas/$Docs_HybridDocSearchRequest"; -export { $Docs_Snippet } from "./schemas/$Docs_Snippet"; -export { $Docs_TextOnlyDocSearchRequest } from "./schemas/$Docs_TextOnlyDocSearchRequest"; -export { $Docs_VectorDocSearchRequest } from "./schemas/$Docs_VectorDocSearchRequest"; -export { $Entries_BaseEntry } from "./schemas/$Entries_BaseEntry"; -export { $Entries_ChatMLRole } from "./schemas/$Entries_ChatMLRole"; -export { $Entries_Entry } from "./schemas/$Entries_Entry"; -export { $Entries_History } from "./schemas/$Entries_History"; -export { $Entries_ImageDetail } from "./schemas/$Entries_ImageDetail"; -export { $Entries_Relation } from "./schemas/$Entries_Relation"; -export { $Executions_CreateExecutionRequest } from "./schemas/$Executions_CreateExecutionRequest"; -export { $Executions_Execution } from "./schemas/$Executions_Execution"; -export { $Executions_ResumeExecutionRequest } from "./schemas/$Executions_ResumeExecutionRequest"; -export { $Executions_StopExecutionRequest } from "./schemas/$Executions_StopExecutionRequest"; -export { $Executions_TaskTokenResumeExecutionRequest } from "./schemas/$Executions_TaskTokenResumeExecutionRequest"; -export { $Executions_Transition } from "./schemas/$Executions_Transition"; -export { $Executions_TransitionTarget } from "./schemas/$Executions_TransitionTarget"; -export { $Executions_UpdateExecutionRequest } from "./schemas/$Executions_UpdateExecutionRequest"; -export { $Jobs_JobState } from "./schemas/$Jobs_JobState"; -export { $Jobs_JobStatus } from "./schemas/$Jobs_JobStatus"; -export { $Sessions_ContextOverflowType } from "./schemas/$Sessions_ContextOverflowType"; -export { $Sessions_CreateOrUpdateSessionRequest } from "./schemas/$Sessions_CreateOrUpdateSessionRequest"; -export { $Sessions_CreateOrUpdateSessionRequest_id } from "./schemas/$Sessions_CreateOrUpdateSessionRequest_id"; -export { $Sessions_CreateSessionRequest } from "./schemas/$Sessions_CreateSessionRequest"; -export { $Sessions_MultiAgentMultiUserSession } from "./schemas/$Sessions_MultiAgentMultiUserSession"; -export { $Sessions_MultiAgentNoUserSession } from "./schemas/$Sessions_MultiAgentNoUserSession"; -export { $Sessions_MultiAgentSingleUserSession } from "./schemas/$Sessions_MultiAgentSingleUserSession"; -export { $Sessions_PatchSessionRequest } from "./schemas/$Sessions_PatchSessionRequest"; -export { $Sessions_Session } from "./schemas/$Sessions_Session"; -export { $Sessions_SingleAgentMultiUserSession } from "./schemas/$Sessions_SingleAgentMultiUserSession"; -export { $Sessions_SingleAgentNoUserSession } from "./schemas/$Sessions_SingleAgentNoUserSession"; -export { $Sessions_SingleAgentSingleUserSession } from "./schemas/$Sessions_SingleAgentSingleUserSession"; -export { $Sessions_UpdateSessionRequest } from "./schemas/$Sessions_UpdateSessionRequest"; -export { $Tasks_CaseThen } from "./schemas/$Tasks_CaseThen"; -export { $Tasks_CreateOrUpdateTaskRequest_id } from "./schemas/$Tasks_CreateOrUpdateTaskRequest_id"; -export { $Tasks_CreateTaskRequest } from "./schemas/$Tasks_CreateTaskRequest"; -export { $Tasks_EmbedStep } from "./schemas/$Tasks_EmbedStep"; -export { $Tasks_ErrorWorkflowStep } from "./schemas/$Tasks_ErrorWorkflowStep"; -export { $Tasks_EvaluateStep } from "./schemas/$Tasks_EvaluateStep"; -export { $Tasks_ForeachDo } from "./schemas/$Tasks_ForeachDo"; -export { $Tasks_ForeachStep } from "./schemas/$Tasks_ForeachStep"; -export { $Tasks_GetStep } from "./schemas/$Tasks_GetStep"; -export { $Tasks_IfElseWorkflowStep } from "./schemas/$Tasks_IfElseWorkflowStep"; -export { $Tasks_LogStep } from "./schemas/$Tasks_LogStep"; -export { $Tasks_ParallelStep } from "./schemas/$Tasks_ParallelStep"; -export { $Tasks_PatchTaskRequest } from "./schemas/$Tasks_PatchTaskRequest"; -export { $Tasks_PromptStep } from "./schemas/$Tasks_PromptStep"; -export { $Tasks_ReturnStep } from "./schemas/$Tasks_ReturnStep"; -export { $Tasks_SearchStep } from "./schemas/$Tasks_SearchStep"; -export { $Tasks_SetKey } from "./schemas/$Tasks_SetKey"; -export { $Tasks_SetStep } from "./schemas/$Tasks_SetStep"; -export { $Tasks_SleepFor } from "./schemas/$Tasks_SleepFor"; -export { $Tasks_SleepStep } from "./schemas/$Tasks_SleepStep"; -export { $Tasks_SwitchStep } from "./schemas/$Tasks_SwitchStep"; -export { $Tasks_Task } from "./schemas/$Tasks_Task"; -export { $Tasks_TaskTool } from "./schemas/$Tasks_TaskTool"; -export { $Tasks_ToolCallStep } from "./schemas/$Tasks_ToolCallStep"; -export { $Tasks_UpdateTaskRequest } from "./schemas/$Tasks_UpdateTaskRequest"; -export { $Tasks_WaitForInputInfo } from "./schemas/$Tasks_WaitForInputInfo"; -export { $Tasks_WaitForInputStep } from "./schemas/$Tasks_WaitForInputStep"; -export { $Tasks_YieldStep } from "./schemas/$Tasks_YieldStep"; -export { $Tools_ChosenToolCall } from "./schemas/$Tools_ChosenToolCall"; -export { $Tools_CreateToolRequest } from "./schemas/$Tools_CreateToolRequest"; -export { $Tools_FunctionCallOption } from "./schemas/$Tools_FunctionCallOption"; -export { $Tools_FunctionDef } from "./schemas/$Tools_FunctionDef"; -export { $Tools_NamedToolChoice } from "./schemas/$Tools_NamedToolChoice"; -export { $Tools_PatchToolRequest } from "./schemas/$Tools_PatchToolRequest"; -export { $Tools_Tool } from "./schemas/$Tools_Tool"; -export { $Tools_ToolResponse } from "./schemas/$Tools_ToolResponse"; -export { $Tools_ToolType } from "./schemas/$Tools_ToolType"; -export { $Tools_UpdateToolRequest } from "./schemas/$Tools_UpdateToolRequest"; -export { $Users_CreateOrUpdateUserRequest } from "./schemas/$Users_CreateOrUpdateUserRequest"; -export { $Users_CreateUserRequest } from "./schemas/$Users_CreateUserRequest"; -export { $Users_PatchUserRequest } from "./schemas/$Users_PatchUserRequest"; -export { $Users_UpdateUserRequest } from "./schemas/$Users_UpdateUserRequest"; -export { $Users_User } from "./schemas/$Users_User"; - -export { DefaultService } from "./services/DefaultService"; +// This file is auto-generated by @hey-api/openapi-ts +export * from "./schemas.gen"; +export * from "./services.gen"; +export * from "./types.gen"; diff --git a/sdks/ts/src/api/models/Agents_Agent.ts b/sdks/ts/src/api/models/Agents_Agent.ts deleted file mode 100644 index bab63a6e2..000000000 --- a/sdks/ts/src/api/models/Agents_Agent.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Chat_DefaultChatSettings } from "./Chat_DefaultChatSettings"; -import type { Common_identifierSafeUnicode } from "./Common_identifierSafeUnicode"; -import type { Common_uuid } from "./Common_uuid"; -export type Agents_Agent = { - readonly id: Common_uuid; - metadata?: Record; - /** - * When this resource was created as UTC date-time - */ - readonly created_at: string; - /** - * When this resource was updated as UTC date-time - */ - readonly updated_at: string; - /** - * Name of the agent - */ - name: Common_identifierSafeUnicode; - /** - * About the agent - */ - about: string; - /** - * Model name to use (gpt-4-turbo, gemini-nano etc) - */ - model: string; - /** - * Instructions for the agent - */ - instructions: string | Array; - /** - * Default settings for all sessions created by this agent - */ - default_settings?: Chat_DefaultChatSettings; -}; diff --git a/sdks/ts/src/api/models/Agents_CreateAgentRequest.ts b/sdks/ts/src/api/models/Agents_CreateAgentRequest.ts deleted file mode 100644 index 73c576816..000000000 --- a/sdks/ts/src/api/models/Agents_CreateAgentRequest.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Chat_DefaultChatSettings } from "./Chat_DefaultChatSettings"; -import type { Common_identifierSafeUnicode } from "./Common_identifierSafeUnicode"; -/** - * Payload for creating a agent (and associated documents) - */ -export type Agents_CreateAgentRequest = { - metadata?: Record; - /** - * Name of the agent - */ - name: Common_identifierSafeUnicode; - /** - * About the agent - */ - about: string; - /** - * Model name to use (gpt-4-turbo, gemini-nano etc) - */ - model: string; - /** - * Instructions for the agent - */ - instructions: string | Array; - /** - * Default settings for all sessions created by this agent - */ - default_settings?: Chat_DefaultChatSettings; -}; diff --git a/sdks/ts/src/api/models/Agents_CreateOrUpdateAgentRequest.ts b/sdks/ts/src/api/models/Agents_CreateOrUpdateAgentRequest.ts deleted file mode 100644 index 19892b153..000000000 --- a/sdks/ts/src/api/models/Agents_CreateOrUpdateAgentRequest.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Agents_CreateAgentRequest } from "./Agents_CreateAgentRequest"; -import type { Chat_DefaultChatSettings } from "./Chat_DefaultChatSettings"; -import type { Common_identifierSafeUnicode } from "./Common_identifierSafeUnicode"; -import type { Common_uuid } from "./Common_uuid"; -export type Agents_CreateOrUpdateAgentRequest = Agents_CreateAgentRequest & { - id: Common_uuid; - metadata?: Record; - /** - * Name of the agent - */ - name: Common_identifierSafeUnicode; - /** - * About the agent - */ - about: string; - /** - * Model name to use (gpt-4-turbo, gemini-nano etc) - */ - model: string; - /** - * Instructions for the agent - */ - instructions: string | Array; - /** - * Default settings for all sessions created by this agent - */ - default_settings?: Chat_DefaultChatSettings; -}; diff --git a/sdks/ts/src/api/models/Agents_CreateOrUpdateAgentRequest_id.ts b/sdks/ts/src/api/models/Agents_CreateOrUpdateAgentRequest_id.ts deleted file mode 100644 index a0b127a69..000000000 --- a/sdks/ts/src/api/models/Agents_CreateOrUpdateAgentRequest_id.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_uuid } from "./Common_uuid"; -export type Agents_CreateOrUpdateAgentRequest_id = Common_uuid; diff --git a/sdks/ts/src/api/models/Agents_PatchAgentRequest.ts b/sdks/ts/src/api/models/Agents_PatchAgentRequest.ts deleted file mode 100644 index e4334103d..000000000 --- a/sdks/ts/src/api/models/Agents_PatchAgentRequest.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Chat_DefaultChatSettings } from "./Chat_DefaultChatSettings"; -import type { Common_identifierSafeUnicode } from "./Common_identifierSafeUnicode"; -/** - * Payload for patching a agent - */ -export type Agents_PatchAgentRequest = { - metadata?: Record; - /** - * Name of the agent - */ - name?: Common_identifierSafeUnicode; - /** - * About the agent - */ - about?: string; - /** - * Model name to use (gpt-4-turbo, gemini-nano etc) - */ - model?: string; - /** - * Instructions for the agent - */ - instructions?: string | Array; - /** - * Default settings for all sessions created by this agent - */ - default_settings?: Chat_DefaultChatSettings; -}; diff --git a/sdks/ts/src/api/models/Agents_UpdateAgentRequest.ts b/sdks/ts/src/api/models/Agents_UpdateAgentRequest.ts deleted file mode 100644 index ead87abfe..000000000 --- a/sdks/ts/src/api/models/Agents_UpdateAgentRequest.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Chat_DefaultChatSettings } from "./Chat_DefaultChatSettings"; -import type { Common_identifierSafeUnicode } from "./Common_identifierSafeUnicode"; -/** - * Payload for updating a agent - */ -export type Agents_UpdateAgentRequest = { - metadata?: Record; - /** - * Name of the agent - */ - name: Common_identifierSafeUnicode; - /** - * About the agent - */ - about: string; - /** - * Model name to use (gpt-4-turbo, gemini-nano etc) - */ - model: string; - /** - * Instructions for the agent - */ - instructions: string | Array; - /** - * Default settings for all sessions created by this agent - */ - default_settings?: Chat_DefaultChatSettings; -}; diff --git a/sdks/ts/src/api/models/Chat_BaseChatOutput.ts b/sdks/ts/src/api/models/Chat_BaseChatOutput.ts deleted file mode 100644 index 91c56285f..000000000 --- a/sdks/ts/src/api/models/Chat_BaseChatOutput.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Chat_FinishReason } from "./Chat_FinishReason"; -import type { Chat_LogProbResponse } from "./Chat_LogProbResponse"; -export type Chat_BaseChatOutput = { - index: number; - /** - * The reason the model stopped generating tokens - */ - finish_reason: Chat_FinishReason; - /** - * The log probabilities of tokens - */ - logprobs?: Chat_LogProbResponse; -}; diff --git a/sdks/ts/src/api/models/Chat_BaseChatResponse.ts b/sdks/ts/src/api/models/Chat_BaseChatResponse.ts deleted file mode 100644 index 078b8873f..000000000 --- a/sdks/ts/src/api/models/Chat_BaseChatResponse.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Chat_CompetionUsage } from "./Chat_CompetionUsage"; -import type { Common_uuid } from "./Common_uuid"; -import type { Docs_DocReference } from "./Docs_DocReference"; -export type Chat_BaseChatResponse = { - /** - * Usage statistics for the completion request - */ - usage?: Chat_CompetionUsage; - /** - * Background job IDs that may have been spawned from this interaction. - */ - jobs: Array; - /** - * Documents referenced for this request (for citation purposes). - */ - docs: Array; - /** - * When this resource was created as UTC date-time - */ - readonly created_at: string; - readonly id: Common_uuid; -}; diff --git a/sdks/ts/src/api/models/Chat_BaseTokenLogProb.ts b/sdks/ts/src/api/models/Chat_BaseTokenLogProb.ts deleted file mode 100644 index dd9711b4d..000000000 --- a/sdks/ts/src/api/models/Chat_BaseTokenLogProb.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type Chat_BaseTokenLogProb = { - token: string; - /** - * The log probability of the token - */ - logprob: number; - bytes?: Array; -}; diff --git a/sdks/ts/src/api/models/Chat_ChatInput.ts b/sdks/ts/src/api/models/Chat_ChatInput.ts deleted file mode 100644 index e03fa2914..000000000 --- a/sdks/ts/src/api/models/Chat_ChatInput.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Chat_ChatInputData } from "./Chat_ChatInputData"; -import type { Chat_CompletionResponseFormat } from "./Chat_CompletionResponseFormat"; -import type { Common_identifierSafeUnicode } from "./Common_identifierSafeUnicode"; -import type { Common_logit_bias } from "./Common_logit_bias"; -import type { Common_uuid } from "./Common_uuid"; -export type Chat_ChatInput = Chat_ChatInputData & { - /** - * DISABLED: Whether this interaction should form new memories or not (will be enabled in a future release) - */ - readonly remember: boolean; - /** - * Whether previous memories and docs should be recalled or not - */ - recall: boolean; - /** - * Whether this interaction should be stored in the session history or not - */ - save: boolean; - /** - * Identifier of the model to be used - */ - model?: Common_identifierSafeUnicode; - /** - * Indicates if the server should stream the response as it's generated - */ - stream: boolean; - /** - * Up to 4 sequences where the API will stop generating further tokens. - */ - stop?: Array; - /** - * If specified, the system will make a best effort to sample deterministically for that particular seed value - */ - seed?: number; - /** - * The maximum number of tokens to generate in the chat completion - */ - max_tokens?: number; - /** - * Modify the likelihood of specified tokens appearing in the completion - */ - logit_bias?: Record; - /** - * Response format (set to `json_object` to restrict output to JSON) - */ - response_format?: Chat_CompletionResponseFormat; - /** - * Agent ID of the agent to use for this interaction. (Only applicable for multi-agent sessions) - */ - agent?: Common_uuid; - /** - * Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. - */ - repetition_penalty?: number; - /** - * Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize number of tokens generated. - */ - length_penalty?: number; - /** - * Minimum probability compared to leading token to be considered - */ - min_p?: number; - /** - * Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. - */ - frequency_penalty?: number; - /** - * Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. - */ - presence_penalty?: number; - /** - * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. - */ - temperature?: number; - /** - * Defaults to 1 An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both. - */ - top_p?: number; -}; diff --git a/sdks/ts/src/api/models/Chat_ChatInputData.ts b/sdks/ts/src/api/models/Chat_ChatInputData.ts deleted file mode 100644 index 0cbf4e0c2..000000000 --- a/sdks/ts/src/api/models/Chat_ChatInputData.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Entries_ChatMLRole } from "./Entries_ChatMLRole"; -import type { Tools_NamedToolChoice } from "./Tools_NamedToolChoice"; -import type { Tools_Tool } from "./Tools_Tool"; -export type Chat_ChatInputData = { - /** - * A list of new input messages comprising the conversation so far. - */ - messages: Array<{ - /** - * The role of the message - */ - role: Entries_ChatMLRole; - /** - * The content parts of the message - */ - content: string | Array; - /** - * Name - */ - name?: string; - /** - * Whether to continue this message or return a new one - */ - continue?: boolean; - }>; - /** - * (Advanced) List of tools that are provided in addition to agent's default set of tools. - */ - tools?: Array; - /** - * Can be one of existing tools given to the agent earlier or the ones provided in this request. - */ - tool_choice?: "auto" | "none" | Tools_NamedToolChoice; -}; diff --git a/sdks/ts/src/api/models/Chat_ChatOutputChunk.ts b/sdks/ts/src/api/models/Chat_ChatOutputChunk.ts deleted file mode 100644 index af379458a..000000000 --- a/sdks/ts/src/api/models/Chat_ChatOutputChunk.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Chat_BaseChatOutput } from "./Chat_BaseChatOutput"; -import type { Entries_ChatMLRole } from "./Entries_ChatMLRole"; -/** - * Streaming chat completion output - */ -export type Chat_ChatOutputChunk = Chat_BaseChatOutput & { - /** - * The message generated by the model - */ - delta: { - /** - * The role of the message - */ - role: Entries_ChatMLRole; - /** - * The content parts of the message - */ - content: string | Array; - /** - * Name - */ - name?: string; - /** - * Whether to continue this message or return a new one - */ - continue?: boolean; - }; -}; diff --git a/sdks/ts/src/api/models/Chat_ChatSettings.ts b/sdks/ts/src/api/models/Chat_ChatSettings.ts deleted file mode 100644 index 0dd2f61cc..000000000 --- a/sdks/ts/src/api/models/Chat_ChatSettings.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Chat_CompletionResponseFormat } from "./Chat_CompletionResponseFormat"; -import type { Chat_DefaultChatSettings } from "./Chat_DefaultChatSettings"; -import type { Common_identifierSafeUnicode } from "./Common_identifierSafeUnicode"; -import type { Common_logit_bias } from "./Common_logit_bias"; -import type { Common_uuid } from "./Common_uuid"; -export type Chat_ChatSettings = Chat_DefaultChatSettings & { - /** - * Identifier of the model to be used - */ - model?: Common_identifierSafeUnicode; - /** - * Indicates if the server should stream the response as it's generated - */ - stream: boolean; - /** - * Up to 4 sequences where the API will stop generating further tokens. - */ - stop?: Array; - /** - * If specified, the system will make a best effort to sample deterministically for that particular seed value - */ - seed?: number; - /** - * The maximum number of tokens to generate in the chat completion - */ - max_tokens?: number; - /** - * Modify the likelihood of specified tokens appearing in the completion - */ - logit_bias?: Record; - /** - * Response format (set to `json_object` to restrict output to JSON) - */ - response_format?: Chat_CompletionResponseFormat; - /** - * Agent ID of the agent to use for this interaction. (Only applicable for multi-agent sessions) - */ - agent?: Common_uuid; -}; diff --git a/sdks/ts/src/api/models/Chat_ChunkChatResponse.ts b/sdks/ts/src/api/models/Chat_ChunkChatResponse.ts deleted file mode 100644 index 86e614b6f..000000000 --- a/sdks/ts/src/api/models/Chat_ChunkChatResponse.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Chat_BaseChatResponse } from "./Chat_BaseChatResponse"; -import type { Chat_ChatOutputChunk } from "./Chat_ChatOutputChunk"; -export type Chat_ChunkChatResponse = Chat_BaseChatResponse & { - /** - * The deltas generated by the model - */ - choices: Array; -}; diff --git a/sdks/ts/src/api/models/Chat_CompetionUsage.ts b/sdks/ts/src/api/models/Chat_CompetionUsage.ts deleted file mode 100644 index 8422d5f36..000000000 --- a/sdks/ts/src/api/models/Chat_CompetionUsage.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -/** - * Usage statistics for the completion request - */ -export type Chat_CompetionUsage = { - /** - * Number of tokens in the generated completion - */ - readonly completion_tokens?: number; - /** - * Number of tokens in the prompt - */ - readonly prompt_tokens?: number; - /** - * Total number of tokens used in the request (prompt + completion) - */ - readonly total_tokens?: number; -}; diff --git a/sdks/ts/src/api/models/Chat_CompletionResponseFormat.ts b/sdks/ts/src/api/models/Chat_CompletionResponseFormat.ts deleted file mode 100644 index 94d94ac5a..000000000 --- a/sdks/ts/src/api/models/Chat_CompletionResponseFormat.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type Chat_CompletionResponseFormat = { - /** - * The format of the response - */ - type: "text" | "json_object"; -}; diff --git a/sdks/ts/src/api/models/Chat_DefaultChatSettings.ts b/sdks/ts/src/api/models/Chat_DefaultChatSettings.ts deleted file mode 100644 index 5bfeb6bc5..000000000 --- a/sdks/ts/src/api/models/Chat_DefaultChatSettings.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Chat_OpenAISettings } from "./Chat_OpenAISettings"; -/** - * Default settings for the chat session (also used by the agent) - */ -export type Chat_DefaultChatSettings = Chat_OpenAISettings & { - /** - * Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. - */ - repetition_penalty?: number; - /** - * Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize number of tokens generated. - */ - length_penalty?: number; - /** - * Minimum probability compared to leading token to be considered - */ - min_p?: number; -}; diff --git a/sdks/ts/src/api/models/Chat_FinishReason.ts b/sdks/ts/src/api/models/Chat_FinishReason.ts deleted file mode 100644 index 7b1c63b1c..000000000 --- a/sdks/ts/src/api/models/Chat_FinishReason.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -/** - * The reason the model stopped generating tokens. This will be `stop` - * if the model hit a natural stop point or a provided stop sequence, - * `length` if the maximum number of tokens specified in the request - * was reached, `content_filter` if content was omitted due to a flag - * from our content filters, `tool_calls` if the model called a tool. - */ -export type Chat_FinishReason = - | "stop" - | "length" - | "content_filter" - | "tool_calls"; diff --git a/sdks/ts/src/api/models/Chat_LogProbResponse.ts b/sdks/ts/src/api/models/Chat_LogProbResponse.ts deleted file mode 100644 index 4d86294e1..000000000 --- a/sdks/ts/src/api/models/Chat_LogProbResponse.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Chat_TokenLogProb } from "./Chat_TokenLogProb"; -export type Chat_LogProbResponse = { - /** - * The log probabilities of the tokens - */ - content: Array | null; -}; diff --git a/sdks/ts/src/api/models/Chat_MessageChatResponse.ts b/sdks/ts/src/api/models/Chat_MessageChatResponse.ts deleted file mode 100644 index 4ed0e111f..000000000 --- a/sdks/ts/src/api/models/Chat_MessageChatResponse.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Chat_BaseChatResponse } from "./Chat_BaseChatResponse"; -import type { Chat_MultipleChatOutput } from "./Chat_MultipleChatOutput"; -import type { Chat_SingleChatOutput } from "./Chat_SingleChatOutput"; -export type Chat_MessageChatResponse = Chat_BaseChatResponse & { - /** - * The deltas generated by the model - */ - choices: Array; -}; diff --git a/sdks/ts/src/api/models/Chat_MultipleChatOutput.ts b/sdks/ts/src/api/models/Chat_MultipleChatOutput.ts deleted file mode 100644 index 89c725dfa..000000000 --- a/sdks/ts/src/api/models/Chat_MultipleChatOutput.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Chat_BaseChatOutput } from "./Chat_BaseChatOutput"; -import type { Entries_ChatMLRole } from "./Entries_ChatMLRole"; -/** - * The output returned by the model. Note that, depending on the model provider, they might return more than one message. - */ -export type Chat_MultipleChatOutput = Chat_BaseChatOutput & { - messages: Array<{ - /** - * The role of the message - */ - role: Entries_ChatMLRole; - /** - * The content parts of the message - */ - content: string | Array; - /** - * Name - */ - name?: string; - /** - * Whether to continue this message or return a new one - */ - continue?: boolean; - }>; -}; diff --git a/sdks/ts/src/api/models/Chat_OpenAISettings.ts b/sdks/ts/src/api/models/Chat_OpenAISettings.ts deleted file mode 100644 index 2ab230a6f..000000000 --- a/sdks/ts/src/api/models/Chat_OpenAISettings.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type Chat_OpenAISettings = { - /** - * Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. - */ - frequency_penalty?: number; - /** - * Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. - */ - presence_penalty?: number; - /** - * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. - */ - temperature?: number; - /** - * Defaults to 1 An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both. - */ - top_p?: number; -}; diff --git a/sdks/ts/src/api/models/Chat_SingleChatOutput.ts b/sdks/ts/src/api/models/Chat_SingleChatOutput.ts deleted file mode 100644 index b90b8c953..000000000 --- a/sdks/ts/src/api/models/Chat_SingleChatOutput.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Chat_BaseChatOutput } from "./Chat_BaseChatOutput"; -import type { Entries_ChatMLRole } from "./Entries_ChatMLRole"; -/** - * The output returned by the model. Note that, depending on the model provider, they might return more than one message. - */ -export type Chat_SingleChatOutput = Chat_BaseChatOutput & { - message: { - /** - * The role of the message - */ - role: Entries_ChatMLRole; - /** - * The content parts of the message - */ - content: string | Array; - /** - * Name - */ - name?: string; - /** - * Whether to continue this message or return a new one - */ - continue?: boolean; - }; -}; diff --git a/sdks/ts/src/api/models/Chat_TokenLogProb.ts b/sdks/ts/src/api/models/Chat_TokenLogProb.ts deleted file mode 100644 index cec5f6cf7..000000000 --- a/sdks/ts/src/api/models/Chat_TokenLogProb.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Chat_BaseTokenLogProb } from "./Chat_BaseTokenLogProb"; -export type Chat_TokenLogProb = Chat_BaseTokenLogProb & { - top_logprobs: Array; -}; diff --git a/sdks/ts/src/api/models/Common_JinjaTemplate.ts b/sdks/ts/src/api/models/Common_JinjaTemplate.ts deleted file mode 100644 index 7eb9f4a48..000000000 --- a/sdks/ts/src/api/models/Common_JinjaTemplate.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -/** - * A valid jinja template. - */ -export type Common_JinjaTemplate = string; diff --git a/sdks/ts/src/api/models/Common_PaginationOptions_direction.ts b/sdks/ts/src/api/models/Common_PaginationOptions_direction.ts deleted file mode 100644 index f0001cf62..000000000 --- a/sdks/ts/src/api/models/Common_PaginationOptions_direction.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -/** - * Sort direction - */ -export type Common_PaginationOptions_direction = "asc" | "desc"; diff --git a/sdks/ts/src/api/models/Common_PaginationOptions_limit.ts b/sdks/ts/src/api/models/Common_PaginationOptions_limit.ts deleted file mode 100644 index 27f111e65..000000000 --- a/sdks/ts/src/api/models/Common_PaginationOptions_limit.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_limit } from "./Common_limit"; -/** - * Limit the number of items returned - */ -export type Common_PaginationOptions_limit = Common_limit; diff --git a/sdks/ts/src/api/models/Common_PaginationOptions_metadata_filter.ts b/sdks/ts/src/api/models/Common_PaginationOptions_metadata_filter.ts deleted file mode 100644 index 2834eae15..000000000 --- a/sdks/ts/src/api/models/Common_PaginationOptions_metadata_filter.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -/** - * JSON string of object that should be used to filter objects by metadata - */ -export type Common_PaginationOptions_metadata_filter = string; diff --git a/sdks/ts/src/api/models/Common_PaginationOptions_offset.ts b/sdks/ts/src/api/models/Common_PaginationOptions_offset.ts deleted file mode 100644 index 4a28898b3..000000000 --- a/sdks/ts/src/api/models/Common_PaginationOptions_offset.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_offset } from "./Common_offset"; -/** - * Offset the items returned - */ -export type Common_PaginationOptions_offset = Common_offset; diff --git a/sdks/ts/src/api/models/Common_PaginationOptions_sort_by.ts b/sdks/ts/src/api/models/Common_PaginationOptions_sort_by.ts deleted file mode 100644 index 806753d4f..000000000 --- a/sdks/ts/src/api/models/Common_PaginationOptions_sort_by.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -/** - * Sort by a field - */ -export type Common_PaginationOptions_sort_by = "created_at" | "updated_at"; diff --git a/sdks/ts/src/api/models/Common_PyExpression.ts b/sdks/ts/src/api/models/Common_PyExpression.ts deleted file mode 100644 index e578d1fdd..000000000 --- a/sdks/ts/src/api/models/Common_PyExpression.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -/** - * A simple python expression compatible with SimpleEval. - */ -export type Common_PyExpression = string; diff --git a/sdks/ts/src/api/models/Common_ResourceCreatedResponse.ts b/sdks/ts/src/api/models/Common_ResourceCreatedResponse.ts deleted file mode 100644 index 1962bdcca..000000000 --- a/sdks/ts/src/api/models/Common_ResourceCreatedResponse.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_uuid } from "./Common_uuid"; -export type Common_ResourceCreatedResponse = { - /** - * ID of created resource - */ - id: Common_uuid; - /** - * When this resource was created as UTC date-time - */ - readonly created_at: string; - /** - * IDs (if any) of jobs created as part of this request - */ - jobs: Array; -}; diff --git a/sdks/ts/src/api/models/Common_ResourceDeletedResponse.ts b/sdks/ts/src/api/models/Common_ResourceDeletedResponse.ts deleted file mode 100644 index f96cfe5bf..000000000 --- a/sdks/ts/src/api/models/Common_ResourceDeletedResponse.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_uuid } from "./Common_uuid"; -export type Common_ResourceDeletedResponse = { - /** - * ID of deleted resource - */ - id: Common_uuid; - /** - * When this resource was deleted as UTC date-time - */ - readonly deleted_at: string; - /** - * IDs (if any) of jobs created as part of this request - */ - jobs: Array; -}; diff --git a/sdks/ts/src/api/models/Common_ResourceUpdatedResponse.ts b/sdks/ts/src/api/models/Common_ResourceUpdatedResponse.ts deleted file mode 100644 index 1bcdc8703..000000000 --- a/sdks/ts/src/api/models/Common_ResourceUpdatedResponse.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_uuid } from "./Common_uuid"; -export type Common_ResourceUpdatedResponse = { - /** - * ID of updated resource - */ - id: Common_uuid; - /** - * When this resource was updated as UTC date-time - */ - readonly updated_at: string; - /** - * IDs (if any) of jobs created as part of this request - */ - jobs: Array; -}; diff --git a/sdks/ts/src/api/models/Common_identifierSafeUnicode.ts b/sdks/ts/src/api/models/Common_identifierSafeUnicode.ts deleted file mode 100644 index 42b41faad..000000000 --- a/sdks/ts/src/api/models/Common_identifierSafeUnicode.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -/** - * For Unicode character safety - * See: https://unicode.org/reports/tr31/ - * See: https://www.unicode.org/reports/tr39/#Identifier_Characters - */ -export type Common_identifierSafeUnicode = string; diff --git a/sdks/ts/src/api/models/Common_limit.ts b/sdks/ts/src/api/models/Common_limit.ts deleted file mode 100644 index d29076ef3..000000000 --- a/sdks/ts/src/api/models/Common_limit.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -/** - * Limit the number of results - */ -export type Common_limit = number; diff --git a/sdks/ts/src/api/models/Common_logit_bias.ts b/sdks/ts/src/api/models/Common_logit_bias.ts deleted file mode 100644 index 3df5e7b43..000000000 --- a/sdks/ts/src/api/models/Common_logit_bias.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type Common_logit_bias = number; diff --git a/sdks/ts/src/api/models/Common_offset.ts b/sdks/ts/src/api/models/Common_offset.ts deleted file mode 100644 index 742987b41..000000000 --- a/sdks/ts/src/api/models/Common_offset.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -/** - * Offset to apply to the results - */ -export type Common_offset = number; diff --git a/sdks/ts/src/api/models/Common_toolRef.ts b/sdks/ts/src/api/models/Common_toolRef.ts deleted file mode 100644 index 76f396892..000000000 --- a/sdks/ts/src/api/models/Common_toolRef.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -/** - * Naming convention for tool references. Tools are resolved in order: `step-settings` -> `task` -> `agent` - */ -export type Common_toolRef = string; diff --git a/sdks/ts/src/api/models/Common_uuid.ts b/sdks/ts/src/api/models/Common_uuid.ts deleted file mode 100644 index b8bf0d880..000000000 --- a/sdks/ts/src/api/models/Common_uuid.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type Common_uuid = string; diff --git a/sdks/ts/src/api/models/Common_validPythonIdentifier.ts b/sdks/ts/src/api/models/Common_validPythonIdentifier.ts deleted file mode 100644 index 0ddcc9440..000000000 --- a/sdks/ts/src/api/models/Common_validPythonIdentifier.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -/** - * Valid python identifier names - */ -export type Common_validPythonIdentifier = string; diff --git a/sdks/ts/src/api/models/Docs_BaseDocSearchRequest.ts b/sdks/ts/src/api/models/Docs_BaseDocSearchRequest.ts deleted file mode 100644 index b6dd20f99..000000000 --- a/sdks/ts/src/api/models/Docs_BaseDocSearchRequest.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type Docs_BaseDocSearchRequest = { - limit: number; - /** - * The language to be used for text-only search. Support for other languages coming soon. - */ - lang: "en-US"; -}; diff --git a/sdks/ts/src/api/models/Docs_CreateDocRequest.ts b/sdks/ts/src/api/models/Docs_CreateDocRequest.ts deleted file mode 100644 index a972e0f83..000000000 --- a/sdks/ts/src/api/models/Docs_CreateDocRequest.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -/** - * Payload for creating a doc - */ -export type Docs_CreateDocRequest = { - metadata?: Record; - /** - * Title describing what this document contains - */ - title: string; - /** - * Contents of the document - */ - content: string | Array; -}; diff --git a/sdks/ts/src/api/models/Docs_Doc.ts b/sdks/ts/src/api/models/Docs_Doc.ts deleted file mode 100644 index 9735170c6..000000000 --- a/sdks/ts/src/api/models/Docs_Doc.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_uuid } from "./Common_uuid"; -export type Docs_Doc = { - readonly id: Common_uuid; - metadata?: Record; - /** - * When this resource was created as UTC date-time - */ - readonly created_at: string; - /** - * Title describing what this document contains - */ - title: string; - /** - * Contents of the document - */ - content: string | Array; -}; diff --git a/sdks/ts/src/api/models/Docs_DocOwner.ts b/sdks/ts/src/api/models/Docs_DocOwner.ts deleted file mode 100644 index 5f22e918e..000000000 --- a/sdks/ts/src/api/models/Docs_DocOwner.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_uuid } from "./Common_uuid"; -export type Docs_DocOwner = { - id: Common_uuid; - role: "user" | "agent"; -}; diff --git a/sdks/ts/src/api/models/Docs_DocReference.ts b/sdks/ts/src/api/models/Docs_DocReference.ts deleted file mode 100644 index 20fba1b7e..000000000 --- a/sdks/ts/src/api/models/Docs_DocReference.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_uuid } from "./Common_uuid"; -import type { Docs_DocOwner } from "./Docs_DocOwner"; -import type { Docs_Snippet } from "./Docs_Snippet"; -export type Docs_DocReference = { - /** - * The owner of this document. - */ - owner: Docs_DocOwner; - /** - * ID of the document - */ - readonly id: Common_uuid; - title?: string; - snippets: Array; - distance: number | null; -}; diff --git a/sdks/ts/src/api/models/Docs_DocSearchResponse.ts b/sdks/ts/src/api/models/Docs_DocSearchResponse.ts deleted file mode 100644 index cfb8ad225..000000000 --- a/sdks/ts/src/api/models/Docs_DocSearchResponse.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Docs_DocReference } from "./Docs_DocReference"; -export type Docs_DocSearchResponse = { - /** - * The documents that were found - */ - docs: Array; - /** - * The time taken to search in seconds - */ - time: number; -}; diff --git a/sdks/ts/src/api/models/Docs_EmbedQueryRequest.ts b/sdks/ts/src/api/models/Docs_EmbedQueryRequest.ts deleted file mode 100644 index 37b3cfe85..000000000 --- a/sdks/ts/src/api/models/Docs_EmbedQueryRequest.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type Docs_EmbedQueryRequest = { - /** - * Text or texts to embed - */ - text: string | Array; -}; diff --git a/sdks/ts/src/api/models/Docs_EmbedQueryResponse.ts b/sdks/ts/src/api/models/Docs_EmbedQueryResponse.ts deleted file mode 100644 index 042d22084..000000000 --- a/sdks/ts/src/api/models/Docs_EmbedQueryResponse.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type Docs_EmbedQueryResponse = { - /** - * The embedded vectors - */ - vectors: Array>; -}; diff --git a/sdks/ts/src/api/models/Docs_HybridDocSearchRequest.ts b/sdks/ts/src/api/models/Docs_HybridDocSearchRequest.ts deleted file mode 100644 index a1ba32811..000000000 --- a/sdks/ts/src/api/models/Docs_HybridDocSearchRequest.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Docs_BaseDocSearchRequest } from "./Docs_BaseDocSearchRequest"; -export type Docs_HybridDocSearchRequest = Docs_BaseDocSearchRequest & { - /** - * The confidence cutoff level - */ - confidence: number; - /** - * The weight to apply to BM25 vs Vector search results. 0 => pure BM25; 1 => pure vector; - */ - alpha: number; - /** - * Text to use in the search. In `hybrid` search mode, either `text` or both `text` and `vector` fields are required. - */ - text: string; - /** - * Vector to use in the search. Must be the same dimensions as the embedding model or else an error will be thrown. - */ - vector: Array; -}; diff --git a/sdks/ts/src/api/models/Docs_Snippet.ts b/sdks/ts/src/api/models/Docs_Snippet.ts deleted file mode 100644 index f39583199..000000000 --- a/sdks/ts/src/api/models/Docs_Snippet.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type Docs_Snippet = { - index: number; - content: string; -}; diff --git a/sdks/ts/src/api/models/Docs_TextOnlyDocSearchRequest.ts b/sdks/ts/src/api/models/Docs_TextOnlyDocSearchRequest.ts deleted file mode 100644 index 2d05e9f9b..000000000 --- a/sdks/ts/src/api/models/Docs_TextOnlyDocSearchRequest.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Docs_BaseDocSearchRequest } from "./Docs_BaseDocSearchRequest"; -export type Docs_TextOnlyDocSearchRequest = Docs_BaseDocSearchRequest & { - /** - * Text to use in the search. - */ - text: string; -}; diff --git a/sdks/ts/src/api/models/Docs_VectorDocSearchRequest.ts b/sdks/ts/src/api/models/Docs_VectorDocSearchRequest.ts deleted file mode 100644 index 7a720c46a..000000000 --- a/sdks/ts/src/api/models/Docs_VectorDocSearchRequest.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Docs_BaseDocSearchRequest } from "./Docs_BaseDocSearchRequest"; -export type Docs_VectorDocSearchRequest = Docs_BaseDocSearchRequest & { - /** - * The confidence cutoff level - */ - confidence: number; - /** - * Vector to use in the search. Must be the same dimensions as the embedding model or else an error will be thrown. - */ - vector: Array; -}; diff --git a/sdks/ts/src/api/models/Entries_BaseEntry.ts b/sdks/ts/src/api/models/Entries_BaseEntry.ts deleted file mode 100644 index d397d851e..000000000 --- a/sdks/ts/src/api/models/Entries_BaseEntry.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Entries_ChatMLRole } from "./Entries_ChatMLRole"; -import type { Tools_ChosenToolCall } from "./Tools_ChosenToolCall"; -import type { Tools_Tool } from "./Tools_Tool"; -import type { Tools_ToolResponse } from "./Tools_ToolResponse"; -export type Entries_BaseEntry = { - role: Entries_ChatMLRole; - name: string | null; - content: Tools_Tool | Tools_ChosenToolCall | string | Tools_ToolResponse; - source: - | "api_request" - | "api_response" - | "tool_response" - | "internal" - | "summarizer" - | "meta"; - tokenizer: string; - token_count: number; - /** - * This is the time that this event refers to. - */ - timestamp: number; -}; diff --git a/sdks/ts/src/api/models/Entries_ChatMLRole.ts b/sdks/ts/src/api/models/Entries_ChatMLRole.ts deleted file mode 100644 index d0ad7e4da..000000000 --- a/sdks/ts/src/api/models/Entries_ChatMLRole.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -/** - * ChatML role (system|assistant|user|function_call|function|function_response|auto) - */ -export type Entries_ChatMLRole = - | "user" - | "assistant" - | "system" - | "function" - | "function_response" - | "function_call" - | "auto"; diff --git a/sdks/ts/src/api/models/Entries_Entry.ts b/sdks/ts/src/api/models/Entries_Entry.ts deleted file mode 100644 index ce518e93a..000000000 --- a/sdks/ts/src/api/models/Entries_Entry.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_uuid } from "./Common_uuid"; -import type { Entries_BaseEntry } from "./Entries_BaseEntry"; -export type Entries_Entry = Entries_BaseEntry & { - /** - * When this resource was created as UTC date-time - */ - readonly created_at: string; - readonly id: Common_uuid; -}; diff --git a/sdks/ts/src/api/models/Entries_History.ts b/sdks/ts/src/api/models/Entries_History.ts deleted file mode 100644 index 784972435..000000000 --- a/sdks/ts/src/api/models/Entries_History.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_uuid } from "./Common_uuid"; -import type { Entries_Entry } from "./Entries_Entry"; -import type { Entries_Relation } from "./Entries_Relation"; -export type Entries_History = { - entries: Array; - relations: Array; - readonly session_id: Common_uuid; - /** - * When this resource was created as UTC date-time - */ - readonly created_at: string; -}; diff --git a/sdks/ts/src/api/models/Entries_ImageDetail.ts b/sdks/ts/src/api/models/Entries_ImageDetail.ts deleted file mode 100644 index 5d4d49347..000000000 --- a/sdks/ts/src/api/models/Entries_ImageDetail.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -/** - * Image detail level - */ -export type Entries_ImageDetail = "low" | "high" | "auto"; diff --git a/sdks/ts/src/api/models/Entries_Relation.ts b/sdks/ts/src/api/models/Entries_Relation.ts deleted file mode 100644 index 2f7b7383c..000000000 --- a/sdks/ts/src/api/models/Entries_Relation.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_uuid } from "./Common_uuid"; -export type Entries_Relation = { - head: Common_uuid; - relation: string; - tail: Common_uuid; -}; diff --git a/sdks/ts/src/api/models/Executions_CreateExecutionRequest.ts b/sdks/ts/src/api/models/Executions_CreateExecutionRequest.ts deleted file mode 100644 index 5a0b33f61..000000000 --- a/sdks/ts/src/api/models/Executions_CreateExecutionRequest.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -/** - * Payload for creating an execution - */ -export type Executions_CreateExecutionRequest = { - /** - * The input to the execution - */ - input: Record; - metadata?: Record; -}; diff --git a/sdks/ts/src/api/models/Executions_Execution.ts b/sdks/ts/src/api/models/Executions_Execution.ts deleted file mode 100644 index 1e3891c5d..000000000 --- a/sdks/ts/src/api/models/Executions_Execution.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_uuid } from "./Common_uuid"; -export type Executions_Execution = { - /** - * The ID of the task that the execution is running - */ - readonly task_id: Common_uuid; - /** - * The status of the execution - */ - readonly status: - | "queued" - | "starting" - | "running" - | "awaiting_input" - | "succeeded" - | "failed" - | "cancelled"; - /** - * The input to the execution - */ - input: Record; - /** - * When this resource was created as UTC date-time - */ - readonly created_at: string; - /** - * When this resource was updated as UTC date-time - */ - readonly updated_at: string; - metadata?: Record; - readonly id: Common_uuid; -}; diff --git a/sdks/ts/src/api/models/Executions_ResumeExecutionRequest.ts b/sdks/ts/src/api/models/Executions_ResumeExecutionRequest.ts deleted file mode 100644 index edc634cf1..000000000 --- a/sdks/ts/src/api/models/Executions_ResumeExecutionRequest.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Executions_UpdateExecutionRequest } from "./Executions_UpdateExecutionRequest"; -export type Executions_ResumeExecutionRequest = - Executions_UpdateExecutionRequest & { - status: "running"; - /** - * The input to resume the execution with - */ - input?: Record; - }; diff --git a/sdks/ts/src/api/models/Executions_StopExecutionRequest.ts b/sdks/ts/src/api/models/Executions_StopExecutionRequest.ts deleted file mode 100644 index 597bb9040..000000000 --- a/sdks/ts/src/api/models/Executions_StopExecutionRequest.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Executions_UpdateExecutionRequest } from "./Executions_UpdateExecutionRequest"; -export type Executions_StopExecutionRequest = - Executions_UpdateExecutionRequest & { - status: "cancelled"; - /** - * The reason for stopping the execution - */ - reason: string | null; - }; diff --git a/sdks/ts/src/api/models/Executions_TaskTokenResumeExecutionRequest.ts b/sdks/ts/src/api/models/Executions_TaskTokenResumeExecutionRequest.ts deleted file mode 100644 index d81fdfa9c..000000000 --- a/sdks/ts/src/api/models/Executions_TaskTokenResumeExecutionRequest.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type Executions_TaskTokenResumeExecutionRequest = { - status: "running"; - /** - * The input to resume the execution with - */ - input?: Record; -}; diff --git a/sdks/ts/src/api/models/Executions_Transition.ts b/sdks/ts/src/api/models/Executions_Transition.ts deleted file mode 100644 index 7d1194a03..000000000 --- a/sdks/ts/src/api/models/Executions_Transition.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_uuid } from "./Common_uuid"; -import type { Executions_TransitionTarget } from "./Executions_TransitionTarget"; -export type Executions_Transition = { - readonly type: "finish" | "wait" | "resume" | "error" | "step" | "cancelled"; - readonly execution_id: Common_uuid; - readonly output: any; - readonly current: Executions_TransitionTarget; - readonly next: Executions_TransitionTarget | null; - readonly id: Common_uuid; - metadata?: Record; - /** - * When this resource was created as UTC date-time - */ - readonly created_at: string; - /** - * When this resource was updated as UTC date-time - */ - readonly updated_at: string; -}; diff --git a/sdks/ts/src/api/models/Executions_TransitionTarget.ts b/sdks/ts/src/api/models/Executions_TransitionTarget.ts deleted file mode 100644 index fa511c40d..000000000 --- a/sdks/ts/src/api/models/Executions_TransitionTarget.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_identifierSafeUnicode } from "./Common_identifierSafeUnicode"; -export type Executions_TransitionTarget = { - workflow: Common_identifierSafeUnicode; - step: number; -}; diff --git a/sdks/ts/src/api/models/Executions_UpdateExecutionRequest.ts b/sdks/ts/src/api/models/Executions_UpdateExecutionRequest.ts deleted file mode 100644 index d14138173..000000000 --- a/sdks/ts/src/api/models/Executions_UpdateExecutionRequest.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type Executions_UpdateExecutionRequest = { - status: - | "queued" - | "starting" - | "running" - | "awaiting_input" - | "succeeded" - | "failed" - | "cancelled"; -}; diff --git a/sdks/ts/src/api/models/Jobs_JobState.ts b/sdks/ts/src/api/models/Jobs_JobState.ts deleted file mode 100644 index 886df5653..000000000 --- a/sdks/ts/src/api/models/Jobs_JobState.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -/** - * Current state (one of: pending, in_progress, retrying, succeeded, aborted, failed) - */ -export type Jobs_JobState = - | "pending" - | "in_progress" - | "retrying" - | "succeeded" - | "aborted" - | "failed" - | "unknown"; diff --git a/sdks/ts/src/api/models/Jobs_JobStatus.ts b/sdks/ts/src/api/models/Jobs_JobStatus.ts deleted file mode 100644 index 9ec75c8c7..000000000 --- a/sdks/ts/src/api/models/Jobs_JobStatus.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_identifierSafeUnicode } from "./Common_identifierSafeUnicode"; -import type { Common_uuid } from "./Common_uuid"; -import type { Jobs_JobState } from "./Jobs_JobState"; -export type Jobs_JobStatus = { - readonly id: Common_uuid; - /** - * When this resource was created as UTC date-time - */ - readonly created_at: string; - /** - * When this resource was updated as UTC date-time - */ - readonly updated_at: string; - /** - * Name of the job - */ - name: Common_identifierSafeUnicode; - /** - * Reason for the current state of the job - */ - reason: string; - /** - * Whether this Job supports progress updates - */ - has_progress: boolean; - /** - * Progress percentage - */ - progress: number; - /** - * Current state of the job - */ - state: Jobs_JobState; -}; diff --git a/sdks/ts/src/api/models/Sessions_ContextOverflowType.ts b/sdks/ts/src/api/models/Sessions_ContextOverflowType.ts deleted file mode 100644 index 87de87a34..000000000 --- a/sdks/ts/src/api/models/Sessions_ContextOverflowType.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type Sessions_ContextOverflowType = "truncate" | "adaptive"; diff --git a/sdks/ts/src/api/models/Sessions_CreateOrUpdateSessionRequest.ts b/sdks/ts/src/api/models/Sessions_CreateOrUpdateSessionRequest.ts deleted file mode 100644 index 44ebd67e4..000000000 --- a/sdks/ts/src/api/models/Sessions_CreateOrUpdateSessionRequest.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_uuid } from "./Common_uuid"; -import type { Sessions_ContextOverflowType } from "./Sessions_ContextOverflowType"; -import type { Sessions_CreateSessionRequest } from "./Sessions_CreateSessionRequest"; -export type Sessions_CreateOrUpdateSessionRequest = - Sessions_CreateSessionRequest & { - id: Common_uuid; - /** - * User ID of user associated with this session - */ - user?: Common_uuid; - users?: Array; - /** - * Agent ID of agent associated with this session - */ - agent?: Common_uuid; - agents?: Array; - /** - * A specific situation that sets the background for this session - */ - situation: string; - /** - * Render system and assistant message content as jinja templates - */ - render_templates: boolean; - /** - * Threshold value for the adaptive context functionality - */ - token_budget: number | null; - /** - * Action to start on context window overflow - */ - context_overflow: Sessions_ContextOverflowType | null; - metadata?: Record; - }; diff --git a/sdks/ts/src/api/models/Sessions_CreateOrUpdateSessionRequest_id.ts b/sdks/ts/src/api/models/Sessions_CreateOrUpdateSessionRequest_id.ts deleted file mode 100644 index e668e6ee3..000000000 --- a/sdks/ts/src/api/models/Sessions_CreateOrUpdateSessionRequest_id.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_uuid } from "./Common_uuid"; -export type Sessions_CreateOrUpdateSessionRequest_id = Common_uuid; diff --git a/sdks/ts/src/api/models/Sessions_CreateSessionRequest.ts b/sdks/ts/src/api/models/Sessions_CreateSessionRequest.ts deleted file mode 100644 index b2b09c9d3..000000000 --- a/sdks/ts/src/api/models/Sessions_CreateSessionRequest.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_uuid } from "./Common_uuid"; -import type { Sessions_ContextOverflowType } from "./Sessions_ContextOverflowType"; -/** - * Payload for creating a session - */ -export type Sessions_CreateSessionRequest = { - /** - * User ID of user associated with this session - */ - user?: Common_uuid; - users?: Array; - /** - * Agent ID of agent associated with this session - */ - agent?: Common_uuid; - agents?: Array; - /** - * A specific situation that sets the background for this session - */ - situation: string; - /** - * Render system and assistant message content as jinja templates - */ - render_templates: boolean; - /** - * Threshold value for the adaptive context functionality - */ - token_budget: number | null; - /** - * Action to start on context window overflow - */ - context_overflow: Sessions_ContextOverflowType | null; - metadata?: Record; -}; diff --git a/sdks/ts/src/api/models/Sessions_MultiAgentMultiUserSession.ts b/sdks/ts/src/api/models/Sessions_MultiAgentMultiUserSession.ts deleted file mode 100644 index 8437427fc..000000000 --- a/sdks/ts/src/api/models/Sessions_MultiAgentMultiUserSession.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_uuid } from "./Common_uuid"; -import type { Sessions_Session } from "./Sessions_Session"; -export type Sessions_MultiAgentMultiUserSession = Sessions_Session & { - agents: Array; - users: Array; -}; diff --git a/sdks/ts/src/api/models/Sessions_MultiAgentNoUserSession.ts b/sdks/ts/src/api/models/Sessions_MultiAgentNoUserSession.ts deleted file mode 100644 index a684f2dc2..000000000 --- a/sdks/ts/src/api/models/Sessions_MultiAgentNoUserSession.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_uuid } from "./Common_uuid"; -import type { Sessions_Session } from "./Sessions_Session"; -export type Sessions_MultiAgentNoUserSession = Sessions_Session & { - agents: Array; -}; diff --git a/sdks/ts/src/api/models/Sessions_MultiAgentSingleUserSession.ts b/sdks/ts/src/api/models/Sessions_MultiAgentSingleUserSession.ts deleted file mode 100644 index 7a39383c8..000000000 --- a/sdks/ts/src/api/models/Sessions_MultiAgentSingleUserSession.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_uuid } from "./Common_uuid"; -import type { Sessions_Session } from "./Sessions_Session"; -export type Sessions_MultiAgentSingleUserSession = Sessions_Session & { - agents: Array; - user: Common_uuid; -}; diff --git a/sdks/ts/src/api/models/Sessions_PatchSessionRequest.ts b/sdks/ts/src/api/models/Sessions_PatchSessionRequest.ts deleted file mode 100644 index 589c01379..000000000 --- a/sdks/ts/src/api/models/Sessions_PatchSessionRequest.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Sessions_ContextOverflowType } from "./Sessions_ContextOverflowType"; -/** - * Payload for patching a session - */ -export type Sessions_PatchSessionRequest = { - /** - * A specific situation that sets the background for this session - */ - situation?: string; - /** - * Render system and assistant message content as jinja templates - */ - render_templates?: boolean; - /** - * Threshold value for the adaptive context functionality - */ - token_budget?: number | null; - /** - * Action to start on context window overflow - */ - context_overflow?: Sessions_ContextOverflowType | null; - metadata?: Record; -}; diff --git a/sdks/ts/src/api/models/Sessions_Session.ts b/sdks/ts/src/api/models/Sessions_Session.ts deleted file mode 100644 index d8e89604b..000000000 --- a/sdks/ts/src/api/models/Sessions_Session.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_uuid } from "./Common_uuid"; -import type { Sessions_ContextOverflowType } from "./Sessions_ContextOverflowType"; -export type Sessions_Session = { - /** - * A specific situation that sets the background for this session - */ - situation: string; - /** - * Summary (null at the beginning) - generated automatically after every interaction - */ - readonly summary: string | null; - /** - * Render system and assistant message content as jinja templates - */ - render_templates: boolean; - /** - * Threshold value for the adaptive context functionality - */ - token_budget: number | null; - /** - * Action to start on context window overflow - */ - context_overflow: Sessions_ContextOverflowType | null; - readonly id: Common_uuid; - metadata?: Record; - /** - * When this resource was created as UTC date-time - */ - readonly created_at: string; - /** - * When this resource was updated as UTC date-time - */ - readonly updated_at: string; - /** - * Discriminator property for Session. - */ - kind?: string; -}; diff --git a/sdks/ts/src/api/models/Sessions_SingleAgentMultiUserSession.ts b/sdks/ts/src/api/models/Sessions_SingleAgentMultiUserSession.ts deleted file mode 100644 index 2fb9ce705..000000000 --- a/sdks/ts/src/api/models/Sessions_SingleAgentMultiUserSession.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_uuid } from "./Common_uuid"; -import type { Sessions_Session } from "./Sessions_Session"; -export type Sessions_SingleAgentMultiUserSession = Sessions_Session & { - agent: Common_uuid; - users: Array; -}; diff --git a/sdks/ts/src/api/models/Sessions_SingleAgentNoUserSession.ts b/sdks/ts/src/api/models/Sessions_SingleAgentNoUserSession.ts deleted file mode 100644 index 5454c6265..000000000 --- a/sdks/ts/src/api/models/Sessions_SingleAgentNoUserSession.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_uuid } from "./Common_uuid"; -import type { Sessions_Session } from "./Sessions_Session"; -export type Sessions_SingleAgentNoUserSession = Sessions_Session & { - agent: Common_uuid; -}; diff --git a/sdks/ts/src/api/models/Sessions_SingleAgentSingleUserSession.ts b/sdks/ts/src/api/models/Sessions_SingleAgentSingleUserSession.ts deleted file mode 100644 index b4636829b..000000000 --- a/sdks/ts/src/api/models/Sessions_SingleAgentSingleUserSession.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_uuid } from "./Common_uuid"; -import type { Sessions_Session } from "./Sessions_Session"; -export type Sessions_SingleAgentSingleUserSession = Sessions_Session & { - agent: Common_uuid; - user: Common_uuid; -}; diff --git a/sdks/ts/src/api/models/Sessions_UpdateSessionRequest.ts b/sdks/ts/src/api/models/Sessions_UpdateSessionRequest.ts deleted file mode 100644 index cd28f9783..000000000 --- a/sdks/ts/src/api/models/Sessions_UpdateSessionRequest.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Sessions_ContextOverflowType } from "./Sessions_ContextOverflowType"; -/** - * Payload for updating a session - */ -export type Sessions_UpdateSessionRequest = { - /** - * A specific situation that sets the background for this session - */ - situation: string; - /** - * Render system and assistant message content as jinja templates - */ - render_templates: boolean; - /** - * Threshold value for the adaptive context functionality - */ - token_budget: number | null; - /** - * Action to start on context window overflow - */ - context_overflow: Sessions_ContextOverflowType | null; - metadata?: Record; -}; diff --git a/sdks/ts/src/api/models/Tasks_CaseThen.ts b/sdks/ts/src/api/models/Tasks_CaseThen.ts deleted file mode 100644 index a2e96c0d9..000000000 --- a/sdks/ts/src/api/models/Tasks_CaseThen.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_PyExpression } from "./Common_PyExpression"; -import type { Tasks_EmbedStep } from "./Tasks_EmbedStep"; -import type { Tasks_ErrorWorkflowStep } from "./Tasks_ErrorWorkflowStep"; -import type { Tasks_EvaluateStep } from "./Tasks_EvaluateStep"; -import type { Tasks_GetStep } from "./Tasks_GetStep"; -import type { Tasks_LogStep } from "./Tasks_LogStep"; -import type { Tasks_PromptStep } from "./Tasks_PromptStep"; -import type { Tasks_ReturnStep } from "./Tasks_ReturnStep"; -import type { Tasks_SearchStep } from "./Tasks_SearchStep"; -import type { Tasks_SetStep } from "./Tasks_SetStep"; -import type { Tasks_SleepStep } from "./Tasks_SleepStep"; -import type { Tasks_ToolCallStep } from "./Tasks_ToolCallStep"; -import type { Tasks_WaitForInputStep } from "./Tasks_WaitForInputStep"; -import type { Tasks_YieldStep } from "./Tasks_YieldStep"; -export type Tasks_CaseThen = { - /** - * The condition to evaluate - */ - case: Common_PyExpression | "_"; - /** - * The steps to run if the condition is true - */ - then: - | Tasks_EvaluateStep - | Tasks_ToolCallStep - | Tasks_PromptStep - | Tasks_GetStep - | Tasks_SetStep - | Tasks_LogStep - | Tasks_EmbedStep - | Tasks_SearchStep - | Tasks_ReturnStep - | Tasks_SleepStep - | Tasks_ErrorWorkflowStep - | Tasks_YieldStep - | Tasks_WaitForInputStep; -}; diff --git a/sdks/ts/src/api/models/Tasks_CreateOrUpdateTaskRequest_id.ts b/sdks/ts/src/api/models/Tasks_CreateOrUpdateTaskRequest_id.ts deleted file mode 100644 index aa19b3598..000000000 --- a/sdks/ts/src/api/models/Tasks_CreateOrUpdateTaskRequest_id.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_uuid } from "./Common_uuid"; -export type Tasks_CreateOrUpdateTaskRequest_id = Common_uuid; diff --git a/sdks/ts/src/api/models/Tasks_CreateTaskRequest.ts b/sdks/ts/src/api/models/Tasks_CreateTaskRequest.ts deleted file mode 100644 index 9590b4304..000000000 --- a/sdks/ts/src/api/models/Tasks_CreateTaskRequest.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_PyExpression } from "./Common_PyExpression"; -import type { Tasks_EmbedStep } from "./Tasks_EmbedStep"; -import type { Tasks_ErrorWorkflowStep } from "./Tasks_ErrorWorkflowStep"; -import type { Tasks_EvaluateStep } from "./Tasks_EvaluateStep"; -import type { Tasks_ForeachStep } from "./Tasks_ForeachStep"; -import type { Tasks_GetStep } from "./Tasks_GetStep"; -import type { Tasks_IfElseWorkflowStep } from "./Tasks_IfElseWorkflowStep"; -import type { Tasks_LogStep } from "./Tasks_LogStep"; -import type { Tasks_ParallelStep } from "./Tasks_ParallelStep"; -import type { Tasks_PromptStep } from "./Tasks_PromptStep"; -import type { Tasks_ReturnStep } from "./Tasks_ReturnStep"; -import type { Tasks_SearchStep } from "./Tasks_SearchStep"; -import type { Tasks_SetStep } from "./Tasks_SetStep"; -import type { Tasks_SleepStep } from "./Tasks_SleepStep"; -import type { Tasks_SwitchStep } from "./Tasks_SwitchStep"; -import type { Tasks_ToolCallStep } from "./Tasks_ToolCallStep"; -import type { Tasks_WaitForInputStep } from "./Tasks_WaitForInputStep"; -import type { Tasks_YieldStep } from "./Tasks_YieldStep"; -/** - * Payload for creating a task - */ -export type Tasks_CreateTaskRequest = Record< - string, - Array< - | Tasks_EvaluateStep - | Tasks_ToolCallStep - | Tasks_PromptStep - | Tasks_GetStep - | Tasks_SetStep - | Tasks_LogStep - | Tasks_EmbedStep - | Tasks_SearchStep - | Tasks_ReturnStep - | Tasks_SleepStep - | Tasks_ErrorWorkflowStep - | Tasks_YieldStep - | Tasks_WaitForInputStep - | Tasks_IfElseWorkflowStep - | Tasks_SwitchStep - | Tasks_ForeachStep - | Tasks_ParallelStep - | ({ - /** - * The kind of step - */ - readonly kind_: "map_reduce"; - } & { - readonly kind_: "map_reduce"; - /** - * The variable to iterate over - */ - over: Common_PyExpression; - /** - * The steps to run for each iteration - */ - map: - | Tasks_EvaluateStep - | Tasks_ToolCallStep - | Tasks_PromptStep - | Tasks_GetStep - | Tasks_SetStep - | Tasks_LogStep - | Tasks_EmbedStep - | Tasks_SearchStep; - /** - * The expression to reduce the results. - * If not provided, the results are collected and returned as a list. - * A special parameter named `results` is the accumulator and `_` is the current value. - */ - reduce?: Common_PyExpression; - initial?: any; - }) - > ->; diff --git a/sdks/ts/src/api/models/Tasks_EmbedStep.ts b/sdks/ts/src/api/models/Tasks_EmbedStep.ts deleted file mode 100644 index e9d321ed3..000000000 --- a/sdks/ts/src/api/models/Tasks_EmbedStep.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Docs_EmbedQueryRequest } from "./Docs_EmbedQueryRequest"; -export type Tasks_EmbedStep = { - /** - * The kind of step - */ - readonly kind_: "embed"; -} & { - readonly kind_: "embed"; - /** - * The text to embed - */ - embed: Docs_EmbedQueryRequest; -}; diff --git a/sdks/ts/src/api/models/Tasks_ErrorWorkflowStep.ts b/sdks/ts/src/api/models/Tasks_ErrorWorkflowStep.ts deleted file mode 100644 index 1e9e74aaf..000000000 --- a/sdks/ts/src/api/models/Tasks_ErrorWorkflowStep.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type Tasks_ErrorWorkflowStep = { - /** - * The kind of step - */ - readonly kind_: "error"; -} & { - readonly kind_: "error"; - /** - * The error message - */ - error: string; -}; diff --git a/sdks/ts/src/api/models/Tasks_EvaluateStep.ts b/sdks/ts/src/api/models/Tasks_EvaluateStep.ts deleted file mode 100644 index 8d5962382..000000000 --- a/sdks/ts/src/api/models/Tasks_EvaluateStep.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_PyExpression } from "./Common_PyExpression"; -export type Tasks_EvaluateStep = { - /** - * The kind of step - */ - readonly kind_: "evaluate"; -} & { - readonly kind_: "evaluate"; - /** - * The expression to evaluate - */ - evaluate: Record; -}; diff --git a/sdks/ts/src/api/models/Tasks_ForeachDo.ts b/sdks/ts/src/api/models/Tasks_ForeachDo.ts deleted file mode 100644 index db2861b06..000000000 --- a/sdks/ts/src/api/models/Tasks_ForeachDo.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_PyExpression } from "./Common_PyExpression"; -import type { Tasks_EmbedStep } from "./Tasks_EmbedStep"; -import type { Tasks_EvaluateStep } from "./Tasks_EvaluateStep"; -import type { Tasks_GetStep } from "./Tasks_GetStep"; -import type { Tasks_LogStep } from "./Tasks_LogStep"; -import type { Tasks_PromptStep } from "./Tasks_PromptStep"; -import type { Tasks_SearchStep } from "./Tasks_SearchStep"; -import type { Tasks_SetStep } from "./Tasks_SetStep"; -import type { Tasks_ToolCallStep } from "./Tasks_ToolCallStep"; -export type Tasks_ForeachDo = { - /** - * The variable to iterate over. - * VALIDATION: Should NOT return more than 1000 elements. - */ - in: Common_PyExpression; - /** - * The steps to run for each iteration - */ - do: - | Tasks_EvaluateStep - | Tasks_ToolCallStep - | Tasks_PromptStep - | Tasks_GetStep - | Tasks_SetStep - | Tasks_LogStep - | Tasks_EmbedStep - | Tasks_SearchStep; -}; diff --git a/sdks/ts/src/api/models/Tasks_ForeachStep.ts b/sdks/ts/src/api/models/Tasks_ForeachStep.ts deleted file mode 100644 index ad3f53550..000000000 --- a/sdks/ts/src/api/models/Tasks_ForeachStep.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Tasks_ForeachDo } from "./Tasks_ForeachDo"; -export type Tasks_ForeachStep = { - /** - * The kind of step - */ - readonly kind_: "foreach"; -} & { - readonly kind_: "foreach"; - /** - * The steps to run for each iteration - */ - foreach: Tasks_ForeachDo; -}; diff --git a/sdks/ts/src/api/models/Tasks_GetStep.ts b/sdks/ts/src/api/models/Tasks_GetStep.ts deleted file mode 100644 index b07732a92..000000000 --- a/sdks/ts/src/api/models/Tasks_GetStep.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type Tasks_GetStep = { - /** - * The kind of step - */ - readonly kind_: "get"; -} & { - readonly kind_: "get"; - /** - * The key to get - */ - get: string; -}; diff --git a/sdks/ts/src/api/models/Tasks_IfElseWorkflowStep.ts b/sdks/ts/src/api/models/Tasks_IfElseWorkflowStep.ts deleted file mode 100644 index f05a33f80..000000000 --- a/sdks/ts/src/api/models/Tasks_IfElseWorkflowStep.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_PyExpression } from "./Common_PyExpression"; -import type { Tasks_EmbedStep } from "./Tasks_EmbedStep"; -import type { Tasks_ErrorWorkflowStep } from "./Tasks_ErrorWorkflowStep"; -import type { Tasks_EvaluateStep } from "./Tasks_EvaluateStep"; -import type { Tasks_GetStep } from "./Tasks_GetStep"; -import type { Tasks_LogStep } from "./Tasks_LogStep"; -import type { Tasks_PromptStep } from "./Tasks_PromptStep"; -import type { Tasks_ReturnStep } from "./Tasks_ReturnStep"; -import type { Tasks_SearchStep } from "./Tasks_SearchStep"; -import type { Tasks_SetStep } from "./Tasks_SetStep"; -import type { Tasks_SleepStep } from "./Tasks_SleepStep"; -import type { Tasks_ToolCallStep } from "./Tasks_ToolCallStep"; -import type { Tasks_WaitForInputStep } from "./Tasks_WaitForInputStep"; -import type { Tasks_YieldStep } from "./Tasks_YieldStep"; -export type Tasks_IfElseWorkflowStep = { - /** - * The kind of step - */ - readonly kind_: "if_else"; -} & { - readonly kind_: "if_else"; - /** - * The condition to evaluate - */ - if: Common_PyExpression; - /** - * The steps to run if the condition is true - */ - then: - | Tasks_EvaluateStep - | Tasks_ToolCallStep - | Tasks_PromptStep - | Tasks_GetStep - | Tasks_SetStep - | Tasks_LogStep - | Tasks_EmbedStep - | Tasks_SearchStep - | Tasks_ReturnStep - | Tasks_SleepStep - | Tasks_ErrorWorkflowStep - | Tasks_YieldStep - | Tasks_WaitForInputStep; - /** - * The steps to run if the condition is false - */ - else: - | Tasks_EvaluateStep - | Tasks_ToolCallStep - | Tasks_PromptStep - | Tasks_GetStep - | Tasks_SetStep - | Tasks_LogStep - | Tasks_EmbedStep - | Tasks_SearchStep - | Tasks_ReturnStep - | Tasks_SleepStep - | Tasks_ErrorWorkflowStep - | Tasks_YieldStep - | Tasks_WaitForInputStep; -}; diff --git a/sdks/ts/src/api/models/Tasks_LogStep.ts b/sdks/ts/src/api/models/Tasks_LogStep.ts deleted file mode 100644 index 372bfccd3..000000000 --- a/sdks/ts/src/api/models/Tasks_LogStep.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_PyExpression } from "./Common_PyExpression"; -export type Tasks_LogStep = { - /** - * The kind of step - */ - readonly kind_: "log"; -} & { - readonly kind_: "log"; - /** - * The value to log - */ - log: Common_PyExpression; -}; diff --git a/sdks/ts/src/api/models/Tasks_ParallelStep.ts b/sdks/ts/src/api/models/Tasks_ParallelStep.ts deleted file mode 100644 index 9118d48dd..000000000 --- a/sdks/ts/src/api/models/Tasks_ParallelStep.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Tasks_EmbedStep } from "./Tasks_EmbedStep"; -import type { Tasks_EvaluateStep } from "./Tasks_EvaluateStep"; -import type { Tasks_GetStep } from "./Tasks_GetStep"; -import type { Tasks_LogStep } from "./Tasks_LogStep"; -import type { Tasks_PromptStep } from "./Tasks_PromptStep"; -import type { Tasks_SearchStep } from "./Tasks_SearchStep"; -import type { Tasks_SetStep } from "./Tasks_SetStep"; -import type { Tasks_ToolCallStep } from "./Tasks_ToolCallStep"; -export type Tasks_ParallelStep = { - /** - * The kind of step - */ - readonly kind_: "parallel"; -} & { - readonly kind_: "parallel"; - /** - * The steps to run in parallel. Max concurrency will depend on the platform. - */ - parallel: Array< - | Tasks_EvaluateStep - | Tasks_ToolCallStep - | Tasks_PromptStep - | Tasks_GetStep - | Tasks_SetStep - | Tasks_LogStep - | Tasks_EmbedStep - | Tasks_SearchStep - >; -}; diff --git a/sdks/ts/src/api/models/Tasks_PatchTaskRequest.ts b/sdks/ts/src/api/models/Tasks_PatchTaskRequest.ts deleted file mode 100644 index e511be553..000000000 --- a/sdks/ts/src/api/models/Tasks_PatchTaskRequest.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_PyExpression } from "./Common_PyExpression"; -import type { Tasks_EmbedStep } from "./Tasks_EmbedStep"; -import type { Tasks_ErrorWorkflowStep } from "./Tasks_ErrorWorkflowStep"; -import type { Tasks_EvaluateStep } from "./Tasks_EvaluateStep"; -import type { Tasks_ForeachStep } from "./Tasks_ForeachStep"; -import type { Tasks_GetStep } from "./Tasks_GetStep"; -import type { Tasks_IfElseWorkflowStep } from "./Tasks_IfElseWorkflowStep"; -import type { Tasks_LogStep } from "./Tasks_LogStep"; -import type { Tasks_ParallelStep } from "./Tasks_ParallelStep"; -import type { Tasks_PromptStep } from "./Tasks_PromptStep"; -import type { Tasks_ReturnStep } from "./Tasks_ReturnStep"; -import type { Tasks_SearchStep } from "./Tasks_SearchStep"; -import type { Tasks_SetStep } from "./Tasks_SetStep"; -import type { Tasks_SleepStep } from "./Tasks_SleepStep"; -import type { Tasks_SwitchStep } from "./Tasks_SwitchStep"; -import type { Tasks_ToolCallStep } from "./Tasks_ToolCallStep"; -import type { Tasks_WaitForInputStep } from "./Tasks_WaitForInputStep"; -import type { Tasks_YieldStep } from "./Tasks_YieldStep"; -/** - * Payload for patching a task - */ -export type Tasks_PatchTaskRequest = Record< - string, - Array< - | Tasks_EvaluateStep - | Tasks_ToolCallStep - | Tasks_PromptStep - | Tasks_GetStep - | Tasks_SetStep - | Tasks_LogStep - | Tasks_EmbedStep - | Tasks_SearchStep - | Tasks_ReturnStep - | Tasks_SleepStep - | Tasks_ErrorWorkflowStep - | Tasks_YieldStep - | Tasks_WaitForInputStep - | Tasks_IfElseWorkflowStep - | Tasks_SwitchStep - | Tasks_ForeachStep - | Tasks_ParallelStep - | ({ - /** - * Discriminator property for BaseWorkflowStep. - */ - kind_?: string; - } & { - /** - * The variable to iterate over - */ - over: Common_PyExpression; - /** - * The steps to run for each iteration - */ - map: - | Tasks_EvaluateStep - | Tasks_ToolCallStep - | Tasks_PromptStep - | Tasks_GetStep - | Tasks_SetStep - | Tasks_LogStep - | Tasks_EmbedStep - | Tasks_SearchStep; - /** - * The expression to reduce the results. - * If not provided, the results are collected and returned as a list. - * A special parameter named `results` is the accumulator and `_` is the current value. - */ - reduce?: Common_PyExpression; - initial?: any; - }) - > ->; diff --git a/sdks/ts/src/api/models/Tasks_PromptStep.ts b/sdks/ts/src/api/models/Tasks_PromptStep.ts deleted file mode 100644 index a4e200f02..000000000 --- a/sdks/ts/src/api/models/Tasks_PromptStep.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Chat_ChatSettings } from "./Chat_ChatSettings"; -import type { Common_JinjaTemplate } from "./Common_JinjaTemplate"; -export type Tasks_PromptStep = { - /** - * The kind of step - */ - readonly kind_: "prompt"; -} & { - readonly kind_: "prompt"; - /** - * The prompt to run - */ - prompt: Common_JinjaTemplate; - /** - * Settings for the prompt - */ - settings?: Chat_ChatSettings; -}; diff --git a/sdks/ts/src/api/models/Tasks_ReturnStep.ts b/sdks/ts/src/api/models/Tasks_ReturnStep.ts deleted file mode 100644 index 7eda54161..000000000 --- a/sdks/ts/src/api/models/Tasks_ReturnStep.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_PyExpression } from "./Common_PyExpression"; -export type Tasks_ReturnStep = { - /** - * The kind of step - */ - readonly kind_: "return"; -} & { - readonly kind_: "return"; - /** - * The value to return - */ - return: Record; -}; diff --git a/sdks/ts/src/api/models/Tasks_SearchStep.ts b/sdks/ts/src/api/models/Tasks_SearchStep.ts deleted file mode 100644 index 3a2663fa9..000000000 --- a/sdks/ts/src/api/models/Tasks_SearchStep.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Docs_HybridDocSearchRequest } from "./Docs_HybridDocSearchRequest"; -import type { Docs_TextOnlyDocSearchRequest } from "./Docs_TextOnlyDocSearchRequest"; -import type { Docs_VectorDocSearchRequest } from "./Docs_VectorDocSearchRequest"; -export type Tasks_SearchStep = { - /** - * The kind of step - */ - readonly kind_: "search"; -} & { - readonly kind_: "search"; - /** - * The search query - */ - search: - | Docs_VectorDocSearchRequest - | Docs_TextOnlyDocSearchRequest - | Docs_HybridDocSearchRequest; -}; diff --git a/sdks/ts/src/api/models/Tasks_SetKey.ts b/sdks/ts/src/api/models/Tasks_SetKey.ts deleted file mode 100644 index a7cef005d..000000000 --- a/sdks/ts/src/api/models/Tasks_SetKey.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_PyExpression } from "./Common_PyExpression"; -export type Tasks_SetKey = { - /** - * The key to set - */ - key: string; - /** - * The value to set - */ - value: Common_PyExpression; -}; diff --git a/sdks/ts/src/api/models/Tasks_SetStep.ts b/sdks/ts/src/api/models/Tasks_SetStep.ts deleted file mode 100644 index 2bccabeac..000000000 --- a/sdks/ts/src/api/models/Tasks_SetStep.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Tasks_SetKey } from "./Tasks_SetKey"; -export type Tasks_SetStep = { - /** - * The kind of step - */ - readonly kind_: "set"; -} & { - readonly kind_: "set"; - /** - * The value to set - */ - set: Tasks_SetKey; -}; diff --git a/sdks/ts/src/api/models/Tasks_SleepFor.ts b/sdks/ts/src/api/models/Tasks_SleepFor.ts deleted file mode 100644 index 85b1ef55f..000000000 --- a/sdks/ts/src/api/models/Tasks_SleepFor.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type Tasks_SleepFor = { - /** - * The number of seconds to sleep for - */ - seconds: number; - /** - * The number of minutes to sleep for - */ - minutes: number; - /** - * The number of hours to sleep for - */ - hours: number; - /** - * The number of days to sleep for - */ - days: number; -}; diff --git a/sdks/ts/src/api/models/Tasks_SleepStep.ts b/sdks/ts/src/api/models/Tasks_SleepStep.ts deleted file mode 100644 index e3b8c576b..000000000 --- a/sdks/ts/src/api/models/Tasks_SleepStep.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Tasks_SleepFor } from "./Tasks_SleepFor"; -export type Tasks_SleepStep = { - /** - * The kind of step - */ - readonly kind_: "sleep"; -} & { - readonly kind_: "sleep"; - /** - * The duration to sleep for (max 31 days) - */ - sleep: Tasks_SleepFor; -}; diff --git a/sdks/ts/src/api/models/Tasks_SwitchStep.ts b/sdks/ts/src/api/models/Tasks_SwitchStep.ts deleted file mode 100644 index a560cee13..000000000 --- a/sdks/ts/src/api/models/Tasks_SwitchStep.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Tasks_CaseThen } from "./Tasks_CaseThen"; -export type Tasks_SwitchStep = { - /** - * The kind of step - */ - readonly kind_: "switch"; -} & { - readonly kind_: "switch"; - /** - * The cond tree - */ - switch: Array; -}; diff --git a/sdks/ts/src/api/models/Tasks_Task.ts b/sdks/ts/src/api/models/Tasks_Task.ts deleted file mode 100644 index e155187ae..000000000 --- a/sdks/ts/src/api/models/Tasks_Task.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_PyExpression } from "./Common_PyExpression"; -import type { Tasks_EmbedStep } from "./Tasks_EmbedStep"; -import type { Tasks_ErrorWorkflowStep } from "./Tasks_ErrorWorkflowStep"; -import type { Tasks_EvaluateStep } from "./Tasks_EvaluateStep"; -import type { Tasks_ForeachStep } from "./Tasks_ForeachStep"; -import type { Tasks_GetStep } from "./Tasks_GetStep"; -import type { Tasks_IfElseWorkflowStep } from "./Tasks_IfElseWorkflowStep"; -import type { Tasks_LogStep } from "./Tasks_LogStep"; -import type { Tasks_ParallelStep } from "./Tasks_ParallelStep"; -import type { Tasks_PromptStep } from "./Tasks_PromptStep"; -import type { Tasks_ReturnStep } from "./Tasks_ReturnStep"; -import type { Tasks_SearchStep } from "./Tasks_SearchStep"; -import type { Tasks_SetStep } from "./Tasks_SetStep"; -import type { Tasks_SleepStep } from "./Tasks_SleepStep"; -import type { Tasks_SwitchStep } from "./Tasks_SwitchStep"; -import type { Tasks_ToolCallStep } from "./Tasks_ToolCallStep"; -import type { Tasks_WaitForInputStep } from "./Tasks_WaitForInputStep"; -import type { Tasks_YieldStep } from "./Tasks_YieldStep"; -/** - * Object describing a Task - */ -export type Tasks_Task = Record< - string, - Array< - | Tasks_EvaluateStep - | Tasks_ToolCallStep - | Tasks_PromptStep - | Tasks_GetStep - | Tasks_SetStep - | Tasks_LogStep - | Tasks_EmbedStep - | Tasks_SearchStep - | Tasks_ReturnStep - | Tasks_SleepStep - | Tasks_ErrorWorkflowStep - | Tasks_YieldStep - | Tasks_WaitForInputStep - | Tasks_IfElseWorkflowStep - | Tasks_SwitchStep - | Tasks_ForeachStep - | Tasks_ParallelStep - | ({ - /** - * The kind of step - */ - readonly kind_: "map_reduce"; - } & { - readonly kind_: "map_reduce"; - /** - * The variable to iterate over - */ - over: Common_PyExpression; - /** - * The steps to run for each iteration - */ - map: - | Tasks_EvaluateStep - | Tasks_ToolCallStep - | Tasks_PromptStep - | Tasks_GetStep - | Tasks_SetStep - | Tasks_LogStep - | Tasks_EmbedStep - | Tasks_SearchStep; - /** - * The expression to reduce the results. - * If not provided, the results are collected and returned as a list. - * A special parameter named `results` is the accumulator and `_` is the current value. - */ - reduce?: Common_PyExpression; - initial?: any; - }) - > ->; diff --git a/sdks/ts/src/api/models/Tasks_TaskTool.ts b/sdks/ts/src/api/models/Tasks_TaskTool.ts deleted file mode 100644 index 8f53afa9e..000000000 --- a/sdks/ts/src/api/models/Tasks_TaskTool.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Tools_CreateToolRequest } from "./Tools_CreateToolRequest"; -export type Tasks_TaskTool = Tools_CreateToolRequest & { - /** - * Read-only: Whether the tool was inherited or not. Only applies within tasks. - */ - readonly inherited?: boolean; -}; diff --git a/sdks/ts/src/api/models/Tasks_ToolCallStep.ts b/sdks/ts/src/api/models/Tasks_ToolCallStep.ts deleted file mode 100644 index 9a3eadb51..000000000 --- a/sdks/ts/src/api/models/Tasks_ToolCallStep.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_PyExpression } from "./Common_PyExpression"; -import type { Common_toolRef } from "./Common_toolRef"; -export type Tasks_ToolCallStep = { - /** - * The kind of step - */ - readonly kind_: "tool_call"; -} & { - readonly kind_: "tool_call"; - /** - * The tool to run - */ - tool: Common_toolRef; - /** - * The input parameters for the tool (defaults to last step output) - */ - arguments: Record | "_"; -}; diff --git a/sdks/ts/src/api/models/Tasks_UpdateTaskRequest.ts b/sdks/ts/src/api/models/Tasks_UpdateTaskRequest.ts deleted file mode 100644 index 8f3afc2c0..000000000 --- a/sdks/ts/src/api/models/Tasks_UpdateTaskRequest.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_PyExpression } from "./Common_PyExpression"; -import type { Tasks_EmbedStep } from "./Tasks_EmbedStep"; -import type { Tasks_ErrorWorkflowStep } from "./Tasks_ErrorWorkflowStep"; -import type { Tasks_EvaluateStep } from "./Tasks_EvaluateStep"; -import type { Tasks_ForeachStep } from "./Tasks_ForeachStep"; -import type { Tasks_GetStep } from "./Tasks_GetStep"; -import type { Tasks_IfElseWorkflowStep } from "./Tasks_IfElseWorkflowStep"; -import type { Tasks_LogStep } from "./Tasks_LogStep"; -import type { Tasks_ParallelStep } from "./Tasks_ParallelStep"; -import type { Tasks_PromptStep } from "./Tasks_PromptStep"; -import type { Tasks_ReturnStep } from "./Tasks_ReturnStep"; -import type { Tasks_SearchStep } from "./Tasks_SearchStep"; -import type { Tasks_SetStep } from "./Tasks_SetStep"; -import type { Tasks_SleepStep } from "./Tasks_SleepStep"; -import type { Tasks_SwitchStep } from "./Tasks_SwitchStep"; -import type { Tasks_ToolCallStep } from "./Tasks_ToolCallStep"; -import type { Tasks_WaitForInputStep } from "./Tasks_WaitForInputStep"; -import type { Tasks_YieldStep } from "./Tasks_YieldStep"; -/** - * Payload for updating a task - */ -export type Tasks_UpdateTaskRequest = Record< - string, - Array< - | Tasks_EvaluateStep - | Tasks_ToolCallStep - | Tasks_PromptStep - | Tasks_GetStep - | Tasks_SetStep - | Tasks_LogStep - | Tasks_EmbedStep - | Tasks_SearchStep - | Tasks_ReturnStep - | Tasks_SleepStep - | Tasks_ErrorWorkflowStep - | Tasks_YieldStep - | Tasks_WaitForInputStep - | Tasks_IfElseWorkflowStep - | Tasks_SwitchStep - | Tasks_ForeachStep - | Tasks_ParallelStep - | ({ - /** - * The kind of step - */ - readonly kind_: "map_reduce"; - } & { - readonly kind_: "map_reduce"; - /** - * The variable to iterate over - */ - over: Common_PyExpression; - /** - * The steps to run for each iteration - */ - map: - | Tasks_EvaluateStep - | Tasks_ToolCallStep - | Tasks_PromptStep - | Tasks_GetStep - | Tasks_SetStep - | Tasks_LogStep - | Tasks_EmbedStep - | Tasks_SearchStep; - /** - * The expression to reduce the results. - * If not provided, the results are collected and returned as a list. - * A special parameter named `results` is the accumulator and `_` is the current value. - */ - reduce?: Common_PyExpression; - initial?: any; - }) - > ->; diff --git a/sdks/ts/src/api/models/Tasks_WaitForInputInfo.ts b/sdks/ts/src/api/models/Tasks_WaitForInputInfo.ts deleted file mode 100644 index adef0d462..000000000 --- a/sdks/ts/src/api/models/Tasks_WaitForInputInfo.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_PyExpression } from "./Common_PyExpression"; -export type Tasks_WaitForInputInfo = { - /** - * Any additional info or data - */ - info: Record; -}; diff --git a/sdks/ts/src/api/models/Tasks_WaitForInputStep.ts b/sdks/ts/src/api/models/Tasks_WaitForInputStep.ts deleted file mode 100644 index d7b537ea3..000000000 --- a/sdks/ts/src/api/models/Tasks_WaitForInputStep.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Tasks_WaitForInputInfo } from "./Tasks_WaitForInputInfo"; -export type Tasks_WaitForInputStep = { - /** - * The kind of step - */ - readonly kind_: "wait_for_input"; -} & { - readonly kind_: "wait_for_input"; - /** - * Any additional info or data - */ - wait_for_input: Tasks_WaitForInputInfo; -}; diff --git a/sdks/ts/src/api/models/Tasks_YieldStep.ts b/sdks/ts/src/api/models/Tasks_YieldStep.ts deleted file mode 100644 index 3792539a2..000000000 --- a/sdks/ts/src/api/models/Tasks_YieldStep.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_PyExpression } from "./Common_PyExpression"; -export type Tasks_YieldStep = { - /** - * The kind of step - */ - readonly kind_: "yield"; -} & { - readonly kind_: "yield"; - /** - * The subworkflow to run. - * VALIDATION: Should resolve to a defined subworkflow. - */ - workflow: string; - /** - * The input parameters for the subworkflow (defaults to last step output) - */ - arguments: Record | "_"; -}; diff --git a/sdks/ts/src/api/models/Tools_ChosenToolCall.ts b/sdks/ts/src/api/models/Tools_ChosenToolCall.ts deleted file mode 100644 index d44bad5c5..000000000 --- a/sdks/ts/src/api/models/Tools_ChosenToolCall.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_uuid } from "./Common_uuid"; -import type { Tools_FunctionCallOption } from "./Tools_FunctionCallOption"; -import type { Tools_ToolType } from "./Tools_ToolType"; -/** - * The response tool value generated by the model - */ -export type Tools_ChosenToolCall = { - /** - * Whether this tool is a `function`, `api_call`, `system` etc. (Only `function` tool supported right now) - */ - type: Tools_ToolType; - function?: Tools_FunctionCallOption; - integration?: any; - system?: any; - api_call?: any; - readonly id: Common_uuid; -}; diff --git a/sdks/ts/src/api/models/Tools_CreateToolRequest.ts b/sdks/ts/src/api/models/Tools_CreateToolRequest.ts deleted file mode 100644 index b6f898e2b..000000000 --- a/sdks/ts/src/api/models/Tools_CreateToolRequest.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_validPythonIdentifier } from "./Common_validPythonIdentifier"; -import type { Tools_FunctionDef } from "./Tools_FunctionDef"; -import type { Tools_ToolType } from "./Tools_ToolType"; -/** - * Payload for creating a tool - */ -export type Tools_CreateToolRequest = { - /** - * Whether this tool is a `function`, `api_call`, `system` etc. (Only `function` tool supported right now) - */ - type: Tools_ToolType; - /** - * Name of the tool (must be unique for this agent and a valid python identifier string ) - */ - name: Common_validPythonIdentifier; - background: boolean; - /** - * The function to call - */ - function: Tools_FunctionDef; - integration?: any; - system?: any; - api_call?: any; -}; diff --git a/sdks/ts/src/api/models/Tools_FunctionCallOption.ts b/sdks/ts/src/api/models/Tools_FunctionCallOption.ts deleted file mode 100644 index ece3304cb..000000000 --- a/sdks/ts/src/api/models/Tools_FunctionCallOption.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type Tools_FunctionCallOption = { - /** - * The name of the function - */ - name: string; -}; diff --git a/sdks/ts/src/api/models/Tools_FunctionDef.ts b/sdks/ts/src/api/models/Tools_FunctionDef.ts deleted file mode 100644 index 8e57315a3..000000000 --- a/sdks/ts/src/api/models/Tools_FunctionDef.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_identifierSafeUnicode } from "./Common_identifierSafeUnicode"; -/** - * Function definition - */ -export type Tools_FunctionDef = { - /** - * DO NOT USE: This will be overriden by the tool name. Here only for compatibility reasons. - */ - name?: any; - /** - * Description of the function - */ - description?: Common_identifierSafeUnicode; - /** - * The parameters the function accepts - */ - parameters?: Record; -}; diff --git a/sdks/ts/src/api/models/Tools_NamedToolChoice.ts b/sdks/ts/src/api/models/Tools_NamedToolChoice.ts deleted file mode 100644 index c489d5c21..000000000 --- a/sdks/ts/src/api/models/Tools_NamedToolChoice.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Tools_FunctionCallOption } from "./Tools_FunctionCallOption"; -import type { Tools_ToolType } from "./Tools_ToolType"; -export type Tools_NamedToolChoice = { - /** - * Whether this tool is a `function`, `api_call`, `system` etc. (Only `function` tool supported right now) - */ - type: Tools_ToolType; - function?: Tools_FunctionCallOption; - integration?: any; - system?: any; - api_call?: any; -}; diff --git a/sdks/ts/src/api/models/Tools_PatchToolRequest.ts b/sdks/ts/src/api/models/Tools_PatchToolRequest.ts deleted file mode 100644 index 2f7f1c740..000000000 --- a/sdks/ts/src/api/models/Tools_PatchToolRequest.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_validPythonIdentifier } from "./Common_validPythonIdentifier"; -import type { Tools_FunctionDef } from "./Tools_FunctionDef"; -import type { Tools_ToolType } from "./Tools_ToolType"; -/** - * Payload for patching a tool - */ -export type Tools_PatchToolRequest = { - /** - * Whether this tool is a `function`, `api_call`, `system` etc. (Only `function` tool supported right now) - */ - type?: Tools_ToolType; - /** - * Name of the tool (must be unique for this agent and a valid python identifier string ) - */ - name?: Common_validPythonIdentifier; - background?: boolean; - /** - * The function to call - */ - function?: Tools_FunctionDef; - integration?: any; - system?: any; - api_call?: any; -}; diff --git a/sdks/ts/src/api/models/Tools_Tool.ts b/sdks/ts/src/api/models/Tools_Tool.ts deleted file mode 100644 index 1f493710e..000000000 --- a/sdks/ts/src/api/models/Tools_Tool.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_uuid } from "./Common_uuid"; -import type { Common_validPythonIdentifier } from "./Common_validPythonIdentifier"; -import type { Tools_FunctionDef } from "./Tools_FunctionDef"; -import type { Tools_ToolType } from "./Tools_ToolType"; -export type Tools_Tool = { - /** - * Whether this tool is a `function`, `api_call`, `system` etc. (Only `function` tool supported right now) - */ - type: Tools_ToolType; - /** - * Name of the tool (must be unique for this agent and a valid python identifier string ) - */ - name: Common_validPythonIdentifier; - background: boolean; - /** - * The function to call - */ - function: Tools_FunctionDef; - integration?: any; - system?: any; - api_call?: any; - /** - * When this resource was created as UTC date-time - */ - readonly created_at: string; - /** - * When this resource was updated as UTC date-time - */ - readonly updated_at: string; - readonly id: Common_uuid; -}; diff --git a/sdks/ts/src/api/models/Tools_ToolResponse.ts b/sdks/ts/src/api/models/Tools_ToolResponse.ts deleted file mode 100644 index 0173f7b91..000000000 --- a/sdks/ts/src/api/models/Tools_ToolResponse.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_uuid } from "./Common_uuid"; -export type Tools_ToolResponse = { - id: Common_uuid; - /** - * The output of the tool - */ - output: Record; -}; diff --git a/sdks/ts/src/api/models/Tools_ToolType.ts b/sdks/ts/src/api/models/Tools_ToolType.ts deleted file mode 100644 index 734b2453f..000000000 --- a/sdks/ts/src/api/models/Tools_ToolType.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type Tools_ToolType = "function" | "integration" | "system" | "api_call"; diff --git a/sdks/ts/src/api/models/Tools_UpdateToolRequest.ts b/sdks/ts/src/api/models/Tools_UpdateToolRequest.ts deleted file mode 100644 index 00c7808e9..000000000 --- a/sdks/ts/src/api/models/Tools_UpdateToolRequest.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_validPythonIdentifier } from "./Common_validPythonIdentifier"; -import type { Tools_FunctionDef } from "./Tools_FunctionDef"; -import type { Tools_ToolType } from "./Tools_ToolType"; -/** - * Payload for updating a tool - */ -export type Tools_UpdateToolRequest = { - /** - * Whether this tool is a `function`, `api_call`, `system` etc. (Only `function` tool supported right now) - */ - type: Tools_ToolType; - /** - * Name of the tool (must be unique for this agent and a valid python identifier string ) - */ - name: Common_validPythonIdentifier; - background: boolean; - /** - * The function to call - */ - function: Tools_FunctionDef; - integration?: any; - system?: any; - api_call?: any; -}; diff --git a/sdks/ts/src/api/models/Users_CreateOrUpdateUserRequest.ts b/sdks/ts/src/api/models/Users_CreateOrUpdateUserRequest.ts deleted file mode 100644 index 8257ad304..000000000 --- a/sdks/ts/src/api/models/Users_CreateOrUpdateUserRequest.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_uuid } from "./Common_uuid"; -export type Users_CreateOrUpdateUserRequest = Common_uuid; diff --git a/sdks/ts/src/api/models/Users_CreateUserRequest.ts b/sdks/ts/src/api/models/Users_CreateUserRequest.ts deleted file mode 100644 index 8811f8252..000000000 --- a/sdks/ts/src/api/models/Users_CreateUserRequest.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_identifierSafeUnicode } from "./Common_identifierSafeUnicode"; -/** - * Payload for creating a user (and associated documents) - */ -export type Users_CreateUserRequest = { - metadata?: Record; - /** - * Name of the user - */ - name: Common_identifierSafeUnicode; - /** - * About the user - */ - about: string; -}; diff --git a/sdks/ts/src/api/models/Users_PatchUserRequest.ts b/sdks/ts/src/api/models/Users_PatchUserRequest.ts deleted file mode 100644 index 1fe03611b..000000000 --- a/sdks/ts/src/api/models/Users_PatchUserRequest.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_identifierSafeUnicode } from "./Common_identifierSafeUnicode"; -/** - * Payload for patching a user - */ -export type Users_PatchUserRequest = { - metadata?: Record; - /** - * Name of the user - */ - name?: Common_identifierSafeUnicode; - /** - * About the user - */ - about?: string; -}; diff --git a/sdks/ts/src/api/models/Users_UpdateUserRequest.ts b/sdks/ts/src/api/models/Users_UpdateUserRequest.ts deleted file mode 100644 index d9094acf4..000000000 --- a/sdks/ts/src/api/models/Users_UpdateUserRequest.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_identifierSafeUnicode } from "./Common_identifierSafeUnicode"; -/** - * Payload for updating a user - */ -export type Users_UpdateUserRequest = { - metadata?: Record; - /** - * Name of the user - */ - name: Common_identifierSafeUnicode; - /** - * About the user - */ - about: string; -}; diff --git a/sdks/ts/src/api/models/Users_User.ts b/sdks/ts/src/api/models/Users_User.ts deleted file mode 100644 index eb42b433e..000000000 --- a/sdks/ts/src/api/models/Users_User.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Common_identifierSafeUnicode } from "./Common_identifierSafeUnicode"; -import type { Common_uuid } from "./Common_uuid"; -export type Users_User = { - readonly id: Common_uuid; - metadata?: Record; - /** - * When this resource was created as UTC date-time - */ - readonly created_at: string; - /** - * When this resource was updated as UTC date-time - */ - readonly updated_at: string; - /** - * Name of the user - */ - name: Common_identifierSafeUnicode; - /** - * About the user - */ - about: string; -}; diff --git a/sdks/ts/src/api/schemas.gen.ts b/sdks/ts/src/api/schemas.gen.ts new file mode 100644 index 000000000..20859581f --- /dev/null +++ b/sdks/ts/src/api/schemas.gen.ts @@ -0,0 +1,6056 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export const Agents_AgentSchema = { + type: "object", + required: [ + "id", + "created_at", + "updated_at", + "name", + "about", + "model", + "instructions", + ], + properties: { + id: { + allOf: [ + { + $ref: "#/components/schemas/Common.uuid", + }, + ], + readOnly: true, + }, + metadata: { + type: "object", + additionalProperties: {}, + }, + created_at: { + type: "string", + format: "date-time", + description: "When this resource was created as UTC date-time", + readOnly: true, + }, + updated_at: { + type: "string", + format: "date-time", + description: "When this resource was updated as UTC date-time", + readOnly: true, + }, + name: { + allOf: [ + { + $ref: "#/components/schemas/Common.identifierSafeUnicode", + }, + ], + description: "Name of the agent", + default: "", + }, + about: { + type: "string", + description: "About the agent", + default: "", + }, + model: { + type: "string", + description: "Model name to use (gpt-4-turbo, gemini-nano etc)", + default: "", + }, + instructions: { + anyOf: [ + { + type: "string", + }, + { + type: "array", + items: { + type: "string", + }, + }, + ], + description: "Instructions for the agent", + default: "", + }, + default_settings: { + allOf: [ + { + $ref: "#/components/schemas/Chat.DefaultChatSettings", + }, + ], + description: "Default settings for all sessions created by this agent", + }, + }, +} as const; + +export const Agents_CreateAgentRequestSchema = { + type: "object", + required: ["name", "about", "model", "instructions"], + properties: { + metadata: { + type: "object", + additionalProperties: {}, + }, + name: { + allOf: [ + { + $ref: "#/components/schemas/Common.identifierSafeUnicode", + }, + ], + description: "Name of the agent", + default: "", + }, + about: { + type: "string", + description: "About the agent", + default: "", + }, + model: { + type: "string", + description: "Model name to use (gpt-4-turbo, gemini-nano etc)", + default: "", + }, + instructions: { + anyOf: [ + { + type: "string", + }, + { + type: "array", + items: { + type: "string", + }, + }, + ], + description: "Instructions for the agent", + default: "", + }, + default_settings: { + allOf: [ + { + $ref: "#/components/schemas/Chat.DefaultChatSettings", + }, + ], + description: "Default settings for all sessions created by this agent", + }, + }, + description: "Payload for creating a agent (and associated documents)", +} as const; + +export const Agents_CreateOrUpdateAgentRequestSchema = { + type: "object", + required: ["id", "name", "about", "model", "instructions"], + properties: { + id: { + $ref: "#/components/schemas/Common.uuid", + }, + metadata: { + type: "object", + additionalProperties: {}, + }, + name: { + allOf: [ + { + $ref: "#/components/schemas/Common.identifierSafeUnicode", + }, + ], + description: "Name of the agent", + default: "", + }, + about: { + type: "string", + description: "About the agent", + default: "", + }, + model: { + type: "string", + description: "Model name to use (gpt-4-turbo, gemini-nano etc)", + default: "", + }, + instructions: { + anyOf: [ + { + type: "string", + }, + { + type: "array", + items: { + type: "string", + }, + }, + ], + description: "Instructions for the agent", + default: "", + }, + default_settings: { + allOf: [ + { + $ref: "#/components/schemas/Chat.DefaultChatSettings", + }, + ], + description: "Default settings for all sessions created by this agent", + }, + }, + allOf: [ + { + $ref: "#/components/schemas/Agents.CreateAgentRequest", + }, + ], +} as const; + +export const Agents_PatchAgentRequestSchema = { + type: "object", + properties: { + metadata: { + type: "object", + additionalProperties: {}, + }, + name: { + allOf: [ + { + $ref: "#/components/schemas/Common.identifierSafeUnicode", + }, + ], + description: "Name of the agent", + default: "", + }, + about: { + type: "string", + description: "About the agent", + default: "", + }, + model: { + type: "string", + description: "Model name to use (gpt-4-turbo, gemini-nano etc)", + default: "", + }, + instructions: { + anyOf: [ + { + type: "string", + }, + { + type: "array", + items: { + type: "string", + }, + }, + ], + description: "Instructions for the agent", + default: "", + }, + default_settings: { + allOf: [ + { + $ref: "#/components/schemas/Chat.DefaultChatSettings", + }, + ], + description: "Default settings for all sessions created by this agent", + }, + }, + description: "Payload for patching a agent", +} as const; + +export const Agents_UpdateAgentRequestSchema = { + type: "object", + required: ["name", "about", "model", "instructions"], + properties: { + metadata: { + type: "object", + additionalProperties: {}, + }, + name: { + allOf: [ + { + $ref: "#/components/schemas/Common.identifierSafeUnicode", + }, + ], + description: "Name of the agent", + default: "", + }, + about: { + type: "string", + description: "About the agent", + default: "", + }, + model: { + type: "string", + description: "Model name to use (gpt-4-turbo, gemini-nano etc)", + default: "", + }, + instructions: { + anyOf: [ + { + type: "string", + }, + { + type: "array", + items: { + type: "string", + }, + }, + ], + description: "Instructions for the agent", + default: "", + }, + default_settings: { + allOf: [ + { + $ref: "#/components/schemas/Chat.DefaultChatSettings", + }, + ], + description: "Default settings for all sessions created by this agent", + }, + }, + description: "Payload for updating a agent", +} as const; + +export const Chat_BaseChatOutputSchema = { + type: "object", + required: ["index", "finish_reason"], + properties: { + index: { + type: "integer", + format: "uint32", + }, + finish_reason: { + allOf: [ + { + $ref: "#/components/schemas/Chat.FinishReason", + }, + ], + description: "The reason the model stopped generating tokens", + }, + logprobs: { + allOf: [ + { + $ref: "#/components/schemas/Chat.LogProbResponse", + }, + ], + description: "The log probabilities of tokens", + }, + }, +} as const; + +export const Chat_BaseChatResponseSchema = { + type: "object", + required: ["jobs", "docs", "created_at", "id"], + properties: { + usage: { + allOf: [ + { + $ref: "#/components/schemas/Chat.CompetionUsage", + }, + ], + description: "Usage statistics for the completion request", + }, + jobs: { + type: "array", + items: { + $ref: "#/components/schemas/Common.uuid", + }, + description: + "Background job IDs that may have been spawned from this interaction.", + }, + docs: { + type: "array", + items: { + $ref: "#/components/schemas/Docs.DocReference", + }, + description: + "Documents referenced for this request (for citation purposes).", + }, + created_at: { + type: "string", + format: "date-time", + description: "When this resource was created as UTC date-time", + readOnly: true, + }, + id: { + allOf: [ + { + $ref: "#/components/schemas/Common.uuid", + }, + ], + readOnly: true, + }, + }, +} as const; + +export const Chat_BaseTokenLogProbSchema = { + type: "object", + required: ["token", "logprob"], + properties: { + token: { + type: "string", + }, + logprob: { + type: "number", + format: "float", + description: "The log probability of the token", + }, + bytes: { + type: "array", + items: { + type: "integer", + format: "uint16", + }, + }, + }, +} as const; + +export const Chat_ChatInputSchema = { + type: "object", + required: ["remember", "recall", "save", "stream"], + properties: { + remember: { + type: "boolean", + description: + "DISABLED: Whether this interaction should form new memories or not (will be enabled in a future release)", + default: false, + readOnly: true, + }, + recall: { + type: "boolean", + description: + "Whether previous memories and docs should be recalled or not", + default: true, + }, + save: { + type: "boolean", + description: + "Whether this interaction should be stored in the session history or not", + default: true, + }, + model: { + allOf: [ + { + $ref: "#/components/schemas/Common.identifierSafeUnicode", + }, + ], + description: "Identifier of the model to be used", + }, + stream: { + type: "boolean", + description: + "Indicates if the server should stream the response as it's generated", + default: false, + }, + stop: { + type: "array", + items: { + type: "string", + }, + minItems: 1, + maxItems: 4, + description: + "Up to 4 sequences where the API will stop generating further tokens.", + }, + seed: { + type: "integer", + format: "int16", + minimum: -1, + maximum: 1000, + description: + "If specified, the system will make a best effort to sample deterministically for that particular seed value", + }, + max_tokens: { + type: "integer", + format: "uint32", + minimum: 1, + description: + "The maximum number of tokens to generate in the chat completion", + }, + logit_bias: { + type: "object", + additionalProperties: { + $ref: "#/components/schemas/Common.logit_bias", + }, + description: + "Modify the likelihood of specified tokens appearing in the completion", + }, + response_format: { + allOf: [ + { + $ref: "#/components/schemas/Chat.CompletionResponseFormat", + }, + ], + description: + "Response format (set to `json_object` to restrict output to JSON)", + }, + agent: { + allOf: [ + { + $ref: "#/components/schemas/Common.uuid", + }, + ], + description: + "Agent ID of the agent to use for this interaction. (Only applicable for multi-agent sessions)", + }, + repetition_penalty: { + type: "number", + format: "float", + minimum: 0, + maximum: 2, + description: + "Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.", + }, + length_penalty: { + type: "number", + format: "float", + minimum: 0, + maximum: 2, + description: + "Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize number of tokens generated.", + }, + min_p: { + type: "number", + format: "float", + minimum: 0, + maximum: 1, + description: + "Minimum probability compared to leading token to be considered", + }, + frequency_penalty: { + type: "number", + format: "float", + minimum: -2, + maximum: 2, + description: + "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.", + }, + presence_penalty: { + type: "number", + format: "float", + minimum: -2, + maximum: 2, + description: + "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.", + }, + temperature: { + type: "number", + format: "float", + minimum: 0, + maximum: 5, + description: + "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", + }, + top_p: { + type: "number", + format: "float", + minimum: 0, + maximum: 1, + description: + "Defaults to 1 An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both.", + }, + }, + allOf: [ + { + $ref: "#/components/schemas/Chat.ChatInputData", + }, + ], +} as const; + +export const Chat_ChatInputDataSchema = { + type: "object", + required: ["messages"], + properties: { + messages: { + type: "array", + items: { + type: "object", + required: ["role", "content"], + properties: { + role: { + allOf: [ + { + $ref: "#/components/schemas/Entries.ChatMLRole", + }, + ], + description: "The role of the message", + }, + content: { + anyOf: [ + { + type: "string", + }, + { + type: "array", + items: { + type: "string", + }, + }, + { + type: "array", + items: { + anyOf: [ + { + type: "object", + required: ["text", "type"], + properties: { + text: { + type: "string", + }, + type: { + type: "string", + enum: ["text"], + description: "The type (fixed to 'text')", + default: "text", + }, + }, + }, + { + type: "object", + required: ["image_url", "type"], + properties: { + image_url: { + type: "object", + required: ["url", "detail"], + properties: { + url: { + type: "string", + description: + "Image URL or base64 data url (e.g. `data:image/jpeg;base64,`)", + }, + detail: { + allOf: [ + { + $ref: "#/components/schemas/Entries.ImageDetail", + }, + ], + description: "The detail level of the image", + default: "auto", + }, + }, + description: "The image URL", + }, + type: { + type: "string", + enum: ["image_url"], + description: "The type (fixed to 'image_url')", + default: "image_url", + }, + }, + }, + ], + }, + }, + ], + description: "The content parts of the message", + }, + name: { + type: "string", + description: "Name", + }, + continue: { + type: "boolean", + description: "Whether to continue this message or return a new one", + }, + }, + }, + minItems: 1, + description: + "A list of new input messages comprising the conversation so far.", + }, + tools: { + type: "array", + items: { + $ref: "#/components/schemas/Tools.Tool", + }, + minItems: 1, + description: + "(Advanced) List of tools that are provided in addition to agent's default set of tools.", + }, + tool_choice: { + anyOf: [ + { + type: "string", + enum: ["auto", "none"], + }, + { + $ref: "#/components/schemas/Tools.NamedToolChoice", + }, + ], + description: + "Can be one of existing tools given to the agent earlier or the ones provided in this request.", + }, + }, +} as const; + +export const Chat_ChatOutputChunkSchema = { + type: "object", + required: ["delta"], + properties: { + delta: { + type: "object", + required: ["role", "content"], + properties: { + role: { + allOf: [ + { + $ref: "#/components/schemas/Entries.ChatMLRole", + }, + ], + description: "The role of the message", + }, + content: { + anyOf: [ + { + type: "string", + }, + { + type: "array", + items: { + type: "string", + }, + }, + { + type: "array", + items: { + anyOf: [ + { + type: "object", + required: ["text", "type"], + properties: { + text: { + type: "string", + }, + type: { + type: "string", + enum: ["text"], + description: "The type (fixed to 'text')", + default: "text", + }, + }, + }, + { + type: "object", + required: ["image_url", "type"], + properties: { + image_url: { + type: "object", + required: ["url", "detail"], + properties: { + url: { + type: "string", + description: + "Image URL or base64 data url (e.g. `data:image/jpeg;base64,`)", + }, + detail: { + allOf: [ + { + $ref: "#/components/schemas/Entries.ImageDetail", + }, + ], + description: "The detail level of the image", + default: "auto", + }, + }, + description: "The image URL", + }, + type: { + type: "string", + enum: ["image_url"], + description: "The type (fixed to 'image_url')", + default: "image_url", + }, + }, + }, + ], + }, + }, + ], + description: "The content parts of the message", + }, + name: { + type: "string", + description: "Name", + }, + continue: { + type: "boolean", + description: "Whether to continue this message or return a new one", + }, + }, + description: "The message generated by the model", + }, + }, + allOf: [ + { + $ref: "#/components/schemas/Chat.BaseChatOutput", + }, + ], + description: "Streaming chat completion output", +} as const; + +export const Chat_ChatSettingsSchema = { + type: "object", + required: ["stream"], + properties: { + model: { + allOf: [ + { + $ref: "#/components/schemas/Common.identifierSafeUnicode", + }, + ], + description: "Identifier of the model to be used", + }, + stream: { + type: "boolean", + description: + "Indicates if the server should stream the response as it's generated", + default: false, + }, + stop: { + type: "array", + items: { + type: "string", + }, + minItems: 1, + maxItems: 4, + description: + "Up to 4 sequences where the API will stop generating further tokens.", + }, + seed: { + type: "integer", + format: "int16", + minimum: -1, + maximum: 1000, + description: + "If specified, the system will make a best effort to sample deterministically for that particular seed value", + }, + max_tokens: { + type: "integer", + format: "uint32", + minimum: 1, + description: + "The maximum number of tokens to generate in the chat completion", + }, + logit_bias: { + type: "object", + additionalProperties: { + $ref: "#/components/schemas/Common.logit_bias", + }, + description: + "Modify the likelihood of specified tokens appearing in the completion", + }, + response_format: { + allOf: [ + { + $ref: "#/components/schemas/Chat.CompletionResponseFormat", + }, + ], + description: + "Response format (set to `json_object` to restrict output to JSON)", + }, + agent: { + allOf: [ + { + $ref: "#/components/schemas/Common.uuid", + }, + ], + description: + "Agent ID of the agent to use for this interaction. (Only applicable for multi-agent sessions)", + }, + }, + allOf: [ + { + $ref: "#/components/schemas/Chat.DefaultChatSettings", + }, + ], +} as const; + +export const Chat_ChunkChatResponseSchema = { + type: "object", + required: ["choices"], + properties: { + choices: { + type: "array", + items: { + $ref: "#/components/schemas/Chat.ChatOutputChunk", + }, + description: "The deltas generated by the model", + }, + }, + allOf: [ + { + $ref: "#/components/schemas/Chat.BaseChatResponse", + }, + ], +} as const; + +export const Chat_CompetionUsageSchema = { + type: "object", + properties: { + completion_tokens: { + type: "integer", + format: "uint32", + description: "Number of tokens in the generated completion", + readOnly: true, + }, + prompt_tokens: { + type: "integer", + format: "uint32", + description: "Number of tokens in the prompt", + readOnly: true, + }, + total_tokens: { + type: "integer", + format: "uint32", + description: + "Total number of tokens used in the request (prompt + completion)", + readOnly: true, + }, + }, + description: "Usage statistics for the completion request", +} as const; + +export const Chat_CompletionResponseFormatSchema = { + type: "object", + required: ["type"], + properties: { + type: { + type: "string", + enum: ["text", "json_object"], + description: "The format of the response", + default: "text", + }, + }, +} as const; + +export const Chat_DefaultChatSettingsSchema = { + type: "object", + properties: { + repetition_penalty: { + type: "number", + format: "float", + minimum: 0, + maximum: 2, + description: + "Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.", + }, + length_penalty: { + type: "number", + format: "float", + minimum: 0, + maximum: 2, + description: + "Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize number of tokens generated.", + }, + min_p: { + type: "number", + format: "float", + minimum: 0, + maximum: 1, + description: + "Minimum probability compared to leading token to be considered", + }, + }, + allOf: [ + { + $ref: "#/components/schemas/Chat.OpenAISettings", + }, + ], + description: "Default settings for the chat session (also used by the agent)", +} as const; + +export const Chat_FinishReasonSchema = { + type: "string", + enum: ["stop", "length", "content_filter", "tool_calls"], + description: `The reason the model stopped generating tokens. This will be \`stop\` +if the model hit a natural stop point or a provided stop sequence, +\`length\` if the maximum number of tokens specified in the request +was reached, \`content_filter\` if content was omitted due to a flag +from our content filters, \`tool_calls\` if the model called a tool.`, +} as const; + +export const Chat_LogProbResponseSchema = { + type: "object", + required: ["content"], + properties: { + content: { + type: "array", + items: { + $ref: "#/components/schemas/Chat.TokenLogProb", + }, + nullable: true, + description: "The log probabilities of the tokens", + }, + }, +} as const; + +export const Chat_MessageChatResponseSchema = { + type: "object", + required: ["choices"], + properties: { + choices: { + type: "array", + items: { + anyOf: [ + { + $ref: "#/components/schemas/Chat.SingleChatOutput", + }, + { + $ref: "#/components/schemas/Chat.MultipleChatOutput", + }, + ], + }, + description: "The deltas generated by the model", + }, + }, + allOf: [ + { + $ref: "#/components/schemas/Chat.BaseChatResponse", + }, + ], +} as const; + +export const Chat_MultipleChatOutputSchema = { + type: "object", + required: ["messages"], + properties: { + messages: { + type: "array", + items: { + type: "object", + required: ["role", "content"], + properties: { + role: { + allOf: [ + { + $ref: "#/components/schemas/Entries.ChatMLRole", + }, + ], + description: "The role of the message", + }, + content: { + anyOf: [ + { + type: "string", + }, + { + type: "array", + items: { + type: "string", + }, + }, + { + type: "array", + items: { + anyOf: [ + { + type: "object", + required: ["text", "type"], + properties: { + text: { + type: "string", + }, + type: { + type: "string", + enum: ["text"], + description: "The type (fixed to 'text')", + default: "text", + }, + }, + }, + { + type: "object", + required: ["image_url", "type"], + properties: { + image_url: { + type: "object", + required: ["url", "detail"], + properties: { + url: { + type: "string", + description: + "Image URL or base64 data url (e.g. `data:image/jpeg;base64,`)", + }, + detail: { + allOf: [ + { + $ref: "#/components/schemas/Entries.ImageDetail", + }, + ], + description: "The detail level of the image", + default: "auto", + }, + }, + description: "The image URL", + }, + type: { + type: "string", + enum: ["image_url"], + description: "The type (fixed to 'image_url')", + default: "image_url", + }, + }, + }, + ], + }, + }, + ], + description: "The content parts of the message", + }, + name: { + type: "string", + description: "Name", + }, + continue: { + type: "boolean", + description: "Whether to continue this message or return a new one", + }, + }, + }, + }, + }, + allOf: [ + { + $ref: "#/components/schemas/Chat.BaseChatOutput", + }, + ], + description: + "The output returned by the model. Note that, depending on the model provider, they might return more than one message.", +} as const; + +export const Chat_OpenAISettingsSchema = { + type: "object", + properties: { + frequency_penalty: { + type: "number", + format: "float", + minimum: -2, + maximum: 2, + description: + "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.", + }, + presence_penalty: { + type: "number", + format: "float", + minimum: -2, + maximum: 2, + description: + "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.", + }, + temperature: { + type: "number", + format: "float", + minimum: 0, + maximum: 5, + description: + "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.", + }, + top_p: { + type: "number", + format: "float", + minimum: 0, + maximum: 1, + description: + "Defaults to 1 An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both.", + }, + }, +} as const; + +export const Chat_SingleChatOutputSchema = { + type: "object", + required: ["message"], + properties: { + message: { + type: "object", + required: ["role", "content"], + properties: { + role: { + allOf: [ + { + $ref: "#/components/schemas/Entries.ChatMLRole", + }, + ], + description: "The role of the message", + }, + content: { + anyOf: [ + { + type: "string", + }, + { + type: "array", + items: { + type: "string", + }, + }, + { + type: "array", + items: { + anyOf: [ + { + type: "object", + required: ["text", "type"], + properties: { + text: { + type: "string", + }, + type: { + type: "string", + enum: ["text"], + description: "The type (fixed to 'text')", + default: "text", + }, + }, + }, + { + type: "object", + required: ["image_url", "type"], + properties: { + image_url: { + type: "object", + required: ["url", "detail"], + properties: { + url: { + type: "string", + description: + "Image URL or base64 data url (e.g. `data:image/jpeg;base64,`)", + }, + detail: { + allOf: [ + { + $ref: "#/components/schemas/Entries.ImageDetail", + }, + ], + description: "The detail level of the image", + default: "auto", + }, + }, + description: "The image URL", + }, + type: { + type: "string", + enum: ["image_url"], + description: "The type (fixed to 'image_url')", + default: "image_url", + }, + }, + }, + ], + }, + }, + ], + description: "The content parts of the message", + }, + name: { + type: "string", + description: "Name", + }, + continue: { + type: "boolean", + description: "Whether to continue this message or return a new one", + }, + }, + }, + }, + allOf: [ + { + $ref: "#/components/schemas/Chat.BaseChatOutput", + }, + ], + description: + "The output returned by the model. Note that, depending on the model provider, they might return more than one message.", +} as const; + +export const Chat_TokenLogProbSchema = { + type: "object", + required: ["top_logprobs"], + properties: { + top_logprobs: { + type: "array", + items: { + $ref: "#/components/schemas/Chat.BaseTokenLogProb", + }, + }, + }, + allOf: [ + { + $ref: "#/components/schemas/Chat.BaseTokenLogProb", + }, + ], +} as const; + +export const Common_JinjaTemplateSchema = { + type: "string", + description: "A valid jinja template.", +} as const; + +export const Common_PyExpressionSchema = { + type: "string", + description: "A simple python expression compatible with SimpleEval.", +} as const; + +export const Common_ResourceCreatedResponseSchema = { + type: "object", + required: ["id", "created_at", "jobs"], + properties: { + id: { + allOf: [ + { + $ref: "#/components/schemas/Common.uuid", + }, + ], + description: "ID of created resource", + }, + created_at: { + type: "string", + format: "date-time", + description: "When this resource was created as UTC date-time", + readOnly: true, + }, + jobs: { + type: "array", + items: { + $ref: "#/components/schemas/Common.uuid", + }, + description: "IDs (if any) of jobs created as part of this request", + }, + }, +} as const; + +export const Common_ResourceDeletedResponseSchema = { + type: "object", + required: ["id", "deleted_at", "jobs"], + properties: { + id: { + allOf: [ + { + $ref: "#/components/schemas/Common.uuid", + }, + ], + description: "ID of deleted resource", + }, + deleted_at: { + type: "string", + format: "date-time", + description: "When this resource was deleted as UTC date-time", + readOnly: true, + }, + jobs: { + type: "array", + items: { + $ref: "#/components/schemas/Common.uuid", + }, + description: "IDs (if any) of jobs created as part of this request", + }, + }, +} as const; + +export const Common_ResourceUpdatedResponseSchema = { + type: "object", + required: ["id", "updated_at", "jobs"], + properties: { + id: { + allOf: [ + { + $ref: "#/components/schemas/Common.uuid", + }, + ], + description: "ID of updated resource", + }, + updated_at: { + type: "string", + format: "date-time", + description: "When this resource was updated as UTC date-time", + readOnly: true, + }, + jobs: { + type: "array", + items: { + $ref: "#/components/schemas/Common.uuid", + }, + description: "IDs (if any) of jobs created as part of this request", + }, + }, +} as const; + +export const Common_identifierSafeUnicodeSchema = { + type: "string", + maxLength: 120, + pattern: + "^[\\p{L}\\p{Nl}\\p{Pattern_Syntax}\\p{Pattern_White_Space}]+[\\p{ID_Start}\\p{Mn}\\p{Mc}\\p{Nd}\\p{Pc}\\p{Pattern_Syntax}\\p{Pattern_White_Space}]*$", + description: `For Unicode character safety +See: https://unicode.org/reports/tr31/ +See: https://www.unicode.org/reports/tr39/#Identifier_Characters`, +} as const; + +export const Common_limitSchema = { + type: "integer", + format: "uint16", + minimum: 1, + maximum: 1000, + exclusiveMaximum: true, + description: "Limit the number of results", +} as const; + +export const Common_logit_biasSchema = { + type: "number", + format: "float", + minimum: -100, + maximum: 100, +} as const; + +export const Common_offsetSchema = { + type: "integer", + format: "uint32", + minimum: 0, + description: "Offset to apply to the results", +} as const; + +export const Common_toolRefSchema = { + type: "string", + pattern: "^(function|integration|system|api_call)\\.(\\w+)$", + description: + "Naming convention for tool references. Tools are resolved in order: `step-settings` -> `task` -> `agent`", +} as const; + +export const Common_uuidSchema = { + type: "string", + format: "uuid", +} as const; + +export const Common_validPythonIdentifierSchema = { + type: "string", + maxLength: 40, + pattern: "^[^\\W0-9]\\w*$", + description: "Valid python identifier names", +} as const; + +export const Docs_BaseDocSearchRequestSchema = { + type: "object", + required: ["limit", "lang"], + properties: { + limit: { + type: "integer", + format: "uint16", + minimum: 1, + maximum: 100, + default: 10, + }, + lang: { + type: "string", + enum: ["en-US"], + description: + "The language to be used for text-only search. Support for other languages coming soon.", + default: "en-US", + }, + }, +} as const; + +export const Docs_CreateDocRequestSchema = { + type: "object", + required: ["title", "content"], + properties: { + metadata: { + type: "object", + additionalProperties: {}, + }, + title: { + type: "string", + maxLength: 800, + description: "Title describing what this document contains", + }, + content: { + anyOf: [ + { + type: "string", + }, + { + type: "array", + items: { + type: "string", + }, + }, + ], + description: "Contents of the document", + }, + }, + description: "Payload for creating a doc", +} as const; + +export const Docs_DocSchema = { + type: "object", + required: ["id", "created_at", "title", "content"], + properties: { + id: { + allOf: [ + { + $ref: "#/components/schemas/Common.uuid", + }, + ], + readOnly: true, + }, + metadata: { + type: "object", + additionalProperties: {}, + }, + created_at: { + type: "string", + format: "date-time", + description: "When this resource was created as UTC date-time", + readOnly: true, + }, + title: { + type: "string", + maxLength: 800, + description: "Title describing what this document contains", + }, + content: { + anyOf: [ + { + type: "string", + }, + { + type: "array", + items: { + type: "string", + }, + }, + ], + description: "Contents of the document", + }, + }, +} as const; + +export const Docs_DocOwnerSchema = { + type: "object", + required: ["id", "role"], + properties: { + id: { + anyOf: [ + { + allOf: [ + { + $ref: "#/components/schemas/Common.uuid", + }, + ], + readOnly: true, + }, + { + allOf: [ + { + $ref: "#/components/schemas/Common.uuid", + }, + ], + readOnly: true, + }, + ], + }, + role: { + type: "string", + enum: ["user", "agent"], + }, + }, +} as const; + +export const Docs_DocReferenceSchema = { + type: "object", + required: ["owner", "id", "snippets", "distance"], + properties: { + owner: { + allOf: [ + { + $ref: "#/components/schemas/Docs.DocOwner", + }, + ], + description: "The owner of this document.", + }, + id: { + allOf: [ + { + $ref: "#/components/schemas/Common.uuid", + }, + ], + readOnly: true, + description: "ID of the document", + }, + title: { + type: "string", + }, + snippets: { + type: "array", + items: { + $ref: "#/components/schemas/Docs.Snippet", + }, + minItems: 1, + }, + distance: { + type: "number", + nullable: true, + default: null, + }, + }, +} as const; + +export const Docs_DocSearchResponseSchema = { + type: "object", + required: ["docs", "time"], + properties: { + docs: { + type: "array", + items: { + $ref: "#/components/schemas/Docs.DocReference", + }, + description: "The documents that were found", + }, + time: { + type: "number", + minimum: 0, + exclusiveMinimum: true, + description: "The time taken to search in seconds", + }, + }, +} as const; + +export const Docs_EmbedQueryRequestSchema = { + type: "object", + required: ["text"], + properties: { + text: { + anyOf: [ + { + type: "string", + }, + { + type: "array", + items: { + type: "string", + }, + }, + ], + description: "Text or texts to embed", + }, + }, +} as const; + +export const Docs_EmbedQueryResponseSchema = { + type: "object", + required: ["vectors"], + properties: { + vectors: { + type: "array", + items: { + type: "array", + items: { + type: "number", + }, + }, + description: "The embedded vectors", + }, + }, +} as const; + +export const Docs_HybridDocSearchRequestSchema = { + type: "object", + required: ["confidence", "alpha", "text", "vector"], + properties: { + confidence: { + type: "number", + minimum: 0, + maximum: 1, + description: "The confidence cutoff level", + default: 0.5, + }, + alpha: { + type: "number", + minimum: 0, + maximum: 1, + description: + "The weight to apply to BM25 vs Vector search results. 0 => pure BM25; 1 => pure vector;", + default: 0.75, + }, + text: { + type: "string", + description: + "Text to use in the search. In `hybrid` search mode, either `text` or both `text` and `vector` fields are required.", + }, + vector: { + type: "array", + items: { + type: "number", + }, + description: + "Vector to use in the search. Must be the same dimensions as the embedding model or else an error will be thrown.", + }, + }, + allOf: [ + { + $ref: "#/components/schemas/Docs.BaseDocSearchRequest", + }, + ], +} as const; + +export const Docs_SnippetSchema = { + type: "object", + required: ["index", "content"], + properties: { + index: { + type: "integer", + format: "uint16", + }, + content: { + type: "string", + }, + }, +} as const; + +export const Docs_TextOnlyDocSearchRequestSchema = { + type: "object", + required: ["text"], + properties: { + text: { + type: "string", + description: "Text to use in the search.", + }, + }, + allOf: [ + { + $ref: "#/components/schemas/Docs.BaseDocSearchRequest", + }, + ], +} as const; + +export const Docs_VectorDocSearchRequestSchema = { + type: "object", + required: ["confidence", "vector"], + properties: { + confidence: { + type: "number", + minimum: 0, + maximum: 1, + description: "The confidence cutoff level", + default: 0.5, + }, + vector: { + type: "array", + items: { + type: "number", + }, + description: + "Vector to use in the search. Must be the same dimensions as the embedding model or else an error will be thrown.", + }, + }, + allOf: [ + { + $ref: "#/components/schemas/Docs.BaseDocSearchRequest", + }, + ], +} as const; + +export const Entries_BaseEntrySchema = { + type: "object", + required: [ + "role", + "name", + "content", + "source", + "tokenizer", + "token_count", + "timestamp", + ], + properties: { + role: { + $ref: "#/components/schemas/Entries.ChatMLRole", + }, + name: { + type: "string", + nullable: true, + default: null, + }, + content: { + anyOf: [ + { + type: "array", + items: { + anyOf: [ + { + type: "object", + required: ["text", "type"], + properties: { + text: { + type: "string", + }, + type: { + type: "string", + enum: ["text"], + description: "The type (fixed to 'text')", + default: "text", + }, + }, + }, + { + type: "object", + required: ["image_url", "type"], + properties: { + image_url: { + type: "object", + required: ["url", "detail"], + properties: { + url: { + type: "string", + description: + "Image URL or base64 data url (e.g. `data:image/jpeg;base64,`)", + }, + detail: { + allOf: [ + { + $ref: "#/components/schemas/Entries.ImageDetail", + }, + ], + description: "The detail level of the image", + default: "auto", + }, + }, + description: "The image URL", + }, + type: { + type: "string", + enum: ["image_url"], + description: "The type (fixed to 'image_url')", + default: "image_url", + }, + }, + }, + ], + }, + }, + { + $ref: "#/components/schemas/Tools.Tool", + }, + { + $ref: "#/components/schemas/Tools.ChosenToolCall", + }, + { + type: "string", + }, + { + $ref: "#/components/schemas/Tools.ToolResponse", + }, + { + type: "array", + items: { + anyOf: [ + { + type: "array", + items: { + anyOf: [ + { + type: "object", + required: ["text", "type"], + properties: { + text: { + type: "string", + }, + type: { + type: "string", + enum: ["text"], + description: "The type (fixed to 'text')", + default: "text", + }, + }, + }, + { + type: "object", + required: ["image_url", "type"], + properties: { + image_url: { + type: "object", + required: ["url", "detail"], + properties: { + url: { + type: "string", + description: + "Image URL or base64 data url (e.g. `data:image/jpeg;base64,`)", + }, + detail: { + allOf: [ + { + $ref: "#/components/schemas/Entries.ImageDetail", + }, + ], + description: "The detail level of the image", + default: "auto", + }, + }, + description: "The image URL", + }, + type: { + type: "string", + enum: ["image_url"], + description: "The type (fixed to 'image_url')", + default: "image_url", + }, + }, + }, + ], + }, + }, + { + $ref: "#/components/schemas/Tools.Tool", + }, + { + $ref: "#/components/schemas/Tools.ChosenToolCall", + }, + { + type: "string", + }, + { + $ref: "#/components/schemas/Tools.ToolResponse", + }, + ], + }, + }, + ], + }, + source: { + type: "string", + enum: [ + "api_request", + "api_response", + "tool_response", + "internal", + "summarizer", + "meta", + ], + }, + tokenizer: { + type: "string", + }, + token_count: { + type: "integer", + format: "uint16", + }, + timestamp: { + type: "number", + minimum: 0, + description: "This is the time that this event refers to.", + }, + }, +} as const; + +export const Entries_ChatMLRoleSchema = { + type: "string", + enum: [ + "user", + "assistant", + "system", + "function", + "function_response", + "function_call", + "auto", + ], + description: + "ChatML role (system|assistant|user|function_call|function|function_response|auto)", +} as const; + +export const Entries_EntrySchema = { + type: "object", + required: ["created_at", "id"], + properties: { + created_at: { + type: "string", + format: "date-time", + description: "When this resource was created as UTC date-time", + readOnly: true, + }, + id: { + allOf: [ + { + $ref: "#/components/schemas/Common.uuid", + }, + ], + readOnly: true, + }, + }, + allOf: [ + { + $ref: "#/components/schemas/Entries.BaseEntry", + }, + ], +} as const; + +export const Entries_HistorySchema = { + type: "object", + required: ["entries", "relations", "session_id", "created_at"], + properties: { + entries: { + type: "array", + items: { + $ref: "#/components/schemas/Entries.Entry", + }, + }, + relations: { + type: "array", + items: { + $ref: "#/components/schemas/Entries.Relation", + }, + }, + session_id: { + allOf: [ + { + $ref: "#/components/schemas/Common.uuid", + }, + ], + readOnly: true, + }, + created_at: { + type: "string", + format: "date-time", + description: "When this resource was created as UTC date-time", + readOnly: true, + }, + }, +} as const; + +export const Entries_ImageDetailSchema = { + type: "string", + enum: ["low", "high", "auto"], + description: "Image detail level", +} as const; + +export const Entries_RelationSchema = { + type: "object", + required: ["head", "relation", "tail"], + properties: { + head: { + $ref: "#/components/schemas/Common.uuid", + }, + relation: { + type: "string", + }, + tail: { + $ref: "#/components/schemas/Common.uuid", + }, + }, +} as const; + +export const Executions_CreateExecutionRequestSchema = { + type: "object", + required: ["input"], + properties: { + input: { + type: "object", + additionalProperties: {}, + description: "The input to the execution", + }, + metadata: { + type: "object", + additionalProperties: {}, + }, + }, + description: "Payload for creating an execution", +} as const; + +export const Executions_ExecutionSchema = { + type: "object", + required: ["task_id", "status", "input", "created_at", "updated_at", "id"], + properties: { + task_id: { + allOf: [ + { + $ref: "#/components/schemas/Common.uuid", + }, + ], + readOnly: true, + description: "The ID of the task that the execution is running", + }, + status: { + type: "string", + enum: [ + "queued", + "starting", + "running", + "awaiting_input", + "succeeded", + "failed", + "cancelled", + ], + description: "The status of the execution", + readOnly: true, + }, + input: { + type: "object", + additionalProperties: {}, + description: "The input to the execution", + }, + created_at: { + type: "string", + format: "date-time", + description: "When this resource was created as UTC date-time", + readOnly: true, + }, + updated_at: { + type: "string", + format: "date-time", + description: "When this resource was updated as UTC date-time", + readOnly: true, + }, + metadata: { + type: "object", + additionalProperties: {}, + }, + id: { + allOf: [ + { + $ref: "#/components/schemas/Common.uuid", + }, + ], + readOnly: true, + }, + }, +} as const; + +export const Executions_ResumeExecutionRequestSchema = { + type: "object", + required: ["status"], + properties: { + status: { + type: "string", + enum: ["running"], + default: "running", + }, + input: { + type: "object", + additionalProperties: {}, + description: "The input to resume the execution with", + }, + }, + allOf: [ + { + $ref: "#/components/schemas/Executions.UpdateExecutionRequest", + }, + ], +} as const; + +export const Executions_StopExecutionRequestSchema = { + type: "object", + required: ["status", "reason"], + properties: { + status: { + type: "string", + enum: ["cancelled"], + default: "cancelled", + }, + reason: { + type: "string", + nullable: true, + description: "The reason for stopping the execution", + default: null, + }, + }, + allOf: [ + { + $ref: "#/components/schemas/Executions.UpdateExecutionRequest", + }, + ], +} as const; + +export const Executions_TaskTokenResumeExecutionRequestSchema = { + type: "object", + required: ["status"], + properties: { + status: { + type: "string", + enum: ["running"], + default: "running", + }, + input: { + type: "object", + additionalProperties: {}, + description: "The input to resume the execution with", + }, + }, +} as const; + +export const Executions_TransitionSchema = { + type: "object", + required: [ + "type", + "execution_id", + "output", + "current", + "next", + "id", + "created_at", + "updated_at", + ], + properties: { + type: { + type: "string", + enum: ["finish", "wait", "resume", "error", "step", "cancelled"], + readOnly: true, + }, + execution_id: { + allOf: [ + { + $ref: "#/components/schemas/Common.uuid", + }, + ], + readOnly: true, + }, + output: { + readOnly: true, + }, + current: { + allOf: [ + { + $ref: "#/components/schemas/Executions.TransitionTarget", + }, + ], + readOnly: true, + }, + next: { + type: "object", + allOf: [ + { + $ref: "#/components/schemas/Executions.TransitionTarget", + }, + ], + nullable: true, + readOnly: true, + }, + id: { + allOf: [ + { + $ref: "#/components/schemas/Common.uuid", + }, + ], + readOnly: true, + }, + metadata: { + type: "object", + additionalProperties: {}, + }, + created_at: { + type: "string", + format: "date-time", + description: "When this resource was created as UTC date-time", + readOnly: true, + }, + updated_at: { + type: "string", + format: "date-time", + description: "When this resource was updated as UTC date-time", + readOnly: true, + }, + }, +} as const; + +export const Executions_TransitionTargetSchema = { + type: "object", + required: ["workflow", "step"], + properties: { + workflow: { + $ref: "#/components/schemas/Common.identifierSafeUnicode", + }, + step: { + type: "integer", + format: "uint16", + }, + }, +} as const; + +export const Executions_UpdateExecutionRequestSchema = { + type: "object", + required: ["status"], + properties: { + status: { + type: "string", + enum: [ + "queued", + "starting", + "running", + "awaiting_input", + "succeeded", + "failed", + "cancelled", + ], + }, + }, + discriminator: { + propertyName: "status", + mapping: { + cancelled: "#/components/schemas/Executions.StopExecutionRequest", + running: "#/components/schemas/Executions.ResumeExecutionRequest", + }, + }, +} as const; + +export const Jobs_JobStateSchema = { + type: "string", + enum: [ + "pending", + "in_progress", + "retrying", + "succeeded", + "aborted", + "failed", + "unknown", + ], + description: + "Current state (one of: pending, in_progress, retrying, succeeded, aborted, failed)", +} as const; + +export const Jobs_JobStatusSchema = { + type: "object", + required: [ + "id", + "created_at", + "updated_at", + "name", + "reason", + "has_progress", + "progress", + "state", + ], + properties: { + id: { + allOf: [ + { + $ref: "#/components/schemas/Common.uuid", + }, + ], + readOnly: true, + }, + created_at: { + type: "string", + format: "date-time", + description: "When this resource was created as UTC date-time", + readOnly: true, + }, + updated_at: { + type: "string", + format: "date-time", + description: "When this resource was updated as UTC date-time", + readOnly: true, + }, + name: { + allOf: [ + { + $ref: "#/components/schemas/Common.identifierSafeUnicode", + }, + ], + description: "Name of the job", + default: "", + }, + reason: { + type: "string", + description: "Reason for the current state of the job", + default: "", + }, + has_progress: { + type: "boolean", + description: "Whether this Job supports progress updates", + default: false, + }, + progress: { + type: "number", + format: "float", + minimum: 0, + maximum: 100, + description: "Progress percentage", + default: 0, + }, + state: { + allOf: [ + { + $ref: "#/components/schemas/Jobs.JobState", + }, + ], + description: "Current state of the job", + default: "pending", + }, + }, +} as const; + +export const Sessions_ContextOverflowTypeSchema = { + type: "string", + enum: ["truncate", "adaptive"], +} as const; + +export const Sessions_CreateOrUpdateSessionRequestSchema = { + type: "object", + required: [ + "id", + "situation", + "render_templates", + "token_budget", + "context_overflow", + ], + properties: { + id: { + $ref: "#/components/schemas/Common.uuid", + }, + user: { + allOf: [ + { + $ref: "#/components/schemas/Common.uuid", + }, + ], + description: "User ID of user associated with this session", + }, + users: { + type: "array", + items: { + $ref: "#/components/schemas/Common.uuid", + }, + }, + agent: { + allOf: [ + { + $ref: "#/components/schemas/Common.uuid", + }, + ], + description: "Agent ID of agent associated with this session", + }, + agents: { + type: "array", + items: { + $ref: "#/components/schemas/Common.uuid", + }, + }, + situation: { + type: "string", + description: + "A specific situation that sets the background for this session", + default: `{%- if agent.name -%} +You are {{agent.name}}.{{" "}} +{%- endif -%} + +{%- if agent.about -%} +About you: {{agent.name}}.{{" "}} +{%- endif -%} + +{%- if user -%} +You are talking to a user + {%- if user.name -%}{{" "}} and their name is {{user.name}} + {%- if user.about -%}. About the user: {{user.about}}.{%- else -%}.{%- endif -%} + {%- endif -%} +{%- endif -%} + +{{" + +"}} + +{%- if agent.instructions -%} +Instructions:{{" +"}} + {%- if agent.instructions is string -%} + {{agent.instructions}}{{" +"}} + {%- else -%} + {%- for instruction in agent.instructions -%} + - {{instruction}}{{" +"}} + {%- endfor -%} + {%- endif -%} + {{" +"}} +{%- endif -%} + +{%- if tools -%} +Tools:{{" +"}} + {%- for tool in tools -%} + {%- if tool.type == "function" -%} + - {{tool.function.name}} + {%- if tool.function.description -%}: {{tool.function.description}}{%- endif -%}{{" +"}} + {%- else -%} + - {{ 0/0 }} {# Error: Other tool types aren't supported yet. #} + {%- endif -%} + {%- endfor -%} +{{" + +"}} +{%- endif -%} + +{%- if docs -%} +Relevant documents:{{" +"}} + {%- for doc in docs -%} + {{doc.title}}{{" +"}} + {%- if doc.content is string -%} + {{doc.content}}{{" +"}} + {%- else -%} + {%- for snippet in doc.content -%} + {{snippet}}{{" +"}} + {%- endfor -%} + {%- endif -%} + {{"---"}} + {%- endfor -%} +{%- endif -%}`, + }, + render_templates: { + type: "boolean", + description: + "Render system and assistant message content as jinja templates", + default: true, + }, + token_budget: { + type: "integer", + format: "uint16", + nullable: true, + description: "Threshold value for the adaptive context functionality", + default: null, + }, + context_overflow: { + oneOf: [ + { + $ref: "#/components/schemas/Sessions.ContextOverflowType", + }, + ], + nullable: true, + description: "Action to start on context window overflow", + default: null, + }, + metadata: { + type: "object", + additionalProperties: {}, + }, + }, + allOf: [ + { + $ref: "#/components/schemas/Sessions.CreateSessionRequest", + }, + ], +} as const; + +export const Sessions_CreateSessionRequestSchema = { + type: "object", + required: [ + "situation", + "render_templates", + "token_budget", + "context_overflow", + ], + properties: { + user: { + allOf: [ + { + $ref: "#/components/schemas/Common.uuid", + }, + ], + description: "User ID of user associated with this session", + }, + users: { + type: "array", + items: { + $ref: "#/components/schemas/Common.uuid", + }, + }, + agent: { + allOf: [ + { + $ref: "#/components/schemas/Common.uuid", + }, + ], + description: "Agent ID of agent associated with this session", + }, + agents: { + type: "array", + items: { + $ref: "#/components/schemas/Common.uuid", + }, + }, + situation: { + type: "string", + description: + "A specific situation that sets the background for this session", + default: `{%- if agent.name -%} +You are {{agent.name}}.{{" "}} +{%- endif -%} + +{%- if agent.about -%} +About you: {{agent.name}}.{{" "}} +{%- endif -%} + +{%- if user -%} +You are talking to a user + {%- if user.name -%}{{" "}} and their name is {{user.name}} + {%- if user.about -%}. About the user: {{user.about}}.{%- else -%}.{%- endif -%} + {%- endif -%} +{%- endif -%} + +{{" + +"}} + +{%- if agent.instructions -%} +Instructions:{{" +"}} + {%- if agent.instructions is string -%} + {{agent.instructions}}{{" +"}} + {%- else -%} + {%- for instruction in agent.instructions -%} + - {{instruction}}{{" +"}} + {%- endfor -%} + {%- endif -%} + {{" +"}} +{%- endif -%} + +{%- if tools -%} +Tools:{{" +"}} + {%- for tool in tools -%} + {%- if tool.type == "function" -%} + - {{tool.function.name}} + {%- if tool.function.description -%}: {{tool.function.description}}{%- endif -%}{{" +"}} + {%- else -%} + - {{ 0/0 }} {# Error: Other tool types aren't supported yet. #} + {%- endif -%} + {%- endfor -%} +{{" + +"}} +{%- endif -%} + +{%- if docs -%} +Relevant documents:{{" +"}} + {%- for doc in docs -%} + {{doc.title}}{{" +"}} + {%- if doc.content is string -%} + {{doc.content}}{{" +"}} + {%- else -%} + {%- for snippet in doc.content -%} + {{snippet}}{{" +"}} + {%- endfor -%} + {%- endif -%} + {{"---"}} + {%- endfor -%} +{%- endif -%}`, + }, + render_templates: { + type: "boolean", + description: + "Render system and assistant message content as jinja templates", + default: true, + }, + token_budget: { + type: "integer", + format: "uint16", + nullable: true, + description: "Threshold value for the adaptive context functionality", + default: null, + }, + context_overflow: { + oneOf: [ + { + $ref: "#/components/schemas/Sessions.ContextOverflowType", + }, + ], + nullable: true, + description: "Action to start on context window overflow", + default: null, + }, + metadata: { + type: "object", + additionalProperties: {}, + }, + }, + description: "Payload for creating a session", +} as const; + +export const Sessions_MultiAgentMultiUserSessionSchema = { + type: "object", + required: ["agents", "users"], + properties: { + agents: { + type: "array", + items: { + $ref: "#/components/schemas/Common.uuid", + }, + }, + users: { + type: "array", + items: { + $ref: "#/components/schemas/Common.uuid", + }, + }, + }, + allOf: [ + { + $ref: "#/components/schemas/Sessions.Session", + }, + ], +} as const; + +export const Sessions_MultiAgentNoUserSessionSchema = { + type: "object", + required: ["agents"], + properties: { + agents: { + type: "array", + items: { + $ref: "#/components/schemas/Common.uuid", + }, + }, + }, + allOf: [ + { + $ref: "#/components/schemas/Sessions.Session", + }, + ], +} as const; + +export const Sessions_MultiAgentSingleUserSessionSchema = { + type: "object", + required: ["agents", "user"], + properties: { + agents: { + type: "array", + items: { + $ref: "#/components/schemas/Common.uuid", + }, + }, + user: { + $ref: "#/components/schemas/Common.uuid", + }, + }, + allOf: [ + { + $ref: "#/components/schemas/Sessions.Session", + }, + ], +} as const; + +export const Sessions_PatchSessionRequestSchema = { + type: "object", + properties: { + situation: { + type: "string", + description: + "A specific situation that sets the background for this session", + default: `{%- if agent.name -%} +You are {{agent.name}}.{{" "}} +{%- endif -%} + +{%- if agent.about -%} +About you: {{agent.name}}.{{" "}} +{%- endif -%} + +{%- if user -%} +You are talking to a user + {%- if user.name -%}{{" "}} and their name is {{user.name}} + {%- if user.about -%}. About the user: {{user.about}}.{%- else -%}.{%- endif -%} + {%- endif -%} +{%- endif -%} + +{{" + +"}} + +{%- if agent.instructions -%} +Instructions:{{" +"}} + {%- if agent.instructions is string -%} + {{agent.instructions}}{{" +"}} + {%- else -%} + {%- for instruction in agent.instructions -%} + - {{instruction}}{{" +"}} + {%- endfor -%} + {%- endif -%} + {{" +"}} +{%- endif -%} + +{%- if tools -%} +Tools:{{" +"}} + {%- for tool in tools -%} + {%- if tool.type == "function" -%} + - {{tool.function.name}} + {%- if tool.function.description -%}: {{tool.function.description}}{%- endif -%}{{" +"}} + {%- else -%} + - {{ 0/0 }} {# Error: Other tool types aren't supported yet. #} + {%- endif -%} + {%- endfor -%} +{{" + +"}} +{%- endif -%} + +{%- if docs -%} +Relevant documents:{{" +"}} + {%- for doc in docs -%} + {{doc.title}}{{" +"}} + {%- if doc.content is string -%} + {{doc.content}}{{" +"}} + {%- else -%} + {%- for snippet in doc.content -%} + {{snippet}}{{" +"}} + {%- endfor -%} + {%- endif -%} + {{"---"}} + {%- endfor -%} +{%- endif -%}`, + }, + render_templates: { + type: "boolean", + description: + "Render system and assistant message content as jinja templates", + default: true, + }, + token_budget: { + type: "integer", + format: "uint16", + nullable: true, + description: "Threshold value for the adaptive context functionality", + default: null, + }, + context_overflow: { + oneOf: [ + { + $ref: "#/components/schemas/Sessions.ContextOverflowType", + }, + ], + nullable: true, + description: "Action to start on context window overflow", + default: null, + }, + metadata: { + type: "object", + additionalProperties: {}, + }, + }, + description: "Payload for patching a session", +} as const; + +export const Sessions_SessionSchema = { + type: "object", + required: [ + "situation", + "summary", + "render_templates", + "token_budget", + "context_overflow", + "id", + "created_at", + "updated_at", + ], + properties: { + situation: { + type: "string", + description: + "A specific situation that sets the background for this session", + default: `{%- if agent.name -%} +You are {{agent.name}}.{{" "}} +{%- endif -%} + +{%- if agent.about -%} +About you: {{agent.name}}.{{" "}} +{%- endif -%} + +{%- if user -%} +You are talking to a user + {%- if user.name -%}{{" "}} and their name is {{user.name}} + {%- if user.about -%}. About the user: {{user.about}}.{%- else -%}.{%- endif -%} + {%- endif -%} +{%- endif -%} + +{{" + +"}} + +{%- if agent.instructions -%} +Instructions:{{" +"}} + {%- if agent.instructions is string -%} + {{agent.instructions}}{{" +"}} + {%- else -%} + {%- for instruction in agent.instructions -%} + - {{instruction}}{{" +"}} + {%- endfor -%} + {%- endif -%} + {{" +"}} +{%- endif -%} + +{%- if tools -%} +Tools:{{" +"}} + {%- for tool in tools -%} + {%- if tool.type == "function" -%} + - {{tool.function.name}} + {%- if tool.function.description -%}: {{tool.function.description}}{%- endif -%}{{" +"}} + {%- else -%} + - {{ 0/0 }} {# Error: Other tool types aren't supported yet. #} + {%- endif -%} + {%- endfor -%} +{{" + +"}} +{%- endif -%} + +{%- if docs -%} +Relevant documents:{{" +"}} + {%- for doc in docs -%} + {{doc.title}}{{" +"}} + {%- if doc.content is string -%} + {{doc.content}}{{" +"}} + {%- else -%} + {%- for snippet in doc.content -%} + {{snippet}}{{" +"}} + {%- endfor -%} + {%- endif -%} + {{"---"}} + {%- endfor -%} +{%- endif -%}`, + }, + summary: { + type: "string", + nullable: true, + description: + "Summary (null at the beginning) - generated automatically after every interaction", + default: null, + readOnly: true, + }, + render_templates: { + type: "boolean", + description: + "Render system and assistant message content as jinja templates", + default: true, + }, + token_budget: { + type: "integer", + format: "uint16", + nullable: true, + description: "Threshold value for the adaptive context functionality", + default: null, + }, + context_overflow: { + oneOf: [ + { + $ref: "#/components/schemas/Sessions.ContextOverflowType", + }, + ], + nullable: true, + description: "Action to start on context window overflow", + default: null, + }, + id: { + allOf: [ + { + $ref: "#/components/schemas/Common.uuid", + }, + ], + readOnly: true, + }, + metadata: { + type: "object", + additionalProperties: {}, + }, + created_at: { + type: "string", + format: "date-time", + description: "When this resource was created as UTC date-time", + readOnly: true, + }, + updated_at: { + type: "string", + format: "date-time", + description: "When this resource was updated as UTC date-time", + readOnly: true, + }, + kind: { + type: "string", + description: "Discriminator property for Session.", + }, + }, + discriminator: { + propertyName: "kind", + mapping: { + single_agent_no_user: + "#/components/schemas/Sessions.SingleAgentNoUserSession", + single_agent_single_user: + "#/components/schemas/Sessions.SingleAgentSingleUserSession", + single_agent_multi_user: + "#/components/schemas/Sessions.SingleAgentMultiUserSession", + multi_agent_no_user: + "#/components/schemas/Sessions.MultiAgentNoUserSession", + multi_agent_single_user: + "#/components/schemas/Sessions.MultiAgentSingleUserSession", + multi_agent_multi_user: + "#/components/schemas/Sessions.MultiAgentMultiUserSession", + }, + }, +} as const; + +export const Sessions_SingleAgentMultiUserSessionSchema = { + type: "object", + required: ["agent", "users"], + properties: { + agent: { + $ref: "#/components/schemas/Common.uuid", + }, + users: { + type: "array", + items: { + $ref: "#/components/schemas/Common.uuid", + }, + }, + }, + allOf: [ + { + $ref: "#/components/schemas/Sessions.Session", + }, + ], +} as const; + +export const Sessions_SingleAgentNoUserSessionSchema = { + type: "object", + required: ["agent"], + properties: { + agent: { + $ref: "#/components/schemas/Common.uuid", + }, + }, + allOf: [ + { + $ref: "#/components/schemas/Sessions.Session", + }, + ], +} as const; + +export const Sessions_SingleAgentSingleUserSessionSchema = { + type: "object", + required: ["agent", "user"], + properties: { + agent: { + $ref: "#/components/schemas/Common.uuid", + }, + user: { + $ref: "#/components/schemas/Common.uuid", + }, + }, + allOf: [ + { + $ref: "#/components/schemas/Sessions.Session", + }, + ], +} as const; + +export const Sessions_UpdateSessionRequestSchema = { + type: "object", + required: [ + "situation", + "render_templates", + "token_budget", + "context_overflow", + ], + properties: { + situation: { + type: "string", + description: + "A specific situation that sets the background for this session", + default: `{%- if agent.name -%} +You are {{agent.name}}.{{" "}} +{%- endif -%} + +{%- if agent.about -%} +About you: {{agent.name}}.{{" "}} +{%- endif -%} + +{%- if user -%} +You are talking to a user + {%- if user.name -%}{{" "}} and their name is {{user.name}} + {%- if user.about -%}. About the user: {{user.about}}.{%- else -%}.{%- endif -%} + {%- endif -%} +{%- endif -%} + +{{" + +"}} + +{%- if agent.instructions -%} +Instructions:{{" +"}} + {%- if agent.instructions is string -%} + {{agent.instructions}}{{" +"}} + {%- else -%} + {%- for instruction in agent.instructions -%} + - {{instruction}}{{" +"}} + {%- endfor -%} + {%- endif -%} + {{" +"}} +{%- endif -%} + +{%- if tools -%} +Tools:{{" +"}} + {%- for tool in tools -%} + {%- if tool.type == "function" -%} + - {{tool.function.name}} + {%- if tool.function.description -%}: {{tool.function.description}}{%- endif -%}{{" +"}} + {%- else -%} + - {{ 0/0 }} {# Error: Other tool types aren't supported yet. #} + {%- endif -%} + {%- endfor -%} +{{" + +"}} +{%- endif -%} + +{%- if docs -%} +Relevant documents:{{" +"}} + {%- for doc in docs -%} + {{doc.title}}{{" +"}} + {%- if doc.content is string -%} + {{doc.content}}{{" +"}} + {%- else -%} + {%- for snippet in doc.content -%} + {{snippet}}{{" +"}} + {%- endfor -%} + {%- endif -%} + {{"---"}} + {%- endfor -%} +{%- endif -%}`, + }, + render_templates: { + type: "boolean", + description: + "Render system and assistant message content as jinja templates", + default: true, + }, + token_budget: { + type: "integer", + format: "uint16", + nullable: true, + description: "Threshold value for the adaptive context functionality", + default: null, + }, + context_overflow: { + oneOf: [ + { + $ref: "#/components/schemas/Sessions.ContextOverflowType", + }, + ], + nullable: true, + description: "Action to start on context window overflow", + default: null, + }, + metadata: { + type: "object", + additionalProperties: {}, + }, + }, + description: "Payload for updating a session", +} as const; + +export const Tasks_CaseThenSchema = { + type: "object", + required: ["case", "then"], + properties: { + case: { + anyOf: [ + { + $ref: "#/components/schemas/Common.PyExpression", + }, + { + type: "string", + enum: ["_"], + }, + ], + description: "The condition to evaluate", + }, + then: { + anyOf: [ + { + $ref: "#/components/schemas/Tasks.EvaluateStep", + }, + { + $ref: "#/components/schemas/Tasks.ToolCallStep", + }, + { + $ref: "#/components/schemas/Tasks.PromptStep", + }, + { + $ref: "#/components/schemas/Tasks.GetStep", + }, + { + $ref: "#/components/schemas/Tasks.SetStep", + }, + { + $ref: "#/components/schemas/Tasks.LogStep", + }, + { + $ref: "#/components/schemas/Tasks.EmbedStep", + }, + { + $ref: "#/components/schemas/Tasks.SearchStep", + }, + { + $ref: "#/components/schemas/Tasks.ReturnStep", + }, + { + $ref: "#/components/schemas/Tasks.SleepStep", + }, + { + $ref: "#/components/schemas/Tasks.ErrorWorkflowStep", + }, + { + $ref: "#/components/schemas/Tasks.YieldStep", + }, + { + $ref: "#/components/schemas/Tasks.WaitForInputStep", + }, + ], + description: "The steps to run if the condition is true", + }, + }, +} as const; + +export const Tasks_CreateTaskRequestSchema = { + type: "object", + required: [ + "name", + "description", + "main", + "input_schema", + "tools", + "inherit_tools", + ], + properties: { + name: { + type: "string", + }, + description: { + type: "string", + default: "", + }, + main: { + type: "array", + items: { + anyOf: [ + { + $ref: "#/components/schemas/Tasks.EvaluateStep", + }, + { + $ref: "#/components/schemas/Tasks.ToolCallStep", + }, + { + $ref: "#/components/schemas/Tasks.PromptStep", + }, + { + $ref: "#/components/schemas/Tasks.GetStep", + }, + { + $ref: "#/components/schemas/Tasks.SetStep", + }, + { + $ref: "#/components/schemas/Tasks.LogStep", + }, + { + $ref: "#/components/schemas/Tasks.EmbedStep", + }, + { + $ref: "#/components/schemas/Tasks.SearchStep", + }, + { + $ref: "#/components/schemas/Tasks.ReturnStep", + }, + { + $ref: "#/components/schemas/Tasks.SleepStep", + }, + { + $ref: "#/components/schemas/Tasks.ErrorWorkflowStep", + }, + { + $ref: "#/components/schemas/Tasks.YieldStep", + }, + { + $ref: "#/components/schemas/Tasks.WaitForInputStep", + }, + { + $ref: "#/components/schemas/Tasks.IfElseWorkflowStep", + }, + { + $ref: "#/components/schemas/Tasks.SwitchStep", + }, + { + $ref: "#/components/schemas/Tasks.ForeachStep", + }, + { + $ref: "#/components/schemas/Tasks.ParallelStep", + }, + { + type: "object", + required: ["kind_", "over", "map"], + properties: { + kind_: { + type: "string", + enum: ["map_reduce"], + default: "map_reduce", + readOnly: true, + }, + over: { + allOf: [ + { + $ref: "#/components/schemas/Common.PyExpression", + }, + ], + description: "The variable to iterate over", + }, + map: { + anyOf: [ + { + $ref: "#/components/schemas/Tasks.EvaluateStep", + }, + { + $ref: "#/components/schemas/Tasks.ToolCallStep", + }, + { + $ref: "#/components/schemas/Tasks.PromptStep", + }, + { + $ref: "#/components/schemas/Tasks.GetStep", + }, + { + $ref: "#/components/schemas/Tasks.SetStep", + }, + { + $ref: "#/components/schemas/Tasks.LogStep", + }, + { + $ref: "#/components/schemas/Tasks.EmbedStep", + }, + { + $ref: "#/components/schemas/Tasks.SearchStep", + }, + ], + description: "The steps to run for each iteration", + }, + reduce: { + allOf: [ + { + $ref: "#/components/schemas/Common.PyExpression", + }, + ], + description: `The expression to reduce the results. +If not provided, the results are collected and returned as a list. +A special parameter named \`results\` is the accumulator and \`_\` is the current value.`, + }, + initial: { + default: [], + }, + }, + allOf: [ + { + type: "object", + required: ["kind_"], + properties: { + kind_: { + type: "string", + enum: ["map_reduce"], + description: "The kind of step", + readOnly: true, + }, + }, + discriminator: { + propertyName: "kind_", + }, + }, + ], + }, + ], + }, + description: "The entrypoint of the task.", + }, + input_schema: { + type: "object", + additionalProperties: {}, + nullable: true, + description: + "The schema for the input to the task. `null` means all inputs are valid.", + default: null, + }, + tools: { + type: "array", + items: { + $ref: "#/components/schemas/Tasks.TaskTool", + }, + description: + "Tools defined specifically for this task not included in the Agent itself.", + default: [], + }, + inherit_tools: { + type: "boolean", + description: + "Whether to inherit tools from the parent agent or not. Defaults to true.", + default: true, + }, + metadata: { + type: "object", + additionalProperties: {}, + }, + }, + additionalProperties: { + type: "array", + items: { + anyOf: [ + { + $ref: "#/components/schemas/Tasks.EvaluateStep", + }, + { + $ref: "#/components/schemas/Tasks.ToolCallStep", + }, + { + $ref: "#/components/schemas/Tasks.PromptStep", + }, + { + $ref: "#/components/schemas/Tasks.GetStep", + }, + { + $ref: "#/components/schemas/Tasks.SetStep", + }, + { + $ref: "#/components/schemas/Tasks.LogStep", + }, + { + $ref: "#/components/schemas/Tasks.EmbedStep", + }, + { + $ref: "#/components/schemas/Tasks.SearchStep", + }, + { + $ref: "#/components/schemas/Tasks.ReturnStep", + }, + { + $ref: "#/components/schemas/Tasks.SleepStep", + }, + { + $ref: "#/components/schemas/Tasks.ErrorWorkflowStep", + }, + { + $ref: "#/components/schemas/Tasks.YieldStep", + }, + { + $ref: "#/components/schemas/Tasks.WaitForInputStep", + }, + { + $ref: "#/components/schemas/Tasks.IfElseWorkflowStep", + }, + { + $ref: "#/components/schemas/Tasks.SwitchStep", + }, + { + $ref: "#/components/schemas/Tasks.ForeachStep", + }, + { + $ref: "#/components/schemas/Tasks.ParallelStep", + }, + { + type: "object", + required: ["kind_", "over", "map"], + properties: { + kind_: { + type: "string", + enum: ["map_reduce"], + default: "map_reduce", + readOnly: true, + }, + over: { + allOf: [ + { + $ref: "#/components/schemas/Common.PyExpression", + }, + ], + description: "The variable to iterate over", + }, + map: { + anyOf: [ + { + $ref: "#/components/schemas/Tasks.EvaluateStep", + }, + { + $ref: "#/components/schemas/Tasks.ToolCallStep", + }, + { + $ref: "#/components/schemas/Tasks.PromptStep", + }, + { + $ref: "#/components/schemas/Tasks.GetStep", + }, + { + $ref: "#/components/schemas/Tasks.SetStep", + }, + { + $ref: "#/components/schemas/Tasks.LogStep", + }, + { + $ref: "#/components/schemas/Tasks.EmbedStep", + }, + { + $ref: "#/components/schemas/Tasks.SearchStep", + }, + ], + description: "The steps to run for each iteration", + }, + reduce: { + allOf: [ + { + $ref: "#/components/schemas/Common.PyExpression", + }, + ], + description: `The expression to reduce the results. +If not provided, the results are collected and returned as a list. +A special parameter named \`results\` is the accumulator and \`_\` is the current value.`, + }, + initial: { + default: [], + }, + }, + allOf: [ + { + type: "object", + required: ["kind_"], + properties: { + kind_: { + type: "string", + enum: ["map_reduce"], + description: "The kind of step", + readOnly: true, + }, + }, + discriminator: { + propertyName: "kind_", + }, + }, + ], + }, + ], + }, + }, + description: "Payload for creating a task", +} as const; + +export const Tasks_EmbedStepSchema = { + type: "object", + required: ["kind_", "embed"], + properties: { + kind_: { + type: "string", + enum: ["embed"], + default: "embed", + readOnly: true, + }, + embed: { + allOf: [ + { + $ref: "#/components/schemas/Docs.EmbedQueryRequest", + }, + ], + description: "The text to embed", + }, + }, + allOf: [ + { + type: "object", + required: ["kind_"], + properties: { + kind_: { + type: "string", + enum: ["embed"], + description: "The kind of step", + readOnly: true, + }, + }, + discriminator: { + propertyName: "kind_", + mapping: {}, + }, + }, + ], +} as const; + +export const Tasks_ErrorWorkflowStepSchema = { + type: "object", + required: ["kind_", "error"], + properties: { + kind_: { + type: "string", + enum: ["error"], + default: "error", + readOnly: true, + }, + error: { + type: "string", + description: "The error message", + }, + }, + allOf: [ + { + type: "object", + required: ["kind_"], + properties: { + kind_: { + type: "string", + enum: ["error"], + description: "The kind of step", + readOnly: true, + }, + }, + discriminator: { + propertyName: "kind_", + mapping: {}, + }, + }, + ], +} as const; + +export const Tasks_EvaluateStepSchema = { + type: "object", + required: ["kind_", "evaluate"], + properties: { + kind_: { + type: "string", + enum: ["evaluate"], + default: "evaluate", + readOnly: true, + }, + evaluate: { + type: "object", + additionalProperties: { + $ref: "#/components/schemas/Common.PyExpression", + }, + description: "The expression to evaluate", + }, + }, + allOf: [ + { + type: "object", + required: ["kind_"], + properties: { + kind_: { + type: "string", + enum: ["evaluate"], + description: "The kind of step", + readOnly: true, + }, + }, + discriminator: { + propertyName: "kind_", + mapping: {}, + }, + }, + ], +} as const; + +export const Tasks_ForeachDoSchema = { + type: "object", + required: ["in", "do"], + properties: { + in: { + allOf: [ + { + $ref: "#/components/schemas/Common.PyExpression", + }, + ], + description: `The variable to iterate over. +VALIDATION: Should NOT return more than 1000 elements.`, + }, + do: { + anyOf: [ + { + $ref: "#/components/schemas/Tasks.EvaluateStep", + }, + { + $ref: "#/components/schemas/Tasks.ToolCallStep", + }, + { + $ref: "#/components/schemas/Tasks.PromptStep", + }, + { + $ref: "#/components/schemas/Tasks.GetStep", + }, + { + $ref: "#/components/schemas/Tasks.SetStep", + }, + { + $ref: "#/components/schemas/Tasks.LogStep", + }, + { + $ref: "#/components/schemas/Tasks.EmbedStep", + }, + { + $ref: "#/components/schemas/Tasks.SearchStep", + }, + ], + description: "The steps to run for each iteration", + }, + }, +} as const; + +export const Tasks_ForeachStepSchema = { + type: "object", + required: ["kind_", "foreach"], + properties: { + kind_: { + type: "string", + enum: ["foreach"], + default: "foreach", + readOnly: true, + }, + foreach: { + allOf: [ + { + $ref: "#/components/schemas/Tasks.ForeachDo", + }, + ], + description: "The steps to run for each iteration", + }, + }, + allOf: [ + { + type: "object", + required: ["kind_"], + properties: { + kind_: { + type: "string", + enum: ["foreach"], + description: "The kind of step", + readOnly: true, + }, + }, + discriminator: { + propertyName: "kind_", + mapping: {}, + }, + }, + ], +} as const; + +export const Tasks_GetStepSchema = { + type: "object", + required: ["kind_", "get"], + properties: { + kind_: { + type: "string", + enum: ["get"], + default: "get", + readOnly: true, + }, + get: { + type: "string", + description: "The key to get", + }, + }, + allOf: [ + { + type: "object", + required: ["kind_"], + properties: { + kind_: { + type: "string", + enum: ["get"], + description: "The kind of step", + readOnly: true, + }, + }, + discriminator: { + propertyName: "kind_", + mapping: {}, + }, + }, + ], +} as const; + +export const Tasks_IfElseWorkflowStepSchema = { + type: "object", + required: ["kind_", "if", "then", "else"], + properties: { + kind_: { + type: "string", + enum: ["if_else"], + default: "if_else", + readOnly: true, + }, + if: { + allOf: [ + { + $ref: "#/components/schemas/Common.PyExpression", + }, + ], + description: "The condition to evaluate", + }, + then: { + anyOf: [ + { + $ref: "#/components/schemas/Tasks.EvaluateStep", + }, + { + $ref: "#/components/schemas/Tasks.ToolCallStep", + }, + { + $ref: "#/components/schemas/Tasks.PromptStep", + }, + { + $ref: "#/components/schemas/Tasks.GetStep", + }, + { + $ref: "#/components/schemas/Tasks.SetStep", + }, + { + $ref: "#/components/schemas/Tasks.LogStep", + }, + { + $ref: "#/components/schemas/Tasks.EmbedStep", + }, + { + $ref: "#/components/schemas/Tasks.SearchStep", + }, + { + $ref: "#/components/schemas/Tasks.ReturnStep", + }, + { + $ref: "#/components/schemas/Tasks.SleepStep", + }, + { + $ref: "#/components/schemas/Tasks.ErrorWorkflowStep", + }, + { + $ref: "#/components/schemas/Tasks.YieldStep", + }, + { + $ref: "#/components/schemas/Tasks.WaitForInputStep", + }, + ], + description: "The steps to run if the condition is true", + }, + else: { + anyOf: [ + { + $ref: "#/components/schemas/Tasks.EvaluateStep", + }, + { + $ref: "#/components/schemas/Tasks.ToolCallStep", + }, + { + $ref: "#/components/schemas/Tasks.PromptStep", + }, + { + $ref: "#/components/schemas/Tasks.GetStep", + }, + { + $ref: "#/components/schemas/Tasks.SetStep", + }, + { + $ref: "#/components/schemas/Tasks.LogStep", + }, + { + $ref: "#/components/schemas/Tasks.EmbedStep", + }, + { + $ref: "#/components/schemas/Tasks.SearchStep", + }, + { + $ref: "#/components/schemas/Tasks.ReturnStep", + }, + { + $ref: "#/components/schemas/Tasks.SleepStep", + }, + { + $ref: "#/components/schemas/Tasks.ErrorWorkflowStep", + }, + { + $ref: "#/components/schemas/Tasks.YieldStep", + }, + { + $ref: "#/components/schemas/Tasks.WaitForInputStep", + }, + ], + description: "The steps to run if the condition is false", + }, + }, + allOf: [ + { + type: "object", + required: ["kind_"], + properties: { + kind_: { + type: "string", + enum: ["if_else"], + description: "The kind of step", + readOnly: true, + }, + }, + discriminator: { + propertyName: "kind_", + mapping: {}, + }, + }, + ], +} as const; + +export const Tasks_LogStepSchema = { + type: "object", + required: ["kind_", "log"], + properties: { + kind_: { + type: "string", + enum: ["log"], + default: "log", + readOnly: true, + }, + log: { + allOf: [ + { + $ref: "#/components/schemas/Common.PyExpression", + }, + ], + description: "The value to log", + }, + }, + allOf: [ + { + type: "object", + required: ["kind_"], + properties: { + kind_: { + type: "string", + enum: ["log"], + description: "The kind of step", + readOnly: true, + }, + }, + discriminator: { + propertyName: "kind_", + mapping: {}, + }, + }, + ], +} as const; + +export const Tasks_ParallelStepSchema = { + type: "object", + required: ["kind_", "parallel"], + properties: { + kind_: { + type: "string", + enum: ["parallel"], + default: "parallel", + readOnly: true, + }, + parallel: { + type: "array", + items: { + anyOf: [ + { + $ref: "#/components/schemas/Tasks.EvaluateStep", + }, + { + $ref: "#/components/schemas/Tasks.ToolCallStep", + }, + { + $ref: "#/components/schemas/Tasks.PromptStep", + }, + { + $ref: "#/components/schemas/Tasks.GetStep", + }, + { + $ref: "#/components/schemas/Tasks.SetStep", + }, + { + $ref: "#/components/schemas/Tasks.LogStep", + }, + { + $ref: "#/components/schemas/Tasks.EmbedStep", + }, + { + $ref: "#/components/schemas/Tasks.SearchStep", + }, + ], + }, + maxItems: 100, + description: + "The steps to run in parallel. Max concurrency will depend on the platform.", + }, + }, + allOf: [ + { + type: "object", + required: ["kind_"], + properties: { + kind_: { + type: "string", + enum: ["parallel"], + description: "The kind of step", + readOnly: true, + }, + }, + discriminator: { + propertyName: "kind_", + mapping: {}, + }, + }, + ], +} as const; + +export const Tasks_PatchTaskRequestSchema = { + type: "object", + properties: { + description: { + type: "string", + default: "", + }, + main: { + type: "array", + items: { + anyOf: [ + { + $ref: "#/components/schemas/Tasks.EvaluateStep", + }, + { + $ref: "#/components/schemas/Tasks.ToolCallStep", + }, + { + $ref: "#/components/schemas/Tasks.PromptStep", + }, + { + $ref: "#/components/schemas/Tasks.GetStep", + }, + { + $ref: "#/components/schemas/Tasks.SetStep", + }, + { + $ref: "#/components/schemas/Tasks.LogStep", + }, + { + $ref: "#/components/schemas/Tasks.EmbedStep", + }, + { + $ref: "#/components/schemas/Tasks.SearchStep", + }, + { + $ref: "#/components/schemas/Tasks.ReturnStep", + }, + { + $ref: "#/components/schemas/Tasks.SleepStep", + }, + { + $ref: "#/components/schemas/Tasks.ErrorWorkflowStep", + }, + { + $ref: "#/components/schemas/Tasks.YieldStep", + }, + { + $ref: "#/components/schemas/Tasks.WaitForInputStep", + }, + { + $ref: "#/components/schemas/Tasks.IfElseWorkflowStep", + }, + { + $ref: "#/components/schemas/Tasks.SwitchStep", + }, + { + $ref: "#/components/schemas/Tasks.ForeachStep", + }, + { + $ref: "#/components/schemas/Tasks.ParallelStep", + }, + { + type: "object", + required: ["over", "map"], + properties: { + over: { + allOf: [ + { + $ref: "#/components/schemas/Common.PyExpression", + }, + ], + description: "The variable to iterate over", + }, + map: { + anyOf: [ + { + $ref: "#/components/schemas/Tasks.EvaluateStep", + }, + { + $ref: "#/components/schemas/Tasks.ToolCallStep", + }, + { + $ref: "#/components/schemas/Tasks.PromptStep", + }, + { + $ref: "#/components/schemas/Tasks.GetStep", + }, + { + $ref: "#/components/schemas/Tasks.SetStep", + }, + { + $ref: "#/components/schemas/Tasks.LogStep", + }, + { + $ref: "#/components/schemas/Tasks.EmbedStep", + }, + { + $ref: "#/components/schemas/Tasks.SearchStep", + }, + ], + description: "The steps to run for each iteration", + }, + reduce: { + allOf: [ + { + $ref: "#/components/schemas/Common.PyExpression", + }, + ], + description: `The expression to reduce the results. +If not provided, the results are collected and returned as a list. +A special parameter named \`results\` is the accumulator and \`_\` is the current value.`, + }, + initial: { + default: [], + }, + }, + allOf: [ + { + type: "object", + properties: { + kind_: { + type: "string", + description: "Discriminator property for BaseWorkflowStep.", + }, + }, + discriminator: { + propertyName: "kind_", + }, + }, + ], + }, + ], + }, + description: "The entrypoint of the task.", + }, + input_schema: { + type: "object", + additionalProperties: {}, + nullable: true, + description: + "The schema for the input to the task. `null` means all inputs are valid.", + default: null, + }, + tools: { + type: "array", + items: { + $ref: "#/components/schemas/Tasks.TaskTool", + }, + description: + "Tools defined specifically for this task not included in the Agent itself.", + default: [], + }, + inherit_tools: { + type: "boolean", + description: + "Whether to inherit tools from the parent agent or not. Defaults to true.", + default: true, + }, + metadata: { + type: "object", + additionalProperties: {}, + }, + }, + additionalProperties: { + type: "array", + items: { + anyOf: [ + { + $ref: "#/components/schemas/Tasks.EvaluateStep", + }, + { + $ref: "#/components/schemas/Tasks.ToolCallStep", + }, + { + $ref: "#/components/schemas/Tasks.PromptStep", + }, + { + $ref: "#/components/schemas/Tasks.GetStep", + }, + { + $ref: "#/components/schemas/Tasks.SetStep", + }, + { + $ref: "#/components/schemas/Tasks.LogStep", + }, + { + $ref: "#/components/schemas/Tasks.EmbedStep", + }, + { + $ref: "#/components/schemas/Tasks.SearchStep", + }, + { + $ref: "#/components/schemas/Tasks.ReturnStep", + }, + { + $ref: "#/components/schemas/Tasks.SleepStep", + }, + { + $ref: "#/components/schemas/Tasks.ErrorWorkflowStep", + }, + { + $ref: "#/components/schemas/Tasks.YieldStep", + }, + { + $ref: "#/components/schemas/Tasks.WaitForInputStep", + }, + { + $ref: "#/components/schemas/Tasks.IfElseWorkflowStep", + }, + { + $ref: "#/components/schemas/Tasks.SwitchStep", + }, + { + $ref: "#/components/schemas/Tasks.ForeachStep", + }, + { + $ref: "#/components/schemas/Tasks.ParallelStep", + }, + { + type: "object", + required: ["over", "map"], + properties: { + over: { + allOf: [ + { + $ref: "#/components/schemas/Common.PyExpression", + }, + ], + description: "The variable to iterate over", + }, + map: { + anyOf: [ + { + $ref: "#/components/schemas/Tasks.EvaluateStep", + }, + { + $ref: "#/components/schemas/Tasks.ToolCallStep", + }, + { + $ref: "#/components/schemas/Tasks.PromptStep", + }, + { + $ref: "#/components/schemas/Tasks.GetStep", + }, + { + $ref: "#/components/schemas/Tasks.SetStep", + }, + { + $ref: "#/components/schemas/Tasks.LogStep", + }, + { + $ref: "#/components/schemas/Tasks.EmbedStep", + }, + { + $ref: "#/components/schemas/Tasks.SearchStep", + }, + ], + description: "The steps to run for each iteration", + }, + reduce: { + allOf: [ + { + $ref: "#/components/schemas/Common.PyExpression", + }, + ], + description: `The expression to reduce the results. +If not provided, the results are collected and returned as a list. +A special parameter named \`results\` is the accumulator and \`_\` is the current value.`, + }, + initial: { + default: [], + }, + }, + allOf: [ + { + type: "object", + properties: { + kind_: { + type: "string", + description: "Discriminator property for BaseWorkflowStep.", + }, + }, + discriminator: { + propertyName: "kind_", + }, + }, + ], + }, + ], + }, + }, + description: "Payload for patching a task", +} as const; + +export const Tasks_PromptStepSchema = { + type: "object", + required: ["kind_", "prompt"], + properties: { + kind_: { + type: "string", + enum: ["prompt"], + default: "prompt", + readOnly: true, + }, + prompt: { + anyOf: [ + { + $ref: "#/components/schemas/Common.JinjaTemplate", + }, + { + type: "array", + items: { + type: "object", + required: ["role", "content"], + properties: { + role: { + allOf: [ + { + $ref: "#/components/schemas/Entries.ChatMLRole", + }, + ], + description: "The role of the message", + }, + content: { + anyOf: [ + { + $ref: "#/components/schemas/Common.JinjaTemplate", + }, + { + type: "array", + items: { + $ref: "#/components/schemas/Common.JinjaTemplate", + }, + }, + { + type: "array", + items: { + anyOf: [ + { + type: "object", + required: ["text", "type"], + properties: { + text: { + $ref: "#/components/schemas/Common.JinjaTemplate", + }, + type: { + type: "string", + enum: ["text"], + description: "The type (fixed to 'text')", + default: "text", + }, + }, + }, + { + type: "object", + required: ["image_url", "type"], + properties: { + image_url: { + type: "object", + required: ["url", "detail"], + properties: { + url: { + type: "string", + description: + "Image URL or base64 data url (e.g. `data:image/jpeg;base64,`)", + }, + detail: { + allOf: [ + { + $ref: "#/components/schemas/Entries.ImageDetail", + }, + ], + description: "The detail level of the image", + default: "auto", + }, + }, + description: "The image URL", + }, + type: { + type: "string", + enum: ["image_url"], + description: "The type (fixed to 'image_url')", + default: "image_url", + }, + }, + }, + ], + }, + }, + ], + description: "The content parts of the message", + }, + name: { + type: "string", + description: "Name", + }, + continue: { + type: "boolean", + description: + "Whether to continue this message or return a new one", + }, + }, + }, + }, + ], + description: "The prompt to run", + }, + settings: { + allOf: [ + { + $ref: "#/components/schemas/Chat.ChatSettings", + }, + ], + description: "Settings for the prompt", + }, + }, + allOf: [ + { + type: "object", + required: ["kind_"], + properties: { + kind_: { + type: "string", + enum: ["prompt"], + description: "The kind of step", + readOnly: true, + }, + }, + discriminator: { + propertyName: "kind_", + mapping: {}, + }, + }, + ], +} as const; + +export const Tasks_ReturnStepSchema = { + type: "object", + required: ["kind_", "return"], + properties: { + kind_: { + type: "string", + enum: ["return"], + default: "return", + readOnly: true, + }, + return: { + type: "object", + additionalProperties: { + $ref: "#/components/schemas/Common.PyExpression", + }, + description: "The value to return", + }, + }, + allOf: [ + { + type: "object", + required: ["kind_"], + properties: { + kind_: { + type: "string", + enum: ["return"], + description: "The kind of step", + readOnly: true, + }, + }, + discriminator: { + propertyName: "kind_", + mapping: {}, + }, + }, + ], +} as const; + +export const Tasks_SearchStepSchema = { + type: "object", + required: ["kind_", "search"], + properties: { + kind_: { + type: "string", + enum: ["search"], + default: "search", + readOnly: true, + }, + search: { + anyOf: [ + { + $ref: "#/components/schemas/Docs.VectorDocSearchRequest", + }, + { + $ref: "#/components/schemas/Docs.TextOnlyDocSearchRequest", + }, + { + $ref: "#/components/schemas/Docs.HybridDocSearchRequest", + }, + ], + description: "The search query", + }, + }, + allOf: [ + { + type: "object", + required: ["kind_"], + properties: { + kind_: { + type: "string", + enum: ["search"], + description: "The kind of step", + readOnly: true, + }, + }, + discriminator: { + propertyName: "kind_", + mapping: {}, + }, + }, + ], +} as const; + +export const Tasks_SetKeySchema = { + type: "object", + required: ["key", "value"], + properties: { + key: { + type: "string", + description: "The key to set", + }, + value: { + allOf: [ + { + $ref: "#/components/schemas/Common.PyExpression", + }, + ], + description: "The value to set", + }, + }, +} as const; + +export const Tasks_SetStepSchema = { + type: "object", + required: ["kind_", "set"], + properties: { + kind_: { + type: "string", + enum: ["set"], + default: "set", + readOnly: true, + }, + set: { + allOf: [ + { + $ref: "#/components/schemas/Tasks.SetKey", + }, + ], + description: "The value to set", + }, + }, + allOf: [ + { + type: "object", + required: ["kind_"], + properties: { + kind_: { + type: "string", + enum: ["set"], + description: "The kind of step", + readOnly: true, + }, + }, + discriminator: { + propertyName: "kind_", + mapping: {}, + }, + }, + ], +} as const; + +export const Tasks_SleepForSchema = { + type: "object", + required: ["seconds", "minutes", "hours", "days"], + properties: { + seconds: { + type: "integer", + format: "uint16", + minimum: 0, + maximum: 60, + description: "The number of seconds to sleep for", + default: 0, + }, + minutes: { + type: "integer", + format: "uint16", + minimum: 0, + maximum: 60, + description: "The number of minutes to sleep for", + default: 0, + }, + hours: { + type: "integer", + format: "uint16", + minimum: 0, + maximum: 24, + description: "The number of hours to sleep for", + default: 0, + }, + days: { + type: "integer", + format: "uint16", + minimum: 0, + maximum: 30, + description: "The number of days to sleep for", + default: 0, + }, + }, +} as const; + +export const Tasks_SleepStepSchema = { + type: "object", + required: ["kind_", "sleep"], + properties: { + kind_: { + type: "string", + enum: ["sleep"], + default: "sleep", + readOnly: true, + }, + sleep: { + allOf: [ + { + $ref: "#/components/schemas/Tasks.SleepFor", + }, + ], + description: "The duration to sleep for (max 31 days)", + }, + }, + allOf: [ + { + type: "object", + required: ["kind_"], + properties: { + kind_: { + type: "string", + enum: ["sleep"], + description: "The kind of step", + readOnly: true, + }, + }, + discriminator: { + propertyName: "kind_", + mapping: {}, + }, + }, + ], +} as const; + +export const Tasks_SwitchStepSchema = { + type: "object", + required: ["kind_", "switch"], + properties: { + kind_: { + type: "string", + enum: ["switch"], + default: "switch", + readOnly: true, + }, + switch: { + type: "array", + items: { + $ref: "#/components/schemas/Tasks.CaseThen", + }, + minItems: 1, + description: "The cond tree", + }, + }, + allOf: [ + { + type: "object", + required: ["kind_"], + properties: { + kind_: { + type: "string", + enum: ["switch"], + description: "The kind of step", + readOnly: true, + }, + }, + discriminator: { + propertyName: "kind_", + mapping: {}, + }, + }, + ], +} as const; + +export const Tasks_TaskSchema = { + type: "object", + required: [ + "name", + "description", + "main", + "input_schema", + "tools", + "inherit_tools", + "id", + "created_at", + "updated_at", + ], + properties: { + name: { + type: "string", + }, + description: { + type: "string", + default: "", + }, + main: { + type: "array", + items: { + anyOf: [ + { + $ref: "#/components/schemas/Tasks.EvaluateStep", + }, + { + $ref: "#/components/schemas/Tasks.ToolCallStep", + }, + { + $ref: "#/components/schemas/Tasks.PromptStep", + }, + { + $ref: "#/components/schemas/Tasks.GetStep", + }, + { + $ref: "#/components/schemas/Tasks.SetStep", + }, + { + $ref: "#/components/schemas/Tasks.LogStep", + }, + { + $ref: "#/components/schemas/Tasks.EmbedStep", + }, + { + $ref: "#/components/schemas/Tasks.SearchStep", + }, + { + $ref: "#/components/schemas/Tasks.ReturnStep", + }, + { + $ref: "#/components/schemas/Tasks.SleepStep", + }, + { + $ref: "#/components/schemas/Tasks.ErrorWorkflowStep", + }, + { + $ref: "#/components/schemas/Tasks.YieldStep", + }, + { + $ref: "#/components/schemas/Tasks.WaitForInputStep", + }, + { + $ref: "#/components/schemas/Tasks.IfElseWorkflowStep", + }, + { + $ref: "#/components/schemas/Tasks.SwitchStep", + }, + { + $ref: "#/components/schemas/Tasks.ForeachStep", + }, + { + $ref: "#/components/schemas/Tasks.ParallelStep", + }, + { + type: "object", + required: ["kind_", "over", "map"], + properties: { + kind_: { + type: "string", + enum: ["map_reduce"], + default: "map_reduce", + readOnly: true, + }, + over: { + allOf: [ + { + $ref: "#/components/schemas/Common.PyExpression", + }, + ], + description: "The variable to iterate over", + }, + map: { + anyOf: [ + { + $ref: "#/components/schemas/Tasks.EvaluateStep", + }, + { + $ref: "#/components/schemas/Tasks.ToolCallStep", + }, + { + $ref: "#/components/schemas/Tasks.PromptStep", + }, + { + $ref: "#/components/schemas/Tasks.GetStep", + }, + { + $ref: "#/components/schemas/Tasks.SetStep", + }, + { + $ref: "#/components/schemas/Tasks.LogStep", + }, + { + $ref: "#/components/schemas/Tasks.EmbedStep", + }, + { + $ref: "#/components/schemas/Tasks.SearchStep", + }, + ], + description: "The steps to run for each iteration", + }, + reduce: { + allOf: [ + { + $ref: "#/components/schemas/Common.PyExpression", + }, + ], + description: `The expression to reduce the results. +If not provided, the results are collected and returned as a list. +A special parameter named \`results\` is the accumulator and \`_\` is the current value.`, + }, + initial: { + default: [], + }, + }, + allOf: [ + { + type: "object", + required: ["kind_"], + properties: { + kind_: { + type: "string", + enum: ["map_reduce"], + description: "The kind of step", + readOnly: true, + }, + }, + discriminator: { + propertyName: "kind_", + }, + }, + ], + }, + ], + }, + description: "The entrypoint of the task.", + }, + input_schema: { + type: "object", + additionalProperties: {}, + nullable: true, + description: + "The schema for the input to the task. `null` means all inputs are valid.", + default: null, + }, + tools: { + type: "array", + items: { + $ref: "#/components/schemas/Tasks.TaskTool", + }, + description: + "Tools defined specifically for this task not included in the Agent itself.", + default: [], + }, + inherit_tools: { + type: "boolean", + description: + "Whether to inherit tools from the parent agent or not. Defaults to true.", + default: true, + }, + id: { + allOf: [ + { + $ref: "#/components/schemas/Common.uuid", + }, + ], + readOnly: true, + }, + created_at: { + type: "string", + format: "date-time", + description: "When this resource was created as UTC date-time", + readOnly: true, + }, + updated_at: { + type: "string", + format: "date-time", + description: "When this resource was updated as UTC date-time", + readOnly: true, + }, + metadata: { + type: "object", + additionalProperties: {}, + }, + }, + additionalProperties: { + type: "array", + items: { + anyOf: [ + { + $ref: "#/components/schemas/Tasks.EvaluateStep", + }, + { + $ref: "#/components/schemas/Tasks.ToolCallStep", + }, + { + $ref: "#/components/schemas/Tasks.PromptStep", + }, + { + $ref: "#/components/schemas/Tasks.GetStep", + }, + { + $ref: "#/components/schemas/Tasks.SetStep", + }, + { + $ref: "#/components/schemas/Tasks.LogStep", + }, + { + $ref: "#/components/schemas/Tasks.EmbedStep", + }, + { + $ref: "#/components/schemas/Tasks.SearchStep", + }, + { + $ref: "#/components/schemas/Tasks.ReturnStep", + }, + { + $ref: "#/components/schemas/Tasks.SleepStep", + }, + { + $ref: "#/components/schemas/Tasks.ErrorWorkflowStep", + }, + { + $ref: "#/components/schemas/Tasks.YieldStep", + }, + { + $ref: "#/components/schemas/Tasks.WaitForInputStep", + }, + { + $ref: "#/components/schemas/Tasks.IfElseWorkflowStep", + }, + { + $ref: "#/components/schemas/Tasks.SwitchStep", + }, + { + $ref: "#/components/schemas/Tasks.ForeachStep", + }, + { + $ref: "#/components/schemas/Tasks.ParallelStep", + }, + { + type: "object", + required: ["kind_", "over", "map"], + properties: { + kind_: { + type: "string", + enum: ["map_reduce"], + default: "map_reduce", + readOnly: true, + }, + over: { + allOf: [ + { + $ref: "#/components/schemas/Common.PyExpression", + }, + ], + description: "The variable to iterate over", + }, + map: { + anyOf: [ + { + $ref: "#/components/schemas/Tasks.EvaluateStep", + }, + { + $ref: "#/components/schemas/Tasks.ToolCallStep", + }, + { + $ref: "#/components/schemas/Tasks.PromptStep", + }, + { + $ref: "#/components/schemas/Tasks.GetStep", + }, + { + $ref: "#/components/schemas/Tasks.SetStep", + }, + { + $ref: "#/components/schemas/Tasks.LogStep", + }, + { + $ref: "#/components/schemas/Tasks.EmbedStep", + }, + { + $ref: "#/components/schemas/Tasks.SearchStep", + }, + ], + description: "The steps to run for each iteration", + }, + reduce: { + allOf: [ + { + $ref: "#/components/schemas/Common.PyExpression", + }, + ], + description: `The expression to reduce the results. +If not provided, the results are collected and returned as a list. +A special parameter named \`results\` is the accumulator and \`_\` is the current value.`, + }, + initial: { + default: [], + }, + }, + allOf: [ + { + type: "object", + required: ["kind_"], + properties: { + kind_: { + type: "string", + enum: ["map_reduce"], + description: "The kind of step", + readOnly: true, + }, + }, + discriminator: { + propertyName: "kind_", + }, + }, + ], + }, + ], + }, + }, + description: "Object describing a Task", +} as const; + +export const Tasks_TaskToolSchema = { + type: "object", + properties: { + inherited: { + type: "boolean", + description: + "Read-only: Whether the tool was inherited or not. Only applies within tasks.", + default: false, + readOnly: true, + }, + }, + allOf: [ + { + $ref: "#/components/schemas/Tools.CreateToolRequest", + }, + ], +} as const; + +export const Tasks_ToolCallStepSchema = { + type: "object", + required: ["kind_", "tool", "arguments"], + properties: { + kind_: { + type: "string", + enum: ["tool_call"], + default: "tool_call", + readOnly: true, + }, + tool: { + allOf: [ + { + $ref: "#/components/schemas/Common.toolRef", + }, + ], + description: "The tool to run", + }, + arguments: { + anyOf: [ + { + type: "object", + additionalProperties: { + $ref: "#/components/schemas/Common.PyExpression", + }, + }, + { + type: "string", + enum: ["_"], + }, + ], + description: + "The input parameters for the tool (defaults to last step output)", + default: "_", + }, + }, + allOf: [ + { + type: "object", + required: ["kind_"], + properties: { + kind_: { + type: "string", + enum: ["tool_call"], + description: "The kind of step", + readOnly: true, + }, + }, + discriminator: { + propertyName: "kind_", + mapping: {}, + }, + }, + ], +} as const; + +export const Tasks_UpdateTaskRequestSchema = { + type: "object", + required: ["description", "main", "input_schema", "tools", "inherit_tools"], + properties: { + description: { + type: "string", + default: "", + }, + main: { + type: "array", + items: { + anyOf: [ + { + $ref: "#/components/schemas/Tasks.EvaluateStep", + }, + { + $ref: "#/components/schemas/Tasks.ToolCallStep", + }, + { + $ref: "#/components/schemas/Tasks.PromptStep", + }, + { + $ref: "#/components/schemas/Tasks.GetStep", + }, + { + $ref: "#/components/schemas/Tasks.SetStep", + }, + { + $ref: "#/components/schemas/Tasks.LogStep", + }, + { + $ref: "#/components/schemas/Tasks.EmbedStep", + }, + { + $ref: "#/components/schemas/Tasks.SearchStep", + }, + { + $ref: "#/components/schemas/Tasks.ReturnStep", + }, + { + $ref: "#/components/schemas/Tasks.SleepStep", + }, + { + $ref: "#/components/schemas/Tasks.ErrorWorkflowStep", + }, + { + $ref: "#/components/schemas/Tasks.YieldStep", + }, + { + $ref: "#/components/schemas/Tasks.WaitForInputStep", + }, + { + $ref: "#/components/schemas/Tasks.IfElseWorkflowStep", + }, + { + $ref: "#/components/schemas/Tasks.SwitchStep", + }, + { + $ref: "#/components/schemas/Tasks.ForeachStep", + }, + { + $ref: "#/components/schemas/Tasks.ParallelStep", + }, + { + type: "object", + required: ["kind_", "over", "map"], + properties: { + kind_: { + type: "string", + enum: ["map_reduce"], + default: "map_reduce", + readOnly: true, + }, + over: { + allOf: [ + { + $ref: "#/components/schemas/Common.PyExpression", + }, + ], + description: "The variable to iterate over", + }, + map: { + anyOf: [ + { + $ref: "#/components/schemas/Tasks.EvaluateStep", + }, + { + $ref: "#/components/schemas/Tasks.ToolCallStep", + }, + { + $ref: "#/components/schemas/Tasks.PromptStep", + }, + { + $ref: "#/components/schemas/Tasks.GetStep", + }, + { + $ref: "#/components/schemas/Tasks.SetStep", + }, + { + $ref: "#/components/schemas/Tasks.LogStep", + }, + { + $ref: "#/components/schemas/Tasks.EmbedStep", + }, + { + $ref: "#/components/schemas/Tasks.SearchStep", + }, + ], + description: "The steps to run for each iteration", + }, + reduce: { + allOf: [ + { + $ref: "#/components/schemas/Common.PyExpression", + }, + ], + description: `The expression to reduce the results. +If not provided, the results are collected and returned as a list. +A special parameter named \`results\` is the accumulator and \`_\` is the current value.`, + }, + initial: { + default: [], + }, + }, + allOf: [ + { + type: "object", + required: ["kind_"], + properties: { + kind_: { + type: "string", + enum: ["map_reduce"], + description: "The kind of step", + readOnly: true, + }, + }, + discriminator: { + propertyName: "kind_", + }, + }, + ], + }, + ], + }, + description: "The entrypoint of the task.", + }, + input_schema: { + type: "object", + additionalProperties: {}, + nullable: true, + description: + "The schema for the input to the task. `null` means all inputs are valid.", + default: null, + }, + tools: { + type: "array", + items: { + $ref: "#/components/schemas/Tasks.TaskTool", + }, + description: + "Tools defined specifically for this task not included in the Agent itself.", + default: [], + }, + inherit_tools: { + type: "boolean", + description: + "Whether to inherit tools from the parent agent or not. Defaults to true.", + default: true, + }, + metadata: { + type: "object", + additionalProperties: {}, + }, + }, + additionalProperties: { + type: "array", + items: { + anyOf: [ + { + $ref: "#/components/schemas/Tasks.EvaluateStep", + }, + { + $ref: "#/components/schemas/Tasks.ToolCallStep", + }, + { + $ref: "#/components/schemas/Tasks.PromptStep", + }, + { + $ref: "#/components/schemas/Tasks.GetStep", + }, + { + $ref: "#/components/schemas/Tasks.SetStep", + }, + { + $ref: "#/components/schemas/Tasks.LogStep", + }, + { + $ref: "#/components/schemas/Tasks.EmbedStep", + }, + { + $ref: "#/components/schemas/Tasks.SearchStep", + }, + { + $ref: "#/components/schemas/Tasks.ReturnStep", + }, + { + $ref: "#/components/schemas/Tasks.SleepStep", + }, + { + $ref: "#/components/schemas/Tasks.ErrorWorkflowStep", + }, + { + $ref: "#/components/schemas/Tasks.YieldStep", + }, + { + $ref: "#/components/schemas/Tasks.WaitForInputStep", + }, + { + $ref: "#/components/schemas/Tasks.IfElseWorkflowStep", + }, + { + $ref: "#/components/schemas/Tasks.SwitchStep", + }, + { + $ref: "#/components/schemas/Tasks.ForeachStep", + }, + { + $ref: "#/components/schemas/Tasks.ParallelStep", + }, + { + type: "object", + required: ["kind_", "over", "map"], + properties: { + kind_: { + type: "string", + enum: ["map_reduce"], + default: "map_reduce", + readOnly: true, + }, + over: { + allOf: [ + { + $ref: "#/components/schemas/Common.PyExpression", + }, + ], + description: "The variable to iterate over", + }, + map: { + anyOf: [ + { + $ref: "#/components/schemas/Tasks.EvaluateStep", + }, + { + $ref: "#/components/schemas/Tasks.ToolCallStep", + }, + { + $ref: "#/components/schemas/Tasks.PromptStep", + }, + { + $ref: "#/components/schemas/Tasks.GetStep", + }, + { + $ref: "#/components/schemas/Tasks.SetStep", + }, + { + $ref: "#/components/schemas/Tasks.LogStep", + }, + { + $ref: "#/components/schemas/Tasks.EmbedStep", + }, + { + $ref: "#/components/schemas/Tasks.SearchStep", + }, + ], + description: "The steps to run for each iteration", + }, + reduce: { + allOf: [ + { + $ref: "#/components/schemas/Common.PyExpression", + }, + ], + description: `The expression to reduce the results. +If not provided, the results are collected and returned as a list. +A special parameter named \`results\` is the accumulator and \`_\` is the current value.`, + }, + initial: { + default: [], + }, + }, + allOf: [ + { + type: "object", + required: ["kind_"], + properties: { + kind_: { + type: "string", + enum: ["map_reduce"], + description: "The kind of step", + readOnly: true, + }, + }, + discriminator: { + propertyName: "kind_", + }, + }, + ], + }, + ], + }, + }, + description: "Payload for updating a task", +} as const; + +export const Tasks_WaitForInputInfoSchema = { + type: "object", + required: ["info"], + properties: { + info: { + type: "object", + additionalProperties: { + $ref: "#/components/schemas/Common.PyExpression", + }, + description: "Any additional info or data", + }, + }, +} as const; + +export const Tasks_WaitForInputStepSchema = { + type: "object", + required: ["kind_", "wait_for_input"], + properties: { + kind_: { + type: "string", + enum: ["wait_for_input"], + default: "wait_for_input", + readOnly: true, + }, + wait_for_input: { + allOf: [ + { + $ref: "#/components/schemas/Tasks.WaitForInputInfo", + }, + ], + description: "Any additional info or data", + }, + }, + allOf: [ + { + type: "object", + required: ["kind_"], + properties: { + kind_: { + type: "string", + enum: ["wait_for_input"], + description: "The kind of step", + readOnly: true, + }, + }, + discriminator: { + propertyName: "kind_", + mapping: {}, + }, + }, + ], +} as const; + +export const Tasks_YieldStepSchema = { + type: "object", + required: ["kind_", "workflow", "arguments"], + properties: { + kind_: { + type: "string", + enum: ["yield"], + default: "yield", + readOnly: true, + }, + workflow: { + type: "string", + description: `The subworkflow to run. +VALIDATION: Should resolve to a defined subworkflow.`, + }, + arguments: { + anyOf: [ + { + type: "object", + additionalProperties: { + $ref: "#/components/schemas/Common.PyExpression", + }, + }, + { + type: "string", + enum: ["_"], + }, + ], + description: + "The input parameters for the subworkflow (defaults to last step output)", + default: "_", + }, + }, + allOf: [ + { + type: "object", + required: ["kind_"], + properties: { + kind_: { + type: "string", + enum: ["yield"], + description: "The kind of step", + readOnly: true, + }, + }, + discriminator: { + propertyName: "kind_", + mapping: {}, + }, + }, + ], +} as const; + +export const Tools_ChosenFunctionCallSchema = { + type: "object", + required: ["type", "function"], + properties: { + type: { + type: "string", + enum: ["function"], + }, + function: { + allOf: [ + { + $ref: "#/components/schemas/Tools.FunctionCallOption", + }, + ], + description: "The function to call", + }, + }, + allOf: [ + { + $ref: "#/components/schemas/Tools.ChosenToolCall", + }, + ], +} as const; + +export const Tools_ChosenToolCallSchema = { + type: "object", + required: ["type", "id"], + properties: { + type: { + allOf: [ + { + $ref: "#/components/schemas/Tools.ToolType", + }, + ], + description: + "Whether this tool is a `function`, `api_call`, `system` etc. (Only `function` tool supported right now)", + }, + function: { + $ref: "#/components/schemas/Tools.FunctionCallOption", + }, + integration: {}, + system: {}, + api_call: {}, + id: { + allOf: [ + { + $ref: "#/components/schemas/Common.uuid", + }, + ], + readOnly: true, + }, + }, + description: "The response tool value generated by the model", +} as const; + +export const Tools_CreateToolRequestSchema = { + type: "object", + required: ["type", "name", "background", "function"], + properties: { + type: { + allOf: [ + { + $ref: "#/components/schemas/Tools.ToolType", + }, + ], + description: + "Whether this tool is a `function`, `api_call`, `system` etc. (Only `function` tool supported right now)", + default: "function", + }, + name: { + allOf: [ + { + $ref: "#/components/schemas/Common.validPythonIdentifier", + }, + ], + description: + "Name of the tool (must be unique for this agent and a valid python identifier string )", + }, + background: { + type: "boolean", + enum: [false], + default: false, + }, + function: { + allOf: [ + { + $ref: "#/components/schemas/Tools.FunctionDef", + }, + ], + description: "The function to call", + }, + integration: {}, + system: {}, + api_call: {}, + }, + description: "Payload for creating a tool", +} as const; + +export const Tools_FunctionCallOptionSchema = { + type: "object", + required: ["name"], + properties: { + name: { + type: "string", + description: "The name of the function", + }, + }, +} as const; + +export const Tools_FunctionDefSchema = { + type: "object", + properties: { + name: { + nullable: true, + description: + "DO NOT USE: This will be overriden by the tool name. Here only for compatibility reasons.", + default: null, + }, + description: { + allOf: [ + { + $ref: "#/components/schemas/Common.identifierSafeUnicode", + }, + ], + description: "Description of the function", + }, + parameters: { + type: "object", + additionalProperties: {}, + description: "The parameters the function accepts", + }, + }, + description: "Function definition", +} as const; + +export const Tools_NamedFunctionChoiceSchema = { + type: "object", + required: ["type", "function"], + properties: { + type: { + type: "string", + enum: ["function"], + }, + function: { + allOf: [ + { + $ref: "#/components/schemas/Tools.FunctionCallOption", + }, + ], + description: "The function to call", + }, + }, + allOf: [ + { + $ref: "#/components/schemas/Tools.NamedToolChoice", + }, + ], +} as const; + +export const Tools_NamedToolChoiceSchema = { + type: "object", + required: ["type"], + properties: { + type: { + allOf: [ + { + $ref: "#/components/schemas/Tools.ToolType", + }, + ], + description: + "Whether this tool is a `function`, `api_call`, `system` etc. (Only `function` tool supported right now)", + }, + function: { + $ref: "#/components/schemas/Tools.FunctionCallOption", + }, + integration: {}, + system: {}, + api_call: {}, + }, + discriminator: { + propertyName: "type", + mapping: { + function: "#/components/schemas/Tools.NamedFunctionChoice", + }, + }, +} as const; + +export const Tools_PatchToolRequestSchema = { + type: "object", + properties: { + type: { + allOf: [ + { + $ref: "#/components/schemas/Tools.ToolType", + }, + ], + description: + "Whether this tool is a `function`, `api_call`, `system` etc. (Only `function` tool supported right now)", + default: "function", + }, + name: { + allOf: [ + { + $ref: "#/components/schemas/Common.validPythonIdentifier", + }, + ], + description: + "Name of the tool (must be unique for this agent and a valid python identifier string )", + }, + background: { + type: "boolean", + enum: [false], + default: false, + }, + function: { + allOf: [ + { + $ref: "#/components/schemas/Tools.FunctionDef", + }, + ], + description: "The function to call", + }, + integration: {}, + system: {}, + api_call: {}, + }, + description: "Payload for patching a tool", +} as const; + +export const Tools_ToolSchema = { + type: "object", + required: [ + "type", + "name", + "background", + "function", + "created_at", + "updated_at", + "id", + ], + properties: { + type: { + allOf: [ + { + $ref: "#/components/schemas/Tools.ToolType", + }, + ], + description: + "Whether this tool is a `function`, `api_call`, `system` etc. (Only `function` tool supported right now)", + default: "function", + }, + name: { + allOf: [ + { + $ref: "#/components/schemas/Common.validPythonIdentifier", + }, + ], + description: + "Name of the tool (must be unique for this agent and a valid python identifier string )", + }, + background: { + type: "boolean", + enum: [false], + default: false, + }, + function: { + allOf: [ + { + $ref: "#/components/schemas/Tools.FunctionDef", + }, + ], + description: "The function to call", + }, + integration: {}, + system: {}, + api_call: {}, + created_at: { + type: "string", + format: "date-time", + description: "When this resource was created as UTC date-time", + readOnly: true, + }, + updated_at: { + type: "string", + format: "date-time", + description: "When this resource was updated as UTC date-time", + readOnly: true, + }, + id: { + allOf: [ + { + $ref: "#/components/schemas/Common.uuid", + }, + ], + readOnly: true, + }, + }, +} as const; + +export const Tools_ToolResponseSchema = { + type: "object", + required: ["id", "output"], + properties: { + id: { + $ref: "#/components/schemas/Common.uuid", + }, + output: { + type: "object", + additionalProperties: {}, + description: "The output of the tool", + }, + }, +} as const; + +export const Tools_ToolTypeSchema = { + type: "string", + enum: ["function", "integration", "system", "api_call"], +} as const; + +export const Tools_UpdateToolRequestSchema = { + type: "object", + required: ["type", "name", "background", "function"], + properties: { + type: { + allOf: [ + { + $ref: "#/components/schemas/Tools.ToolType", + }, + ], + description: + "Whether this tool is a `function`, `api_call`, `system` etc. (Only `function` tool supported right now)", + default: "function", + }, + name: { + allOf: [ + { + $ref: "#/components/schemas/Common.validPythonIdentifier", + }, + ], + description: + "Name of the tool (must be unique for this agent and a valid python identifier string )", + }, + background: { + type: "boolean", + enum: [false], + default: false, + }, + function: { + allOf: [ + { + $ref: "#/components/schemas/Tools.FunctionDef", + }, + ], + description: "The function to call", + }, + integration: {}, + system: {}, + api_call: {}, + }, + description: "Payload for updating a tool", +} as const; + +export const Users_CreateOrUpdateUserRequestSchema = { + type: "object", + required: ["id"], + properties: { + id: { + $ref: "#/components/schemas/Common.uuid", + }, + }, + allOf: [ + { + $ref: "#/components/schemas/Users.CreateUserRequest", + }, + ], +} as const; + +export const Users_CreateUserRequestSchema = { + type: "object", + required: ["name", "about"], + properties: { + metadata: { + type: "object", + additionalProperties: {}, + }, + name: { + allOf: [ + { + $ref: "#/components/schemas/Common.identifierSafeUnicode", + }, + ], + description: "Name of the user", + default: "", + }, + about: { + type: "string", + description: "About the user", + default: "", + }, + }, + description: "Payload for creating a user (and associated documents)", +} as const; + +export const Users_PatchUserRequestSchema = { + type: "object", + properties: { + metadata: { + type: "object", + additionalProperties: {}, + }, + name: { + allOf: [ + { + $ref: "#/components/schemas/Common.identifierSafeUnicode", + }, + ], + description: "Name of the user", + default: "", + }, + about: { + type: "string", + description: "About the user", + default: "", + }, + }, + description: "Payload for patching a user", +} as const; + +export const Users_UpdateUserRequestSchema = { + type: "object", + required: ["name", "about"], + properties: { + metadata: { + type: "object", + additionalProperties: {}, + }, + name: { + allOf: [ + { + $ref: "#/components/schemas/Common.identifierSafeUnicode", + }, + ], + description: "Name of the user", + default: "", + }, + about: { + type: "string", + description: "About the user", + default: "", + }, + }, + description: "Payload for updating a user", +} as const; + +export const Users_UserSchema = { + type: "object", + required: ["id", "created_at", "updated_at", "name", "about"], + properties: { + id: { + allOf: [ + { + $ref: "#/components/schemas/Common.uuid", + }, + ], + readOnly: true, + }, + metadata: { + type: "object", + additionalProperties: {}, + }, + created_at: { + type: "string", + format: "date-time", + description: "When this resource was created as UTC date-time", + readOnly: true, + }, + updated_at: { + type: "string", + format: "date-time", + description: "When this resource was updated as UTC date-time", + readOnly: true, + }, + name: { + allOf: [ + { + $ref: "#/components/schemas/Common.identifierSafeUnicode", + }, + ], + description: "Name of the user", + default: "", + }, + about: { + type: "string", + description: "About the user", + default: "", + }, + }, +} as const; diff --git a/sdks/ts/src/api/schemas/$Agents_Agent.ts b/sdks/ts/src/api/schemas/$Agents_Agent.ts deleted file mode 100644 index 0aadbfb6d..000000000 --- a/sdks/ts/src/api/schemas/$Agents_Agent.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Agents_Agent = { - properties: { - id: { - type: "all-of", - contains: [ - { - type: "Common_uuid", - }, - ], - isReadOnly: true, - isRequired: true, - }, - metadata: { - type: "dictionary", - contains: { - properties: {}, - }, - }, - created_at: { - type: "string", - description: `When this resource was created as UTC date-time`, - isReadOnly: true, - isRequired: true, - format: "date-time", - }, - updated_at: { - type: "string", - description: `When this resource was updated as UTC date-time`, - isReadOnly: true, - isRequired: true, - format: "date-time", - }, - name: { - type: "all-of", - description: `Name of the agent`, - contains: [ - { - type: "Common_identifierSafeUnicode", - }, - ], - isRequired: true, - }, - about: { - type: "string", - description: `About the agent`, - isRequired: true, - }, - model: { - type: "string", - description: `Model name to use (gpt-4-turbo, gemini-nano etc)`, - isRequired: true, - }, - instructions: { - type: "any-of", - description: `Instructions for the agent`, - contains: [ - { - type: "string", - }, - { - type: "array", - contains: { - type: "string", - }, - }, - ], - isRequired: true, - }, - default_settings: { - type: "all-of", - description: `Default settings for all sessions created by this agent`, - contains: [ - { - type: "Chat_DefaultChatSettings", - }, - ], - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Agents_CreateAgentRequest.ts b/sdks/ts/src/api/schemas/$Agents_CreateAgentRequest.ts deleted file mode 100644 index 3271b5264..000000000 --- a/sdks/ts/src/api/schemas/$Agents_CreateAgentRequest.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Agents_CreateAgentRequest = { - description: `Payload for creating a agent (and associated documents)`, - properties: { - metadata: { - type: "dictionary", - contains: { - properties: {}, - }, - }, - name: { - type: "all-of", - description: `Name of the agent`, - contains: [ - { - type: "Common_identifierSafeUnicode", - }, - ], - isRequired: true, - }, - about: { - type: "string", - description: `About the agent`, - isRequired: true, - }, - model: { - type: "string", - description: `Model name to use (gpt-4-turbo, gemini-nano etc)`, - isRequired: true, - }, - instructions: { - type: "any-of", - description: `Instructions for the agent`, - contains: [ - { - type: "string", - }, - { - type: "array", - contains: { - type: "string", - }, - }, - ], - isRequired: true, - }, - default_settings: { - type: "all-of", - description: `Default settings for all sessions created by this agent`, - contains: [ - { - type: "Chat_DefaultChatSettings", - }, - ], - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Agents_CreateOrUpdateAgentRequest.ts b/sdks/ts/src/api/schemas/$Agents_CreateOrUpdateAgentRequest.ts deleted file mode 100644 index 3c30c3cf3..000000000 --- a/sdks/ts/src/api/schemas/$Agents_CreateOrUpdateAgentRequest.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Agents_CreateOrUpdateAgentRequest = { - type: "all-of", - contains: [ - { - type: "Agents_CreateAgentRequest", - }, - { - properties: { - id: { - type: "Common_uuid", - isRequired: true, - }, - metadata: { - type: "dictionary", - contains: { - properties: {}, - }, - }, - name: { - type: "all-of", - description: `Name of the agent`, - contains: [ - { - type: "Common_identifierSafeUnicode", - }, - ], - isRequired: true, - }, - about: { - type: "string", - description: `About the agent`, - isRequired: true, - }, - model: { - type: "string", - description: `Model name to use (gpt-4-turbo, gemini-nano etc)`, - isRequired: true, - }, - instructions: { - type: "any-of", - description: `Instructions for the agent`, - contains: [ - { - type: "string", - }, - { - type: "array", - contains: { - type: "string", - }, - }, - ], - isRequired: true, - }, - default_settings: { - type: "all-of", - description: `Default settings for all sessions created by this agent`, - contains: [ - { - type: "Chat_DefaultChatSettings", - }, - ], - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Agents_CreateOrUpdateAgentRequest_id.ts b/sdks/ts/src/api/schemas/$Agents_CreateOrUpdateAgentRequest_id.ts deleted file mode 100644 index e5db88f15..000000000 --- a/sdks/ts/src/api/schemas/$Agents_CreateOrUpdateAgentRequest_id.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Agents_CreateOrUpdateAgentRequest_id = { - type: "Common_uuid", -} as const; diff --git a/sdks/ts/src/api/schemas/$Agents_PatchAgentRequest.ts b/sdks/ts/src/api/schemas/$Agents_PatchAgentRequest.ts deleted file mode 100644 index 26a59a55f..000000000 --- a/sdks/ts/src/api/schemas/$Agents_PatchAgentRequest.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Agents_PatchAgentRequest = { - description: `Payload for patching a agent`, - properties: { - metadata: { - type: "dictionary", - contains: { - properties: {}, - }, - }, - name: { - type: "all-of", - description: `Name of the agent`, - contains: [ - { - type: "Common_identifierSafeUnicode", - }, - ], - }, - about: { - type: "string", - description: `About the agent`, - }, - model: { - type: "string", - description: `Model name to use (gpt-4-turbo, gemini-nano etc)`, - }, - instructions: { - type: "any-of", - description: `Instructions for the agent`, - contains: [ - { - type: "string", - }, - { - type: "array", - contains: { - type: "string", - }, - }, - ], - }, - default_settings: { - type: "all-of", - description: `Default settings for all sessions created by this agent`, - contains: [ - { - type: "Chat_DefaultChatSettings", - }, - ], - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Agents_UpdateAgentRequest.ts b/sdks/ts/src/api/schemas/$Agents_UpdateAgentRequest.ts deleted file mode 100644 index c94cedc6e..000000000 --- a/sdks/ts/src/api/schemas/$Agents_UpdateAgentRequest.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Agents_UpdateAgentRequest = { - description: `Payload for updating a agent`, - properties: { - metadata: { - type: "dictionary", - contains: { - properties: {}, - }, - }, - name: { - type: "all-of", - description: `Name of the agent`, - contains: [ - { - type: "Common_identifierSafeUnicode", - }, - ], - isRequired: true, - }, - about: { - type: "string", - description: `About the agent`, - isRequired: true, - }, - model: { - type: "string", - description: `Model name to use (gpt-4-turbo, gemini-nano etc)`, - isRequired: true, - }, - instructions: { - type: "any-of", - description: `Instructions for the agent`, - contains: [ - { - type: "string", - }, - { - type: "array", - contains: { - type: "string", - }, - }, - ], - isRequired: true, - }, - default_settings: { - type: "all-of", - description: `Default settings for all sessions created by this agent`, - contains: [ - { - type: "Chat_DefaultChatSettings", - }, - ], - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Chat_BaseChatOutput.ts b/sdks/ts/src/api/schemas/$Chat_BaseChatOutput.ts deleted file mode 100644 index e5c25070d..000000000 --- a/sdks/ts/src/api/schemas/$Chat_BaseChatOutput.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Chat_BaseChatOutput = { - properties: { - index: { - type: "number", - isRequired: true, - format: "uint32", - }, - finish_reason: { - type: "all-of", - description: `The reason the model stopped generating tokens`, - contains: [ - { - type: "Chat_FinishReason", - }, - ], - isRequired: true, - }, - logprobs: { - type: "all-of", - description: `The log probabilities of tokens`, - contains: [ - { - type: "Chat_LogProbResponse", - }, - ], - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Chat_BaseChatResponse.ts b/sdks/ts/src/api/schemas/$Chat_BaseChatResponse.ts deleted file mode 100644 index 1ca3e7008..000000000 --- a/sdks/ts/src/api/schemas/$Chat_BaseChatResponse.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Chat_BaseChatResponse = { - properties: { - usage: { - type: "all-of", - description: `Usage statistics for the completion request`, - contains: [ - { - type: "Chat_CompetionUsage", - }, - ], - }, - jobs: { - type: "array", - contains: { - type: "Common_uuid", - }, - isRequired: true, - }, - docs: { - type: "array", - contains: { - type: "Docs_DocReference", - }, - isRequired: true, - }, - created_at: { - type: "string", - description: `When this resource was created as UTC date-time`, - isReadOnly: true, - isRequired: true, - format: "date-time", - }, - id: { - type: "all-of", - contains: [ - { - type: "Common_uuid", - }, - ], - isReadOnly: true, - isRequired: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Chat_BaseTokenLogProb.ts b/sdks/ts/src/api/schemas/$Chat_BaseTokenLogProb.ts deleted file mode 100644 index e7af2a307..000000000 --- a/sdks/ts/src/api/schemas/$Chat_BaseTokenLogProb.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Chat_BaseTokenLogProb = { - properties: { - token: { - type: "string", - isRequired: true, - }, - logprob: { - type: "number", - description: `The log probability of the token`, - isRequired: true, - format: "float", - }, - bytes: { - type: "array", - contains: { - type: "number", - format: "uint16", - }, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Chat_ChatInput.ts b/sdks/ts/src/api/schemas/$Chat_ChatInput.ts deleted file mode 100644 index 538b90e76..000000000 --- a/sdks/ts/src/api/schemas/$Chat_ChatInput.ts +++ /dev/null @@ -1,133 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Chat_ChatInput = { - type: "all-of", - contains: [ - { - type: "Chat_ChatInputData", - }, - { - properties: { - remember: { - type: "boolean", - description: `DISABLED: Whether this interaction should form new memories or not (will be enabled in a future release)`, - isReadOnly: true, - isRequired: true, - }, - recall: { - type: "boolean", - description: `Whether previous memories and docs should be recalled or not`, - isRequired: true, - }, - save: { - type: "boolean", - description: `Whether this interaction should be stored in the session history or not`, - isRequired: true, - }, - model: { - type: "all-of", - description: `Identifier of the model to be used`, - contains: [ - { - type: "Common_identifierSafeUnicode", - }, - ], - }, - stream: { - type: "boolean", - description: `Indicates if the server should stream the response as it's generated`, - isRequired: true, - }, - stop: { - type: "array", - contains: { - type: "string", - }, - }, - seed: { - type: "number", - description: `If specified, the system will make a best effort to sample deterministically for that particular seed value`, - format: "int16", - maximum: 1000, - minimum: -1, - }, - max_tokens: { - type: "number", - description: `The maximum number of tokens to generate in the chat completion`, - format: "uint32", - minimum: 1, - }, - logit_bias: { - type: "dictionary", - contains: { - type: "Common_logit_bias", - }, - }, - response_format: { - type: "all-of", - description: `Response format (set to \`json_object\` to restrict output to JSON)`, - contains: [ - { - type: "Chat_CompletionResponseFormat", - }, - ], - }, - agent: { - type: "all-of", - description: `Agent ID of the agent to use for this interaction. (Only applicable for multi-agent sessions)`, - contains: [ - { - type: "Common_uuid", - }, - ], - }, - repetition_penalty: { - type: "number", - description: `Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.`, - format: "float", - maximum: 2, - }, - length_penalty: { - type: "number", - description: `Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize number of tokens generated.`, - format: "float", - maximum: 2, - }, - min_p: { - type: "number", - description: `Minimum probability compared to leading token to be considered`, - format: "float", - maximum: 1, - }, - frequency_penalty: { - type: "number", - description: `Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.`, - format: "float", - maximum: 2, - minimum: -2, - }, - presence_penalty: { - type: "number", - description: `Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.`, - format: "float", - maximum: 2, - minimum: -2, - }, - temperature: { - type: "number", - description: `What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.`, - format: "float", - maximum: 5, - }, - top_p: { - type: "number", - description: `Defaults to 1 An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both.`, - format: "float", - maximum: 1, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Chat_ChatInputData.ts b/sdks/ts/src/api/schemas/$Chat_ChatInputData.ts deleted file mode 100644 index 856e9891c..000000000 --- a/sdks/ts/src/api/schemas/$Chat_ChatInputData.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Chat_ChatInputData = { - properties: { - messages: { - type: "array", - contains: { - properties: { - role: { - type: "all-of", - description: `The role of the message`, - contains: [ - { - type: "Entries_ChatMLRole", - }, - ], - isRequired: true, - }, - content: { - type: "any-of", - description: `The content parts of the message`, - contains: [ - { - type: "string", - }, - { - type: "array", - contains: { - type: "string", - }, - }, - ], - isRequired: true, - }, - name: { - type: "string", - description: `Name`, - }, - continue: { - type: "boolean", - description: `Whether to continue this message or return a new one`, - }, - }, - }, - isRequired: true, - }, - tools: { - type: "array", - contains: { - type: "Tools_Tool", - }, - }, - tool_choice: { - type: "any-of", - description: `Can be one of existing tools given to the agent earlier or the ones provided in this request.`, - contains: [ - { - type: "Enum", - }, - { - type: "Tools_NamedToolChoice", - }, - ], - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Chat_ChatOutputChunk.ts b/sdks/ts/src/api/schemas/$Chat_ChatOutputChunk.ts deleted file mode 100644 index 869be9d62..000000000 --- a/sdks/ts/src/api/schemas/$Chat_ChatOutputChunk.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Chat_ChatOutputChunk = { - type: "all-of", - description: `Streaming chat completion output`, - contains: [ - { - type: "Chat_BaseChatOutput", - }, - { - properties: { - delta: { - description: `The message generated by the model`, - properties: { - role: { - type: "all-of", - description: `The role of the message`, - contains: [ - { - type: "Entries_ChatMLRole", - }, - ], - isRequired: true, - }, - content: { - type: "any-of", - description: `The content parts of the message`, - contains: [ - { - type: "string", - }, - { - type: "array", - contains: { - type: "string", - }, - }, - ], - isRequired: true, - }, - name: { - type: "string", - description: `Name`, - }, - continue: { - type: "boolean", - description: `Whether to continue this message or return a new one`, - }, - }, - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Chat_ChatSettings.ts b/sdks/ts/src/api/schemas/$Chat_ChatSettings.ts deleted file mode 100644 index 3c123c30c..000000000 --- a/sdks/ts/src/api/schemas/$Chat_ChatSettings.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Chat_ChatSettings = { - type: "all-of", - contains: [ - { - type: "Chat_DefaultChatSettings", - }, - { - properties: { - model: { - type: "all-of", - description: `Identifier of the model to be used`, - contains: [ - { - type: "Common_identifierSafeUnicode", - }, - ], - }, - stream: { - type: "boolean", - description: `Indicates if the server should stream the response as it's generated`, - isRequired: true, - }, - stop: { - type: "array", - contains: { - type: "string", - }, - }, - seed: { - type: "number", - description: `If specified, the system will make a best effort to sample deterministically for that particular seed value`, - format: "int16", - maximum: 1000, - minimum: -1, - }, - max_tokens: { - type: "number", - description: `The maximum number of tokens to generate in the chat completion`, - format: "uint32", - minimum: 1, - }, - logit_bias: { - type: "dictionary", - contains: { - type: "Common_logit_bias", - }, - }, - response_format: { - type: "all-of", - description: `Response format (set to \`json_object\` to restrict output to JSON)`, - contains: [ - { - type: "Chat_CompletionResponseFormat", - }, - ], - }, - agent: { - type: "all-of", - description: `Agent ID of the agent to use for this interaction. (Only applicable for multi-agent sessions)`, - contains: [ - { - type: "Common_uuid", - }, - ], - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Chat_ChunkChatResponse.ts b/sdks/ts/src/api/schemas/$Chat_ChunkChatResponse.ts deleted file mode 100644 index 07b83d11e..000000000 --- a/sdks/ts/src/api/schemas/$Chat_ChunkChatResponse.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Chat_ChunkChatResponse = { - type: "all-of", - contains: [ - { - type: "Chat_BaseChatResponse", - }, - { - properties: { - choices: { - type: "array", - contains: { - type: "Chat_ChatOutputChunk", - }, - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Chat_CompetionUsage.ts b/sdks/ts/src/api/schemas/$Chat_CompetionUsage.ts deleted file mode 100644 index d8f34cb14..000000000 --- a/sdks/ts/src/api/schemas/$Chat_CompetionUsage.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Chat_CompetionUsage = { - description: `Usage statistics for the completion request`, - properties: { - completion_tokens: { - type: "number", - description: `Number of tokens in the generated completion`, - isReadOnly: true, - format: "uint32", - }, - prompt_tokens: { - type: "number", - description: `Number of tokens in the prompt`, - isReadOnly: true, - format: "uint32", - }, - total_tokens: { - type: "number", - description: `Total number of tokens used in the request (prompt + completion)`, - isReadOnly: true, - format: "uint32", - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Chat_CompletionResponseFormat.ts b/sdks/ts/src/api/schemas/$Chat_CompletionResponseFormat.ts deleted file mode 100644 index 1e4dcab53..000000000 --- a/sdks/ts/src/api/schemas/$Chat_CompletionResponseFormat.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Chat_CompletionResponseFormat = { - properties: { - type: { - type: "Enum", - isRequired: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Chat_DefaultChatSettings.ts b/sdks/ts/src/api/schemas/$Chat_DefaultChatSettings.ts deleted file mode 100644 index 573bf31bd..000000000 --- a/sdks/ts/src/api/schemas/$Chat_DefaultChatSettings.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Chat_DefaultChatSettings = { - type: "all-of", - description: `Default settings for the chat session (also used by the agent)`, - contains: [ - { - type: "Chat_OpenAISettings", - }, - { - properties: { - repetition_penalty: { - type: "number", - description: `Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.`, - format: "float", - maximum: 2, - }, - length_penalty: { - type: "number", - description: `Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize number of tokens generated.`, - format: "float", - maximum: 2, - }, - min_p: { - type: "number", - description: `Minimum probability compared to leading token to be considered`, - format: "float", - maximum: 1, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Chat_FinishReason.ts b/sdks/ts/src/api/schemas/$Chat_FinishReason.ts deleted file mode 100644 index 9f4846733..000000000 --- a/sdks/ts/src/api/schemas/$Chat_FinishReason.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Chat_FinishReason = { - type: "Enum", -} as const; diff --git a/sdks/ts/src/api/schemas/$Chat_LogProbResponse.ts b/sdks/ts/src/api/schemas/$Chat_LogProbResponse.ts deleted file mode 100644 index 2f3d2c095..000000000 --- a/sdks/ts/src/api/schemas/$Chat_LogProbResponse.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Chat_LogProbResponse = { - properties: { - content: { - type: "array", - contains: { - type: "Chat_TokenLogProb", - }, - isRequired: true, - isNullable: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Chat_MessageChatResponse.ts b/sdks/ts/src/api/schemas/$Chat_MessageChatResponse.ts deleted file mode 100644 index 8b80d8698..000000000 --- a/sdks/ts/src/api/schemas/$Chat_MessageChatResponse.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Chat_MessageChatResponse = { - type: "all-of", - contains: [ - { - type: "Chat_BaseChatResponse", - }, - { - properties: { - choices: { - type: "array", - contains: { - type: "any-of", - contains: [ - { - type: "Chat_SingleChatOutput", - }, - { - type: "Chat_MultipleChatOutput", - }, - ], - }, - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Chat_MultipleChatOutput.ts b/sdks/ts/src/api/schemas/$Chat_MultipleChatOutput.ts deleted file mode 100644 index 2b54621f5..000000000 --- a/sdks/ts/src/api/schemas/$Chat_MultipleChatOutput.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Chat_MultipleChatOutput = { - type: "all-of", - description: `The output returned by the model. Note that, depending on the model provider, they might return more than one message.`, - contains: [ - { - type: "Chat_BaseChatOutput", - }, - { - properties: { - messages: { - type: "array", - contains: { - properties: { - role: { - type: "all-of", - description: `The role of the message`, - contains: [ - { - type: "Entries_ChatMLRole", - }, - ], - isRequired: true, - }, - content: { - type: "any-of", - description: `The content parts of the message`, - contains: [ - { - type: "string", - }, - { - type: "array", - contains: { - type: "string", - }, - }, - ], - isRequired: true, - }, - name: { - type: "string", - description: `Name`, - }, - continue: { - type: "boolean", - description: `Whether to continue this message or return a new one`, - }, - }, - }, - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Chat_OpenAISettings.ts b/sdks/ts/src/api/schemas/$Chat_OpenAISettings.ts deleted file mode 100644 index 61a12ed7e..000000000 --- a/sdks/ts/src/api/schemas/$Chat_OpenAISettings.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Chat_OpenAISettings = { - properties: { - frequency_penalty: { - type: "number", - description: `Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.`, - format: "float", - maximum: 2, - minimum: -2, - }, - presence_penalty: { - type: "number", - description: `Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.`, - format: "float", - maximum: 2, - minimum: -2, - }, - temperature: { - type: "number", - description: `What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.`, - format: "float", - maximum: 5, - }, - top_p: { - type: "number", - description: `Defaults to 1 An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both.`, - format: "float", - maximum: 1, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Chat_SingleChatOutput.ts b/sdks/ts/src/api/schemas/$Chat_SingleChatOutput.ts deleted file mode 100644 index e5f68cf9b..000000000 --- a/sdks/ts/src/api/schemas/$Chat_SingleChatOutput.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Chat_SingleChatOutput = { - type: "all-of", - description: `The output returned by the model. Note that, depending on the model provider, they might return more than one message.`, - contains: [ - { - type: "Chat_BaseChatOutput", - }, - { - properties: { - message: { - properties: { - role: { - type: "all-of", - description: `The role of the message`, - contains: [ - { - type: "Entries_ChatMLRole", - }, - ], - isRequired: true, - }, - content: { - type: "any-of", - description: `The content parts of the message`, - contains: [ - { - type: "string", - }, - { - type: "array", - contains: { - type: "string", - }, - }, - ], - isRequired: true, - }, - name: { - type: "string", - description: `Name`, - }, - continue: { - type: "boolean", - description: `Whether to continue this message or return a new one`, - }, - }, - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Chat_TokenLogProb.ts b/sdks/ts/src/api/schemas/$Chat_TokenLogProb.ts deleted file mode 100644 index aa4228362..000000000 --- a/sdks/ts/src/api/schemas/$Chat_TokenLogProb.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Chat_TokenLogProb = { - type: "all-of", - contains: [ - { - type: "Chat_BaseTokenLogProb", - }, - { - properties: { - top_logprobs: { - type: "array", - contains: { - type: "Chat_BaseTokenLogProb", - }, - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Common_JinjaTemplate.ts b/sdks/ts/src/api/schemas/$Common_JinjaTemplate.ts deleted file mode 100644 index 903a1579b..000000000 --- a/sdks/ts/src/api/schemas/$Common_JinjaTemplate.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Common_JinjaTemplate = { - type: "string", - description: `A valid jinja template.`, -} as const; diff --git a/sdks/ts/src/api/schemas/$Common_PaginationOptions_direction.ts b/sdks/ts/src/api/schemas/$Common_PaginationOptions_direction.ts deleted file mode 100644 index 3ed6aa848..000000000 --- a/sdks/ts/src/api/schemas/$Common_PaginationOptions_direction.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Common_PaginationOptions_direction = { - type: "Enum", -} as const; diff --git a/sdks/ts/src/api/schemas/$Common_PaginationOptions_limit.ts b/sdks/ts/src/api/schemas/$Common_PaginationOptions_limit.ts deleted file mode 100644 index 369f8a657..000000000 --- a/sdks/ts/src/api/schemas/$Common_PaginationOptions_limit.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Common_PaginationOptions_limit = { - type: "Common_limit", - description: `Limit the number of items returned`, -} as const; diff --git a/sdks/ts/src/api/schemas/$Common_PaginationOptions_metadata_filter.ts b/sdks/ts/src/api/schemas/$Common_PaginationOptions_metadata_filter.ts deleted file mode 100644 index 123192ee2..000000000 --- a/sdks/ts/src/api/schemas/$Common_PaginationOptions_metadata_filter.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Common_PaginationOptions_metadata_filter = { - type: "string", - description: `JSON string of object that should be used to filter objects by metadata`, -} as const; diff --git a/sdks/ts/src/api/schemas/$Common_PaginationOptions_offset.ts b/sdks/ts/src/api/schemas/$Common_PaginationOptions_offset.ts deleted file mode 100644 index b8935bba0..000000000 --- a/sdks/ts/src/api/schemas/$Common_PaginationOptions_offset.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Common_PaginationOptions_offset = { - type: "Common_offset", - description: `Offset the items returned`, -} as const; diff --git a/sdks/ts/src/api/schemas/$Common_PaginationOptions_sort_by.ts b/sdks/ts/src/api/schemas/$Common_PaginationOptions_sort_by.ts deleted file mode 100644 index 1e571b3a6..000000000 --- a/sdks/ts/src/api/schemas/$Common_PaginationOptions_sort_by.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Common_PaginationOptions_sort_by = { - type: "Enum", -} as const; diff --git a/sdks/ts/src/api/schemas/$Common_PyExpression.ts b/sdks/ts/src/api/schemas/$Common_PyExpression.ts deleted file mode 100644 index 399fb95b0..000000000 --- a/sdks/ts/src/api/schemas/$Common_PyExpression.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Common_PyExpression = { - type: "string", - description: `A simple python expression compatible with SimpleEval.`, -} as const; diff --git a/sdks/ts/src/api/schemas/$Common_ResourceCreatedResponse.ts b/sdks/ts/src/api/schemas/$Common_ResourceCreatedResponse.ts deleted file mode 100644 index da5fbfb95..000000000 --- a/sdks/ts/src/api/schemas/$Common_ResourceCreatedResponse.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Common_ResourceCreatedResponse = { - properties: { - id: { - type: "all-of", - description: `ID of created resource`, - contains: [ - { - type: "Common_uuid", - }, - ], - isRequired: true, - }, - created_at: { - type: "string", - description: `When this resource was created as UTC date-time`, - isReadOnly: true, - isRequired: true, - format: "date-time", - }, - jobs: { - type: "array", - contains: { - type: "Common_uuid", - }, - isRequired: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Common_ResourceDeletedResponse.ts b/sdks/ts/src/api/schemas/$Common_ResourceDeletedResponse.ts deleted file mode 100644 index 4496f8c9d..000000000 --- a/sdks/ts/src/api/schemas/$Common_ResourceDeletedResponse.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Common_ResourceDeletedResponse = { - properties: { - id: { - type: "all-of", - description: `ID of deleted resource`, - contains: [ - { - type: "Common_uuid", - }, - ], - isRequired: true, - }, - deleted_at: { - type: "string", - description: `When this resource was deleted as UTC date-time`, - isReadOnly: true, - isRequired: true, - format: "date-time", - }, - jobs: { - type: "array", - contains: { - type: "Common_uuid", - }, - isRequired: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Common_ResourceUpdatedResponse.ts b/sdks/ts/src/api/schemas/$Common_ResourceUpdatedResponse.ts deleted file mode 100644 index b021b9a7a..000000000 --- a/sdks/ts/src/api/schemas/$Common_ResourceUpdatedResponse.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Common_ResourceUpdatedResponse = { - properties: { - id: { - type: "all-of", - description: `ID of updated resource`, - contains: [ - { - type: "Common_uuid", - }, - ], - isRequired: true, - }, - updated_at: { - type: "string", - description: `When this resource was updated as UTC date-time`, - isReadOnly: true, - isRequired: true, - format: "date-time", - }, - jobs: { - type: "array", - contains: { - type: "Common_uuid", - }, - isRequired: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Common_identifierSafeUnicode.ts b/sdks/ts/src/api/schemas/$Common_identifierSafeUnicode.ts deleted file mode 100644 index 75cd72df6..000000000 --- a/sdks/ts/src/api/schemas/$Common_identifierSafeUnicode.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Common_identifierSafeUnicode = { - type: "string", - description: `For Unicode character safety - See: https://unicode.org/reports/tr31/ - See: https://www.unicode.org/reports/tr39/#Identifier_Characters`, - maxLength: 120, - pattern: - "^[\\p{L}\\p{Nl}\\p{Pattern_Syntax}\\p{Pattern_White_Space}]+[\\p{ID_Start}\\p{Mn}\\p{Mc}\\p{Nd}\\p{Pc}\\p{Pattern_Syntax}\\p{Pattern_White_Space}]*$", -} as const; diff --git a/sdks/ts/src/api/schemas/$Common_limit.ts b/sdks/ts/src/api/schemas/$Common_limit.ts deleted file mode 100644 index 444d6f7f9..000000000 --- a/sdks/ts/src/api/schemas/$Common_limit.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Common_limit = { - type: "number", - description: `Limit the number of results`, - format: "uint16", - maximum: 1000, - exclusiveMaximum: true, - minimum: 1, -} as const; diff --git a/sdks/ts/src/api/schemas/$Common_logit_bias.ts b/sdks/ts/src/api/schemas/$Common_logit_bias.ts deleted file mode 100644 index 1d509202d..000000000 --- a/sdks/ts/src/api/schemas/$Common_logit_bias.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Common_logit_bias = { - type: "number", - format: "float", - maximum: 100, - minimum: -100, -} as const; diff --git a/sdks/ts/src/api/schemas/$Common_offset.ts b/sdks/ts/src/api/schemas/$Common_offset.ts deleted file mode 100644 index 84621fd41..000000000 --- a/sdks/ts/src/api/schemas/$Common_offset.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Common_offset = { - type: "number", - description: `Offset to apply to the results`, - format: "uint32", -} as const; diff --git a/sdks/ts/src/api/schemas/$Common_toolRef.ts b/sdks/ts/src/api/schemas/$Common_toolRef.ts deleted file mode 100644 index 96102f9b0..000000000 --- a/sdks/ts/src/api/schemas/$Common_toolRef.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Common_toolRef = { - type: "string", - description: `Naming convention for tool references. Tools are resolved in order: \`step-settings\` -> \`task\` -> \`agent\``, - pattern: "^(function|integration|system|api_call)\\.(\\w+)$", -} as const; diff --git a/sdks/ts/src/api/schemas/$Common_uuid.ts b/sdks/ts/src/api/schemas/$Common_uuid.ts deleted file mode 100644 index d6439cd88..000000000 --- a/sdks/ts/src/api/schemas/$Common_uuid.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Common_uuid = { - type: "string", - format: "uuid", -} as const; diff --git a/sdks/ts/src/api/schemas/$Common_validPythonIdentifier.ts b/sdks/ts/src/api/schemas/$Common_validPythonIdentifier.ts deleted file mode 100644 index 89c378739..000000000 --- a/sdks/ts/src/api/schemas/$Common_validPythonIdentifier.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Common_validPythonIdentifier = { - type: "string", - description: `Valid python identifier names`, - maxLength: 40, - pattern: "^[^\\W0-9]\\w*$", -} as const; diff --git a/sdks/ts/src/api/schemas/$Docs_BaseDocSearchRequest.ts b/sdks/ts/src/api/schemas/$Docs_BaseDocSearchRequest.ts deleted file mode 100644 index 99188755e..000000000 --- a/sdks/ts/src/api/schemas/$Docs_BaseDocSearchRequest.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Docs_BaseDocSearchRequest = { - properties: { - limit: { - type: "number", - isRequired: true, - format: "uint16", - maximum: 100, - minimum: 1, - }, - lang: { - type: "Enum", - isRequired: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Docs_CreateDocRequest.ts b/sdks/ts/src/api/schemas/$Docs_CreateDocRequest.ts deleted file mode 100644 index 4af7128e1..000000000 --- a/sdks/ts/src/api/schemas/$Docs_CreateDocRequest.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Docs_CreateDocRequest = { - description: `Payload for creating a doc`, - properties: { - metadata: { - type: "dictionary", - contains: { - properties: {}, - }, - }, - title: { - type: "string", - description: `Title describing what this document contains`, - isRequired: true, - maxLength: 800, - }, - content: { - type: "any-of", - description: `Contents of the document`, - contains: [ - { - type: "string", - }, - { - type: "array", - contains: { - type: "string", - }, - }, - ], - isRequired: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Docs_Doc.ts b/sdks/ts/src/api/schemas/$Docs_Doc.ts deleted file mode 100644 index f77ec6d23..000000000 --- a/sdks/ts/src/api/schemas/$Docs_Doc.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Docs_Doc = { - properties: { - id: { - type: "all-of", - contains: [ - { - type: "Common_uuid", - }, - ], - isReadOnly: true, - isRequired: true, - }, - metadata: { - type: "dictionary", - contains: { - properties: {}, - }, - }, - created_at: { - type: "string", - description: `When this resource was created as UTC date-time`, - isReadOnly: true, - isRequired: true, - format: "date-time", - }, - title: { - type: "string", - description: `Title describing what this document contains`, - isRequired: true, - maxLength: 800, - }, - content: { - type: "any-of", - description: `Contents of the document`, - contains: [ - { - type: "string", - }, - { - type: "array", - contains: { - type: "string", - }, - }, - ], - isRequired: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Docs_DocOwner.ts b/sdks/ts/src/api/schemas/$Docs_DocOwner.ts deleted file mode 100644 index 25e2043e2..000000000 --- a/sdks/ts/src/api/schemas/$Docs_DocOwner.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Docs_DocOwner = { - properties: { - id: { - type: "any-of", - contains: [ - { - type: "all-of", - contains: [ - { - type: "Common_uuid", - }, - ], - isReadOnly: true, - }, - { - type: "all-of", - contains: [ - { - type: "Common_uuid", - }, - ], - isReadOnly: true, - }, - ], - isRequired: true, - }, - role: { - type: "Enum", - isRequired: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Docs_DocReference.ts b/sdks/ts/src/api/schemas/$Docs_DocReference.ts deleted file mode 100644 index e8788d4ba..000000000 --- a/sdks/ts/src/api/schemas/$Docs_DocReference.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Docs_DocReference = { - properties: { - owner: { - type: "all-of", - description: `The owner of this document.`, - contains: [ - { - type: "Docs_DocOwner", - }, - ], - isRequired: true, - }, - id: { - type: "all-of", - description: `ID of the document`, - contains: [ - { - type: "Common_uuid", - }, - ], - isReadOnly: true, - isRequired: true, - }, - title: { - type: "string", - }, - snippets: { - type: "array", - contains: { - type: "Docs_Snippet", - }, - isRequired: true, - }, - distance: { - type: "number", - isRequired: true, - isNullable: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Docs_DocSearchResponse.ts b/sdks/ts/src/api/schemas/$Docs_DocSearchResponse.ts deleted file mode 100644 index df2b37b48..000000000 --- a/sdks/ts/src/api/schemas/$Docs_DocSearchResponse.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Docs_DocSearchResponse = { - properties: { - docs: { - type: "array", - contains: { - type: "Docs_DocReference", - }, - isRequired: true, - }, - time: { - type: "number", - description: `The time taken to search in seconds`, - isRequired: true, - exclusiveMinimum: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Docs_EmbedQueryRequest.ts b/sdks/ts/src/api/schemas/$Docs_EmbedQueryRequest.ts deleted file mode 100644 index 1cf18ee0e..000000000 --- a/sdks/ts/src/api/schemas/$Docs_EmbedQueryRequest.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Docs_EmbedQueryRequest = { - properties: { - text: { - type: "any-of", - description: `Text or texts to embed`, - contains: [ - { - type: "string", - }, - { - type: "array", - contains: { - type: "string", - }, - }, - ], - isRequired: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Docs_EmbedQueryResponse.ts b/sdks/ts/src/api/schemas/$Docs_EmbedQueryResponse.ts deleted file mode 100644 index 381f37709..000000000 --- a/sdks/ts/src/api/schemas/$Docs_EmbedQueryResponse.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Docs_EmbedQueryResponse = { - properties: { - vectors: { - type: "array", - contains: { - type: "array", - contains: { - type: "number", - }, - }, - isRequired: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Docs_HybridDocSearchRequest.ts b/sdks/ts/src/api/schemas/$Docs_HybridDocSearchRequest.ts deleted file mode 100644 index 2bc5005fb..000000000 --- a/sdks/ts/src/api/schemas/$Docs_HybridDocSearchRequest.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Docs_HybridDocSearchRequest = { - type: "all-of", - contains: [ - { - type: "Docs_BaseDocSearchRequest", - }, - { - properties: { - confidence: { - type: "number", - description: `The confidence cutoff level`, - isRequired: true, - maximum: 1, - }, - alpha: { - type: "number", - description: `The weight to apply to BM25 vs Vector search results. 0 => pure BM25; 1 => pure vector;`, - isRequired: true, - maximum: 1, - }, - text: { - type: "string", - description: `Text to use in the search. In \`hybrid\` search mode, either \`text\` or both \`text\` and \`vector\` fields are required.`, - isRequired: true, - }, - vector: { - type: "array", - contains: { - type: "number", - }, - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Docs_Snippet.ts b/sdks/ts/src/api/schemas/$Docs_Snippet.ts deleted file mode 100644 index 36b6deef2..000000000 --- a/sdks/ts/src/api/schemas/$Docs_Snippet.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Docs_Snippet = { - properties: { - index: { - type: "number", - isRequired: true, - format: "uint16", - }, - content: { - type: "string", - isRequired: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Docs_TextOnlyDocSearchRequest.ts b/sdks/ts/src/api/schemas/$Docs_TextOnlyDocSearchRequest.ts deleted file mode 100644 index b9711dbc4..000000000 --- a/sdks/ts/src/api/schemas/$Docs_TextOnlyDocSearchRequest.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Docs_TextOnlyDocSearchRequest = { - type: "all-of", - contains: [ - { - type: "Docs_BaseDocSearchRequest", - }, - { - properties: { - text: { - type: "string", - description: `Text to use in the search.`, - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Docs_VectorDocSearchRequest.ts b/sdks/ts/src/api/schemas/$Docs_VectorDocSearchRequest.ts deleted file mode 100644 index af6de0b12..000000000 --- a/sdks/ts/src/api/schemas/$Docs_VectorDocSearchRequest.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Docs_VectorDocSearchRequest = { - type: "all-of", - contains: [ - { - type: "Docs_BaseDocSearchRequest", - }, - { - properties: { - confidence: { - type: "number", - description: `The confidence cutoff level`, - isRequired: true, - maximum: 1, - }, - vector: { - type: "array", - contains: { - type: "number", - }, - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Entries_BaseEntry.ts b/sdks/ts/src/api/schemas/$Entries_BaseEntry.ts deleted file mode 100644 index bcdb7122e..000000000 --- a/sdks/ts/src/api/schemas/$Entries_BaseEntry.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Entries_BaseEntry = { - properties: { - role: { - type: "Entries_ChatMLRole", - isRequired: true, - }, - name: { - type: "string", - isRequired: true, - isNullable: true, - }, - content: { - type: "any-of", - contains: [ - { - type: "Tools_Tool", - }, - { - type: "Tools_ChosenToolCall", - }, - { - type: "string", - }, - { - type: "Tools_ToolResponse", - }, - ], - isRequired: true, - }, - source: { - type: "Enum", - isRequired: true, - }, - tokenizer: { - type: "string", - isRequired: true, - }, - token_count: { - type: "number", - isRequired: true, - format: "uint16", - }, - timestamp: { - type: "number", - description: `This is the time that this event refers to.`, - isRequired: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Entries_ChatMLRole.ts b/sdks/ts/src/api/schemas/$Entries_ChatMLRole.ts deleted file mode 100644 index 98dd6ad43..000000000 --- a/sdks/ts/src/api/schemas/$Entries_ChatMLRole.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Entries_ChatMLRole = { - type: "Enum", -} as const; diff --git a/sdks/ts/src/api/schemas/$Entries_Entry.ts b/sdks/ts/src/api/schemas/$Entries_Entry.ts deleted file mode 100644 index b4b6adec5..000000000 --- a/sdks/ts/src/api/schemas/$Entries_Entry.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Entries_Entry = { - type: "all-of", - contains: [ - { - type: "Entries_BaseEntry", - }, - { - properties: { - created_at: { - type: "string", - description: `When this resource was created as UTC date-time`, - isReadOnly: true, - isRequired: true, - format: "date-time", - }, - id: { - type: "all-of", - contains: [ - { - type: "Common_uuid", - }, - ], - isReadOnly: true, - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Entries_History.ts b/sdks/ts/src/api/schemas/$Entries_History.ts deleted file mode 100644 index c75c70678..000000000 --- a/sdks/ts/src/api/schemas/$Entries_History.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Entries_History = { - properties: { - entries: { - type: "array", - contains: { - type: "Entries_Entry", - }, - isRequired: true, - }, - relations: { - type: "array", - contains: { - type: "Entries_Relation", - }, - isRequired: true, - }, - session_id: { - type: "all-of", - contains: [ - { - type: "Common_uuid", - }, - ], - isReadOnly: true, - isRequired: true, - }, - created_at: { - type: "string", - description: `When this resource was created as UTC date-time`, - isReadOnly: true, - isRequired: true, - format: "date-time", - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Entries_ImageDetail.ts b/sdks/ts/src/api/schemas/$Entries_ImageDetail.ts deleted file mode 100644 index 9d8ebe636..000000000 --- a/sdks/ts/src/api/schemas/$Entries_ImageDetail.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Entries_ImageDetail = { - type: "Enum", -} as const; diff --git a/sdks/ts/src/api/schemas/$Entries_Relation.ts b/sdks/ts/src/api/schemas/$Entries_Relation.ts deleted file mode 100644 index a04fa0fb0..000000000 --- a/sdks/ts/src/api/schemas/$Entries_Relation.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Entries_Relation = { - properties: { - head: { - type: "Common_uuid", - isRequired: true, - }, - relation: { - type: "string", - isRequired: true, - }, - tail: { - type: "Common_uuid", - isRequired: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Executions_CreateExecutionRequest.ts b/sdks/ts/src/api/schemas/$Executions_CreateExecutionRequest.ts deleted file mode 100644 index 0a3c4919f..000000000 --- a/sdks/ts/src/api/schemas/$Executions_CreateExecutionRequest.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Executions_CreateExecutionRequest = { - description: `Payload for creating an execution`, - properties: { - input: { - type: "dictionary", - contains: { - properties: {}, - }, - isRequired: true, - }, - metadata: { - type: "dictionary", - contains: { - properties: {}, - }, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Executions_Execution.ts b/sdks/ts/src/api/schemas/$Executions_Execution.ts deleted file mode 100644 index 6f92d9dce..000000000 --- a/sdks/ts/src/api/schemas/$Executions_Execution.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Executions_Execution = { - properties: { - task_id: { - type: "all-of", - description: `The ID of the task that the execution is running`, - contains: [ - { - type: "Common_uuid", - }, - ], - isReadOnly: true, - isRequired: true, - }, - status: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - input: { - type: "dictionary", - contains: { - properties: {}, - }, - isRequired: true, - }, - created_at: { - type: "string", - description: `When this resource was created as UTC date-time`, - isReadOnly: true, - isRequired: true, - format: "date-time", - }, - updated_at: { - type: "string", - description: `When this resource was updated as UTC date-time`, - isReadOnly: true, - isRequired: true, - format: "date-time", - }, - metadata: { - type: "dictionary", - contains: { - properties: {}, - }, - }, - id: { - type: "all-of", - contains: [ - { - type: "Common_uuid", - }, - ], - isReadOnly: true, - isRequired: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Executions_ResumeExecutionRequest.ts b/sdks/ts/src/api/schemas/$Executions_ResumeExecutionRequest.ts deleted file mode 100644 index ee70dcf04..000000000 --- a/sdks/ts/src/api/schemas/$Executions_ResumeExecutionRequest.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Executions_ResumeExecutionRequest = { - type: "all-of", - contains: [ - { - type: "Executions_UpdateExecutionRequest", - }, - { - properties: { - status: { - type: "Enum", - isRequired: true, - }, - input: { - type: "dictionary", - contains: { - properties: {}, - }, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Executions_StopExecutionRequest.ts b/sdks/ts/src/api/schemas/$Executions_StopExecutionRequest.ts deleted file mode 100644 index b12ddaeac..000000000 --- a/sdks/ts/src/api/schemas/$Executions_StopExecutionRequest.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Executions_StopExecutionRequest = { - type: "all-of", - contains: [ - { - type: "Executions_UpdateExecutionRequest", - }, - { - properties: { - status: { - type: "Enum", - isRequired: true, - }, - reason: { - type: "string", - description: `The reason for stopping the execution`, - isRequired: true, - isNullable: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Executions_TaskTokenResumeExecutionRequest.ts b/sdks/ts/src/api/schemas/$Executions_TaskTokenResumeExecutionRequest.ts deleted file mode 100644 index fd85a8716..000000000 --- a/sdks/ts/src/api/schemas/$Executions_TaskTokenResumeExecutionRequest.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Executions_TaskTokenResumeExecutionRequest = { - properties: { - status: { - type: "Enum", - isRequired: true, - }, - input: { - type: "dictionary", - contains: { - properties: {}, - }, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Executions_Transition.ts b/sdks/ts/src/api/schemas/$Executions_Transition.ts deleted file mode 100644 index 45731aff9..000000000 --- a/sdks/ts/src/api/schemas/$Executions_Transition.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Executions_Transition = { - properties: { - type: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - execution_id: { - type: "all-of", - contains: [ - { - type: "Common_uuid", - }, - ], - isReadOnly: true, - isRequired: true, - }, - output: { - properties: {}, - isReadOnly: true, - isRequired: true, - }, - current: { - type: "all-of", - contains: [ - { - type: "Executions_TransitionTarget", - }, - ], - isReadOnly: true, - isRequired: true, - }, - next: { - type: "all-of", - contains: [ - { - type: "Executions_TransitionTarget", - }, - ], - isReadOnly: true, - isRequired: true, - isNullable: true, - }, - id: { - type: "all-of", - contains: [ - { - type: "Common_uuid", - }, - ], - isReadOnly: true, - isRequired: true, - }, - metadata: { - type: "dictionary", - contains: { - properties: {}, - }, - }, - created_at: { - type: "string", - description: `When this resource was created as UTC date-time`, - isReadOnly: true, - isRequired: true, - format: "date-time", - }, - updated_at: { - type: "string", - description: `When this resource was updated as UTC date-time`, - isReadOnly: true, - isRequired: true, - format: "date-time", - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Executions_TransitionTarget.ts b/sdks/ts/src/api/schemas/$Executions_TransitionTarget.ts deleted file mode 100644 index 62d5b4962..000000000 --- a/sdks/ts/src/api/schemas/$Executions_TransitionTarget.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Executions_TransitionTarget = { - properties: { - workflow: { - type: "Common_identifierSafeUnicode", - isRequired: true, - }, - step: { - type: "number", - isRequired: true, - format: "uint16", - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Executions_UpdateExecutionRequest.ts b/sdks/ts/src/api/schemas/$Executions_UpdateExecutionRequest.ts deleted file mode 100644 index ae8cb9df3..000000000 --- a/sdks/ts/src/api/schemas/$Executions_UpdateExecutionRequest.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Executions_UpdateExecutionRequest = { - properties: { - status: { - type: "Enum", - isRequired: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Jobs_JobState.ts b/sdks/ts/src/api/schemas/$Jobs_JobState.ts deleted file mode 100644 index 651b0849f..000000000 --- a/sdks/ts/src/api/schemas/$Jobs_JobState.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Jobs_JobState = { - type: "Enum", -} as const; diff --git a/sdks/ts/src/api/schemas/$Jobs_JobStatus.ts b/sdks/ts/src/api/schemas/$Jobs_JobStatus.ts deleted file mode 100644 index 3fe2f032b..000000000 --- a/sdks/ts/src/api/schemas/$Jobs_JobStatus.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Jobs_JobStatus = { - properties: { - id: { - type: "all-of", - contains: [ - { - type: "Common_uuid", - }, - ], - isReadOnly: true, - isRequired: true, - }, - created_at: { - type: "string", - description: `When this resource was created as UTC date-time`, - isReadOnly: true, - isRequired: true, - format: "date-time", - }, - updated_at: { - type: "string", - description: `When this resource was updated as UTC date-time`, - isReadOnly: true, - isRequired: true, - format: "date-time", - }, - name: { - type: "all-of", - description: `Name of the job`, - contains: [ - { - type: "Common_identifierSafeUnicode", - }, - ], - isRequired: true, - }, - reason: { - type: "string", - description: `Reason for the current state of the job`, - isRequired: true, - }, - has_progress: { - type: "boolean", - description: `Whether this Job supports progress updates`, - isRequired: true, - }, - progress: { - type: "number", - description: `Progress percentage`, - isRequired: true, - format: "float", - maximum: 100, - }, - state: { - type: "all-of", - description: `Current state of the job`, - contains: [ - { - type: "Jobs_JobState", - }, - ], - isRequired: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Sessions_ContextOverflowType.ts b/sdks/ts/src/api/schemas/$Sessions_ContextOverflowType.ts deleted file mode 100644 index 1a4cd0f7d..000000000 --- a/sdks/ts/src/api/schemas/$Sessions_ContextOverflowType.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Sessions_ContextOverflowType = { - type: "Enum", -} as const; diff --git a/sdks/ts/src/api/schemas/$Sessions_CreateOrUpdateSessionRequest.ts b/sdks/ts/src/api/schemas/$Sessions_CreateOrUpdateSessionRequest.ts deleted file mode 100644 index 16720dd71..000000000 --- a/sdks/ts/src/api/schemas/$Sessions_CreateOrUpdateSessionRequest.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Sessions_CreateOrUpdateSessionRequest = { - type: "all-of", - contains: [ - { - type: "Sessions_CreateSessionRequest", - }, - { - properties: { - id: { - type: "Common_uuid", - isRequired: true, - }, - user: { - type: "all-of", - description: `User ID of user associated with this session`, - contains: [ - { - type: "Common_uuid", - }, - ], - }, - users: { - type: "array", - contains: { - type: "Common_uuid", - }, - }, - agent: { - type: "all-of", - description: `Agent ID of agent associated with this session`, - contains: [ - { - type: "Common_uuid", - }, - ], - }, - agents: { - type: "array", - contains: { - type: "Common_uuid", - }, - }, - situation: { - type: "string", - description: `A specific situation that sets the background for this session`, - isRequired: true, - }, - render_templates: { - type: "boolean", - description: `Render system and assistant message content as jinja templates`, - isRequired: true, - }, - token_budget: { - type: "number", - description: `Threshold value for the adaptive context functionality`, - isRequired: true, - isNullable: true, - format: "uint16", - }, - context_overflow: { - type: "one-of", - description: `Action to start on context window overflow`, - contains: [ - { - type: "Sessions_ContextOverflowType", - }, - ], - isRequired: true, - isNullable: true, - }, - metadata: { - type: "dictionary", - contains: { - properties: {}, - }, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Sessions_CreateOrUpdateSessionRequest_id.ts b/sdks/ts/src/api/schemas/$Sessions_CreateOrUpdateSessionRequest_id.ts deleted file mode 100644 index 56cc353a0..000000000 --- a/sdks/ts/src/api/schemas/$Sessions_CreateOrUpdateSessionRequest_id.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Sessions_CreateOrUpdateSessionRequest_id = { - type: "Common_uuid", -} as const; diff --git a/sdks/ts/src/api/schemas/$Sessions_CreateSessionRequest.ts b/sdks/ts/src/api/schemas/$Sessions_CreateSessionRequest.ts deleted file mode 100644 index 3f21c4996..000000000 --- a/sdks/ts/src/api/schemas/$Sessions_CreateSessionRequest.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Sessions_CreateSessionRequest = { - description: `Payload for creating a session`, - properties: { - user: { - type: "all-of", - description: `User ID of user associated with this session`, - contains: [ - { - type: "Common_uuid", - }, - ], - }, - users: { - type: "array", - contains: { - type: "Common_uuid", - }, - }, - agent: { - type: "all-of", - description: `Agent ID of agent associated with this session`, - contains: [ - { - type: "Common_uuid", - }, - ], - }, - agents: { - type: "array", - contains: { - type: "Common_uuid", - }, - }, - situation: { - type: "string", - description: `A specific situation that sets the background for this session`, - isRequired: true, - }, - render_templates: { - type: "boolean", - description: `Render system and assistant message content as jinja templates`, - isRequired: true, - }, - token_budget: { - type: "number", - description: `Threshold value for the adaptive context functionality`, - isRequired: true, - isNullable: true, - format: "uint16", - }, - context_overflow: { - type: "one-of", - description: `Action to start on context window overflow`, - contains: [ - { - type: "Sessions_ContextOverflowType", - }, - ], - isRequired: true, - isNullable: true, - }, - metadata: { - type: "dictionary", - contains: { - properties: {}, - }, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Sessions_MultiAgentMultiUserSession.ts b/sdks/ts/src/api/schemas/$Sessions_MultiAgentMultiUserSession.ts deleted file mode 100644 index 846bf8b92..000000000 --- a/sdks/ts/src/api/schemas/$Sessions_MultiAgentMultiUserSession.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Sessions_MultiAgentMultiUserSession = { - type: "all-of", - contains: [ - { - type: "Sessions_Session", - }, - { - properties: { - agents: { - type: "array", - contains: { - type: "Common_uuid", - }, - isRequired: true, - }, - users: { - type: "array", - contains: { - type: "Common_uuid", - }, - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Sessions_MultiAgentNoUserSession.ts b/sdks/ts/src/api/schemas/$Sessions_MultiAgentNoUserSession.ts deleted file mode 100644 index 36f2ada1d..000000000 --- a/sdks/ts/src/api/schemas/$Sessions_MultiAgentNoUserSession.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Sessions_MultiAgentNoUserSession = { - type: "all-of", - contains: [ - { - type: "Sessions_Session", - }, - { - properties: { - agents: { - type: "array", - contains: { - type: "Common_uuid", - }, - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Sessions_MultiAgentSingleUserSession.ts b/sdks/ts/src/api/schemas/$Sessions_MultiAgentSingleUserSession.ts deleted file mode 100644 index 17146caa9..000000000 --- a/sdks/ts/src/api/schemas/$Sessions_MultiAgentSingleUserSession.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Sessions_MultiAgentSingleUserSession = { - type: "all-of", - contains: [ - { - type: "Sessions_Session", - }, - { - properties: { - agents: { - type: "array", - contains: { - type: "Common_uuid", - }, - isRequired: true, - }, - user: { - type: "Common_uuid", - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Sessions_PatchSessionRequest.ts b/sdks/ts/src/api/schemas/$Sessions_PatchSessionRequest.ts deleted file mode 100644 index ec0f8ebed..000000000 --- a/sdks/ts/src/api/schemas/$Sessions_PatchSessionRequest.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Sessions_PatchSessionRequest = { - description: `Payload for patching a session`, - properties: { - situation: { - type: "string", - description: `A specific situation that sets the background for this session`, - }, - render_templates: { - type: "boolean", - description: `Render system and assistant message content as jinja templates`, - }, - token_budget: { - type: "number", - description: `Threshold value for the adaptive context functionality`, - isNullable: true, - format: "uint16", - }, - context_overflow: { - type: "one-of", - description: `Action to start on context window overflow`, - contains: [ - { - type: "Sessions_ContextOverflowType", - }, - ], - isNullable: true, - }, - metadata: { - type: "dictionary", - contains: { - properties: {}, - }, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Sessions_Session.ts b/sdks/ts/src/api/schemas/$Sessions_Session.ts deleted file mode 100644 index 27b368494..000000000 --- a/sdks/ts/src/api/schemas/$Sessions_Session.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Sessions_Session = { - properties: { - situation: { - type: "string", - description: `A specific situation that sets the background for this session`, - isRequired: true, - }, - summary: { - type: "string", - description: `Summary (null at the beginning) - generated automatically after every interaction`, - isReadOnly: true, - isRequired: true, - isNullable: true, - }, - render_templates: { - type: "boolean", - description: `Render system and assistant message content as jinja templates`, - isRequired: true, - }, - token_budget: { - type: "number", - description: `Threshold value for the adaptive context functionality`, - isRequired: true, - isNullable: true, - format: "uint16", - }, - context_overflow: { - type: "one-of", - description: `Action to start on context window overflow`, - contains: [ - { - type: "Sessions_ContextOverflowType", - }, - ], - isRequired: true, - isNullable: true, - }, - id: { - type: "all-of", - contains: [ - { - type: "Common_uuid", - }, - ], - isReadOnly: true, - isRequired: true, - }, - metadata: { - type: "dictionary", - contains: { - properties: {}, - }, - }, - created_at: { - type: "string", - description: `When this resource was created as UTC date-time`, - isReadOnly: true, - isRequired: true, - format: "date-time", - }, - updated_at: { - type: "string", - description: `When this resource was updated as UTC date-time`, - isReadOnly: true, - isRequired: true, - format: "date-time", - }, - kind: { - type: "string", - description: `Discriminator property for Session.`, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Sessions_SingleAgentMultiUserSession.ts b/sdks/ts/src/api/schemas/$Sessions_SingleAgentMultiUserSession.ts deleted file mode 100644 index 25e5a0f92..000000000 --- a/sdks/ts/src/api/schemas/$Sessions_SingleAgentMultiUserSession.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Sessions_SingleAgentMultiUserSession = { - type: "all-of", - contains: [ - { - type: "Sessions_Session", - }, - { - properties: { - agent: { - type: "Common_uuid", - isRequired: true, - }, - users: { - type: "array", - contains: { - type: "Common_uuid", - }, - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Sessions_SingleAgentNoUserSession.ts b/sdks/ts/src/api/schemas/$Sessions_SingleAgentNoUserSession.ts deleted file mode 100644 index e234326b9..000000000 --- a/sdks/ts/src/api/schemas/$Sessions_SingleAgentNoUserSession.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Sessions_SingleAgentNoUserSession = { - type: "all-of", - contains: [ - { - type: "Sessions_Session", - }, - { - properties: { - agent: { - type: "Common_uuid", - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Sessions_SingleAgentSingleUserSession.ts b/sdks/ts/src/api/schemas/$Sessions_SingleAgentSingleUserSession.ts deleted file mode 100644 index 943fd645d..000000000 --- a/sdks/ts/src/api/schemas/$Sessions_SingleAgentSingleUserSession.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Sessions_SingleAgentSingleUserSession = { - type: "all-of", - contains: [ - { - type: "Sessions_Session", - }, - { - properties: { - agent: { - type: "Common_uuid", - isRequired: true, - }, - user: { - type: "Common_uuid", - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Sessions_UpdateSessionRequest.ts b/sdks/ts/src/api/schemas/$Sessions_UpdateSessionRequest.ts deleted file mode 100644 index ceada4666..000000000 --- a/sdks/ts/src/api/schemas/$Sessions_UpdateSessionRequest.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Sessions_UpdateSessionRequest = { - description: `Payload for updating a session`, - properties: { - situation: { - type: "string", - description: `A specific situation that sets the background for this session`, - isRequired: true, - }, - render_templates: { - type: "boolean", - description: `Render system and assistant message content as jinja templates`, - isRequired: true, - }, - token_budget: { - type: "number", - description: `Threshold value for the adaptive context functionality`, - isRequired: true, - isNullable: true, - format: "uint16", - }, - context_overflow: { - type: "one-of", - description: `Action to start on context window overflow`, - contains: [ - { - type: "Sessions_ContextOverflowType", - }, - ], - isRequired: true, - isNullable: true, - }, - metadata: { - type: "dictionary", - contains: { - properties: {}, - }, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Tasks_CaseThen.ts b/sdks/ts/src/api/schemas/$Tasks_CaseThen.ts deleted file mode 100644 index 4507fa803..000000000 --- a/sdks/ts/src/api/schemas/$Tasks_CaseThen.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tasks_CaseThen = { - properties: { - case: { - type: "any-of", - description: `The condition to evaluate`, - contains: [ - { - type: "Common_PyExpression", - }, - { - type: "Enum", - }, - ], - isRequired: true, - }, - then: { - type: "any-of", - description: `The steps to run if the condition is true`, - contains: [ - { - type: "Tasks_EvaluateStep", - }, - { - type: "Tasks_ToolCallStep", - }, - { - type: "Tasks_PromptStep", - }, - { - type: "Tasks_GetStep", - }, - { - type: "Tasks_SetStep", - }, - { - type: "Tasks_LogStep", - }, - { - type: "Tasks_EmbedStep", - }, - { - type: "Tasks_SearchStep", - }, - { - type: "Tasks_ReturnStep", - }, - { - type: "Tasks_SleepStep", - }, - { - type: "Tasks_ErrorWorkflowStep", - }, - { - type: "Tasks_YieldStep", - }, - { - type: "Tasks_WaitForInputStep", - }, - ], - isRequired: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Tasks_CreateOrUpdateTaskRequest_id.ts b/sdks/ts/src/api/schemas/$Tasks_CreateOrUpdateTaskRequest_id.ts deleted file mode 100644 index 54aca71b6..000000000 --- a/sdks/ts/src/api/schemas/$Tasks_CreateOrUpdateTaskRequest_id.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tasks_CreateOrUpdateTaskRequest_id = { - type: "Common_uuid", -} as const; diff --git a/sdks/ts/src/api/schemas/$Tasks_CreateTaskRequest.ts b/sdks/ts/src/api/schemas/$Tasks_CreateTaskRequest.ts deleted file mode 100644 index 882c1cf13..000000000 --- a/sdks/ts/src/api/schemas/$Tasks_CreateTaskRequest.ts +++ /dev/null @@ -1,144 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tasks_CreateTaskRequest = { - type: "dictionary", - contains: { - type: "array", - contains: { - type: "any-of", - contains: [ - { - type: "Tasks_EvaluateStep", - }, - { - type: "Tasks_ToolCallStep", - }, - { - type: "Tasks_PromptStep", - }, - { - type: "Tasks_GetStep", - }, - { - type: "Tasks_SetStep", - }, - { - type: "Tasks_LogStep", - }, - { - type: "Tasks_EmbedStep", - }, - { - type: "Tasks_SearchStep", - }, - { - type: "Tasks_ReturnStep", - }, - { - type: "Tasks_SleepStep", - }, - { - type: "Tasks_ErrorWorkflowStep", - }, - { - type: "Tasks_YieldStep", - }, - { - type: "Tasks_WaitForInputStep", - }, - { - type: "Tasks_IfElseWorkflowStep", - }, - { - type: "Tasks_SwitchStep", - }, - { - type: "Tasks_ForeachStep", - }, - { - type: "Tasks_ParallelStep", - }, - { - type: "all-of", - contains: [ - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - }, - }, - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - over: { - type: "all-of", - description: `The variable to iterate over`, - contains: [ - { - type: "Common_PyExpression", - }, - ], - isRequired: true, - }, - map: { - type: "any-of", - description: `The steps to run for each iteration`, - contains: [ - { - type: "Tasks_EvaluateStep", - }, - { - type: "Tasks_ToolCallStep", - }, - { - type: "Tasks_PromptStep", - }, - { - type: "Tasks_GetStep", - }, - { - type: "Tasks_SetStep", - }, - { - type: "Tasks_LogStep", - }, - { - type: "Tasks_EmbedStep", - }, - { - type: "Tasks_SearchStep", - }, - ], - isRequired: true, - }, - reduce: { - type: "all-of", - description: `The expression to reduce the results. - If not provided, the results are collected and returned as a list. - A special parameter named \`results\` is the accumulator and \`_\` is the current value.`, - contains: [ - { - type: "Common_PyExpression", - }, - ], - }, - initial: { - properties: {}, - }, - }, - }, - ], - }, - ], - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Tasks_EmbedStep.ts b/sdks/ts/src/api/schemas/$Tasks_EmbedStep.ts deleted file mode 100644 index 007215dec..000000000 --- a/sdks/ts/src/api/schemas/$Tasks_EmbedStep.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tasks_EmbedStep = { - type: "all-of", - contains: [ - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - }, - }, - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - embed: { - type: "all-of", - description: `The text to embed`, - contains: [ - { - type: "Docs_EmbedQueryRequest", - }, - ], - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Tasks_ErrorWorkflowStep.ts b/sdks/ts/src/api/schemas/$Tasks_ErrorWorkflowStep.ts deleted file mode 100644 index 371a8952a..000000000 --- a/sdks/ts/src/api/schemas/$Tasks_ErrorWorkflowStep.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tasks_ErrorWorkflowStep = { - type: "all-of", - contains: [ - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - }, - }, - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - error: { - type: "string", - description: `The error message`, - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Tasks_EvaluateStep.ts b/sdks/ts/src/api/schemas/$Tasks_EvaluateStep.ts deleted file mode 100644 index 1ba2687fe..000000000 --- a/sdks/ts/src/api/schemas/$Tasks_EvaluateStep.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tasks_EvaluateStep = { - type: "all-of", - contains: [ - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - }, - }, - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - evaluate: { - type: "dictionary", - contains: { - type: "Common_PyExpression", - }, - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Tasks_ForeachDo.ts b/sdks/ts/src/api/schemas/$Tasks_ForeachDo.ts deleted file mode 100644 index 920c95f63..000000000 --- a/sdks/ts/src/api/schemas/$Tasks_ForeachDo.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tasks_ForeachDo = { - properties: { - in: { - type: "all-of", - description: `The variable to iterate over. - VALIDATION: Should NOT return more than 1000 elements.`, - contains: [ - { - type: "Common_PyExpression", - }, - ], - isRequired: true, - }, - do: { - type: "any-of", - description: `The steps to run for each iteration`, - contains: [ - { - type: "Tasks_EvaluateStep", - }, - { - type: "Tasks_ToolCallStep", - }, - { - type: "Tasks_PromptStep", - }, - { - type: "Tasks_GetStep", - }, - { - type: "Tasks_SetStep", - }, - { - type: "Tasks_LogStep", - }, - { - type: "Tasks_EmbedStep", - }, - { - type: "Tasks_SearchStep", - }, - ], - isRequired: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Tasks_ForeachStep.ts b/sdks/ts/src/api/schemas/$Tasks_ForeachStep.ts deleted file mode 100644 index d458e4bd5..000000000 --- a/sdks/ts/src/api/schemas/$Tasks_ForeachStep.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tasks_ForeachStep = { - type: "all-of", - contains: [ - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - }, - }, - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - foreach: { - type: "all-of", - description: `The steps to run for each iteration`, - contains: [ - { - type: "Tasks_ForeachDo", - }, - ], - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Tasks_GetStep.ts b/sdks/ts/src/api/schemas/$Tasks_GetStep.ts deleted file mode 100644 index d09852322..000000000 --- a/sdks/ts/src/api/schemas/$Tasks_GetStep.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tasks_GetStep = { - type: "all-of", - contains: [ - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - }, - }, - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - get: { - type: "string", - description: `The key to get`, - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Tasks_IfElseWorkflowStep.ts b/sdks/ts/src/api/schemas/$Tasks_IfElseWorkflowStep.ts deleted file mode 100644 index 06fa47e33..000000000 --- a/sdks/ts/src/api/schemas/$Tasks_IfElseWorkflowStep.ts +++ /dev/null @@ -1,129 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tasks_IfElseWorkflowStep = { - type: "all-of", - contains: [ - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - }, - }, - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - if: { - type: "all-of", - description: `The condition to evaluate`, - contains: [ - { - type: "Common_PyExpression", - }, - ], - isRequired: true, - }, - then: { - type: "any-of", - description: `The steps to run if the condition is true`, - contains: [ - { - type: "Tasks_EvaluateStep", - }, - { - type: "Tasks_ToolCallStep", - }, - { - type: "Tasks_PromptStep", - }, - { - type: "Tasks_GetStep", - }, - { - type: "Tasks_SetStep", - }, - { - type: "Tasks_LogStep", - }, - { - type: "Tasks_EmbedStep", - }, - { - type: "Tasks_SearchStep", - }, - { - type: "Tasks_ReturnStep", - }, - { - type: "Tasks_SleepStep", - }, - { - type: "Tasks_ErrorWorkflowStep", - }, - { - type: "Tasks_YieldStep", - }, - { - type: "Tasks_WaitForInputStep", - }, - ], - isRequired: true, - }, - else: { - type: "any-of", - description: `The steps to run if the condition is false`, - contains: [ - { - type: "Tasks_EvaluateStep", - }, - { - type: "Tasks_ToolCallStep", - }, - { - type: "Tasks_PromptStep", - }, - { - type: "Tasks_GetStep", - }, - { - type: "Tasks_SetStep", - }, - { - type: "Tasks_LogStep", - }, - { - type: "Tasks_EmbedStep", - }, - { - type: "Tasks_SearchStep", - }, - { - type: "Tasks_ReturnStep", - }, - { - type: "Tasks_SleepStep", - }, - { - type: "Tasks_ErrorWorkflowStep", - }, - { - type: "Tasks_YieldStep", - }, - { - type: "Tasks_WaitForInputStep", - }, - ], - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Tasks_LogStep.ts b/sdks/ts/src/api/schemas/$Tasks_LogStep.ts deleted file mode 100644 index 0ed1b16df..000000000 --- a/sdks/ts/src/api/schemas/$Tasks_LogStep.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tasks_LogStep = { - type: "all-of", - contains: [ - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - }, - }, - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - log: { - type: "all-of", - description: `The value to log`, - contains: [ - { - type: "Common_PyExpression", - }, - ], - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Tasks_ParallelStep.ts b/sdks/ts/src/api/schemas/$Tasks_ParallelStep.ts deleted file mode 100644 index fd6fab551..000000000 --- a/sdks/ts/src/api/schemas/$Tasks_ParallelStep.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tasks_ParallelStep = { - type: "all-of", - contains: [ - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - }, - }, - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - parallel: { - type: "array", - contains: { - type: "any-of", - contains: [ - { - type: "Tasks_EvaluateStep", - }, - { - type: "Tasks_ToolCallStep", - }, - { - type: "Tasks_PromptStep", - }, - { - type: "Tasks_GetStep", - }, - { - type: "Tasks_SetStep", - }, - { - type: "Tasks_LogStep", - }, - { - type: "Tasks_EmbedStep", - }, - { - type: "Tasks_SearchStep", - }, - ], - }, - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Tasks_PatchTaskRequest.ts b/sdks/ts/src/api/schemas/$Tasks_PatchTaskRequest.ts deleted file mode 100644 index 45ad2927f..000000000 --- a/sdks/ts/src/api/schemas/$Tasks_PatchTaskRequest.ts +++ /dev/null @@ -1,138 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tasks_PatchTaskRequest = { - type: "dictionary", - contains: { - type: "array", - contains: { - type: "any-of", - contains: [ - { - type: "Tasks_EvaluateStep", - }, - { - type: "Tasks_ToolCallStep", - }, - { - type: "Tasks_PromptStep", - }, - { - type: "Tasks_GetStep", - }, - { - type: "Tasks_SetStep", - }, - { - type: "Tasks_LogStep", - }, - { - type: "Tasks_EmbedStep", - }, - { - type: "Tasks_SearchStep", - }, - { - type: "Tasks_ReturnStep", - }, - { - type: "Tasks_SleepStep", - }, - { - type: "Tasks_ErrorWorkflowStep", - }, - { - type: "Tasks_YieldStep", - }, - { - type: "Tasks_WaitForInputStep", - }, - { - type: "Tasks_IfElseWorkflowStep", - }, - { - type: "Tasks_SwitchStep", - }, - { - type: "Tasks_ForeachStep", - }, - { - type: "Tasks_ParallelStep", - }, - { - type: "all-of", - contains: [ - { - properties: { - kind_: { - type: "string", - description: `Discriminator property for BaseWorkflowStep.`, - }, - }, - }, - { - properties: { - over: { - type: "all-of", - description: `The variable to iterate over`, - contains: [ - { - type: "Common_PyExpression", - }, - ], - isRequired: true, - }, - map: { - type: "any-of", - description: `The steps to run for each iteration`, - contains: [ - { - type: "Tasks_EvaluateStep", - }, - { - type: "Tasks_ToolCallStep", - }, - { - type: "Tasks_PromptStep", - }, - { - type: "Tasks_GetStep", - }, - { - type: "Tasks_SetStep", - }, - { - type: "Tasks_LogStep", - }, - { - type: "Tasks_EmbedStep", - }, - { - type: "Tasks_SearchStep", - }, - ], - isRequired: true, - }, - reduce: { - type: "all-of", - description: `The expression to reduce the results. - If not provided, the results are collected and returned as a list. - A special parameter named \`results\` is the accumulator and \`_\` is the current value.`, - contains: [ - { - type: "Common_PyExpression", - }, - ], - }, - initial: { - properties: {}, - }, - }, - }, - ], - }, - ], - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Tasks_PromptStep.ts b/sdks/ts/src/api/schemas/$Tasks_PromptStep.ts deleted file mode 100644 index 2e133936f..000000000 --- a/sdks/ts/src/api/schemas/$Tasks_PromptStep.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tasks_PromptStep = { - type: "all-of", - contains: [ - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - }, - }, - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - prompt: { - type: "any-of", - description: `The prompt to run`, - contains: [ - { - type: "Common_JinjaTemplate", - }, - ], - isRequired: true, - }, - settings: { - type: "all-of", - description: `Settings for the prompt`, - contains: [ - { - type: "Chat_ChatSettings", - }, - ], - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Tasks_ReturnStep.ts b/sdks/ts/src/api/schemas/$Tasks_ReturnStep.ts deleted file mode 100644 index ae2b95deb..000000000 --- a/sdks/ts/src/api/schemas/$Tasks_ReturnStep.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tasks_ReturnStep = { - type: "all-of", - contains: [ - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - }, - }, - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - return: { - type: "dictionary", - contains: { - type: "Common_PyExpression", - }, - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Tasks_SearchStep.ts b/sdks/ts/src/api/schemas/$Tasks_SearchStep.ts deleted file mode 100644 index 6adbd50d8..000000000 --- a/sdks/ts/src/api/schemas/$Tasks_SearchStep.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tasks_SearchStep = { - type: "all-of", - contains: [ - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - }, - }, - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - search: { - type: "any-of", - description: `The search query`, - contains: [ - { - type: "Docs_VectorDocSearchRequest", - }, - { - type: "Docs_TextOnlyDocSearchRequest", - }, - { - type: "Docs_HybridDocSearchRequest", - }, - ], - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Tasks_SetKey.ts b/sdks/ts/src/api/schemas/$Tasks_SetKey.ts deleted file mode 100644 index c93f367d1..000000000 --- a/sdks/ts/src/api/schemas/$Tasks_SetKey.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tasks_SetKey = { - properties: { - key: { - type: "string", - description: `The key to set`, - isRequired: true, - }, - value: { - type: "all-of", - description: `The value to set`, - contains: [ - { - type: "Common_PyExpression", - }, - ], - isRequired: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Tasks_SetStep.ts b/sdks/ts/src/api/schemas/$Tasks_SetStep.ts deleted file mode 100644 index 579d25a13..000000000 --- a/sdks/ts/src/api/schemas/$Tasks_SetStep.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tasks_SetStep = { - type: "all-of", - contains: [ - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - }, - }, - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - set: { - type: "all-of", - description: `The value to set`, - contains: [ - { - type: "Tasks_SetKey", - }, - ], - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Tasks_SleepFor.ts b/sdks/ts/src/api/schemas/$Tasks_SleepFor.ts deleted file mode 100644 index 025d83c26..000000000 --- a/sdks/ts/src/api/schemas/$Tasks_SleepFor.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tasks_SleepFor = { - properties: { - seconds: { - type: "number", - description: `The number of seconds to sleep for`, - isRequired: true, - format: "uint16", - maximum: 60, - }, - minutes: { - type: "number", - description: `The number of minutes to sleep for`, - isRequired: true, - format: "uint16", - maximum: 60, - }, - hours: { - type: "number", - description: `The number of hours to sleep for`, - isRequired: true, - format: "uint16", - maximum: 24, - }, - days: { - type: "number", - description: `The number of days to sleep for`, - isRequired: true, - format: "uint16", - maximum: 30, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Tasks_SleepStep.ts b/sdks/ts/src/api/schemas/$Tasks_SleepStep.ts deleted file mode 100644 index 2b69dcf92..000000000 --- a/sdks/ts/src/api/schemas/$Tasks_SleepStep.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tasks_SleepStep = { - type: "all-of", - contains: [ - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - }, - }, - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - sleep: { - type: "all-of", - description: `The duration to sleep for (max 31 days)`, - contains: [ - { - type: "Tasks_SleepFor", - }, - ], - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Tasks_SwitchStep.ts b/sdks/ts/src/api/schemas/$Tasks_SwitchStep.ts deleted file mode 100644 index 31926aacb..000000000 --- a/sdks/ts/src/api/schemas/$Tasks_SwitchStep.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tasks_SwitchStep = { - type: "all-of", - contains: [ - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - }, - }, - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - switch: { - type: "array", - contains: { - type: "Tasks_CaseThen", - }, - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Tasks_Task.ts b/sdks/ts/src/api/schemas/$Tasks_Task.ts deleted file mode 100644 index c89bade35..000000000 --- a/sdks/ts/src/api/schemas/$Tasks_Task.ts +++ /dev/null @@ -1,144 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tasks_Task = { - type: "dictionary", - contains: { - type: "array", - contains: { - type: "any-of", - contains: [ - { - type: "Tasks_EvaluateStep", - }, - { - type: "Tasks_ToolCallStep", - }, - { - type: "Tasks_PromptStep", - }, - { - type: "Tasks_GetStep", - }, - { - type: "Tasks_SetStep", - }, - { - type: "Tasks_LogStep", - }, - { - type: "Tasks_EmbedStep", - }, - { - type: "Tasks_SearchStep", - }, - { - type: "Tasks_ReturnStep", - }, - { - type: "Tasks_SleepStep", - }, - { - type: "Tasks_ErrorWorkflowStep", - }, - { - type: "Tasks_YieldStep", - }, - { - type: "Tasks_WaitForInputStep", - }, - { - type: "Tasks_IfElseWorkflowStep", - }, - { - type: "Tasks_SwitchStep", - }, - { - type: "Tasks_ForeachStep", - }, - { - type: "Tasks_ParallelStep", - }, - { - type: "all-of", - contains: [ - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - }, - }, - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - over: { - type: "all-of", - description: `The variable to iterate over`, - contains: [ - { - type: "Common_PyExpression", - }, - ], - isRequired: true, - }, - map: { - type: "any-of", - description: `The steps to run for each iteration`, - contains: [ - { - type: "Tasks_EvaluateStep", - }, - { - type: "Tasks_ToolCallStep", - }, - { - type: "Tasks_PromptStep", - }, - { - type: "Tasks_GetStep", - }, - { - type: "Tasks_SetStep", - }, - { - type: "Tasks_LogStep", - }, - { - type: "Tasks_EmbedStep", - }, - { - type: "Tasks_SearchStep", - }, - ], - isRequired: true, - }, - reduce: { - type: "all-of", - description: `The expression to reduce the results. - If not provided, the results are collected and returned as a list. - A special parameter named \`results\` is the accumulator and \`_\` is the current value.`, - contains: [ - { - type: "Common_PyExpression", - }, - ], - }, - initial: { - properties: {}, - }, - }, - }, - ], - }, - ], - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Tasks_TaskTool.ts b/sdks/ts/src/api/schemas/$Tasks_TaskTool.ts deleted file mode 100644 index f329deb7c..000000000 --- a/sdks/ts/src/api/schemas/$Tasks_TaskTool.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tasks_TaskTool = { - type: "all-of", - contains: [ - { - type: "Tools_CreateToolRequest", - }, - { - properties: { - inherited: { - type: "boolean", - description: `Read-only: Whether the tool was inherited or not. Only applies within tasks.`, - isReadOnly: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Tasks_ToolCallStep.ts b/sdks/ts/src/api/schemas/$Tasks_ToolCallStep.ts deleted file mode 100644 index 9be4582a1..000000000 --- a/sdks/ts/src/api/schemas/$Tasks_ToolCallStep.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tasks_ToolCallStep = { - type: "all-of", - contains: [ - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - }, - }, - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - tool: { - type: "all-of", - description: `The tool to run`, - contains: [ - { - type: "Common_toolRef", - }, - ], - isRequired: true, - }, - arguments: { - type: "any-of", - description: `The input parameters for the tool (defaults to last step output)`, - contains: [ - { - type: "dictionary", - contains: { - type: "Common_PyExpression", - }, - }, - { - type: "Enum", - }, - ], - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Tasks_UpdateTaskRequest.ts b/sdks/ts/src/api/schemas/$Tasks_UpdateTaskRequest.ts deleted file mode 100644 index 84255c8ca..000000000 --- a/sdks/ts/src/api/schemas/$Tasks_UpdateTaskRequest.ts +++ /dev/null @@ -1,144 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tasks_UpdateTaskRequest = { - type: "dictionary", - contains: { - type: "array", - contains: { - type: "any-of", - contains: [ - { - type: "Tasks_EvaluateStep", - }, - { - type: "Tasks_ToolCallStep", - }, - { - type: "Tasks_PromptStep", - }, - { - type: "Tasks_GetStep", - }, - { - type: "Tasks_SetStep", - }, - { - type: "Tasks_LogStep", - }, - { - type: "Tasks_EmbedStep", - }, - { - type: "Tasks_SearchStep", - }, - { - type: "Tasks_ReturnStep", - }, - { - type: "Tasks_SleepStep", - }, - { - type: "Tasks_ErrorWorkflowStep", - }, - { - type: "Tasks_YieldStep", - }, - { - type: "Tasks_WaitForInputStep", - }, - { - type: "Tasks_IfElseWorkflowStep", - }, - { - type: "Tasks_SwitchStep", - }, - { - type: "Tasks_ForeachStep", - }, - { - type: "Tasks_ParallelStep", - }, - { - type: "all-of", - contains: [ - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - }, - }, - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - over: { - type: "all-of", - description: `The variable to iterate over`, - contains: [ - { - type: "Common_PyExpression", - }, - ], - isRequired: true, - }, - map: { - type: "any-of", - description: `The steps to run for each iteration`, - contains: [ - { - type: "Tasks_EvaluateStep", - }, - { - type: "Tasks_ToolCallStep", - }, - { - type: "Tasks_PromptStep", - }, - { - type: "Tasks_GetStep", - }, - { - type: "Tasks_SetStep", - }, - { - type: "Tasks_LogStep", - }, - { - type: "Tasks_EmbedStep", - }, - { - type: "Tasks_SearchStep", - }, - ], - isRequired: true, - }, - reduce: { - type: "all-of", - description: `The expression to reduce the results. - If not provided, the results are collected and returned as a list. - A special parameter named \`results\` is the accumulator and \`_\` is the current value.`, - contains: [ - { - type: "Common_PyExpression", - }, - ], - }, - initial: { - properties: {}, - }, - }, - }, - ], - }, - ], - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Tasks_WaitForInputInfo.ts b/sdks/ts/src/api/schemas/$Tasks_WaitForInputInfo.ts deleted file mode 100644 index 81526c6a1..000000000 --- a/sdks/ts/src/api/schemas/$Tasks_WaitForInputInfo.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tasks_WaitForInputInfo = { - properties: { - info: { - type: "dictionary", - contains: { - type: "Common_PyExpression", - }, - isRequired: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Tasks_WaitForInputStep.ts b/sdks/ts/src/api/schemas/$Tasks_WaitForInputStep.ts deleted file mode 100644 index 91a9e7bc9..000000000 --- a/sdks/ts/src/api/schemas/$Tasks_WaitForInputStep.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tasks_WaitForInputStep = { - type: "all-of", - contains: [ - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - }, - }, - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - wait_for_input: { - type: "all-of", - description: `Any additional info or data`, - contains: [ - { - type: "Tasks_WaitForInputInfo", - }, - ], - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Tasks_YieldStep.ts b/sdks/ts/src/api/schemas/$Tasks_YieldStep.ts deleted file mode 100644 index b0ad18252..000000000 --- a/sdks/ts/src/api/schemas/$Tasks_YieldStep.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tasks_YieldStep = { - type: "all-of", - contains: [ - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - }, - }, - { - properties: { - kind_: { - type: "Enum", - isReadOnly: true, - isRequired: true, - }, - workflow: { - type: "string", - description: `The subworkflow to run. - VALIDATION: Should resolve to a defined subworkflow.`, - isRequired: true, - }, - arguments: { - type: "any-of", - description: `The input parameters for the subworkflow (defaults to last step output)`, - contains: [ - { - type: "dictionary", - contains: { - type: "Common_PyExpression", - }, - }, - { - type: "Enum", - }, - ], - isRequired: true, - }, - }, - }, - ], -} as const; diff --git a/sdks/ts/src/api/schemas/$Tools_ChosenToolCall.ts b/sdks/ts/src/api/schemas/$Tools_ChosenToolCall.ts deleted file mode 100644 index 9db118f36..000000000 --- a/sdks/ts/src/api/schemas/$Tools_ChosenToolCall.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tools_ChosenToolCall = { - description: `The response tool value generated by the model`, - properties: { - type: { - type: "all-of", - description: `Whether this tool is a \`function\`, \`api_call\`, \`system\` etc. (Only \`function\` tool supported right now)`, - contains: [ - { - type: "Tools_ToolType", - }, - ], - isRequired: true, - }, - function: { - type: "Tools_FunctionCallOption", - }, - integration: { - properties: {}, - }, - system: { - properties: {}, - }, - api_call: { - properties: {}, - }, - id: { - type: "all-of", - contains: [ - { - type: "Common_uuid", - }, - ], - isReadOnly: true, - isRequired: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Tools_CreateToolRequest.ts b/sdks/ts/src/api/schemas/$Tools_CreateToolRequest.ts deleted file mode 100644 index 9430480b5..000000000 --- a/sdks/ts/src/api/schemas/$Tools_CreateToolRequest.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tools_CreateToolRequest = { - description: `Payload for creating a tool`, - properties: { - type: { - type: "all-of", - description: `Whether this tool is a \`function\`, \`api_call\`, \`system\` etc. (Only \`function\` tool supported right now)`, - contains: [ - { - type: "Tools_ToolType", - }, - ], - isRequired: true, - }, - name: { - type: "all-of", - description: `Name of the tool (must be unique for this agent and a valid python identifier string )`, - contains: [ - { - type: "Common_validPythonIdentifier", - }, - ], - isRequired: true, - }, - background: { - type: "boolean", - isRequired: true, - }, - function: { - type: "all-of", - description: `The function to call`, - contains: [ - { - type: "Tools_FunctionDef", - }, - ], - isRequired: true, - }, - integration: { - properties: {}, - }, - system: { - properties: {}, - }, - api_call: { - properties: {}, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Tools_FunctionCallOption.ts b/sdks/ts/src/api/schemas/$Tools_FunctionCallOption.ts deleted file mode 100644 index 11630b918..000000000 --- a/sdks/ts/src/api/schemas/$Tools_FunctionCallOption.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tools_FunctionCallOption = { - properties: { - name: { - type: "string", - description: `The name of the function`, - isRequired: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Tools_FunctionDef.ts b/sdks/ts/src/api/schemas/$Tools_FunctionDef.ts deleted file mode 100644 index 57fba7cdc..000000000 --- a/sdks/ts/src/api/schemas/$Tools_FunctionDef.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tools_FunctionDef = { - description: `Function definition`, - properties: { - name: { - description: `DO NOT USE: This will be overriden by the tool name. Here only for compatibility reasons.`, - properties: {}, - isNullable: true, - }, - description: { - type: "all-of", - description: `Description of the function`, - contains: [ - { - type: "Common_identifierSafeUnicode", - }, - ], - }, - parameters: { - type: "dictionary", - contains: { - properties: {}, - }, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Tools_NamedToolChoice.ts b/sdks/ts/src/api/schemas/$Tools_NamedToolChoice.ts deleted file mode 100644 index 32578781a..000000000 --- a/sdks/ts/src/api/schemas/$Tools_NamedToolChoice.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tools_NamedToolChoice = { - properties: { - type: { - type: "all-of", - description: `Whether this tool is a \`function\`, \`api_call\`, \`system\` etc. (Only \`function\` tool supported right now)`, - contains: [ - { - type: "Tools_ToolType", - }, - ], - isRequired: true, - }, - function: { - type: "Tools_FunctionCallOption", - }, - integration: { - properties: {}, - }, - system: { - properties: {}, - }, - api_call: { - properties: {}, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Tools_PatchToolRequest.ts b/sdks/ts/src/api/schemas/$Tools_PatchToolRequest.ts deleted file mode 100644 index 507c5f971..000000000 --- a/sdks/ts/src/api/schemas/$Tools_PatchToolRequest.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tools_PatchToolRequest = { - description: `Payload for patching a tool`, - properties: { - type: { - type: "all-of", - description: `Whether this tool is a \`function\`, \`api_call\`, \`system\` etc. (Only \`function\` tool supported right now)`, - contains: [ - { - type: "Tools_ToolType", - }, - ], - }, - name: { - type: "all-of", - description: `Name of the tool (must be unique for this agent and a valid python identifier string )`, - contains: [ - { - type: "Common_validPythonIdentifier", - }, - ], - }, - background: { - type: "boolean", - }, - function: { - type: "all-of", - description: `The function to call`, - contains: [ - { - type: "Tools_FunctionDef", - }, - ], - }, - integration: { - properties: {}, - }, - system: { - properties: {}, - }, - api_call: { - properties: {}, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Tools_Tool.ts b/sdks/ts/src/api/schemas/$Tools_Tool.ts deleted file mode 100644 index 1f6ff2a76..000000000 --- a/sdks/ts/src/api/schemas/$Tools_Tool.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tools_Tool = { - properties: { - type: { - type: "all-of", - description: `Whether this tool is a \`function\`, \`api_call\`, \`system\` etc. (Only \`function\` tool supported right now)`, - contains: [ - { - type: "Tools_ToolType", - }, - ], - isRequired: true, - }, - name: { - type: "all-of", - description: `Name of the tool (must be unique for this agent and a valid python identifier string )`, - contains: [ - { - type: "Common_validPythonIdentifier", - }, - ], - isRequired: true, - }, - background: { - type: "boolean", - isRequired: true, - }, - function: { - type: "all-of", - description: `The function to call`, - contains: [ - { - type: "Tools_FunctionDef", - }, - ], - isRequired: true, - }, - integration: { - properties: {}, - }, - system: { - properties: {}, - }, - api_call: { - properties: {}, - }, - created_at: { - type: "string", - description: `When this resource was created as UTC date-time`, - isReadOnly: true, - isRequired: true, - format: "date-time", - }, - updated_at: { - type: "string", - description: `When this resource was updated as UTC date-time`, - isReadOnly: true, - isRequired: true, - format: "date-time", - }, - id: { - type: "all-of", - contains: [ - { - type: "Common_uuid", - }, - ], - isReadOnly: true, - isRequired: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Tools_ToolResponse.ts b/sdks/ts/src/api/schemas/$Tools_ToolResponse.ts deleted file mode 100644 index 177317cd9..000000000 --- a/sdks/ts/src/api/schemas/$Tools_ToolResponse.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tools_ToolResponse = { - properties: { - id: { - type: "Common_uuid", - isRequired: true, - }, - output: { - type: "dictionary", - contains: { - properties: {}, - }, - isRequired: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Tools_ToolType.ts b/sdks/ts/src/api/schemas/$Tools_ToolType.ts deleted file mode 100644 index af2dc0d3d..000000000 --- a/sdks/ts/src/api/schemas/$Tools_ToolType.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tools_ToolType = { - type: "Enum", -} as const; diff --git a/sdks/ts/src/api/schemas/$Tools_UpdateToolRequest.ts b/sdks/ts/src/api/schemas/$Tools_UpdateToolRequest.ts deleted file mode 100644 index bd3c37b6e..000000000 --- a/sdks/ts/src/api/schemas/$Tools_UpdateToolRequest.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Tools_UpdateToolRequest = { - description: `Payload for updating a tool`, - properties: { - type: { - type: "all-of", - description: `Whether this tool is a \`function\`, \`api_call\`, \`system\` etc. (Only \`function\` tool supported right now)`, - contains: [ - { - type: "Tools_ToolType", - }, - ], - isRequired: true, - }, - name: { - type: "all-of", - description: `Name of the tool (must be unique for this agent and a valid python identifier string )`, - contains: [ - { - type: "Common_validPythonIdentifier", - }, - ], - isRequired: true, - }, - background: { - type: "boolean", - isRequired: true, - }, - function: { - type: "all-of", - description: `The function to call`, - contains: [ - { - type: "Tools_FunctionDef", - }, - ], - isRequired: true, - }, - integration: { - properties: {}, - }, - system: { - properties: {}, - }, - api_call: { - properties: {}, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Users_CreateOrUpdateUserRequest.ts b/sdks/ts/src/api/schemas/$Users_CreateOrUpdateUserRequest.ts deleted file mode 100644 index 3edb83c22..000000000 --- a/sdks/ts/src/api/schemas/$Users_CreateOrUpdateUserRequest.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Users_CreateOrUpdateUserRequest = { - type: "Common_uuid", -} as const; diff --git a/sdks/ts/src/api/schemas/$Users_CreateUserRequest.ts b/sdks/ts/src/api/schemas/$Users_CreateUserRequest.ts deleted file mode 100644 index e9131ec14..000000000 --- a/sdks/ts/src/api/schemas/$Users_CreateUserRequest.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Users_CreateUserRequest = { - description: `Payload for creating a user (and associated documents)`, - properties: { - metadata: { - type: "dictionary", - contains: { - properties: {}, - }, - }, - name: { - type: "all-of", - description: `Name of the user`, - contains: [ - { - type: "Common_identifierSafeUnicode", - }, - ], - isRequired: true, - }, - about: { - type: "string", - description: `About the user`, - isRequired: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Users_PatchUserRequest.ts b/sdks/ts/src/api/schemas/$Users_PatchUserRequest.ts deleted file mode 100644 index 060855d65..000000000 --- a/sdks/ts/src/api/schemas/$Users_PatchUserRequest.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Users_PatchUserRequest = { - description: `Payload for patching a user`, - properties: { - metadata: { - type: "dictionary", - contains: { - properties: {}, - }, - }, - name: { - type: "all-of", - description: `Name of the user`, - contains: [ - { - type: "Common_identifierSafeUnicode", - }, - ], - }, - about: { - type: "string", - description: `About the user`, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Users_UpdateUserRequest.ts b/sdks/ts/src/api/schemas/$Users_UpdateUserRequest.ts deleted file mode 100644 index cef57aa63..000000000 --- a/sdks/ts/src/api/schemas/$Users_UpdateUserRequest.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Users_UpdateUserRequest = { - description: `Payload for updating a user`, - properties: { - metadata: { - type: "dictionary", - contains: { - properties: {}, - }, - }, - name: { - type: "all-of", - description: `Name of the user`, - contains: [ - { - type: "Common_identifierSafeUnicode", - }, - ], - isRequired: true, - }, - about: { - type: "string", - description: `About the user`, - isRequired: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/schemas/$Users_User.ts b/sdks/ts/src/api/schemas/$Users_User.ts deleted file mode 100644 index 232c618c3..000000000 --- a/sdks/ts/src/api/schemas/$Users_User.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Users_User = { - properties: { - id: { - type: "all-of", - contains: [ - { - type: "Common_uuid", - }, - ], - isReadOnly: true, - isRequired: true, - }, - metadata: { - type: "dictionary", - contains: { - properties: {}, - }, - }, - created_at: { - type: "string", - description: `When this resource was created as UTC date-time`, - isReadOnly: true, - isRequired: true, - format: "date-time", - }, - updated_at: { - type: "string", - description: `When this resource was updated as UTC date-time`, - isReadOnly: true, - isRequired: true, - format: "date-time", - }, - name: { - type: "all-of", - description: `Name of the user`, - contains: [ - { - type: "Common_identifierSafeUnicode", - }, - ], - isRequired: true, - }, - about: { - type: "string", - description: `About the user`, - isRequired: true, - }, - }, -} as const; diff --git a/sdks/ts/src/api/services.gen.ts b/sdks/ts/src/api/services.gen.ts new file mode 100644 index 000000000..e522be52e --- /dev/null +++ b/sdks/ts/src/api/services.gen.ts @@ -0,0 +1,1009 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import { + createClient, + createConfig, + type Options, +} from "@hey-api/client-fetch"; +import type { + AgentsRouteListData, + AgentsRouteListError, + AgentsRouteListResponse, + AgentsRouteCreateData, + AgentsRouteCreateError, + AgentsRouteCreateResponse, + AgentsRouteCreateOrUpdateData, + AgentsRouteCreateOrUpdateError, + AgentsRouteCreateOrUpdateResponse, + AgentsRouteUpdateData, + AgentsRouteUpdateError, + AgentsRouteUpdateResponse, + AgentsRoutePatchData, + AgentsRoutePatchError, + AgentsRoutePatchResponse, + AgentsRouteDeleteData, + AgentsRouteDeleteError, + AgentsRouteDeleteResponse, + AgentsRouteGetData, + AgentsRouteGetError, + AgentsRouteGetResponse, + AgentDocsRouteListData, + AgentDocsRouteListError, + AgentDocsRouteListResponse, + AgentDocsRouteCreateData, + AgentDocsRouteCreateError, + AgentDocsRouteCreateResponse, + AgentDocsRouteDeleteData, + AgentDocsRouteDeleteError, + AgentDocsRouteDeleteResponse, + AgentsDocsSearchRouteSearchData, + AgentsDocsSearchRouteSearchError, + AgentsDocsSearchRouteSearchResponse, + TasksRouteListData, + TasksRouteListError, + TasksRouteListResponse, + TasksRouteCreateData, + TasksRouteCreateError, + TasksRouteCreateResponse, + TasksRouteUpdateData, + TasksRouteUpdateError, + TasksRouteUpdateResponse, + TasksRoutePatchData, + TasksRoutePatchError, + TasksRoutePatchResponse, + TasksRouteDeleteData, + TasksRouteDeleteError, + TasksRouteDeleteResponse, + AgentToolsRouteListData, + AgentToolsRouteListError, + AgentToolsRouteListResponse, + AgentToolsRouteCreateData, + AgentToolsRouteCreateError, + AgentToolsRouteCreateResponse, + AgentToolsRouteUpdateData, + AgentToolsRouteUpdateError, + AgentToolsRouteUpdateResponse, + AgentToolsRoutePatchData, + AgentToolsRoutePatchError, + AgentToolsRoutePatchResponse, + AgentToolsRouteDeleteData, + AgentToolsRouteDeleteError, + AgentToolsRouteDeleteResponse, + TasksCreateOrUpdateRouteCreateOrUpdateData, + TasksCreateOrUpdateRouteCreateOrUpdateError, + TasksCreateOrUpdateRouteCreateOrUpdateResponse, + IndividualDocsRouteGetData, + IndividualDocsRouteGetError, + IndividualDocsRouteGetResponse, + EmbedRouteEmbedData, + EmbedRouteEmbedError, + EmbedRouteEmbedResponse, + ExecutionsRouteResumeWithTaskTokenData, + ExecutionsRouteResumeWithTaskTokenError, + ExecutionsRouteResumeWithTaskTokenResponse, + ExecutionsRouteGetData, + ExecutionsRouteGetError, + ExecutionsRouteGetResponse, + ExecutionsRouteUpdateData, + ExecutionsRouteUpdateError, + ExecutionsRouteUpdateResponse, + ExecutionTransitionsRouteListData, + ExecutionTransitionsRouteListError, + ExecutionTransitionsRouteListResponse, + JobRouteGetData, + JobRouteGetError, + JobRouteGetResponse, + SessionsRouteListData, + SessionsRouteListError, + SessionsRouteListResponse, + SessionsRouteCreateData, + SessionsRouteCreateError, + SessionsRouteCreateResponse, + SessionsRouteCreateOrUpdateData, + SessionsRouteCreateOrUpdateError, + SessionsRouteCreateOrUpdateResponse, + SessionsRouteUpdateData, + SessionsRouteUpdateError, + SessionsRouteUpdateResponse, + SessionsRoutePatchData, + SessionsRoutePatchError, + SessionsRoutePatchResponse, + SessionsRouteDeleteData, + SessionsRouteDeleteError, + SessionsRouteDeleteResponse, + SessionsRouteGetData, + SessionsRouteGetError, + SessionsRouteGetResponse, + ChatRouteGenerateData, + ChatRouteGenerateError, + ChatRouteGenerateResponse, + HistoryRouteDeleteData, + HistoryRouteDeleteError, + HistoryRouteDeleteResponse, + HistoryRouteHistoryData, + HistoryRouteHistoryError, + HistoryRouteHistoryResponse, + TaskExecutionsRouteCreateData, + TaskExecutionsRouteCreateError, + TaskExecutionsRouteCreateResponse, + TaskExecutionsRouteListData, + TaskExecutionsRouteListError, + TaskExecutionsRouteListResponse, + UsersRouteListData, + UsersRouteListError, + UsersRouteListResponse, + UsersRouteCreateData, + UsersRouteCreateError, + UsersRouteCreateResponse, + UsersRouteCreateOrUpdateData, + UsersRouteCreateOrUpdateError, + UsersRouteCreateOrUpdateResponse, + UsersRouteUpdateData, + UsersRouteUpdateError, + UsersRouteUpdateResponse, + UsersRoutePatchData, + UsersRoutePatchError, + UsersRoutePatchResponse, + UsersRouteDeleteData, + UsersRouteDeleteError, + UsersRouteDeleteResponse, + UsersRouteGetData, + UsersRouteGetError, + UsersRouteGetResponse, + UserDocsRouteListData, + UserDocsRouteListError, + UserDocsRouteListResponse, + UserDocsRouteCreateData, + UserDocsRouteCreateError, + UserDocsRouteCreateResponse, + UserDocsRouteDeleteData, + UserDocsRouteDeleteError, + UserDocsRouteDeleteResponse, + UserDocsSearchRouteSearchData, + UserDocsSearchRouteSearchError, + UserDocsSearchRouteSearchResponse, +} from "./types.gen"; + +export const client = createClient(createConfig()); + +/** + * List Agents (paginated) + */ +export const agentsRouteList = ( + options: Options, +) => { + return (options?.client ?? client).get< + AgentsRouteListResponse, + AgentsRouteListError, + ThrowOnError + >({ + ...options, + url: "/agents", + }); +}; + +/** + * Create a new Agent + */ +export const agentsRouteCreate = ( + options: Options, +) => { + return (options?.client ?? client).post< + AgentsRouteCreateResponse, + AgentsRouteCreateError, + ThrowOnError + >({ + ...options, + url: "/agents", + }); +}; + +/** + * Create or update an Agent + */ +export const agentsRouteCreateOrUpdate = ( + options: Options, +) => { + return (options?.client ?? client).post< + AgentsRouteCreateOrUpdateResponse, + AgentsRouteCreateOrUpdateError, + ThrowOnError + >({ + ...options, + url: "/agents/{id}", + }); +}; + +/** + * Update an existing Agent by id (overwrites existing values; use PATCH for merging instead) + */ +export const agentsRouteUpdate = ( + options: Options, +) => { + return (options?.client ?? client).put< + AgentsRouteUpdateResponse, + AgentsRouteUpdateError, + ThrowOnError + >({ + ...options, + url: "/agents/{id}", + }); +}; + +/** + * Update an existing Agent by id (merges with existing values) + */ +export const agentsRoutePatch = ( + options: Options, +) => { + return (options?.client ?? client).patch< + AgentsRoutePatchResponse, + AgentsRoutePatchError, + ThrowOnError + >({ + ...options, + url: "/agents/{id}", + }); +}; + +/** + * Delete Agent by id + */ +export const agentsRouteDelete = ( + options: Options, +) => { + return (options?.client ?? client).delete< + AgentsRouteDeleteResponse, + AgentsRouteDeleteError, + ThrowOnError + >({ + ...options, + url: "/agents/{id}", + }); +}; + +/** + * Get an Agent by id + */ +export const agentsRouteGet = ( + options: Options, +) => { + return (options?.client ?? client).get< + AgentsRouteGetResponse, + AgentsRouteGetError, + ThrowOnError + >({ + ...options, + url: "/agents/{id}", + }); +}; + +/** + * List Docs owned by an Agent + */ +export const agentDocsRouteList = ( + options: Options, +) => { + return (options?.client ?? client).get< + AgentDocsRouteListResponse, + AgentDocsRouteListError, + ThrowOnError + >({ + ...options, + url: "/agents/{id}/docs", + }); +}; + +/** + * Create a Doc for this Agent + */ +export const agentDocsRouteCreate = ( + options: Options, +) => { + return (options?.client ?? client).post< + AgentDocsRouteCreateResponse, + AgentDocsRouteCreateError, + ThrowOnError + >({ + ...options, + url: "/agents/{id}/docs", + }); +}; + +/** + * Delete a Doc for this Agent + */ +export const agentDocsRouteDelete = ( + options: Options, +) => { + return (options?.client ?? client).delete< + AgentDocsRouteDeleteResponse, + AgentDocsRouteDeleteError, + ThrowOnError + >({ + ...options, + url: "/agents/{id}/docs/{child_id}", + }); +}; + +/** + * Search Docs owned by an Agent + */ +export const agentsDocsSearchRouteSearch = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => { + return (options?.client ?? client).post< + AgentsDocsSearchRouteSearchResponse, + AgentsDocsSearchRouteSearchError, + ThrowOnError + >({ + ...options, + url: "/agents/{id}/search", + }); +}; + +/** + * List tasks (paginated) + */ +export const tasksRouteList = ( + options: Options, +) => { + return (options?.client ?? client).get< + TasksRouteListResponse, + TasksRouteListError, + ThrowOnError + >({ + ...options, + url: "/agents/{id}/tasks", + }); +}; + +/** + * Create a new task + */ +export const tasksRouteCreate = ( + options: Options, +) => { + return (options?.client ?? client).post< + TasksRouteCreateResponse, + TasksRouteCreateError, + ThrowOnError + >({ + ...options, + url: "/agents/{id}/tasks", + }); +}; + +/** + * Update an existing task (overwrite existing values) + */ +export const tasksRouteUpdate = ( + options: Options, +) => { + return (options?.client ?? client).put< + TasksRouteUpdateResponse, + TasksRouteUpdateError, + ThrowOnError + >({ + ...options, + url: "/agents/{id}/tasks/{child_id}", + }); +}; + +/** + * Update an existing task (merges with existing values) + */ +export const tasksRoutePatch = ( + options: Options, +) => { + return (options?.client ?? client).patch< + TasksRoutePatchResponse, + TasksRoutePatchError, + ThrowOnError + >({ + ...options, + url: "/agents/{id}/tasks/{child_id}", + }); +}; + +/** + * Delete a task by its id + */ +export const tasksRouteDelete = ( + options: Options, +) => { + return (options?.client ?? client).delete< + TasksRouteDeleteResponse, + TasksRouteDeleteError, + ThrowOnError + >({ + ...options, + url: "/agents/{id}/tasks/{child_id}", + }); +}; + +/** + * List tools of the given agent + */ +export const agentToolsRouteList = ( + options: Options, +) => { + return (options?.client ?? client).get< + AgentToolsRouteListResponse, + AgentToolsRouteListError, + ThrowOnError + >({ + ...options, + url: "/agents/{id}/tools", + }); +}; + +/** + * Create a new tool for this agent + */ +export const agentToolsRouteCreate = ( + options: Options, +) => { + return (options?.client ?? client).post< + AgentToolsRouteCreateResponse, + AgentToolsRouteCreateError, + ThrowOnError + >({ + ...options, + url: "/agents/{id}/tools", + }); +}; + +/** + * Update an existing tool (overwrite existing values) + */ +export const agentToolsRouteUpdate = ( + options: Options, +) => { + return (options?.client ?? client).put< + AgentToolsRouteUpdateResponse, + AgentToolsRouteUpdateError, + ThrowOnError + >({ + ...options, + url: "/agents/{id}/tools/{child_id}", + }); +}; + +/** + * Update an existing tool (merges with existing values) + */ +export const agentToolsRoutePatch = ( + options: Options, +) => { + return (options?.client ?? client).patch< + AgentToolsRoutePatchResponse, + AgentToolsRoutePatchError, + ThrowOnError + >({ + ...options, + url: "/agents/{id}/tools/{child_id}", + }); +}; + +/** + * Delete an existing tool by id + */ +export const agentToolsRouteDelete = ( + options: Options, +) => { + return (options?.client ?? client).delete< + AgentToolsRouteDeleteResponse, + AgentToolsRouteDeleteError, + ThrowOnError + >({ + ...options, + url: "/agents/{id}/tools/{child_id}", + }); +}; + +/** + * Create or update a task + */ +export const tasksCreateOrUpdateRouteCreateOrUpdate = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => { + return (options?.client ?? client).post< + TasksCreateOrUpdateRouteCreateOrUpdateResponse, + TasksCreateOrUpdateRouteCreateOrUpdateError, + ThrowOnError + >({ + ...options, + url: "/agents/{parent_id}/tasks/{id}", + }); +}; + +/** + * Get Doc by id + */ +export const individualDocsRouteGet = ( + options: Options, +) => { + return (options?.client ?? client).get< + IndividualDocsRouteGetResponse, + IndividualDocsRouteGetError, + ThrowOnError + >({ + ...options, + url: "/docs/{id}", + }); +}; + +/** + * Embed a query for search + */ +export const embedRouteEmbed = ( + options: Options, +) => { + return (options?.client ?? client).post< + EmbedRouteEmbedResponse, + EmbedRouteEmbedError, + ThrowOnError + >({ + ...options, + url: "/embed", + }); +}; + +/** + * Resume an execution with a task token + */ +export const executionsRouteResumeWithTaskToken = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => { + return (options?.client ?? client).post< + ExecutionsRouteResumeWithTaskTokenResponse, + ExecutionsRouteResumeWithTaskTokenError, + ThrowOnError + >({ + ...options, + url: "/executions", + }); +}; + +/** + * Get an Execution by id + */ +export const executionsRouteGet = ( + options: Options, +) => { + return (options?.client ?? client).get< + ExecutionsRouteGetResponse, + ExecutionsRouteGetError, + ThrowOnError + >({ + ...options, + url: "/executions/{id}", + }); +}; + +/** + * Update an existing Execution + */ +export const executionsRouteUpdate = ( + options: Options, +) => { + return (options?.client ?? client).put< + ExecutionsRouteUpdateResponse, + ExecutionsRouteUpdateError, + ThrowOnError + >({ + ...options, + url: "/executions/{id}", + }); +}; + +/** + * List the Transitions of an Execution by id + */ +export const executionTransitionsRouteList = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => { + return (options?.client ?? client).get< + ExecutionTransitionsRouteListResponse, + ExecutionTransitionsRouteListError, + ThrowOnError + >({ + ...options, + url: "/executions/{id}/transitions", + }); +}; + +/** + * Get the status of an existing Job by its id + */ +export const jobRouteGet = ( + options: Options, +) => { + return (options?.client ?? client).get< + JobRouteGetResponse, + JobRouteGetError, + ThrowOnError + >({ + ...options, + url: "/jobs/{id}", + }); +}; + +/** + * List sessions (paginated) + */ +export const sessionsRouteList = ( + options: Options, +) => { + return (options?.client ?? client).get< + SessionsRouteListResponse, + SessionsRouteListError, + ThrowOnError + >({ + ...options, + url: "/sessions", + }); +}; + +/** + * Create a new session + */ +export const sessionsRouteCreate = ( + options: Options, +) => { + return (options?.client ?? client).post< + SessionsRouteCreateResponse, + SessionsRouteCreateError, + ThrowOnError + >({ + ...options, + url: "/sessions", + }); +}; + +/** + * Create or update a session + */ +export const sessionsRouteCreateOrUpdate = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => { + return (options?.client ?? client).post< + SessionsRouteCreateOrUpdateResponse, + SessionsRouteCreateOrUpdateError, + ThrowOnError + >({ + ...options, + url: "/sessions/{id}", + }); +}; + +/** + * Update an existing session by its id (overwrites all existing values) + */ +export const sessionsRouteUpdate = ( + options: Options, +) => { + return (options?.client ?? client).put< + SessionsRouteUpdateResponse, + SessionsRouteUpdateError, + ThrowOnError + >({ + ...options, + url: "/sessions/{id}", + }); +}; + +/** + * Update an existing session by its id (merges with existing values) + */ +export const sessionsRoutePatch = ( + options: Options, +) => { + return (options?.client ?? client).patch< + SessionsRoutePatchResponse, + SessionsRoutePatchError, + ThrowOnError + >({ + ...options, + url: "/sessions/{id}", + }); +}; + +/** + * Delete a session by its id + */ +export const sessionsRouteDelete = ( + options: Options, +) => { + return (options?.client ?? client).delete< + SessionsRouteDeleteResponse, + SessionsRouteDeleteError, + ThrowOnError + >({ + ...options, + url: "/sessions/{id}", + }); +}; + +/** + * Get a session by id + */ +export const sessionsRouteGet = ( + options: Options, +) => { + return (options?.client ?? client).get< + SessionsRouteGetResponse, + SessionsRouteGetError, + ThrowOnError + >({ + ...options, + url: "/sessions/{id}", + }); +}; + +/** + * Generate a response from the model + */ +export const chatRouteGenerate = ( + options: Options, +) => { + return (options?.client ?? client).post< + ChatRouteGenerateResponse, + ChatRouteGenerateError, + ThrowOnError + >({ + ...options, + url: "/sessions/{id}/chat", + }); +}; + +/** + * Clear the history of a Session (resets the Session) + */ +export const historyRouteDelete = ( + options: Options, +) => { + return (options?.client ?? client).delete< + HistoryRouteDeleteResponse, + HistoryRouteDeleteError, + ThrowOnError + >({ + ...options, + url: "/sessions/{id}/history", + }); +}; + +/** + * Get history of a Session + */ +export const historyRouteHistory = ( + options: Options, +) => { + return (options?.client ?? client).get< + HistoryRouteHistoryResponse, + HistoryRouteHistoryError, + ThrowOnError + >({ + ...options, + url: "/sessions/{id}/history", + }); +}; + +/** + * Create an execution for the given task + */ +export const taskExecutionsRouteCreate = ( + options: Options, +) => { + return (options?.client ?? client).post< + TaskExecutionsRouteCreateResponse, + TaskExecutionsRouteCreateError, + ThrowOnError + >({ + ...options, + url: "/tasks/{id}/executions", + }); +}; + +/** + * List executions of the given task + */ +export const taskExecutionsRouteList = ( + options: Options, +) => { + return (options?.client ?? client).get< + TaskExecutionsRouteListResponse, + TaskExecutionsRouteListError, + ThrowOnError + >({ + ...options, + url: "/tasks/{id}/executions", + }); +}; + +/** + * List users (paginated) + */ +export const usersRouteList = ( + options: Options, +) => { + return (options?.client ?? client).get< + UsersRouteListResponse, + UsersRouteListError, + ThrowOnError + >({ + ...options, + url: "/users", + }); +}; + +/** + * Create a new user + */ +export const usersRouteCreate = ( + options: Options, +) => { + return (options?.client ?? client).post< + UsersRouteCreateResponse, + UsersRouteCreateError, + ThrowOnError + >({ + ...options, + url: "/users", + }); +}; + +/** + * Create or update a user + */ +export const usersRouteCreateOrUpdate = ( + options: Options, +) => { + return (options?.client ?? client).post< + UsersRouteCreateOrUpdateResponse, + UsersRouteCreateOrUpdateError, + ThrowOnError + >({ + ...options, + url: "/users/{id}", + }); +}; + +/** + * Update an existing user by id (overwrite existing values) + */ +export const usersRouteUpdate = ( + options: Options, +) => { + return (options?.client ?? client).put< + UsersRouteUpdateResponse, + UsersRouteUpdateError, + ThrowOnError + >({ + ...options, + url: "/users/{id}", + }); +}; + +/** + * Update an existing user by id (merge with existing values) + */ +export const usersRoutePatch = ( + options: Options, +) => { + return (options?.client ?? client).patch< + UsersRoutePatchResponse, + UsersRoutePatchError, + ThrowOnError + >({ + ...options, + url: "/users/{id}", + }); +}; + +/** + * Delete a user by id + */ +export const usersRouteDelete = ( + options: Options, +) => { + return (options?.client ?? client).delete< + UsersRouteDeleteResponse, + UsersRouteDeleteError, + ThrowOnError + >({ + ...options, + url: "/users/{id}", + }); +}; + +/** + * Get a user by id + */ +export const usersRouteGet = ( + options: Options, +) => { + return (options?.client ?? client).get< + UsersRouteGetResponse, + UsersRouteGetError, + ThrowOnError + >({ + ...options, + url: "/users/{id}", + }); +}; + +/** + * List Docs owned by a User + */ +export const userDocsRouteList = ( + options: Options, +) => { + return (options?.client ?? client).get< + UserDocsRouteListResponse, + UserDocsRouteListError, + ThrowOnError + >({ + ...options, + url: "/users/{id}/docs", + }); +}; + +/** + * Create a Doc for this User + */ +export const userDocsRouteCreate = ( + options: Options, +) => { + return (options?.client ?? client).post< + UserDocsRouteCreateResponse, + UserDocsRouteCreateError, + ThrowOnError + >({ + ...options, + url: "/users/{id}/docs", + }); +}; + +/** + * Delete a Doc for this User + */ +export const userDocsRouteDelete = ( + options: Options, +) => { + return (options?.client ?? client).delete< + UserDocsRouteDeleteResponse, + UserDocsRouteDeleteError, + ThrowOnError + >({ + ...options, + url: "/users/{id}/docs/{child_id}", + }); +}; + +/** + * Search Docs owned by a User + */ +export const userDocsSearchRouteSearch = ( + options: Options, +) => { + return (options?.client ?? client).post< + UserDocsSearchRouteSearchResponse, + UserDocsSearchRouteSearchError, + ThrowOnError + >({ + ...options, + url: "/users/{id}/search", + }); +}; diff --git a/sdks/ts/src/api/services/DefaultService.ts b/sdks/ts/src/api/services/DefaultService.ts deleted file mode 100644 index 9e9540ed9..000000000 --- a/sdks/ts/src/api/services/DefaultService.ts +++ /dev/null @@ -1,1568 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Agents_Agent } from "../models/Agents_Agent"; -import type { Agents_CreateAgentRequest } from "../models/Agents_CreateAgentRequest"; -import type { Agents_PatchAgentRequest } from "../models/Agents_PatchAgentRequest"; -import type { Agents_UpdateAgentRequest } from "../models/Agents_UpdateAgentRequest"; -import type { Chat_ChatInput } from "../models/Chat_ChatInput"; -import type { Chat_ChunkChatResponse } from "../models/Chat_ChunkChatResponse"; -import type { Chat_MessageChatResponse } from "../models/Chat_MessageChatResponse"; -import type { Common_limit } from "../models/Common_limit"; -import type { Common_offset } from "../models/Common_offset"; -import type { Common_ResourceCreatedResponse } from "../models/Common_ResourceCreatedResponse"; -import type { Common_ResourceDeletedResponse } from "../models/Common_ResourceDeletedResponse"; -import type { Common_ResourceUpdatedResponse } from "../models/Common_ResourceUpdatedResponse"; -import type { Common_uuid } from "../models/Common_uuid"; -import type { Docs_CreateDocRequest } from "../models/Docs_CreateDocRequest"; -import type { Docs_Doc } from "../models/Docs_Doc"; -import type { Docs_DocSearchResponse } from "../models/Docs_DocSearchResponse"; -import type { Docs_EmbedQueryRequest } from "../models/Docs_EmbedQueryRequest"; -import type { Docs_EmbedQueryResponse } from "../models/Docs_EmbedQueryResponse"; -import type { Docs_HybridDocSearchRequest } from "../models/Docs_HybridDocSearchRequest"; -import type { Docs_TextOnlyDocSearchRequest } from "../models/Docs_TextOnlyDocSearchRequest"; -import type { Docs_VectorDocSearchRequest } from "../models/Docs_VectorDocSearchRequest"; -import type { Entries_History } from "../models/Entries_History"; -import type { Executions_CreateExecutionRequest } from "../models/Executions_CreateExecutionRequest"; -import type { Executions_Execution } from "../models/Executions_Execution"; -import type { Executions_TaskTokenResumeExecutionRequest } from "../models/Executions_TaskTokenResumeExecutionRequest"; -import type { Executions_Transition } from "../models/Executions_Transition"; -import type { Executions_UpdateExecutionRequest } from "../models/Executions_UpdateExecutionRequest"; -import type { Jobs_JobStatus } from "../models/Jobs_JobStatus"; -import type { Sessions_CreateSessionRequest } from "../models/Sessions_CreateSessionRequest"; -import type { Sessions_PatchSessionRequest } from "../models/Sessions_PatchSessionRequest"; -import type { Sessions_Session } from "../models/Sessions_Session"; -import type { Sessions_UpdateSessionRequest } from "../models/Sessions_UpdateSessionRequest"; -import type { Tasks_CreateTaskRequest } from "../models/Tasks_CreateTaskRequest"; -import type { Tasks_PatchTaskRequest } from "../models/Tasks_PatchTaskRequest"; -import type { Tasks_Task } from "../models/Tasks_Task"; -import type { Tasks_UpdateTaskRequest } from "../models/Tasks_UpdateTaskRequest"; -import type { Tools_PatchToolRequest } from "../models/Tools_PatchToolRequest"; -import type { Tools_Tool } from "../models/Tools_Tool"; -import type { Tools_UpdateToolRequest } from "../models/Tools_UpdateToolRequest"; -import type { Users_CreateUserRequest } from "../models/Users_CreateUserRequest"; -import type { Users_PatchUserRequest } from "../models/Users_PatchUserRequest"; -import type { Users_UpdateUserRequest } from "../models/Users_UpdateUserRequest"; -import type { Users_User } from "../models/Users_User"; -import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; -export class DefaultService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * List Agents (paginated) - * @returns any The request has succeeded. - * @throws ApiError - */ - public agentsRouteList({ - limit = 100, - offset, - sortBy = "created_at", - direction = "asc", - metadataFilter = "{}", - }: { - /** - * Limit the number of items returned - */ - limit?: Common_limit; - /** - * Offset the items returned - */ - offset: Common_offset; - /** - * Sort by a field - */ - sortBy?: "created_at" | "updated_at"; - /** - * Sort direction - */ - direction?: "asc" | "desc"; - /** - * JSON string of object that should be used to filter objects by metadata - */ - metadataFilter?: string; - }): CancelablePromise<{ - items: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/agents", - query: { - limit: limit, - offset: offset, - sort_by: sortBy, - direction: direction, - metadata_filter: metadataFilter, - }, - }); - } - /** - * Create a new Agent - * @returns Common_ResourceCreatedResponse The request has succeeded and a new resource has been created as a result. - * @throws ApiError - */ - public agentsRouteCreate({ - requestBody, - }: { - requestBody: Agents_CreateAgentRequest; - }): CancelablePromise { - return this.httpRequest.request({ - method: "POST", - url: "/agents", - body: requestBody, - mediaType: "application/json", - }); - } - /** - * Create or update an Agent - * @returns Common_ResourceUpdatedResponse The request has succeeded. - * @throws ApiError - */ - public agentsRouteCreateOrUpdate({ - id, - requestBody, - }: { - id: Common_uuid; - requestBody: Agents_UpdateAgentRequest; - }): CancelablePromise { - return this.httpRequest.request({ - method: "POST", - url: "/agents/{id}", - path: { - id: id, - }, - body: requestBody, - mediaType: "application/json", - }); - } - /** - * Update an existing Agent by id (overwrites existing values; use PATCH for merging instead) - * @returns Common_ResourceUpdatedResponse The request has succeeded. - * @throws ApiError - */ - public agentsRouteUpdate({ - id, - requestBody, - }: { - /** - * ID of the resource - */ - id: Common_uuid; - requestBody: Agents_UpdateAgentRequest; - }): CancelablePromise { - return this.httpRequest.request({ - method: "PUT", - url: "/agents/{id}", - path: { - id: id, - }, - body: requestBody, - mediaType: "application/json", - }); - } - /** - * Update an existing Agent by id (merges with existing values) - * @returns Common_ResourceUpdatedResponse The request has succeeded. - * @throws ApiError - */ - public agentsRoutePatch({ - id, - requestBody, - }: { - /** - * ID of the resource - */ - id: Common_uuid; - requestBody: Agents_PatchAgentRequest; - }): CancelablePromise { - return this.httpRequest.request({ - method: "PATCH", - url: "/agents/{id}", - path: { - id: id, - }, - body: requestBody, - mediaType: "application/json", - }); - } - /** - * Delete Agent by id - * @returns Common_ResourceDeletedResponse The request has been accepted for processing, but processing has not yet completed. - * @throws ApiError - */ - public agentsRouteDelete({ - id, - }: { - /** - * ID of the resource - */ - id: Common_uuid; - }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/agents/{id}", - path: { - id: id, - }, - }); - } - /** - * Get an Agent by id - * @returns Agents_Agent The request has succeeded. - * @throws ApiError - */ - public agentsRouteGet({ - id, - }: { - /** - * ID of the resource - */ - id: Common_uuid; - }): CancelablePromise { - return this.httpRequest.request({ - method: "GET", - url: "/agents/{id}", - path: { - id: id, - }, - }); - } - /** - * List Docs owned by an Agent - * @returns any The request has succeeded. - * @throws ApiError - */ - public agentDocsRouteList({ - id, - limit = 100, - offset, - sortBy = "created_at", - direction = "asc", - metadataFilter = "{}", - }: { - /** - * ID of parent - */ - id: Common_uuid; - /** - * Limit the number of items returned - */ - limit?: Common_limit; - /** - * Offset the items returned - */ - offset: Common_offset; - /** - * Sort by a field - */ - sortBy?: "created_at" | "updated_at"; - /** - * Sort direction - */ - direction?: "asc" | "desc"; - /** - * JSON string of object that should be used to filter objects by metadata - */ - metadataFilter?: string; - }): CancelablePromise<{ - results: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/agents/{id}/docs", - path: { - id: id, - }, - query: { - limit: limit, - offset: offset, - sort_by: sortBy, - direction: direction, - metadata_filter: metadataFilter, - }, - }); - } - /** - * Create a Doc for this Agent - * @returns Common_ResourceCreatedResponse The request has succeeded and a new resource has been created as a result. - * @throws ApiError - */ - public agentDocsRouteCreate({ - id, - requestBody, - }: { - /** - * ID of parent resource - */ - id: Common_uuid; - requestBody: Docs_CreateDocRequest; - }): CancelablePromise { - return this.httpRequest.request({ - method: "POST", - url: "/agents/{id}/docs", - path: { - id: id, - }, - body: requestBody, - mediaType: "application/json", - }); - } - /** - * Delete a Doc for this Agent - * @returns Common_ResourceDeletedResponse The request has been accepted for processing, but processing has not yet completed. - * @throws ApiError - */ - public agentDocsRouteDelete({ - id, - childId, - }: { - /** - * ID of parent resource - */ - id: Common_uuid; - /** - * ID of the resource to be deleted - */ - childId: Common_uuid; - }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/agents/{id}/docs/{child_id}", - path: { - id: id, - child_id: childId, - }, - }); - } - /** - * Search Docs owned by an Agent - * @returns Docs_DocSearchResponse The request has succeeded. - * @throws ApiError - */ - public agentsDocsSearchRouteSearch({ - id, - requestBody, - }: { - /** - * ID of the parent - */ - id: Common_uuid; - requestBody: { - body: - | Docs_VectorDocSearchRequest - | Docs_TextOnlyDocSearchRequest - | Docs_HybridDocSearchRequest; - }; - }): CancelablePromise { - return this.httpRequest.request({ - method: "POST", - url: "/agents/{id}/search", - path: { - id: id, - }, - body: requestBody, - mediaType: "application/json", - }); - } - /** - * List tasks (paginated) - * @returns any The request has succeeded. - * @throws ApiError - */ - public tasksRouteList({ - id, - limit = 100, - offset, - sortBy = "created_at", - direction = "asc", - metadataFilter = "{}", - }: { - /** - * ID of parent - */ - id: Common_uuid; - /** - * Limit the number of items returned - */ - limit?: Common_limit; - /** - * Offset the items returned - */ - offset: Common_offset; - /** - * Sort by a field - */ - sortBy?: "created_at" | "updated_at"; - /** - * Sort direction - */ - direction?: "asc" | "desc"; - /** - * JSON string of object that should be used to filter objects by metadata - */ - metadataFilter?: string; - }): CancelablePromise<{ - results: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/agents/{id}/tasks", - path: { - id: id, - }, - query: { - limit: limit, - offset: offset, - sort_by: sortBy, - direction: direction, - metadata_filter: metadataFilter, - }, - }); - } - /** - * Create a new task - * @returns Common_ResourceCreatedResponse The request has succeeded. - * @throws ApiError - */ - public tasksRouteCreate({ - id, - requestBody, - }: { - /** - * ID of parent resource - */ - id: Common_uuid; - requestBody: Tasks_CreateTaskRequest; - }): CancelablePromise { - return this.httpRequest.request({ - method: "POST", - url: "/agents/{id}/tasks", - path: { - id: id, - }, - body: requestBody, - mediaType: "application/json", - }); - } - /** - * Update an existing task (overwrite existing values) - * @returns Common_ResourceUpdatedResponse The request has succeeded. - * @throws ApiError - */ - public tasksRouteUpdate({ - id, - childId, - requestBody, - }: { - /** - * ID of parent resource - */ - id: Common_uuid; - /** - * ID of the resource to be updated - */ - childId: Common_uuid; - requestBody: Tasks_UpdateTaskRequest; - }): CancelablePromise { - return this.httpRequest.request({ - method: "PUT", - url: "/agents/{id}/tasks/{child_id}", - path: { - id: id, - child_id: childId, - }, - body: requestBody, - mediaType: "application/json", - }); - } - /** - * Update an existing task (merges with existing values) - * @returns Common_ResourceUpdatedResponse The request has succeeded. - * @throws ApiError - */ - public tasksRoutePatch({ - id, - childId, - requestBody, - }: { - /** - * ID of parent resource - */ - id: Common_uuid; - /** - * ID of the resource to be patched - */ - childId: Common_uuid; - requestBody: Tasks_PatchTaskRequest; - }): CancelablePromise { - return this.httpRequest.request({ - method: "PATCH", - url: "/agents/{id}/tasks/{child_id}", - path: { - id: id, - child_id: childId, - }, - body: requestBody, - mediaType: "application/json", - }); - } - /** - * Delete a task by its id - * @returns Common_ResourceDeletedResponse The request has been accepted for processing, but processing has not yet completed. - * @throws ApiError - */ - public tasksRouteDelete({ - id, - childId, - }: { - /** - * ID of parent resource - */ - id: Common_uuid; - /** - * ID of the resource to be deleted - */ - childId: Common_uuid; - }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/agents/{id}/tasks/{child_id}", - path: { - id: id, - child_id: childId, - }, - }); - } - /** - * List tools of the given agent - * @returns any The request has succeeded. - * @throws ApiError - */ - public agentToolsRouteList({ - id, - limit = 100, - offset, - sortBy = "created_at", - direction = "asc", - metadataFilter = "{}", - }: { - /** - * ID of parent - */ - id: Common_uuid; - /** - * Limit the number of items returned - */ - limit?: Common_limit; - /** - * Offset the items returned - */ - offset: Common_offset; - /** - * Sort by a field - */ - sortBy?: "created_at" | "updated_at"; - /** - * Sort direction - */ - direction?: "asc" | "desc"; - /** - * JSON string of object that should be used to filter objects by metadata - */ - metadataFilter?: string; - }): CancelablePromise<{ - results: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/agents/{id}/tools", - path: { - id: id, - }, - query: { - limit: limit, - offset: offset, - sort_by: sortBy, - direction: direction, - metadata_filter: metadataFilter, - }, - }); - } - /** - * Create a new tool for this agent - * @returns Common_ResourceCreatedResponse The request has succeeded and a new resource has been created as a result. - * @throws ApiError - */ - public agentToolsRouteCreate({ - id, - requestBody, - }: { - /** - * ID of parent resource - */ - id: Common_uuid; - requestBody: Agents_CreateAgentRequest; - }): CancelablePromise { - return this.httpRequest.request({ - method: "POST", - url: "/agents/{id}/tools", - path: { - id: id, - }, - body: requestBody, - mediaType: "application/json", - }); - } - /** - * Update an existing tool (overwrite existing values) - * @returns Common_ResourceUpdatedResponse The request has succeeded. - * @throws ApiError - */ - public agentToolsRouteUpdate({ - id, - childId, - requestBody, - }: { - /** - * ID of parent resource - */ - id: Common_uuid; - /** - * ID of the resource to be updated - */ - childId: Common_uuid; - requestBody: Tools_UpdateToolRequest; - }): CancelablePromise { - return this.httpRequest.request({ - method: "PUT", - url: "/agents/{id}/tools/{child_id}", - path: { - id: id, - child_id: childId, - }, - body: requestBody, - mediaType: "application/json", - }); - } - /** - * Update an existing tool (merges with existing values) - * @returns Common_ResourceUpdatedResponse The request has succeeded. - * @throws ApiError - */ - public agentToolsRoutePatch({ - id, - childId, - requestBody, - }: { - /** - * ID of parent resource - */ - id: Common_uuid; - /** - * ID of the resource to be patched - */ - childId: Common_uuid; - requestBody: Tools_PatchToolRequest; - }): CancelablePromise { - return this.httpRequest.request({ - method: "PATCH", - url: "/agents/{id}/tools/{child_id}", - path: { - id: id, - child_id: childId, - }, - body: requestBody, - mediaType: "application/json", - }); - } - /** - * Delete an existing tool by id - * @returns Common_ResourceDeletedResponse The request has been accepted for processing, but processing has not yet completed. - * @throws ApiError - */ - public agentToolsRouteDelete({ - id, - childId, - }: { - /** - * ID of parent resource - */ - id: Common_uuid; - /** - * ID of the resource to be deleted - */ - childId: Common_uuid; - }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/agents/{id}/tools/{child_id}", - path: { - id: id, - child_id: childId, - }, - }); - } - /** - * Create or update a task - * @returns Common_ResourceUpdatedResponse The request has succeeded and a new resource has been created as a result. - * @throws ApiError - */ - public tasksCreateOrUpdateRouteCreateOrUpdate({ - parentId, - id, - requestBody, - }: { - /** - * ID of the agent - */ - parentId: Common_uuid; - id: Common_uuid; - requestBody: Tasks_CreateTaskRequest; - }): CancelablePromise { - return this.httpRequest.request({ - method: "POST", - url: "/agents/{parent_id}/tasks/{id}", - path: { - parent_id: parentId, - id: id, - }, - body: requestBody, - mediaType: "application/json", - }); - } - /** - * Get Doc by id - * @returns Docs_Doc The request has succeeded. - * @throws ApiError - */ - public individualDocsRouteGet({ - id, - }: { - /** - * ID of the resource - */ - id: Common_uuid; - }): CancelablePromise { - return this.httpRequest.request({ - method: "GET", - url: "/docs/{id}", - path: { - id: id, - }, - }); - } - /** - * Embed a query for search - * @returns Docs_EmbedQueryResponse The request has succeeded. - * @throws ApiError - */ - public embedRouteEmbed({ - requestBody, - }: { - requestBody: { - body: Docs_EmbedQueryRequest; - }; - }): CancelablePromise { - return this.httpRequest.request({ - method: "POST", - url: "/embed", - body: requestBody, - mediaType: "application/json", - }); - } - /** - * Resume an execution with a task token - * @returns Common_ResourceUpdatedResponse The request has succeeded. - * @throws ApiError - */ - public executionsRouteResumeWithTaskToken({ - taskToken, - requestBody, - }: { - /** - * A Task Token is a unique identifier for a specific Task Execution. - */ - taskToken: string; - /** - * Request to resume an execution with a task token - */ - requestBody: Executions_TaskTokenResumeExecutionRequest; - }): CancelablePromise { - return this.httpRequest.request({ - method: "POST", - url: "/executions", - query: { - task_token: taskToken, - }, - body: requestBody, - mediaType: "application/json", - }); - } - /** - * Get an Execution by id - * @returns Executions_Execution The request has succeeded. - * @throws ApiError - */ - public executionsRouteGet({ - id, - }: { - /** - * ID of the resource - */ - id: Common_uuid; - }): CancelablePromise { - return this.httpRequest.request({ - method: "GET", - url: "/executions/{id}", - path: { - id: id, - }, - }); - } - /** - * Update an existing Execution - * @returns Common_ResourceUpdatedResponse The request has succeeded. - * @throws ApiError - */ - public executionsRouteUpdate({ - id, - requestBody, - }: { - /** - * ID of the resource - */ - id: Common_uuid; - requestBody: Executions_UpdateExecutionRequest; - }): CancelablePromise { - return this.httpRequest.request({ - method: "PUT", - url: "/executions/{id}", - path: { - id: id, - }, - body: requestBody, - mediaType: "application/json", - }); - } - /** - * List the Transitions of an Execution by id - * @returns any The request has succeeded. - * @throws ApiError - */ - public executionTransitionsRouteList({ - id, - limit = 100, - offset, - sortBy = "created_at", - direction = "asc", - metadataFilter = "{}", - }: { - /** - * ID of parent - */ - id: Common_uuid; - /** - * Limit the number of items returned - */ - limit?: Common_limit; - /** - * Offset the items returned - */ - offset: Common_offset; - /** - * Sort by a field - */ - sortBy?: "created_at" | "updated_at"; - /** - * Sort direction - */ - direction?: "asc" | "desc"; - /** - * JSON string of object that should be used to filter objects by metadata - */ - metadataFilter?: string; - }): CancelablePromise<{ - results: Array<{ - transitions: Array; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/executions/{id}/transitions", - path: { - id: id, - }, - query: { - limit: limit, - offset: offset, - sort_by: sortBy, - direction: direction, - metadata_filter: metadataFilter, - }, - }); - } - /** - * Get the status of an existing Job by its id - * @returns Jobs_JobStatus The request has succeeded. - * @throws ApiError - */ - public jobRouteGet({ - id, - }: { - /** - * ID of the resource - */ - id: Common_uuid; - }): CancelablePromise { - return this.httpRequest.request({ - method: "GET", - url: "/jobs/{id}", - path: { - id: id, - }, - }); - } - /** - * List sessions (paginated) - * @returns any The request has succeeded. - * @throws ApiError - */ - public sessionsRouteList({ - limit = 100, - offset, - sortBy = "created_at", - direction = "asc", - metadataFilter = "{}", - }: { - /** - * Limit the number of items returned - */ - limit?: Common_limit; - /** - * Offset the items returned - */ - offset: Common_offset; - /** - * Sort by a field - */ - sortBy?: "created_at" | "updated_at"; - /** - * Sort direction - */ - direction?: "asc" | "desc"; - /** - * JSON string of object that should be used to filter objects by metadata - */ - metadataFilter?: string; - }): CancelablePromise<{ - items: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/sessions", - query: { - limit: limit, - offset: offset, - sort_by: sortBy, - direction: direction, - metadata_filter: metadataFilter, - }, - }); - } - /** - * Create a new session - * @returns Common_ResourceCreatedResponse The request has succeeded and a new resource has been created as a result. - * @throws ApiError - */ - public sessionsRouteCreate({ - requestBody, - }: { - requestBody: Sessions_CreateSessionRequest; - }): CancelablePromise { - return this.httpRequest.request({ - method: "POST", - url: "/sessions", - body: requestBody, - mediaType: "application/json", - }); - } - /** - * Create or update a session - * @returns Common_ResourceUpdatedResponse The request has succeeded. - * @throws ApiError - */ - public sessionsRouteCreateOrUpdate({ - id, - requestBody, - }: { - id: Common_uuid; - requestBody: Sessions_CreateSessionRequest; - }): CancelablePromise { - return this.httpRequest.request({ - method: "POST", - url: "/sessions/{id}", - path: { - id: id, - }, - body: requestBody, - mediaType: "application/json", - }); - } - /** - * Update an existing session by its id (overwrites all existing values) - * @returns Common_ResourceUpdatedResponse The request has succeeded. - * @throws ApiError - */ - public sessionsRouteUpdate({ - id, - requestBody, - }: { - /** - * ID of the resource - */ - id: Common_uuid; - requestBody: Sessions_UpdateSessionRequest; - }): CancelablePromise { - return this.httpRequest.request({ - method: "PUT", - url: "/sessions/{id}", - path: { - id: id, - }, - body: requestBody, - mediaType: "application/json", - }); - } - /** - * Update an existing session by its id (merges with existing values) - * @returns Common_ResourceUpdatedResponse The request has succeeded. - * @throws ApiError - */ - public sessionsRoutePatch({ - id, - requestBody, - }: { - /** - * ID of the resource - */ - id: Common_uuid; - requestBody: Sessions_PatchSessionRequest; - }): CancelablePromise { - return this.httpRequest.request({ - method: "PATCH", - url: "/sessions/{id}", - path: { - id: id, - }, - body: requestBody, - mediaType: "application/json", - }); - } - /** - * Delete a session by its id - * @returns Common_ResourceDeletedResponse The request has been accepted for processing, but processing has not yet completed. - * @throws ApiError - */ - public sessionsRouteDelete({ - id, - }: { - /** - * ID of the resource - */ - id: Common_uuid; - }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/sessions/{id}", - path: { - id: id, - }, - }); - } - /** - * Get a session by id - * @returns Sessions_Session The request has succeeded. - * @throws ApiError - */ - public sessionsRouteGet({ - id, - }: { - /** - * ID of the resource - */ - id: Common_uuid; - }): CancelablePromise { - return this.httpRequest.request({ - method: "GET", - url: "/sessions/{id}", - path: { - id: id, - }, - }); - } - /** - * Generate a response from the model - * @returns any The request has succeeded. - * @throws ApiError - */ - public chatRouteGenerate({ - id, - requestBody, - }: { - /** - * The session ID - */ - id: Common_uuid; - /** - * Request to generate a response from the model - */ - requestBody: Chat_ChatInput; - }): CancelablePromise { - return this.httpRequest.request({ - method: "POST", - url: "/sessions/{id}/chat", - path: { - id: id, - }, - body: requestBody, - mediaType: "application/json", - }); - } - /** - * Clear the history of a Session (resets the Session) - * @returns Common_ResourceDeletedResponse The request has been accepted for processing, but processing has not yet completed. - * @throws ApiError - */ - public historyRouteDelete({ - id, - }: { - /** - * ID of the resource - */ - id: Common_uuid; - }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/sessions/{id}/history", - path: { - id: id, - }, - }); - } - /** - * Get history of a Session - * @returns Entries_History The request has succeeded. - * @throws ApiError - */ - public historyRouteHistory({ - id, - }: { - /** - * ID of parent - */ - id: Common_uuid; - }): CancelablePromise { - return this.httpRequest.request({ - method: "GET", - url: "/sessions/{id}/history", - path: { - id: id, - }, - }); - } - /** - * Create an execution for the given task - * @returns Common_ResourceCreatedResponse The request has succeeded and a new resource has been created as a result. - * @throws ApiError - */ - public taskExecutionsRouteCreate({ - id, - requestBody, - }: { - /** - * ID of parent resource - */ - id: Common_uuid; - requestBody: Executions_CreateExecutionRequest; - }): CancelablePromise { - return this.httpRequest.request({ - method: "POST", - url: "/tasks/{id}/executions", - path: { - id: id, - }, - body: requestBody, - mediaType: "application/json", - }); - } - /** - * List executions of the given task - * @returns any The request has succeeded. - * @throws ApiError - */ - public taskExecutionsRouteList({ - id, - limit = 100, - offset, - sortBy = "created_at", - direction = "asc", - metadataFilter = "{}", - }: { - /** - * ID of parent - */ - id: Common_uuid; - /** - * Limit the number of items returned - */ - limit?: Common_limit; - /** - * Offset the items returned - */ - offset: Common_offset; - /** - * Sort by a field - */ - sortBy?: "created_at" | "updated_at"; - /** - * Sort direction - */ - direction?: "asc" | "desc"; - /** - * JSON string of object that should be used to filter objects by metadata - */ - metadataFilter?: string; - }): CancelablePromise<{ - results: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/tasks/{id}/executions", - path: { - id: id, - }, - query: { - limit: limit, - offset: offset, - sort_by: sortBy, - direction: direction, - metadata_filter: metadataFilter, - }, - }); - } - /** - * List users (paginated) - * @returns any The request has succeeded. - * @throws ApiError - */ - public usersRouteList({ - limit = 100, - offset, - sortBy = "created_at", - direction = "asc", - metadataFilter = "{}", - }: { - /** - * Limit the number of items returned - */ - limit?: Common_limit; - /** - * Offset the items returned - */ - offset: Common_offset; - /** - * Sort by a field - */ - sortBy?: "created_at" | "updated_at"; - /** - * Sort direction - */ - direction?: "asc" | "desc"; - /** - * JSON string of object that should be used to filter objects by metadata - */ - metadataFilter?: string; - }): CancelablePromise<{ - items: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/users", - query: { - limit: limit, - offset: offset, - sort_by: sortBy, - direction: direction, - metadata_filter: metadataFilter, - }, - }); - } - /** - * Create a new user - * @returns Common_ResourceCreatedResponse The request has succeeded and a new resource has been created as a result. - * @throws ApiError - */ - public usersRouteCreate({ - requestBody, - }: { - requestBody: Users_CreateUserRequest; - }): CancelablePromise { - return this.httpRequest.request({ - method: "POST", - url: "/users", - body: requestBody, - mediaType: "application/json", - }); - } - /** - * Create or update a user - * @returns Common_ResourceUpdatedResponse The request has succeeded. - * @throws ApiError - */ - public usersRouteCreateOrUpdate({ - id, - requestBody, - }: { - id: Common_uuid; - requestBody: Users_CreateUserRequest; - }): CancelablePromise { - return this.httpRequest.request({ - method: "POST", - url: "/users/{id}", - path: { - id: id, - }, - body: requestBody, - mediaType: "application/json", - }); - } - /** - * Update an existing user by id (overwrite existing values) - * @returns Common_ResourceUpdatedResponse The request has succeeded. - * @throws ApiError - */ - public usersRouteUpdate({ - id, - requestBody, - }: { - /** - * ID of the resource - */ - id: Common_uuid; - requestBody: Users_UpdateUserRequest; - }): CancelablePromise { - return this.httpRequest.request({ - method: "PUT", - url: "/users/{id}", - path: { - id: id, - }, - body: requestBody, - mediaType: "application/json", - }); - } - /** - * Update an existing user by id (merge with existing values) - * @returns Common_ResourceUpdatedResponse The request has succeeded. - * @throws ApiError - */ - public usersRoutePatch({ - id, - requestBody, - }: { - /** - * ID of the resource - */ - id: Common_uuid; - requestBody: Users_PatchUserRequest; - }): CancelablePromise { - return this.httpRequest.request({ - method: "PATCH", - url: "/users/{id}", - path: { - id: id, - }, - body: requestBody, - mediaType: "application/json", - }); - } - /** - * Delete a user by id - * @returns Common_ResourceDeletedResponse The request has been accepted for processing, but processing has not yet completed. - * @throws ApiError - */ - public usersRouteDelete({ - id, - }: { - /** - * ID of the resource - */ - id: Common_uuid; - }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/users/{id}", - path: { - id: id, - }, - }); - } - /** - * Get a user by id - * @returns Users_User The request has succeeded. - * @throws ApiError - */ - public usersRouteGet({ - id, - }: { - /** - * ID of the resource - */ - id: Common_uuid; - }): CancelablePromise { - return this.httpRequest.request({ - method: "GET", - url: "/users/{id}", - path: { - id: id, - }, - }); - } - /** - * List Docs owned by a User - * @returns any The request has succeeded. - * @throws ApiError - */ - public userDocsRouteList({ - id, - limit = 100, - offset, - sortBy = "created_at", - direction = "asc", - metadataFilter = "{}", - }: { - /** - * ID of parent - */ - id: Common_uuid; - /** - * Limit the number of items returned - */ - limit?: Common_limit; - /** - * Offset the items returned - */ - offset: Common_offset; - /** - * Sort by a field - */ - sortBy?: "created_at" | "updated_at"; - /** - * Sort direction - */ - direction?: "asc" | "desc"; - /** - * JSON string of object that should be used to filter objects by metadata - */ - metadataFilter?: string; - }): CancelablePromise<{ - results: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/users/{id}/docs", - path: { - id: id, - }, - query: { - limit: limit, - offset: offset, - sort_by: sortBy, - direction: direction, - metadata_filter: metadataFilter, - }, - }); - } - /** - * Create a Doc for this User - * @returns Common_ResourceCreatedResponse The request has succeeded and a new resource has been created as a result. - * @throws ApiError - */ - public userDocsRouteCreate({ - id, - requestBody, - }: { - /** - * ID of parent resource - */ - id: Common_uuid; - requestBody: Docs_CreateDocRequest; - }): CancelablePromise { - return this.httpRequest.request({ - method: "POST", - url: "/users/{id}/docs", - path: { - id: id, - }, - body: requestBody, - mediaType: "application/json", - }); - } - /** - * Delete a Doc for this User - * @returns Common_ResourceDeletedResponse The request has been accepted for processing, but processing has not yet completed. - * @throws ApiError - */ - public userDocsRouteDelete({ - id, - childId, - }: { - /** - * ID of parent resource - */ - id: Common_uuid; - /** - * ID of the resource to be deleted - */ - childId: Common_uuid; - }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/users/{id}/docs/{child_id}", - path: { - id: id, - child_id: childId, - }, - }); - } - /** - * Search Docs owned by a User - * @returns Docs_DocSearchResponse The request has succeeded. - * @throws ApiError - */ - public userDocsSearchRouteSearch({ - id, - requestBody, - }: { - /** - * ID of the parent - */ - id: Common_uuid; - requestBody: { - body: - | Docs_VectorDocSearchRequest - | Docs_TextOnlyDocSearchRequest - | Docs_HybridDocSearchRequest; - }; - }): CancelablePromise { - return this.httpRequest.request({ - method: "POST", - url: "/users/{id}/search", - path: { - id: id, - }, - body: requestBody, - mediaType: "application/json", - }); - } -} diff --git a/sdks/ts/src/api/types.gen.ts b/sdks/ts/src/api/types.gen.ts new file mode 100644 index 000000000..71c839711 --- /dev/null +++ b/sdks/ts/src/api/types.gen.ts @@ -0,0 +1,3417 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export type Agents_Agent = { + readonly id: Common_uuid; + metadata?: { + [key: string]: unknown; + }; + /** + * When this resource was created as UTC date-time + */ + readonly created_at: string; + /** + * When this resource was updated as UTC date-time + */ + readonly updated_at: string; + /** + * Name of the agent + */ + name: Common_identifierSafeUnicode; + /** + * About the agent + */ + about: string; + /** + * Model name to use (gpt-4-turbo, gemini-nano etc) + */ + model: string; + /** + * Instructions for the agent + */ + instructions: string | Array; + /** + * Default settings for all sessions created by this agent + */ + default_settings?: Chat_DefaultChatSettings; +}; + +/** + * Payload for creating a agent (and associated documents) + */ +export type Agents_CreateAgentRequest = { + metadata?: { + [key: string]: unknown; + }; + /** + * Name of the agent + */ + name: Common_identifierSafeUnicode; + /** + * About the agent + */ + about: string; + /** + * Model name to use (gpt-4-turbo, gemini-nano etc) + */ + model: string; + /** + * Instructions for the agent + */ + instructions: string | Array; + /** + * Default settings for all sessions created by this agent + */ + default_settings?: Chat_DefaultChatSettings; +}; + +export type Agents_CreateOrUpdateAgentRequest = Agents_CreateAgentRequest & { + id: Common_uuid; + metadata?: { + [key: string]: unknown; + }; + /** + * Name of the agent + */ + name: Common_identifierSafeUnicode; + /** + * About the agent + */ + about: string; + /** + * Model name to use (gpt-4-turbo, gemini-nano etc) + */ + model: string; + /** + * Instructions for the agent + */ + instructions: string | Array; + /** + * Default settings for all sessions created by this agent + */ + default_settings?: Chat_DefaultChatSettings; +}; + +/** + * Payload for patching a agent + */ +export type Agents_PatchAgentRequest = { + metadata?: { + [key: string]: unknown; + }; + /** + * Name of the agent + */ + name?: Common_identifierSafeUnicode; + /** + * About the agent + */ + about?: string; + /** + * Model name to use (gpt-4-turbo, gemini-nano etc) + */ + model?: string; + /** + * Instructions for the agent + */ + instructions?: string | Array; + /** + * Default settings for all sessions created by this agent + */ + default_settings?: Chat_DefaultChatSettings; +}; + +/** + * Payload for updating a agent + */ +export type Agents_UpdateAgentRequest = { + metadata?: { + [key: string]: unknown; + }; + /** + * Name of the agent + */ + name: Common_identifierSafeUnicode; + /** + * About the agent + */ + about: string; + /** + * Model name to use (gpt-4-turbo, gemini-nano etc) + */ + model: string; + /** + * Instructions for the agent + */ + instructions: string | Array; + /** + * Default settings for all sessions created by this agent + */ + default_settings?: Chat_DefaultChatSettings; +}; + +export type Chat_BaseChatOutput = { + index: number; + /** + * The reason the model stopped generating tokens + */ + finish_reason: Chat_FinishReason; + /** + * The log probabilities of tokens + */ + logprobs?: Chat_LogProbResponse; +}; + +export type Chat_BaseChatResponse = { + /** + * Usage statistics for the completion request + */ + usage?: Chat_CompetionUsage; + /** + * Background job IDs that may have been spawned from this interaction. + */ + jobs: Array; + /** + * Documents referenced for this request (for citation purposes). + */ + docs: Array; + /** + * When this resource was created as UTC date-time + */ + readonly created_at: string; + readonly id: Common_uuid; +}; + +export type Chat_BaseTokenLogProb = { + token: string; + /** + * The log probability of the token + */ + logprob: number; + bytes?: Array; +}; + +export type Chat_ChatInput = Chat_ChatInputData & { + /** + * DISABLED: Whether this interaction should form new memories or not (will be enabled in a future release) + */ + readonly remember: boolean; + /** + * Whether previous memories and docs should be recalled or not + */ + recall: boolean; + /** + * Whether this interaction should be stored in the session history or not + */ + save: boolean; + /** + * Identifier of the model to be used + */ + model?: Common_identifierSafeUnicode; + /** + * Indicates if the server should stream the response as it's generated + */ + stream: boolean; + /** + * Up to 4 sequences where the API will stop generating further tokens. + */ + stop?: Array; + /** + * If specified, the system will make a best effort to sample deterministically for that particular seed value + */ + seed?: number; + /** + * The maximum number of tokens to generate in the chat completion + */ + max_tokens?: number; + /** + * Modify the likelihood of specified tokens appearing in the completion + */ + logit_bias?: { + [key: string]: Common_logit_bias; + }; + /** + * Response format (set to `json_object` to restrict output to JSON) + */ + response_format?: Chat_CompletionResponseFormat; + /** + * Agent ID of the agent to use for this interaction. (Only applicable for multi-agent sessions) + */ + agent?: Common_uuid; + /** + * Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. + */ + repetition_penalty?: number; + /** + * Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize number of tokens generated. + */ + length_penalty?: number; + /** + * Minimum probability compared to leading token to be considered + */ + min_p?: number; + /** + * Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. + */ + frequency_penalty?: number; + /** + * Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. + */ + presence_penalty?: number; + /** + * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. + */ + temperature?: number; + /** + * Defaults to 1 An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both. + */ + top_p?: number; +}; + +export type Chat_ChatInputData = { + /** + * A list of new input messages comprising the conversation so far. + */ + messages: Array<{ + /** + * The role of the message + */ + role: Entries_ChatMLRole; + /** + * The content parts of the message + */ + content: + | string + | Array + | Array< + | { + text: string; + /** + * The type (fixed to 'text') + */ + type: "text"; + } + | { + /** + * The image URL + */ + image_url: { + /** + * Image URL or base64 data url (e.g. `data:image/jpeg;base64,`) + */ + url: string; + /** + * The detail level of the image + */ + detail: Entries_ImageDetail; + }; + /** + * The type (fixed to 'image_url') + */ + type: "image_url"; + } + >; + /** + * Name + */ + name?: string; + /** + * Whether to continue this message or return a new one + */ + continue?: boolean; + }>; + /** + * (Advanced) List of tools that are provided in addition to agent's default set of tools. + */ + tools?: Array; + /** + * Can be one of existing tools given to the agent earlier or the ones provided in this request. + */ + tool_choice?: "auto" | "none" | Tools_NamedToolChoice; +}; + +/** + * Streaming chat completion output + */ +export type Chat_ChatOutputChunk = Chat_BaseChatOutput & { + /** + * The message generated by the model + */ + delta: { + /** + * The role of the message + */ + role: Entries_ChatMLRole; + /** + * The content parts of the message + */ + content: + | string + | Array + | Array< + | { + text: string; + /** + * The type (fixed to 'text') + */ + type: "text"; + } + | { + /** + * The image URL + */ + image_url: { + /** + * Image URL or base64 data url (e.g. `data:image/jpeg;base64,`) + */ + url: string; + /** + * The detail level of the image + */ + detail: Entries_ImageDetail; + }; + /** + * The type (fixed to 'image_url') + */ + type: "image_url"; + } + >; + /** + * Name + */ + name?: string; + /** + * Whether to continue this message or return a new one + */ + continue?: boolean; + }; +}; + +export type Chat_ChatSettings = Chat_DefaultChatSettings & { + /** + * Identifier of the model to be used + */ + model?: Common_identifierSafeUnicode; + /** + * Indicates if the server should stream the response as it's generated + */ + stream: boolean; + /** + * Up to 4 sequences where the API will stop generating further tokens. + */ + stop?: Array; + /** + * If specified, the system will make a best effort to sample deterministically for that particular seed value + */ + seed?: number; + /** + * The maximum number of tokens to generate in the chat completion + */ + max_tokens?: number; + /** + * Modify the likelihood of specified tokens appearing in the completion + */ + logit_bias?: { + [key: string]: Common_logit_bias; + }; + /** + * Response format (set to `json_object` to restrict output to JSON) + */ + response_format?: Chat_CompletionResponseFormat; + /** + * Agent ID of the agent to use for this interaction. (Only applicable for multi-agent sessions) + */ + agent?: Common_uuid; +}; + +export type Chat_ChunkChatResponse = Chat_BaseChatResponse & { + /** + * The deltas generated by the model + */ + choices: Array; +}; + +/** + * Usage statistics for the completion request + */ +export type Chat_CompetionUsage = { + /** + * Number of tokens in the generated completion + */ + readonly completion_tokens?: number; + /** + * Number of tokens in the prompt + */ + readonly prompt_tokens?: number; + /** + * Total number of tokens used in the request (prompt + completion) + */ + readonly total_tokens?: number; +}; + +export type Chat_CompletionResponseFormat = { + /** + * The format of the response + */ + type: "text" | "json_object"; +}; + +/** + * The format of the response + */ +export type type = "text" | "json_object"; + +/** + * Default settings for the chat session (also used by the agent) + */ +export type Chat_DefaultChatSettings = Chat_OpenAISettings & { + /** + * Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. + */ + repetition_penalty?: number; + /** + * Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize number of tokens generated. + */ + length_penalty?: number; + /** + * Minimum probability compared to leading token to be considered + */ + min_p?: number; +}; + +/** + * The reason the model stopped generating tokens. This will be `stop` + * if the model hit a natural stop point or a provided stop sequence, + * `length` if the maximum number of tokens specified in the request + * was reached, `content_filter` if content was omitted due to a flag + * from our content filters, `tool_calls` if the model called a tool. + */ +export type Chat_FinishReason = + | "stop" + | "length" + | "content_filter" + | "tool_calls"; + +export type Chat_LogProbResponse = { + /** + * The log probabilities of the tokens + */ + content: Array | null; +}; + +export type Chat_MessageChatResponse = Chat_BaseChatResponse & { + ""?: Chat_SingleChatOutput | Chat_MultipleChatOutput; +}; + +/** + * The output returned by the model. Note that, depending on the model provider, they might return more than one message. + */ +export type Chat_MultipleChatOutput = Chat_BaseChatOutput & { + messages: Array<{ + /** + * The role of the message + */ + role: Entries_ChatMLRole; + /** + * The content parts of the message + */ + content: + | string + | Array + | Array< + | { + text: string; + /** + * The type (fixed to 'text') + */ + type: "text"; + } + | { + /** + * The image URL + */ + image_url: { + /** + * Image URL or base64 data url (e.g. `data:image/jpeg;base64,`) + */ + url: string; + /** + * The detail level of the image + */ + detail: Entries_ImageDetail; + }; + /** + * The type (fixed to 'image_url') + */ + type: "image_url"; + } + >; + /** + * Name + */ + name?: string; + /** + * Whether to continue this message or return a new one + */ + continue?: boolean; + }>; +}; + +export type Chat_OpenAISettings = { + /** + * Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. + */ + frequency_penalty?: number; + /** + * Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. + */ + presence_penalty?: number; + /** + * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. + */ + temperature?: number; + /** + * Defaults to 1 An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both. + */ + top_p?: number; +}; + +/** + * The output returned by the model. Note that, depending on the model provider, they might return more than one message. + */ +export type Chat_SingleChatOutput = Chat_BaseChatOutput & { + message: { + /** + * The role of the message + */ + role: Entries_ChatMLRole; + /** + * The content parts of the message + */ + content: + | string + | Array + | Array< + | { + text: string; + /** + * The type (fixed to 'text') + */ + type: "text"; + } + | { + /** + * The image URL + */ + image_url: { + /** + * Image URL or base64 data url (e.g. `data:image/jpeg;base64,`) + */ + url: string; + /** + * The detail level of the image + */ + detail: Entries_ImageDetail; + }; + /** + * The type (fixed to 'image_url') + */ + type: "image_url"; + } + >; + /** + * Name + */ + name?: string; + /** + * Whether to continue this message or return a new one + */ + continue?: boolean; + }; +}; + +export type Chat_TokenLogProb = Chat_BaseTokenLogProb & { + top_logprobs: Array; +}; + +/** + * A valid jinja template. + */ +export type Common_JinjaTemplate = string; + +/** + * A simple python expression compatible with SimpleEval. + */ +export type Common_PyExpression = string; + +export type Common_ResourceCreatedResponse = { + /** + * ID of created resource + */ + id: Common_uuid; + /** + * When this resource was created as UTC date-time + */ + readonly created_at: string; + /** + * IDs (if any) of jobs created as part of this request + */ + jobs: Array; +}; + +export type Common_ResourceDeletedResponse = { + /** + * ID of deleted resource + */ + id: Common_uuid; + /** + * When this resource was deleted as UTC date-time + */ + readonly deleted_at: string; + /** + * IDs (if any) of jobs created as part of this request + */ + jobs: Array; +}; + +export type Common_ResourceUpdatedResponse = { + /** + * ID of updated resource + */ + id: Common_uuid; + /** + * When this resource was updated as UTC date-time + */ + readonly updated_at: string; + /** + * IDs (if any) of jobs created as part of this request + */ + jobs: Array; +}; + +/** + * For Unicode character safety + * See: https://unicode.org/reports/tr31/ + * See: https://www.unicode.org/reports/tr39/#Identifier_Characters + */ +export type Common_identifierSafeUnicode = string; + +/** + * Limit the number of results + */ +export type Common_limit = number; + +export type Common_logit_bias = number; + +/** + * Offset to apply to the results + */ +export type Common_offset = number; + +/** + * Naming convention for tool references. Tools are resolved in order: `step-settings` -> `task` -> `agent` + */ +export type Common_toolRef = string; + +export type Common_uuid = string; + +/** + * Valid python identifier names + */ +export type Common_validPythonIdentifier = string; + +export type Docs_BaseDocSearchRequest = { + limit: number; + /** + * The language to be used for text-only search. Support for other languages coming soon. + */ + lang: "en-US"; +}; + +/** + * The language to be used for text-only search. Support for other languages coming soon. + */ +export type lang = "en-US"; + +/** + * Payload for creating a doc + */ +export type Docs_CreateDocRequest = { + metadata?: { + [key: string]: unknown; + }; + /** + * Title describing what this document contains + */ + title: string; + /** + * Contents of the document + */ + content: string | Array; +}; + +export type Docs_Doc = { + readonly id: Common_uuid; + metadata?: { + [key: string]: unknown; + }; + /** + * When this resource was created as UTC date-time + */ + readonly created_at: string; + /** + * Title describing what this document contains + */ + title: string; + /** + * Contents of the document + */ + content: string | Array; +}; + +export type Docs_DocOwner = { + id: Common_uuid; + role: "user" | "agent"; +}; + +export type role = "user" | "agent"; + +export type Docs_DocReference = { + /** + * The owner of this document. + */ + owner: Docs_DocOwner; + /** + * ID of the document + */ + readonly id: Common_uuid; + title?: string; + snippets: Array; + distance: number | null; +}; + +export type Docs_DocSearchResponse = { + /** + * The documents that were found + */ + docs: Array; + /** + * The time taken to search in seconds + */ + time: number; +}; + +export type Docs_EmbedQueryRequest = { + /** + * Text or texts to embed + */ + text: string | Array; +}; + +export type Docs_EmbedQueryResponse = { + /** + * The embedded vectors + */ + vectors: Array>; +}; + +export type Docs_HybridDocSearchRequest = Docs_BaseDocSearchRequest & { + /** + * The confidence cutoff level + */ + confidence: number; + /** + * The weight to apply to BM25 vs Vector search results. 0 => pure BM25; 1 => pure vector; + */ + alpha: number; + /** + * Text to use in the search. In `hybrid` search mode, either `text` or both `text` and `vector` fields are required. + */ + text: string; + /** + * Vector to use in the search. Must be the same dimensions as the embedding model or else an error will be thrown. + */ + vector: Array; +}; + +export type Docs_Snippet = { + index: number; + content: string; +}; + +export type Docs_TextOnlyDocSearchRequest = Docs_BaseDocSearchRequest & { + /** + * Text to use in the search. + */ + text: string; +}; + +export type Docs_VectorDocSearchRequest = Docs_BaseDocSearchRequest & { + /** + * The confidence cutoff level + */ + confidence: number; + /** + * Vector to use in the search. Must be the same dimensions as the embedding model or else an error will be thrown. + */ + vector: Array; +}; + +export type Entries_BaseEntry = { + role: Entries_ChatMLRole; + name: string | null; + content: + | Array< + | { + text: string; + /** + * The type (fixed to 'text') + */ + type: "text"; + } + | { + /** + * The image URL + */ + image_url: { + /** + * Image URL or base64 data url (e.g. `data:image/jpeg;base64,`) + */ + url: string; + /** + * The detail level of the image + */ + detail: Entries_ImageDetail; + }; + /** + * The type (fixed to 'image_url') + */ + type: "image_url"; + } + > + | Tools_Tool + | Tools_ChosenToolCall + | string + | Tools_ToolResponse + | Array< + | Array< + | { + text: string; + /** + * The type (fixed to 'text') + */ + type: "text"; + } + | { + /** + * The image URL + */ + image_url: { + /** + * Image URL or base64 data url (e.g. `data:image/jpeg;base64,`) + */ + url: string; + /** + * The detail level of the image + */ + detail: Entries_ImageDetail; + }; + /** + * The type (fixed to 'image_url') + */ + type: "image_url"; + } + > + | Tools_Tool + | Tools_ChosenToolCall + | string + | Tools_ToolResponse + >; + source: + | "api_request" + | "api_response" + | "tool_response" + | "internal" + | "summarizer" + | "meta"; + tokenizer: string; + token_count: number; + /** + * This is the time that this event refers to. + */ + timestamp: number; +}; + +export type source = + | "api_request" + | "api_response" + | "tool_response" + | "internal" + | "summarizer" + | "meta"; + +/** + * ChatML role (system|assistant|user|function_call|function|function_response|auto) + */ +export type Entries_ChatMLRole = + | "user" + | "assistant" + | "system" + | "function" + | "function_response" + | "function_call" + | "auto"; + +export type Entries_Entry = Entries_BaseEntry & { + /** + * When this resource was created as UTC date-time + */ + readonly created_at: string; + readonly id: Common_uuid; +}; + +export type Entries_History = { + entries: Array; + relations: Array; + readonly session_id: Common_uuid; + /** + * When this resource was created as UTC date-time + */ + readonly created_at: string; +}; + +/** + * Image detail level + */ +export type Entries_ImageDetail = "low" | "high" | "auto"; + +export type Entries_Relation = { + head: Common_uuid; + relation: string; + tail: Common_uuid; +}; + +/** + * Payload for creating an execution + */ +export type Executions_CreateExecutionRequest = { + /** + * The input to the execution + */ + input: { + [key: string]: unknown; + }; + metadata?: { + [key: string]: unknown; + }; +}; + +export type Executions_Execution = { + /** + * The ID of the task that the execution is running + */ + readonly task_id: Common_uuid; + /** + * The status of the execution + */ + readonly status: + | "queued" + | "starting" + | "running" + | "awaiting_input" + | "succeeded" + | "failed" + | "cancelled"; + /** + * The input to the execution + */ + input: { + [key: string]: unknown; + }; + /** + * When this resource was created as UTC date-time + */ + readonly created_at: string; + /** + * When this resource was updated as UTC date-time + */ + readonly updated_at: string; + metadata?: { + [key: string]: unknown; + }; + readonly id: Common_uuid; +}; + +/** + * The status of the execution + */ +export type status = + | "queued" + | "starting" + | "running" + | "awaiting_input" + | "succeeded" + | "failed" + | "cancelled"; + +export type Executions_ResumeExecutionRequest = + Executions_UpdateExecutionRequest & { + status: "running"; + /** + * The input to resume the execution with + */ + input?: { + [key: string]: unknown; + }; + }; + +export type status2 = "running"; + +export type Executions_StopExecutionRequest = + Executions_UpdateExecutionRequest & { + status: "cancelled"; + /** + * The reason for stopping the execution + */ + reason: string | null; + }; + +export type status3 = "cancelled"; + +export type Executions_TaskTokenResumeExecutionRequest = { + status: "running"; + /** + * The input to resume the execution with + */ + input?: { + [key: string]: unknown; + }; +}; + +export type Executions_Transition = { + readonly type: "finish" | "wait" | "resume" | "error" | "step" | "cancelled"; + readonly execution_id: Common_uuid; + readonly output: unknown; + readonly current: Executions_TransitionTarget; + readonly next: Executions_TransitionTarget | null; + readonly id: Common_uuid; + metadata?: { + [key: string]: unknown; + }; + /** + * When this resource was created as UTC date-time + */ + readonly created_at: string; + /** + * When this resource was updated as UTC date-time + */ + readonly updated_at: string; +}; + +export type type2 = + | "finish" + | "wait" + | "resume" + | "error" + | "step" + | "cancelled"; + +export type Executions_TransitionTarget = { + workflow: Common_identifierSafeUnicode; + step: number; +}; + +export type Executions_UpdateExecutionRequest = { + status: + | "queued" + | "starting" + | "running" + | "awaiting_input" + | "succeeded" + | "failed" + | "cancelled"; +}; + +/** + * Current state (one of: pending, in_progress, retrying, succeeded, aborted, failed) + */ +export type Jobs_JobState = + | "pending" + | "in_progress" + | "retrying" + | "succeeded" + | "aborted" + | "failed" + | "unknown"; + +export type Jobs_JobStatus = { + readonly id: Common_uuid; + /** + * When this resource was created as UTC date-time + */ + readonly created_at: string; + /** + * When this resource was updated as UTC date-time + */ + readonly updated_at: string; + /** + * Name of the job + */ + name: Common_identifierSafeUnicode; + /** + * Reason for the current state of the job + */ + reason: string; + /** + * Whether this Job supports progress updates + */ + has_progress: boolean; + /** + * Progress percentage + */ + progress: number; + /** + * Current state of the job + */ + state: Jobs_JobState; +}; + +export type Sessions_ContextOverflowType = "truncate" | "adaptive"; + +export type Sessions_CreateOrUpdateSessionRequest = + Sessions_CreateSessionRequest & { + id: Common_uuid; + /** + * User ID of user associated with this session + */ + user?: Common_uuid; + users?: Array; + /** + * Agent ID of agent associated with this session + */ + agent?: Common_uuid; + agents?: Array; + /** + * A specific situation that sets the background for this session + */ + situation: string; + /** + * Render system and assistant message content as jinja templates + */ + render_templates: boolean; + /** + * Threshold value for the adaptive context functionality + */ + token_budget: number | null; + /** + * Action to start on context window overflow + */ + context_overflow: Sessions_ContextOverflowType | null; + metadata?: { + [key: string]: unknown; + }; + }; + +/** + * Payload for creating a session + */ +export type Sessions_CreateSessionRequest = { + /** + * User ID of user associated with this session + */ + user?: Common_uuid; + users?: Array; + /** + * Agent ID of agent associated with this session + */ + agent?: Common_uuid; + agents?: Array; + /** + * A specific situation that sets the background for this session + */ + situation: string; + /** + * Render system and assistant message content as jinja templates + */ + render_templates: boolean; + /** + * Threshold value for the adaptive context functionality + */ + token_budget: number | null; + /** + * Action to start on context window overflow + */ + context_overflow: Sessions_ContextOverflowType | null; + metadata?: { + [key: string]: unknown; + }; +}; + +export type Sessions_MultiAgentMultiUserSession = Sessions_Session & { + agents: Array; + users: Array; +}; + +export type Sessions_MultiAgentNoUserSession = Sessions_Session & { + agents: Array; +}; + +export type Sessions_MultiAgentSingleUserSession = Sessions_Session & { + agents: Array; + user: Common_uuid; +}; + +/** + * Payload for patching a session + */ +export type Sessions_PatchSessionRequest = { + /** + * A specific situation that sets the background for this session + */ + situation?: string; + /** + * Render system and assistant message content as jinja templates + */ + render_templates?: boolean; + /** + * Threshold value for the adaptive context functionality + */ + token_budget?: number | null; + /** + * Action to start on context window overflow + */ + context_overflow?: Sessions_ContextOverflowType | null; + metadata?: { + [key: string]: unknown; + }; +}; + +export type Sessions_Session = { + /** + * A specific situation that sets the background for this session + */ + situation: string; + /** + * Summary (null at the beginning) - generated automatically after every interaction + */ + readonly summary: string | null; + /** + * Render system and assistant message content as jinja templates + */ + render_templates: boolean; + /** + * Threshold value for the adaptive context functionality + */ + token_budget: number | null; + /** + * Action to start on context window overflow + */ + context_overflow: Sessions_ContextOverflowType | null; + readonly id: Common_uuid; + metadata?: { + [key: string]: unknown; + }; + /** + * When this resource was created as UTC date-time + */ + readonly created_at: string; + /** + * When this resource was updated as UTC date-time + */ + readonly updated_at: string; + /** + * Discriminator property for Session. + */ + kind?: string; +}; + +export type Sessions_SingleAgentMultiUserSession = Sessions_Session & { + agent: Common_uuid; + users: Array; +}; + +export type Sessions_SingleAgentNoUserSession = Sessions_Session & { + agent: Common_uuid; +}; + +export type Sessions_SingleAgentSingleUserSession = Sessions_Session & { + agent: Common_uuid; + user: Common_uuid; +}; + +/** + * Payload for updating a session + */ +export type Sessions_UpdateSessionRequest = { + /** + * A specific situation that sets the background for this session + */ + situation: string; + /** + * Render system and assistant message content as jinja templates + */ + render_templates: boolean; + /** + * Threshold value for the adaptive context functionality + */ + token_budget: number | null; + /** + * Action to start on context window overflow + */ + context_overflow: Sessions_ContextOverflowType | null; + metadata?: { + [key: string]: unknown; + }; +}; + +export type Tasks_CaseThen = { + /** + * The condition to evaluate + */ + case: Common_PyExpression | "_"; + /** + * The steps to run if the condition is true + */ + then: + | Tasks_EvaluateStep + | Tasks_ToolCallStep + | Tasks_PromptStep + | Tasks_GetStep + | Tasks_SetStep + | Tasks_LogStep + | Tasks_EmbedStep + | Tasks_SearchStep + | Tasks_ReturnStep + | Tasks_SleepStep + | Tasks_ErrorWorkflowStep + | Tasks_YieldStep + | Tasks_WaitForInputStep; +}; + +/** + * Payload for creating a task + */ +export type Tasks_CreateTaskRequest = { + name: string; + description: string; + /** + * The entrypoint of the task. + */ + main: Array< + | Tasks_EvaluateStep + | Tasks_ToolCallStep + | Tasks_PromptStep + | Tasks_GetStep + | Tasks_SetStep + | Tasks_LogStep + | Tasks_EmbedStep + | Tasks_SearchStep + | Tasks_ReturnStep + | Tasks_SleepStep + | Tasks_ErrorWorkflowStep + | Tasks_YieldStep + | Tasks_WaitForInputStep + | Tasks_IfElseWorkflowStep + | Tasks_SwitchStep + | Tasks_ForeachStep + | Tasks_ParallelStep + | ({ + /** + * The kind of step + */ + readonly kind_: "map_reduce"; + } & { + readonly kind_: "map_reduce"; + /** + * The variable to iterate over + */ + over: Common_PyExpression; + /** + * The steps to run for each iteration + */ + map: + | Tasks_EvaluateStep + | Tasks_ToolCallStep + | Tasks_PromptStep + | Tasks_GetStep + | Tasks_SetStep + | Tasks_LogStep + | Tasks_EmbedStep + | Tasks_SearchStep; + /** + * The expression to reduce the results. + * If not provided, the results are collected and returned as a list. + * A special parameter named `results` is the accumulator and `_` is the current value. + */ + reduce?: Common_PyExpression; + initial?: unknown; + }) + >; + /** + * The schema for the input to the task. `null` means all inputs are valid. + */ + input_schema: { + [key: string]: unknown; + } | null; + /** + * Tools defined specifically for this task not included in the Agent itself. + */ + tools: Array; + /** + * Whether to inherit tools from the parent agent or not. Defaults to true. + */ + inherit_tools: boolean; + metadata?: { + [key: string]: unknown; + }; + [key: string]: + | (unknown[] | string | unknown | Tasks_TaskTool | boolean) + | undefined; +}; + +export type Tasks_EmbedStep = { + /** + * The kind of step + */ + readonly kind_: "embed"; +} & { + readonly kind_: "embed"; + /** + * The text to embed + */ + embed: Docs_EmbedQueryRequest; +}; + +/** + * The kind of step + */ +export type kind_ = "embed"; + +export type Tasks_ErrorWorkflowStep = { + /** + * The kind of step + */ + readonly kind_: "error"; +} & { + readonly kind_: "error"; + /** + * The error message + */ + error: string; +}; + +/** + * The kind of step + */ +export type kind_2 = "error"; + +export type Tasks_EvaluateStep = { + /** + * The kind of step + */ + readonly kind_: "evaluate"; +} & { + readonly kind_: "evaluate"; + /** + * The expression to evaluate + */ + evaluate: { + [key: string]: Common_PyExpression; + }; +}; + +/** + * The kind of step + */ +export type kind_3 = "evaluate"; + +export type Tasks_ForeachDo = { + /** + * The variable to iterate over. + * VALIDATION: Should NOT return more than 1000 elements. + */ + in: Common_PyExpression; + /** + * The steps to run for each iteration + */ + do: + | Tasks_EvaluateStep + | Tasks_ToolCallStep + | Tasks_PromptStep + | Tasks_GetStep + | Tasks_SetStep + | Tasks_LogStep + | Tasks_EmbedStep + | Tasks_SearchStep; +}; + +export type Tasks_ForeachStep = { + /** + * The kind of step + */ + readonly kind_: "foreach"; +} & { + readonly kind_: "foreach"; + /** + * The steps to run for each iteration + */ + foreach: Tasks_ForeachDo; +}; + +/** + * The kind of step + */ +export type kind_4 = "foreach"; + +export type Tasks_GetStep = { + /** + * The kind of step + */ + readonly kind_: "get"; +} & { + readonly kind_: "get"; + /** + * The key to get + */ + get: string; +}; + +/** + * The kind of step + */ +export type kind_5 = "get"; + +export type Tasks_IfElseWorkflowStep = { + /** + * The kind of step + */ + readonly kind_: "if_else"; +} & { + readonly kind_: "if_else"; + /** + * The condition to evaluate + */ + if: Common_PyExpression; + /** + * The steps to run if the condition is true + */ + then: + | Tasks_EvaluateStep + | Tasks_ToolCallStep + | Tasks_PromptStep + | Tasks_GetStep + | Tasks_SetStep + | Tasks_LogStep + | Tasks_EmbedStep + | Tasks_SearchStep + | Tasks_ReturnStep + | Tasks_SleepStep + | Tasks_ErrorWorkflowStep + | Tasks_YieldStep + | Tasks_WaitForInputStep; + /** + * The steps to run if the condition is false + */ + else: + | Tasks_EvaluateStep + | Tasks_ToolCallStep + | Tasks_PromptStep + | Tasks_GetStep + | Tasks_SetStep + | Tasks_LogStep + | Tasks_EmbedStep + | Tasks_SearchStep + | Tasks_ReturnStep + | Tasks_SleepStep + | Tasks_ErrorWorkflowStep + | Tasks_YieldStep + | Tasks_WaitForInputStep; +}; + +/** + * The kind of step + */ +export type kind_6 = "if_else"; + +export type Tasks_LogStep = { + /** + * The kind of step + */ + readonly kind_: "log"; +} & { + readonly kind_: "log"; + /** + * The value to log + */ + log: Common_PyExpression; +}; + +/** + * The kind of step + */ +export type kind_7 = "log"; + +export type Tasks_ParallelStep = { + /** + * The kind of step + */ + readonly kind_: "parallel"; +} & { + readonly kind_: "parallel"; + ""?: + | Tasks_EvaluateStep + | Tasks_ToolCallStep + | Tasks_PromptStep + | Tasks_GetStep + | Tasks_SetStep + | Tasks_LogStep + | Tasks_EmbedStep + | Tasks_SearchStep; +}; + +/** + * The kind of step + */ +export type kind_8 = "parallel"; + +/** + * Payload for patching a task + */ +export type Tasks_PatchTaskRequest = { + description?: string; + /** + * The entrypoint of the task. + */ + main?: Array< + | Tasks_EvaluateStep + | Tasks_ToolCallStep + | Tasks_PromptStep + | Tasks_GetStep + | Tasks_SetStep + | Tasks_LogStep + | Tasks_EmbedStep + | Tasks_SearchStep + | Tasks_ReturnStep + | Tasks_SleepStep + | Tasks_ErrorWorkflowStep + | Tasks_YieldStep + | Tasks_WaitForInputStep + | Tasks_IfElseWorkflowStep + | Tasks_SwitchStep + | Tasks_ForeachStep + | Tasks_ParallelStep + | ({ + /** + * Discriminator property for BaseWorkflowStep. + */ + kind_?: string; + } & { + /** + * The variable to iterate over + */ + over: Common_PyExpression; + /** + * The steps to run for each iteration + */ + map: + | Tasks_EvaluateStep + | Tasks_ToolCallStep + | Tasks_PromptStep + | Tasks_GetStep + | Tasks_SetStep + | Tasks_LogStep + | Tasks_EmbedStep + | Tasks_SearchStep; + /** + * The expression to reduce the results. + * If not provided, the results are collected and returned as a list. + * A special parameter named `results` is the accumulator and `_` is the current value. + */ + reduce?: Common_PyExpression; + initial?: unknown; + }) + >; + /** + * The schema for the input to the task. `null` means all inputs are valid. + */ + input_schema?: { + [key: string]: unknown; + } | null; + /** + * Tools defined specifically for this task not included in the Agent itself. + */ + tools?: Array; + /** + * Whether to inherit tools from the parent agent or not. Defaults to true. + */ + inherit_tools?: boolean; + metadata?: { + [key: string]: unknown; + }; + [key: string]: + | (unknown[] | string | unknown | Tasks_TaskTool | boolean) + | undefined; +}; + +export type Tasks_PromptStep = { + /** + * The kind of step + */ + readonly kind_: "prompt"; +} & { + readonly kind_: "prompt"; + /** + * The prompt to run + */ + prompt: + | Common_JinjaTemplate + | Array<{ + /** + * The role of the message + */ + role: Entries_ChatMLRole; + /** + * The content parts of the message + */ + content: + | Common_JinjaTemplate + | Array + | Array< + | { + text: Common_JinjaTemplate; + /** + * The type (fixed to 'text') + */ + type: "text"; + } + | { + /** + * The image URL + */ + image_url: { + /** + * Image URL or base64 data url (e.g. `data:image/jpeg;base64,`) + */ + url: string; + /** + * The detail level of the image + */ + detail: Entries_ImageDetail; + }; + /** + * The type (fixed to 'image_url') + */ + type: "image_url"; + } + >; + /** + * Name + */ + name?: string; + /** + * Whether to continue this message or return a new one + */ + continue?: boolean; + }>; + /** + * Settings for the prompt + */ + settings?: Chat_ChatSettings; +}; + +/** + * The kind of step + */ +export type kind_9 = "prompt"; + +export type Tasks_ReturnStep = { + /** + * The kind of step + */ + readonly kind_: "return"; +} & { + readonly kind_: "return"; + /** + * The value to return + */ + return: { + [key: string]: Common_PyExpression; + }; +}; + +/** + * The kind of step + */ +export type kind_10 = "return"; + +export type Tasks_SearchStep = { + /** + * The kind of step + */ + readonly kind_: "search"; +} & { + readonly kind_: "search"; + /** + * The search query + */ + search: + | Docs_VectorDocSearchRequest + | Docs_TextOnlyDocSearchRequest + | Docs_HybridDocSearchRequest; +}; + +/** + * The kind of step + */ +export type kind_11 = "search"; + +export type Tasks_SetKey = { + /** + * The key to set + */ + key: string; + /** + * The value to set + */ + value: Common_PyExpression; +}; + +export type Tasks_SetStep = { + /** + * The kind of step + */ + readonly kind_: "set"; +} & { + readonly kind_: "set"; + /** + * The value to set + */ + set: Tasks_SetKey; +}; + +/** + * The kind of step + */ +export type kind_12 = "set"; + +export type Tasks_SleepFor = { + /** + * The number of seconds to sleep for + */ + seconds: number; + /** + * The number of minutes to sleep for + */ + minutes: number; + /** + * The number of hours to sleep for + */ + hours: number; + /** + * The number of days to sleep for + */ + days: number; +}; + +export type Tasks_SleepStep = { + /** + * The kind of step + */ + readonly kind_: "sleep"; +} & { + readonly kind_: "sleep"; + /** + * The duration to sleep for (max 31 days) + */ + sleep: Tasks_SleepFor; +}; + +/** + * The kind of step + */ +export type kind_13 = "sleep"; + +export type Tasks_SwitchStep = { + /** + * The kind of step + */ + readonly kind_: "switch"; +} & { + readonly kind_: "switch"; + /** + * The cond tree + */ + switch: Array; +}; + +/** + * The kind of step + */ +export type kind_14 = "switch"; + +/** + * Object describing a Task + */ +export type Tasks_Task = { + name: string; + description: string; + /** + * The entrypoint of the task. + */ + main: Array< + | Tasks_EvaluateStep + | Tasks_ToolCallStep + | Tasks_PromptStep + | Tasks_GetStep + | Tasks_SetStep + | Tasks_LogStep + | Tasks_EmbedStep + | Tasks_SearchStep + | Tasks_ReturnStep + | Tasks_SleepStep + | Tasks_ErrorWorkflowStep + | Tasks_YieldStep + | Tasks_WaitForInputStep + | Tasks_IfElseWorkflowStep + | Tasks_SwitchStep + | Tasks_ForeachStep + | Tasks_ParallelStep + | ({ + /** + * The kind of step + */ + readonly kind_: "map_reduce"; + } & { + readonly kind_: "map_reduce"; + /** + * The variable to iterate over + */ + over: Common_PyExpression; + /** + * The steps to run for each iteration + */ + map: + | Tasks_EvaluateStep + | Tasks_ToolCallStep + | Tasks_PromptStep + | Tasks_GetStep + | Tasks_SetStep + | Tasks_LogStep + | Tasks_EmbedStep + | Tasks_SearchStep; + /** + * The expression to reduce the results. + * If not provided, the results are collected and returned as a list. + * A special parameter named `results` is the accumulator and `_` is the current value. + */ + reduce?: Common_PyExpression; + initial?: unknown; + }) + >; + /** + * The schema for the input to the task. `null` means all inputs are valid. + */ + input_schema: { + [key: string]: unknown; + } | null; + /** + * Tools defined specifically for this task not included in the Agent itself. + */ + tools: Array; + /** + * Whether to inherit tools from the parent agent or not. Defaults to true. + */ + inherit_tools: boolean; + readonly id: Common_uuid; + /** + * When this resource was created as UTC date-time + */ + readonly created_at: string; + /** + * When this resource was updated as UTC date-time + */ + readonly updated_at: string; + metadata?: { + [key: string]: unknown; + }; + [key: string]: + | (unknown[] | string | unknown | Tasks_TaskTool | boolean) + | undefined; +}; + +export type Tasks_TaskTool = Tools_CreateToolRequest & { + /** + * Read-only: Whether the tool was inherited or not. Only applies within tasks. + */ + readonly inherited?: boolean; +}; + +export type Tasks_ToolCallStep = { + /** + * The kind of step + */ + readonly kind_: "tool_call"; +} & { + readonly kind_: "tool_call"; + /** + * The tool to run + */ + tool: Common_toolRef; + /** + * The input parameters for the tool (defaults to last step output) + */ + arguments: + | { + [key: string]: Common_PyExpression; + } + | "_"; +}; + +/** + * The kind of step + */ +export type kind_15 = "tool_call"; + +/** + * Payload for updating a task + */ +export type Tasks_UpdateTaskRequest = { + description: string; + /** + * The entrypoint of the task. + */ + main: Array< + | Tasks_EvaluateStep + | Tasks_ToolCallStep + | Tasks_PromptStep + | Tasks_GetStep + | Tasks_SetStep + | Tasks_LogStep + | Tasks_EmbedStep + | Tasks_SearchStep + | Tasks_ReturnStep + | Tasks_SleepStep + | Tasks_ErrorWorkflowStep + | Tasks_YieldStep + | Tasks_WaitForInputStep + | Tasks_IfElseWorkflowStep + | Tasks_SwitchStep + | Tasks_ForeachStep + | Tasks_ParallelStep + | ({ + /** + * The kind of step + */ + readonly kind_: "map_reduce"; + } & { + readonly kind_: "map_reduce"; + /** + * The variable to iterate over + */ + over: Common_PyExpression; + /** + * The steps to run for each iteration + */ + map: + | Tasks_EvaluateStep + | Tasks_ToolCallStep + | Tasks_PromptStep + | Tasks_GetStep + | Tasks_SetStep + | Tasks_LogStep + | Tasks_EmbedStep + | Tasks_SearchStep; + /** + * The expression to reduce the results. + * If not provided, the results are collected and returned as a list. + * A special parameter named `results` is the accumulator and `_` is the current value. + */ + reduce?: Common_PyExpression; + initial?: unknown; + }) + >; + /** + * The schema for the input to the task. `null` means all inputs are valid. + */ + input_schema: { + [key: string]: unknown; + } | null; + /** + * Tools defined specifically for this task not included in the Agent itself. + */ + tools: Array; + /** + * Whether to inherit tools from the parent agent or not. Defaults to true. + */ + inherit_tools: boolean; + metadata?: { + [key: string]: unknown; + }; + [key: string]: + | (unknown[] | string | unknown | Tasks_TaskTool | boolean) + | undefined; +}; + +export type Tasks_WaitForInputInfo = { + /** + * Any additional info or data + */ + info: { + [key: string]: Common_PyExpression; + }; +}; + +export type Tasks_WaitForInputStep = { + /** + * The kind of step + */ + readonly kind_: "wait_for_input"; +} & { + readonly kind_: "wait_for_input"; + /** + * Any additional info or data + */ + wait_for_input: Tasks_WaitForInputInfo; +}; + +/** + * The kind of step + */ +export type kind_16 = "wait_for_input"; + +export type Tasks_YieldStep = { + /** + * The kind of step + */ + readonly kind_: "yield"; +} & { + readonly kind_: "yield"; + /** + * The subworkflow to run. + * VALIDATION: Should resolve to a defined subworkflow. + */ + workflow: string; + /** + * The input parameters for the subworkflow (defaults to last step output) + */ + arguments: + | { + [key: string]: Common_PyExpression; + } + | "_"; +}; + +/** + * The kind of step + */ +export type kind_17 = "yield"; + +export type Tools_ChosenFunctionCall = Tools_ChosenToolCall & { + function: Tools_FunctionCallOption; + type: "function"; +}; + +export type type3 = "function"; + +/** + * The response tool value generated by the model + */ +export type Tools_ChosenToolCall = { + /** + * Whether this tool is a `function`, `api_call`, `system` etc. (Only `function` tool supported right now) + */ + type: Tools_ToolType; + function?: Tools_FunctionCallOption; + integration?: unknown; + system?: unknown; + api_call?: unknown; + readonly id: Common_uuid; +}; + +/** + * Payload for creating a tool + */ +export type Tools_CreateToolRequest = { + /** + * Whether this tool is a `function`, `api_call`, `system` etc. (Only `function` tool supported right now) + */ + type: Tools_ToolType; + /** + * Name of the tool (must be unique for this agent and a valid python identifier string ) + */ + name: Common_validPythonIdentifier; + background: boolean; + /** + * The function to call + */ + function: Tools_FunctionDef; + integration?: unknown; + system?: unknown; + api_call?: unknown; +}; + +export type Tools_FunctionCallOption = { + /** + * The name of the function + */ + name: string; +}; + +/** + * Function definition + */ +export type Tools_FunctionDef = { + /** + * DO NOT USE: This will be overriden by the tool name. Here only for compatibility reasons. + */ + name?: unknown; + /** + * Description of the function + */ + description?: Common_identifierSafeUnicode; + /** + * The parameters the function accepts + */ + parameters?: { + [key: string]: unknown; + }; +}; + +export type Tools_NamedFunctionChoice = Tools_NamedToolChoice & { + function: Tools_FunctionCallOption; + type: "function"; +}; + +export type Tools_NamedToolChoice = { + /** + * Whether this tool is a `function`, `api_call`, `system` etc. (Only `function` tool supported right now) + */ + type: Tools_ToolType; + function?: Tools_FunctionCallOption; + integration?: unknown; + system?: unknown; + api_call?: unknown; +}; + +/** + * Payload for patching a tool + */ +export type Tools_PatchToolRequest = { + /** + * Whether this tool is a `function`, `api_call`, `system` etc. (Only `function` tool supported right now) + */ + type?: Tools_ToolType; + /** + * Name of the tool (must be unique for this agent and a valid python identifier string ) + */ + name?: Common_validPythonIdentifier; + background?: boolean; + /** + * The function to call + */ + function?: Tools_FunctionDef; + integration?: unknown; + system?: unknown; + api_call?: unknown; +}; + +export type Tools_Tool = { + /** + * Whether this tool is a `function`, `api_call`, `system` etc. (Only `function` tool supported right now) + */ + type: Tools_ToolType; + /** + * Name of the tool (must be unique for this agent and a valid python identifier string ) + */ + name: Common_validPythonIdentifier; + background: boolean; + /** + * The function to call + */ + function: Tools_FunctionDef; + integration?: unknown; + system?: unknown; + api_call?: unknown; + /** + * When this resource was created as UTC date-time + */ + readonly created_at: string; + /** + * When this resource was updated as UTC date-time + */ + readonly updated_at: string; + readonly id: Common_uuid; +}; + +export type Tools_ToolResponse = { + id: Common_uuid; + /** + * The output of the tool + */ + output: { + [key: string]: unknown; + }; +}; + +export type Tools_ToolType = "function" | "integration" | "system" | "api_call"; + +/** + * Payload for updating a tool + */ +export type Tools_UpdateToolRequest = { + /** + * Whether this tool is a `function`, `api_call`, `system` etc. (Only `function` tool supported right now) + */ + type: Tools_ToolType; + /** + * Name of the tool (must be unique for this agent and a valid python identifier string ) + */ + name: Common_validPythonIdentifier; + background: boolean; + /** + * The function to call + */ + function: Tools_FunctionDef; + integration?: unknown; + system?: unknown; + api_call?: unknown; +}; + +export type Users_CreateOrUpdateUserRequest = Users_CreateUserRequest & { + id: Common_uuid; +}; + +/** + * Payload for creating a user (and associated documents) + */ +export type Users_CreateUserRequest = { + metadata?: { + [key: string]: unknown; + }; + /** + * Name of the user + */ + name: Common_identifierSafeUnicode; + /** + * About the user + */ + about: string; +}; + +/** + * Payload for patching a user + */ +export type Users_PatchUserRequest = { + metadata?: { + [key: string]: unknown; + }; + /** + * Name of the user + */ + name?: Common_identifierSafeUnicode; + /** + * About the user + */ + about?: string; +}; + +/** + * Payload for updating a user + */ +export type Users_UpdateUserRequest = { + metadata?: { + [key: string]: unknown; + }; + /** + * Name of the user + */ + name: Common_identifierSafeUnicode; + /** + * About the user + */ + about: string; +}; + +export type Users_User = { + readonly id: Common_uuid; + metadata?: { + [key: string]: unknown; + }; + /** + * When this resource was created as UTC date-time + */ + readonly created_at: string; + /** + * When this resource was updated as UTC date-time + */ + readonly updated_at: string; + /** + * Name of the user + */ + name: Common_identifierSafeUnicode; + /** + * About the user + */ + about: string; +}; + +export type ParameterAgents_CreateOrUpdateAgentRequest_id = Common_uuid; + +/** + * Sort direction + */ +export type ParameterCommon_PaginationOptions_direction = "asc" | "desc"; + +/** + * Limit the number of items returned + */ +export type ParameterCommon_PaginationOptions_limit = Common_limit; + +/** + * JSON string of object that should be used to filter objects by metadata + */ +export type ParameterCommon_PaginationOptions_metadata_filter = string; + +/** + * Offset the items returned + */ +export type ParameterCommon_PaginationOptions_offset = Common_offset; + +/** + * Sort by a field + */ +export type ParameterCommon_PaginationOptions_sort_by = + | "created_at" + | "updated_at"; + +export type ParameterSessions_CreateOrUpdateSessionRequest_id = Common_uuid; + +export type ParameterTasks_CreateOrUpdateTaskRequest_id = Common_uuid; + +export type ParameterUsers_CreateOrUpdateUserRequest = Common_uuid; + +export type AgentsRouteListData = { + query: { + /** + * Sort direction + */ + direction: "asc" | "desc"; + /** + * Limit the number of items returned + */ + limit: Common_limit; + /** + * JSON string of object that should be used to filter objects by metadata + */ + metadata_filter: string; + /** + * Offset the items returned + */ + offset: Common_offset; + /** + * Sort by a field + */ + sort_by: "created_at" | "updated_at"; + }; +}; + +export type AgentsRouteListResponse = { + items: Array; +}; + +export type AgentsRouteListError = unknown; + +export type AgentsRouteCreateData = { + body: Agents_CreateAgentRequest; +}; + +export type AgentsRouteCreateResponse = Common_ResourceCreatedResponse; + +export type AgentsRouteCreateError = unknown; + +export type AgentsRouteCreateOrUpdateData = { + body: Agents_UpdateAgentRequest; + path: { + id: Common_uuid; + }; +}; + +export type AgentsRouteCreateOrUpdateResponse = Common_ResourceUpdatedResponse; + +export type AgentsRouteCreateOrUpdateError = unknown; + +export type AgentsRouteUpdateData = { + body: Agents_UpdateAgentRequest; + path: { + /** + * ID of the resource + */ + id: Common_uuid; + }; +}; + +export type AgentsRouteUpdateResponse = Common_ResourceUpdatedResponse; + +export type AgentsRouteUpdateError = unknown; + +export type AgentsRoutePatchData = { + body: Agents_PatchAgentRequest; + path: { + /** + * ID of the resource + */ + id: Common_uuid; + }; +}; + +export type AgentsRoutePatchResponse = Common_ResourceUpdatedResponse; + +export type AgentsRoutePatchError = unknown; + +export type AgentsRouteDeleteData = { + path: { + /** + * ID of the resource + */ + id: Common_uuid; + }; +}; + +export type AgentsRouteDeleteResponse = Common_ResourceDeletedResponse; + +export type AgentsRouteDeleteError = unknown; + +export type AgentsRouteGetData = { + path: { + /** + * ID of the resource + */ + id: Common_uuid; + }; +}; + +export type AgentsRouteGetResponse = Agents_Agent; + +export type AgentsRouteGetError = unknown; + +export type AgentDocsRouteListData = { + path: { + /** + * ID of parent + */ + id: Common_uuid; + }; + query: { + /** + * Sort direction + */ + direction: "asc" | "desc"; + /** + * Limit the number of items returned + */ + limit: Common_limit; + /** + * JSON string of object that should be used to filter objects by metadata + */ + metadata_filter: string; + /** + * Offset the items returned + */ + offset: Common_offset; + /** + * Sort by a field + */ + sort_by: "created_at" | "updated_at"; + }; +}; + +export type AgentDocsRouteListResponse = { + results: Array; +}; + +export type AgentDocsRouteListError = unknown; + +export type AgentDocsRouteCreateData = { + body: Docs_CreateDocRequest; + path: { + /** + * ID of parent resource + */ + id: Common_uuid; + }; +}; + +export type AgentDocsRouteCreateResponse = Common_ResourceCreatedResponse; + +export type AgentDocsRouteCreateError = unknown; + +export type AgentDocsRouteDeleteData = { + path: { + /** + * ID of the resource to be deleted + */ + child_id: Common_uuid; + /** + * ID of parent resource + */ + id: Common_uuid; + }; +}; + +export type AgentDocsRouteDeleteResponse = Common_ResourceDeletedResponse; + +export type AgentDocsRouteDeleteError = unknown; + +export type AgentsDocsSearchRouteSearchData = { + body: { + body: + | Docs_VectorDocSearchRequest + | Docs_TextOnlyDocSearchRequest + | Docs_HybridDocSearchRequest; + }; + path: { + /** + * ID of the parent + */ + id: Common_uuid; + }; +}; + +export type AgentsDocsSearchRouteSearchResponse = Docs_DocSearchResponse; + +export type AgentsDocsSearchRouteSearchError = unknown; + +export type TasksRouteListData = { + path: { + /** + * ID of parent + */ + id: Common_uuid; + }; + query: { + /** + * Sort direction + */ + direction: "asc" | "desc"; + /** + * Limit the number of items returned + */ + limit: Common_limit; + /** + * JSON string of object that should be used to filter objects by metadata + */ + metadata_filter: string; + /** + * Offset the items returned + */ + offset: Common_offset; + /** + * Sort by a field + */ + sort_by: "created_at" | "updated_at"; + }; +}; + +export type TasksRouteListResponse = { + results: Array; +}; + +export type TasksRouteListError = unknown; + +export type TasksRouteCreateData = { + body: Tasks_CreateTaskRequest; + path: { + /** + * ID of parent resource + */ + id: Common_uuid; + }; +}; + +export type TasksRouteCreateResponse = Common_ResourceCreatedResponse; + +export type TasksRouteCreateError = unknown; + +export type TasksRouteUpdateData = { + body: Tasks_UpdateTaskRequest; + path: { + /** + * ID of the resource to be updated + */ + child_id: Common_uuid; + /** + * ID of parent resource + */ + id: Common_uuid; + }; +}; + +export type TasksRouteUpdateResponse = Common_ResourceUpdatedResponse; + +export type TasksRouteUpdateError = unknown; + +export type TasksRoutePatchData = { + body: Tasks_PatchTaskRequest; + path: { + /** + * ID of the resource to be patched + */ + child_id: Common_uuid; + /** + * ID of parent resource + */ + id: Common_uuid; + }; +}; + +export type TasksRoutePatchResponse = Common_ResourceUpdatedResponse; + +export type TasksRoutePatchError = unknown; + +export type TasksRouteDeleteData = { + path: { + /** + * ID of the resource to be deleted + */ + child_id: Common_uuid; + /** + * ID of parent resource + */ + id: Common_uuid; + }; +}; + +export type TasksRouteDeleteResponse = Common_ResourceDeletedResponse; + +export type TasksRouteDeleteError = unknown; + +export type AgentToolsRouteListData = { + path: { + /** + * ID of parent + */ + id: Common_uuid; + }; + query: { + /** + * Sort direction + */ + direction: "asc" | "desc"; + /** + * Limit the number of items returned + */ + limit: Common_limit; + /** + * JSON string of object that should be used to filter objects by metadata + */ + metadata_filter: string; + /** + * Offset the items returned + */ + offset: Common_offset; + /** + * Sort by a field + */ + sort_by: "created_at" | "updated_at"; + }; +}; + +export type AgentToolsRouteListResponse = { + results: Array; +}; + +export type AgentToolsRouteListError = unknown; + +export type AgentToolsRouteCreateData = { + body: Agents_CreateAgentRequest; + path: { + /** + * ID of parent resource + */ + id: Common_uuid; + }; +}; + +export type AgentToolsRouteCreateResponse = Common_ResourceCreatedResponse; + +export type AgentToolsRouteCreateError = unknown; + +export type AgentToolsRouteUpdateData = { + body: Tools_UpdateToolRequest; + path: { + /** + * ID of the resource to be updated + */ + child_id: Common_uuid; + /** + * ID of parent resource + */ + id: Common_uuid; + }; +}; + +export type AgentToolsRouteUpdateResponse = Common_ResourceUpdatedResponse; + +export type AgentToolsRouteUpdateError = unknown; + +export type AgentToolsRoutePatchData = { + body: Tools_PatchToolRequest; + path: { + /** + * ID of the resource to be patched + */ + child_id: Common_uuid; + /** + * ID of parent resource + */ + id: Common_uuid; + }; +}; + +export type AgentToolsRoutePatchResponse = Common_ResourceUpdatedResponse; + +export type AgentToolsRoutePatchError = unknown; + +export type AgentToolsRouteDeleteData = { + path: { + /** + * ID of the resource to be deleted + */ + child_id: Common_uuid; + /** + * ID of parent resource + */ + id: Common_uuid; + }; +}; + +export type AgentToolsRouteDeleteResponse = Common_ResourceDeletedResponse; + +export type AgentToolsRouteDeleteError = unknown; + +export type TasksCreateOrUpdateRouteCreateOrUpdateData = { + body: Tasks_CreateTaskRequest; + path: { + id: Common_uuid; + /** + * ID of the agent + */ + parent_id: Common_uuid; + }; +}; + +export type TasksCreateOrUpdateRouteCreateOrUpdateResponse = + Common_ResourceUpdatedResponse; + +export type TasksCreateOrUpdateRouteCreateOrUpdateError = unknown; + +export type IndividualDocsRouteGetData = { + path: { + /** + * ID of the resource + */ + id: Common_uuid; + }; +}; + +export type IndividualDocsRouteGetResponse = Docs_Doc; + +export type IndividualDocsRouteGetError = unknown; + +export type EmbedRouteEmbedData = { + body: { + body: Docs_EmbedQueryRequest; + }; +}; + +export type EmbedRouteEmbedResponse = Docs_EmbedQueryResponse; + +export type EmbedRouteEmbedError = unknown; + +export type ExecutionsRouteResumeWithTaskTokenData = { + /** + * Request to resume an execution with a task token + */ + body: Executions_TaskTokenResumeExecutionRequest; + query: { + /** + * A Task Token is a unique identifier for a specific Task Execution. + */ + task_token: string; + }; +}; + +export type ExecutionsRouteResumeWithTaskTokenResponse = + Common_ResourceUpdatedResponse; + +export type ExecutionsRouteResumeWithTaskTokenError = unknown; + +export type ExecutionsRouteGetData = { + path: { + /** + * ID of the resource + */ + id: Common_uuid; + }; +}; + +export type ExecutionsRouteGetResponse = Executions_Execution; + +export type ExecutionsRouteGetError = unknown; + +export type ExecutionsRouteUpdateData = { + body: Executions_UpdateExecutionRequest; + path: { + /** + * ID of the resource + */ + id: Common_uuid; + }; +}; + +export type ExecutionsRouteUpdateResponse = Common_ResourceUpdatedResponse; + +export type ExecutionsRouteUpdateError = unknown; + +export type ExecutionTransitionsRouteListData = { + path: { + /** + * ID of parent + */ + id: Common_uuid; + }; + query: { + /** + * Sort direction + */ + direction: "asc" | "desc"; + /** + * Limit the number of items returned + */ + limit: Common_limit; + /** + * JSON string of object that should be used to filter objects by metadata + */ + metadata_filter: string; + /** + * Offset the items returned + */ + offset: Common_offset; + /** + * Sort by a field + */ + sort_by: "created_at" | "updated_at"; + }; +}; + +export type ExecutionTransitionsRouteListResponse = { + results: Array<{ + transitions: Array; + }>; +}; + +export type ExecutionTransitionsRouteListError = unknown; + +export type JobRouteGetData = { + path: { + /** + * ID of the resource + */ + id: Common_uuid; + }; +}; + +export type JobRouteGetResponse = Jobs_JobStatus; + +export type JobRouteGetError = unknown; + +export type SessionsRouteListData = { + query: { + /** + * Sort direction + */ + direction: "asc" | "desc"; + /** + * Limit the number of items returned + */ + limit: Common_limit; + /** + * JSON string of object that should be used to filter objects by metadata + */ + metadata_filter: string; + /** + * Offset the items returned + */ + offset: Common_offset; + /** + * Sort by a field + */ + sort_by: "created_at" | "updated_at"; + }; +}; + +export type SessionsRouteListResponse = { + items: Array; +}; + +export type SessionsRouteListError = unknown; + +export type SessionsRouteCreateData = { + body: Sessions_CreateSessionRequest; +}; + +export type SessionsRouteCreateResponse = Common_ResourceCreatedResponse; + +export type SessionsRouteCreateError = unknown; + +export type SessionsRouteCreateOrUpdateData = { + body: Sessions_CreateSessionRequest; + path: { + id: Common_uuid; + }; +}; + +export type SessionsRouteCreateOrUpdateResponse = + Common_ResourceUpdatedResponse; + +export type SessionsRouteCreateOrUpdateError = unknown; + +export type SessionsRouteUpdateData = { + body: Sessions_UpdateSessionRequest; + path: { + /** + * ID of the resource + */ + id: Common_uuid; + }; +}; + +export type SessionsRouteUpdateResponse = Common_ResourceUpdatedResponse; + +export type SessionsRouteUpdateError = unknown; + +export type SessionsRoutePatchData = { + body: Sessions_PatchSessionRequest; + path: { + /** + * ID of the resource + */ + id: Common_uuid; + }; +}; + +export type SessionsRoutePatchResponse = Common_ResourceUpdatedResponse; + +export type SessionsRoutePatchError = unknown; + +export type SessionsRouteDeleteData = { + path: { + /** + * ID of the resource + */ + id: Common_uuid; + }; +}; + +export type SessionsRouteDeleteResponse = Common_ResourceDeletedResponse; + +export type SessionsRouteDeleteError = unknown; + +export type SessionsRouteGetData = { + path: { + /** + * ID of the resource + */ + id: Common_uuid; + }; +}; + +export type SessionsRouteGetResponse = Sessions_Session; + +export type SessionsRouteGetError = unknown; + +export type ChatRouteGenerateData = { + /** + * Request to generate a response from the model + */ + body: Chat_ChatInput; + path: { + /** + * The session ID + */ + id: Common_uuid; + }; +}; + +export type ChatRouteGenerateResponse = + | Chat_ChunkChatResponse + | Chat_MessageChatResponse; + +export type ChatRouteGenerateError = unknown; + +export type HistoryRouteDeleteData = { + path: { + /** + * ID of the resource + */ + id: Common_uuid; + }; +}; + +export type HistoryRouteDeleteResponse = Common_ResourceDeletedResponse; + +export type HistoryRouteDeleteError = unknown; + +export type HistoryRouteHistoryData = { + path: { + /** + * ID of parent + */ + id: Common_uuid; + }; +}; + +export type HistoryRouteHistoryResponse = Entries_History; + +export type HistoryRouteHistoryError = unknown; + +export type TaskExecutionsRouteCreateData = { + body: Executions_CreateExecutionRequest; + path: { + /** + * ID of parent resource + */ + id: Common_uuid; + }; +}; + +export type TaskExecutionsRouteCreateResponse = Common_ResourceCreatedResponse; + +export type TaskExecutionsRouteCreateError = unknown; + +export type TaskExecutionsRouteListData = { + path: { + /** + * ID of parent + */ + id: Common_uuid; + }; + query: { + /** + * Sort direction + */ + direction: "asc" | "desc"; + /** + * Limit the number of items returned + */ + limit: Common_limit; + /** + * JSON string of object that should be used to filter objects by metadata + */ + metadata_filter: string; + /** + * Offset the items returned + */ + offset: Common_offset; + /** + * Sort by a field + */ + sort_by: "created_at" | "updated_at"; + }; +}; + +export type TaskExecutionsRouteListResponse = { + results: Array; +}; + +export type TaskExecutionsRouteListError = unknown; + +export type UsersRouteListData = { + query: { + /** + * Sort direction + */ + direction: "asc" | "desc"; + /** + * Limit the number of items returned + */ + limit: Common_limit; + /** + * JSON string of object that should be used to filter objects by metadata + */ + metadata_filter: string; + /** + * Offset the items returned + */ + offset: Common_offset; + /** + * Sort by a field + */ + sort_by: "created_at" | "updated_at"; + }; +}; + +export type UsersRouteListResponse = { + items: Array; +}; + +export type UsersRouteListError = unknown; + +export type UsersRouteCreateData = { + body: Users_CreateUserRequest; +}; + +export type UsersRouteCreateResponse = Common_ResourceCreatedResponse; + +export type UsersRouteCreateError = unknown; + +export type UsersRouteCreateOrUpdateData = { + body: Users_CreateUserRequest; + path: { + id: Common_uuid; + }; +}; + +export type UsersRouteCreateOrUpdateResponse = Common_ResourceUpdatedResponse; + +export type UsersRouteCreateOrUpdateError = unknown; + +export type UsersRouteUpdateData = { + body: Users_UpdateUserRequest; + path: { + /** + * ID of the resource + */ + id: Common_uuid; + }; +}; + +export type UsersRouteUpdateResponse = Common_ResourceUpdatedResponse; + +export type UsersRouteUpdateError = unknown; + +export type UsersRoutePatchData = { + body: Users_PatchUserRequest; + path: { + /** + * ID of the resource + */ + id: Common_uuid; + }; +}; + +export type UsersRoutePatchResponse = Common_ResourceUpdatedResponse; + +export type UsersRoutePatchError = unknown; + +export type UsersRouteDeleteData = { + path: { + /** + * ID of the resource + */ + id: Common_uuid; + }; +}; + +export type UsersRouteDeleteResponse = Common_ResourceDeletedResponse; + +export type UsersRouteDeleteError = unknown; + +export type UsersRouteGetData = { + path: { + /** + * ID of the resource + */ + id: Common_uuid; + }; +}; + +export type UsersRouteGetResponse = Users_User; + +export type UsersRouteGetError = unknown; + +export type UserDocsRouteListData = { + path: { + /** + * ID of parent + */ + id: Common_uuid; + }; + query: { + /** + * Sort direction + */ + direction: "asc" | "desc"; + /** + * Limit the number of items returned + */ + limit: Common_limit; + /** + * JSON string of object that should be used to filter objects by metadata + */ + metadata_filter: string; + /** + * Offset the items returned + */ + offset: Common_offset; + /** + * Sort by a field + */ + sort_by: "created_at" | "updated_at"; + }; +}; + +export type UserDocsRouteListResponse = { + results: Array; +}; + +export type UserDocsRouteListError = unknown; + +export type UserDocsRouteCreateData = { + body: Docs_CreateDocRequest; + path: { + /** + * ID of parent resource + */ + id: Common_uuid; + }; +}; + +export type UserDocsRouteCreateResponse = Common_ResourceCreatedResponse; + +export type UserDocsRouteCreateError = unknown; + +export type UserDocsRouteDeleteData = { + path: { + /** + * ID of the resource to be deleted + */ + child_id: Common_uuid; + /** + * ID of parent resource + */ + id: Common_uuid; + }; +}; + +export type UserDocsRouteDeleteResponse = Common_ResourceDeletedResponse; + +export type UserDocsRouteDeleteError = unknown; + +export type UserDocsSearchRouteSearchData = { + body: { + body: + | Docs_VectorDocSearchRequest + | Docs_TextOnlyDocSearchRequest + | Docs_HybridDocSearchRequest; + }; + path: { + /** + * ID of the parent + */ + id: Common_uuid; + }; +}; + +export type UserDocsSearchRouteSearchResponse = Docs_DocSearchResponse; + +export type UserDocsSearchRouteSearchError = unknown; diff --git a/sdks/ts/src/baseRoutes.ts b/sdks/ts/src/baseRoutes.ts deleted file mode 100644 index 833810ca7..000000000 --- a/sdks/ts/src/baseRoutes.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { JulepApiClient } from "./api"; - -export class BaseRoutes { - constructor(protected apiClient: JulepApiClient) {} -} diff --git a/sdks/ts/src/client.ts b/sdks/ts/src/client.ts index 86a415549..9f2129b37 100644 --- a/sdks/ts/src/client.ts +++ b/sdks/ts/src/client.ts @@ -1,6 +1,7 @@ import { OpenAI } from "openai"; import { Chat, Completions } from "openai/resources/index"; import typia, { tags } from "typia"; +import { client } from "./api"; // import { AgentsManager } from "./managers/agent"; // import { UsersManager } from "./managers/user"; @@ -9,7 +10,7 @@ import typia, { tags } from "typia"; // import { SessionsManager } from "./managers/session"; // import { ToolsManager } from "./managers/tool"; import { AgentsRoutes } from "./agents"; -import { JulepApiClient } from "./api"; +// import { JulepApiClient } from "./api"; import { JULEP_API_KEY, JULEP_API_URL } from "./env"; import { patchCreate } from "./utils/openaiPatch"; import { UsersRoutes } from "./users"; @@ -30,7 +31,6 @@ interface ClientOptions { * Client for interacting with the Julep API and OpenAI. */ export class Client { - private _apiClient: JulepApiClient; private _openaiClient: OpenAI; /** @@ -53,11 +53,11 @@ export class Client { ); } - this._apiClient = new JulepApiClient({ - TOKEN: apiKey, - BASE: baseUrl, - WITH_CREDENTIALS: false, + client.setConfig({ + baseUrl, + headers: { authorization: `Bearer ${apiKey}` }, }); + // this._apiClient = client; const openaiBaseUrl = new URL(baseUrl).origin; this._openaiClient = new OpenAI({ @@ -72,15 +72,15 @@ export class Client { // this.docs = new DocsManager(this._apiClient); // this.memories = new MemoriesManager(this._apiClient); // this.tools = new ToolsManager(this._apiClient); - this.agents = new AgentsRoutes(this._apiClient); - this.tasks = new TasksRoutes(this._apiClient); - this.executions = new ExecutionsRoutes(this._apiClient); - this.docs = new DocsRoutes(this._apiClient); - this.sessions = new SessionsRoutes(this._apiClient); - this.users = new UsersRoutes(this._apiClient); - this.history = new HistoryRoutes(this._apiClient); - this.embed = new EmbedRoutes(this._apiClient); - this.jobs = new JobsRoutes(this._apiClient); + this.agents = new AgentsRoutes(); + this.tasks = new TasksRoutes(); + this.executions = new ExecutionsRoutes(); + this.docs = new DocsRoutes(); + this.sessions = new SessionsRoutes(); + this.users = new UsersRoutes(); + this.history = new HistoryRoutes(); + this.embed = new EmbedRoutes(); + this.jobs = new JobsRoutes(); this.chat = this._openaiClient.chat; patchCreate(this.chat.completions, this.chat); diff --git a/sdks/ts/src/docs.ts b/sdks/ts/src/docs.ts index 4890af333..352b29511 100644 --- a/sdks/ts/src/docs.ts +++ b/sdks/ts/src/docs.ts @@ -1,8 +1,7 @@ -import { Common_uuid } from "./api"; -import { BaseRoutes } from "./baseRoutes"; +import { Common_uuid, individualDocsRouteGet } from "./api"; -export class DocsRoutes extends BaseRoutes { +export class DocsRoutes { async get({ id }: { id: Common_uuid }) { - return await this.apiClient.default.individualDocsRouteGet({ id }); + return await individualDocsRouteGet({ path: { id } }); } } diff --git a/sdks/ts/src/embed.ts b/sdks/ts/src/embed.ts index 0dfa38f78..af4b2b0d8 100644 --- a/sdks/ts/src/embed.ts +++ b/sdks/ts/src/embed.ts @@ -1,7 +1,6 @@ -import { Docs_EmbedQueryRequest } from "./api"; -import { BaseRoutes } from "./baseRoutes"; +import { embedRouteEmbed, Docs_EmbedQueryRequest } from "./api"; -export class EmbedRoutes extends BaseRoutes { +export class EmbedRoutes { async embed({ requestBody, }: { @@ -9,6 +8,6 @@ export class EmbedRoutes extends BaseRoutes { body: Docs_EmbedQueryRequest; }; }) { - return await this.apiClient.default.embedRouteEmbed({ requestBody }); + return await embedRouteEmbed({ body: requestBody }); } } diff --git a/sdks/ts/src/executions.ts b/sdks/ts/src/executions.ts index f33e7d5b4..df219d3e1 100644 --- a/sdks/ts/src/executions.ts +++ b/sdks/ts/src/executions.ts @@ -4,10 +4,13 @@ import { Common_uuid, Executions_TaskTokenResumeExecutionRequest, Executions_UpdateExecutionRequest, + executionsRouteGet, + executionsRouteResumeWithTaskToken, + executionsRouteUpdate, + executionTransitionsRouteList, } from "./api"; -import { BaseRoutes } from "./baseRoutes"; -export class ExecutionsRoutes extends BaseRoutes { +export class ExecutionsRoutes { async resume({ taskToken, requestBody, @@ -15,14 +18,14 @@ export class ExecutionsRoutes extends BaseRoutes { taskToken: string; requestBody: Executions_TaskTokenResumeExecutionRequest; }) { - return await this.apiClient.default.executionsRouteResumeWithTaskToken({ - taskToken, - requestBody, + return await executionsRouteResumeWithTaskToken({ + query: { task_token: taskToken }, + body: requestBody, }); } async get({ id }: { id: Common_uuid }) { - return await this.apiClient.default.executionsRouteGet({ id }); + return await executionsRouteGet({ path: { id } }); } async update({ @@ -32,9 +35,9 @@ export class ExecutionsRoutes extends BaseRoutes { id: Common_uuid; requestBody: Executions_UpdateExecutionRequest; }) { - return await this.apiClient.default.executionsRouteUpdate({ - id, - requestBody, + return await executionsRouteUpdate({ + path: { id }, + body: requestBody, }); } @@ -53,13 +56,15 @@ export class ExecutionsRoutes extends BaseRoutes { direction?: "asc" | "desc"; metadataFilter?: string; }) { - return await this.apiClient.default.executionTransitionsRouteList({ - id, - limit, - offset, - sortBy, - direction, - metadataFilter, + return await executionTransitionsRouteList({ + path: { id }, + query: { + limit, + offset, + sort_by: sortBy, + direction, + metadata_filter: metadataFilter, + }, }); } } diff --git a/sdks/ts/src/history.ts b/sdks/ts/src/history.ts index 50394ae2d..9101ca5b5 100644 --- a/sdks/ts/src/history.ts +++ b/sdks/ts/src/history.ts @@ -1,12 +1,11 @@ -import { Common_uuid } from "./api"; -import { BaseRoutes } from "./baseRoutes"; +import { Common_uuid, historyRouteDelete, historyRouteHistory } from "./api"; -export class HistoryRoutes extends BaseRoutes { +export class HistoryRoutes { async delete({ id }: { id: Common_uuid }) { - return await this.apiClient.default.historyRouteDelete({ id }); + return await historyRouteDelete({ path: { id } }); } async get({ id }: { id: Common_uuid }) { - return await this.apiClient.default.historyRouteHistory({ id }); + return await historyRouteHistory({ path: { id } }); } } diff --git a/sdks/ts/src/jobs.ts b/sdks/ts/src/jobs.ts index 293965788..65f6c085e 100644 --- a/sdks/ts/src/jobs.ts +++ b/sdks/ts/src/jobs.ts @@ -1,8 +1,7 @@ -import { Common_uuid } from "./api"; -import { BaseRoutes } from "./baseRoutes"; +import { Common_uuid, jobRouteGet } from "./api"; -export class JobsRoutes extends BaseRoutes { +export class JobsRoutes { async get({ id }: { id: Common_uuid }) { - return await this.apiClient.default.jobRouteGet({ id }); + return await jobRouteGet({ path: { id } }); } } diff --git a/sdks/ts/src/sessions.ts b/sdks/ts/src/sessions.ts index fb6d7cfa7..2fa7fa27f 100644 --- a/sdks/ts/src/sessions.ts +++ b/sdks/ts/src/sessions.ts @@ -1,21 +1,30 @@ import { Chat_ChatInput, + chatRouteGenerate, Common_limit, Common_offset, Common_uuid, + historyRouteDelete, + historyRouteHistory, Sessions_CreateSessionRequest, Sessions_PatchSessionRequest, Sessions_UpdateSessionRequest, + sessionsRouteCreate, + sessionsRouteCreateOrUpdate, + sessionsRouteDelete, + sessionsRouteGet, + sessionsRouteList, + sessionsRoutePatch, + sessionsRouteUpdate, } from "./api"; -import { BaseRoutes } from "./baseRoutes"; -export class SessionsRoutes extends BaseRoutes { +export class SessionsRoutes { async create({ requestBody, }: { requestBody: Sessions_CreateSessionRequest; }) { - return await this.apiClient.default.sessionsRouteCreate({ requestBody }); + return await sessionsRouteCreate({ body: requestBody }); } async createOrUpdate({ @@ -25,18 +34,18 @@ export class SessionsRoutes extends BaseRoutes { id: Common_uuid; requestBody: Sessions_CreateSessionRequest; }) { - return await this.apiClient.default.sessionsRouteCreateOrUpdate({ - id, - requestBody, + return await sessionsRouteCreateOrUpdate({ + path: { id }, + body: requestBody, }); } async delete({ id }: { id: Common_uuid }) { - return await this.apiClient.default.sessionsRouteDelete({ id }); + return await sessionsRouteDelete({ path: { id } }); } async get({ id }: { id: Common_uuid }) { - return await this.apiClient.default.sessionsRouteGet({ id }); + return await sessionsRouteGet({ path: { id } }); } async list({ @@ -52,12 +61,14 @@ export class SessionsRoutes extends BaseRoutes { direction?: "asc" | "desc"; metadataFilter?: string; }) { - return await this.apiClient.default.sessionsRouteList({ - limit, - offset, - sortBy, - direction, - metadataFilter, + return await sessionsRouteList({ + query: { + limit, + offset, + sort_by: sortBy, + direction, + metadata_filter: metadataFilter, + }, }); } @@ -68,7 +79,7 @@ export class SessionsRoutes extends BaseRoutes { id: Common_uuid; requestBody: Sessions_PatchSessionRequest; }) { - return await this.apiClient.default.sessionsRoutePatch({ id, requestBody }); + return await sessionsRoutePatch({ path: { id }, body: requestBody }); } async update({ @@ -78,9 +89,9 @@ export class SessionsRoutes extends BaseRoutes { id: Common_uuid; requestBody: Sessions_UpdateSessionRequest; }) { - return await this.apiClient.default.sessionsRouteUpdate({ - id, - requestBody, + return await sessionsRouteUpdate({ + path: { id }, + body: requestBody, }); } @@ -91,14 +102,14 @@ export class SessionsRoutes extends BaseRoutes { id: Common_uuid; requestBody: Chat_ChatInput; }) { - return await this.apiClient.default.chatRouteGenerate({ id, requestBody }); + return await chatRouteGenerate({ path: { id }, body: requestBody }); } async history({ id }: { id: Common_uuid }) { - return await this.apiClient.default.historyRouteHistory({ id }); + return await historyRouteHistory({ path: { id } }); } async deleteHistory({ id }: { id: Common_uuid }) { - return await this.apiClient.default.historyRouteDelete({ id }); + return await historyRouteDelete({ path: { id } }); } } diff --git a/sdks/ts/src/tasks.ts b/sdks/ts/src/tasks.ts index 51d2d3304..7710c8d99 100644 --- a/sdks/ts/src/tasks.ts +++ b/sdks/ts/src/tasks.ts @@ -3,13 +3,20 @@ import { Common_offset, Common_uuid, Executions_CreateExecutionRequest, + taskExecutionsRouteCreate, + taskExecutionsRouteList, Tasks_CreateTaskRequest, Tasks_PatchTaskRequest, Tasks_UpdateTaskRequest, + tasksCreateOrUpdateRouteCreateOrUpdate, + tasksRouteCreate, + tasksRouteDelete, + tasksRouteList, + tasksRoutePatch, + tasksRouteUpdate, } from "./api"; -import { BaseRoutes } from "./baseRoutes"; -export class TasksRoutes extends BaseRoutes { +export class TasksRoutes { async create({ id, requestBody, @@ -17,7 +24,7 @@ export class TasksRoutes extends BaseRoutes { id: Common_uuid; requestBody: Tasks_CreateTaskRequest; }) { - return await this.apiClient.default.tasksRouteCreate({ id, requestBody }); + return await tasksRouteCreate({ path: { id }, body: requestBody }); } async createOrUpdate({ @@ -29,15 +36,14 @@ export class TasksRoutes extends BaseRoutes { id: Common_uuid; requestBody: Tasks_CreateTaskRequest; }) { - return await this.apiClient.default.tasksCreateOrUpdateRouteCreateOrUpdate({ - parentId, - id, - requestBody, + return await tasksCreateOrUpdateRouteCreateOrUpdate({ + path: { parent_id: parentId, id }, + body: requestBody, }); } async delete({ id, childId }: { id: Common_uuid; childId: Common_uuid }) { - return await this.apiClient.default.tasksRouteDelete({ id, childId }); + return await tasksRouteDelete({ path: { id, child_id: childId } }); } async list({ @@ -55,13 +61,15 @@ export class TasksRoutes extends BaseRoutes { direction?: "asc" | "desc"; metadataFilter?: string; }) { - return await this.apiClient.default.tasksRouteList({ - id, - limit, - offset, - sortBy, - direction, - metadataFilter, + return await tasksRouteList({ + path: { id }, + query: { + limit, + offset, + sort_by: sortBy, + direction, + metadata_filter: metadataFilter, + }, }); } @@ -74,10 +82,9 @@ export class TasksRoutes extends BaseRoutes { childId: Common_uuid; requestBody: Tasks_PatchTaskRequest; }) { - return await this.apiClient.default.tasksRoutePatch({ - id, - childId, - requestBody, + return await tasksRoutePatch({ + path: { id, child_id: childId }, + body: requestBody, }); } @@ -90,10 +97,9 @@ export class TasksRoutes extends BaseRoutes { childId: Common_uuid; requestBody: Tasks_UpdateTaskRequest; }) { - return await this.apiClient.default.tasksRouteUpdate({ - id, - childId, - requestBody, + return await tasksRouteUpdate({ + path: { id, child_id: childId }, + body: requestBody, }); } @@ -104,9 +110,9 @@ export class TasksRoutes extends BaseRoutes { id: Common_uuid; requestBody: Executions_CreateExecutionRequest; }) { - return await this.apiClient.default.taskExecutionsRouteCreate({ - id, - requestBody, + return await taskExecutionsRouteCreate({ + path: { id }, + body: requestBody, }); } @@ -125,13 +131,15 @@ export class TasksRoutes extends BaseRoutes { direction?: "asc" | "desc"; metadataFilter?: string; }) { - return await this.apiClient.default.taskExecutionsRouteList({ - id, - limit, - offset, - sortBy, - direction, - metadataFilter, + return await taskExecutionsRouteList({ + path: { id }, + query: { + limit, + offset, + sort_by: sortBy, + direction, + metadata_filter: metadataFilter, + }, }); } } diff --git a/sdks/ts/src/users.ts b/sdks/ts/src/users.ts index 920d87eef..560f9fb56 100644 --- a/sdks/ts/src/users.ts +++ b/sdks/ts/src/users.ts @@ -9,12 +9,21 @@ import { Docs_VectorDocSearchRequest, Docs_TextOnlyDocSearchRequest, Docs_HybridDocSearchRequest, + usersRouteCreate, + usersRouteCreateOrUpdate, + usersRouteDelete, + usersRouteGet, + usersRouteList, + usersRoutePatch, + usersRouteUpdate, + userDocsRouteCreate, + userDocsRouteList, + userDocsSearchRouteSearch, } from "./api"; -import { BaseRoutes } from "./baseRoutes"; -export class UsersRoutes extends BaseRoutes { +export class UsersRoutes { async create({ requestBody }: { requestBody: Users_CreateUserRequest }) { - return await this.apiClient.default.usersRouteCreate({ requestBody }); + return await usersRouteCreate({ body: requestBody }); } async createOrUpdate({ @@ -24,18 +33,18 @@ export class UsersRoutes extends BaseRoutes { id: Common_uuid; requestBody: Users_UpdateUserRequest; }) { - return await this.apiClient.default.usersRouteCreateOrUpdate({ - id, - requestBody, + return await usersRouteCreateOrUpdate({ + path: { id }, + body: requestBody, }); } async delete({ id }: { id: Common_uuid }) { - return await this.apiClient.default.usersRouteDelete({ id }); + return await usersRouteDelete({ path: { id } }); } async get({ id }: { id: Common_uuid }) { - return await this.apiClient.default.usersRouteGet({ id }); + return await usersRouteGet({ path: { id } }); } async list({ @@ -51,12 +60,14 @@ export class UsersRoutes extends BaseRoutes { direction?: "asc" | "desc"; metadataFilter?: string; }) { - return await this.apiClient.default.usersRouteList({ - limit, - offset, - sortBy, - direction, - metadataFilter, + return await usersRouteList({ + query: { + limit, + offset, + sort_by: sortBy, + direction, + metadata_filter: metadataFilter, + }, }); } @@ -67,7 +78,7 @@ export class UsersRoutes extends BaseRoutes { id: Common_uuid; requestBody: Users_PatchUserRequest; }) { - return this.apiClient.default.usersRoutePatch({ id, requestBody }); + return usersRoutePatch({ path: { id }, body: requestBody }); } async update({ @@ -77,7 +88,7 @@ export class UsersRoutes extends BaseRoutes { id: Common_uuid; requestBody: Users_UpdateUserRequest; }) { - return await this.apiClient.default.usersRouteUpdate({ id, requestBody }); + return await usersRouteUpdate({ path: { id }, body: requestBody }); } async createDoc({ @@ -87,9 +98,9 @@ export class UsersRoutes extends BaseRoutes { id: Common_uuid; requestBody: Docs_CreateDocRequest; }) { - return await this.apiClient.default.userDocsRouteCreate({ - id, - requestBody, + return await userDocsRouteCreate({ + path: { id }, + body: requestBody, }); } @@ -108,13 +119,15 @@ export class UsersRoutes extends BaseRoutes { direction?: "asc" | "desc"; metadataFilter?: string; }) { - return await this.apiClient.default.userDocsRouteList({ - id, - limit, - offset, - sortBy, - direction, - metadataFilter, + return await userDocsRouteList({ + path: { id }, + query: { + limit, + offset, + sort_by: sortBy, + direction, + metadata_filter: metadataFilter, + }, }); } @@ -133,9 +146,9 @@ export class UsersRoutes extends BaseRoutes { | Docs_HybridDocSearchRequest; }; }) { - return await this.apiClient.default.userDocsSearchRouteSearch({ - id, - requestBody, + return await userDocsSearchRouteSearch({ + path: { id }, + body: requestBody, }); } } diff --git a/sdks/ts/tests/agents.test.ts b/sdks/ts/tests/agents.test.ts index 6a19daa67..217bd793a 100644 --- a/sdks/ts/tests/agents.test.ts +++ b/sdks/ts/tests/agents.test.ts @@ -1,7 +1,6 @@ // agents.test.ts import { describe, expect, test } from "@jest/globals"; -import { Agents_Agent as Agent } from "../src/api"; import { setupClient } from "./fixtures"; @@ -24,7 +23,7 @@ const mockAgentUpdate = { }; describe("Julep Client Tests", () => { - let testAgent: Partial & { id: string }; + let testAgent: any; test("agents.create", async () => { const response = await client.agents.create({ @@ -36,7 +35,7 @@ describe("Julep Client Tests", () => { expect(response).toHaveProperty("created_at"); expect(response).toHaveProperty("jobs"); expect(response).toHaveProperty("id"); - expect(response.id).toBe(testAgent.id); + expect(response.data?.id).toBe(testAgent.id); }); test("agents.get", async () => { @@ -44,8 +43,8 @@ describe("Julep Client Tests", () => { expect(response).toHaveProperty("created_at"); expect(response).toHaveProperty("updated_at"); - expect(response.about).toBe(mockAgent.about); - expect(response.name).toBe(mockAgent.name); + expect(response.data?.about).toBe(mockAgent.about); + expect(response.data?.name).toBe(mockAgent.name); }); test("agents.update", async () => { @@ -54,7 +53,7 @@ describe("Julep Client Tests", () => { requestBody: mockAgentUpdate, }); - expect(response.id).toBe(testAgent.id); + expect(response.data?.id).toBe(testAgent.id); expect(response).toHaveProperty("updated_at"); expect(response).toHaveProperty("jobs"); }); @@ -62,9 +61,11 @@ describe("Julep Client Tests", () => { test("agents.list", async () => { const response = await client.agents.list({ offset: 0 }); - expect(response.items.length).toBeGreaterThan(0); + expect(response.data?.items.length).toBeGreaterThan(0); - const agent = response.items.find((agent) => agent.id === testAgent.id); + const agent = response.data?.items.find( + (agent) => agent.id === testAgent.id, + ); expect(agent).toBeDefined(); expect(agent!.id).toBe(testAgent.id); diff --git a/sdks/ts/tests/docs.test.ts b/sdks/ts/tests/docs.test.ts index 8056330a0..5ab5d97d5 100644 --- a/sdks/ts/tests/docs.test.ts +++ b/sdks/ts/tests/docs.test.ts @@ -4,15 +4,11 @@ import { afterAll, beforeAll, describe, expect, test } from "@jest/globals"; import { setupClient } from "./fixtures"; import { Client } from "../src"; -import { - Agents_Agent as Agent, - Common_ResourceCreatedResponse, -} from "../src/api"; describe("Julep Client Tests", () => { let client: Client; - let testAgent: Partial & { id: string }; - let testUser: Common_ResourceCreatedResponse; + let testAgent: any; + let testUser: any; let testAgentDocId: string; const mockDoc = { title: "test title", content: "test content" }; @@ -46,7 +42,7 @@ describe("Julep Client Tests", () => { requestBody: mockDoc, }); - testAgentDocId = response.id; + testAgentDocId = response.data!.id; expect(response).toHaveProperty("created_at"); expect(response).toHaveProperty("id"); @@ -70,9 +66,9 @@ describe("Julep Client Tests", () => { offset: 0, }); - expect(response.results.length).toBeGreaterThan(0); - expect(response.results[0].content).toBe(mockDoc.content); - expect(response.results[0].title).toBe(mockDoc.title); + expect(response.data?.results.length).toBeGreaterThan(0); + expect(response.data?.results[0].content).toBe(mockDoc.content); + expect(response.data?.results[0].title).toBe(mockDoc.title); }); test("user list docs", async () => { @@ -81,9 +77,9 @@ describe("Julep Client Tests", () => { offset: 0, }); - expect(response.results.length).toBeGreaterThan(0); - expect(response.results[0].content).toBe(mockDoc.content); - expect(response.results[0].title).toBe(mockDoc.title); + expect(response.data?.results.length).toBeGreaterThan(0); + expect(response.data?.results[0].content).toBe(mockDoc.content); + expect(response.data?.results[0].title).toBe(mockDoc.title); }); test("agent docs.delete", async () => { diff --git a/sdks/ts/tests/sessions.test.ts b/sdks/ts/tests/sessions.test.ts index dbe83e337..fff7d3b2e 100644 --- a/sdks/ts/tests/sessions.test.ts +++ b/sdks/ts/tests/sessions.test.ts @@ -55,7 +55,7 @@ describe("Sessions API", () => { let client: Client; let testSessionId: string; let testUser: Common_ResourceCreatedResponse; - let testAgent: Partial & { id: string }; + let testAgent: any; beforeAll(async () => { client = setupClient(); @@ -156,7 +156,7 @@ describe("Sessions API", () => { }); const response = await client.sessions.chat({ - id: session.id, + id: session.data?.id, requestBody: { messages: [ { @@ -172,9 +172,9 @@ describe("Sessions API", () => { }, }); - expect(response.choices).toBeDefined(); + expect(response.data?.choices).toBeDefined(); - const result = response.choices[0]; + const result = response.data?.choices[0]; if (isChat_ChatOutputChunk(result)) { expect(result.delta.content).toContain( @@ -202,7 +202,7 @@ describe("Sessions API", () => { it("sessions.history", async () => { const response = await client.sessions.history({ id: testSessionId }); - expect(response.entries.length).toBeGreaterThan(0); + expect(response.data?.entries.length).toBeGreaterThan(0); }); it("sessions.deleteHistory", async () => { diff --git a/sdks/ts/tests/simpleExample.test.ts b/sdks/ts/tests/simpleExample.test.ts index 27df810b2..8da2ef209 100644 --- a/sdks/ts/tests/simpleExample.test.ts +++ b/sdks/ts/tests/simpleExample.test.ts @@ -64,8 +64,8 @@ describe("Simple Agents Example", () => { const session = await client.sessions.create({ requestBody: { - agent: agent.id, - user: user.id, + agent: agent.data?.id, + user: user.data?.id, situation: situation, render_templates: true, context_overflow: "truncate", diff --git a/sdks/ts/tests/tools.test.ts b/sdks/ts/tests/tools.test.ts index 7f42459da..43fe6e7b7 100644 --- a/sdks/ts/tests/tools.test.ts +++ b/sdks/ts/tests/tools.test.ts @@ -12,7 +12,7 @@ import { describe("Tools API", () => { let client: Client; - let testAgent: Partial & { id: string }; + let testAgent: any; let testTool: Tool; const mockTool = { @@ -78,8 +78,8 @@ describe("Tools API", () => { id: testAgent.id, offset: 0, }); - expect(response.results.length).toBeGreaterThan(0); - const tool = response.results.find((tool) => tool.id === testTool.id); + expect(response.data?.results.length).toBeGreaterThan(0); + const tool = response.data?.results.find((tool) => tool.id === testTool.id); expect(tool).toBeDefined(); expect(tool!.id).toBe(testTool.id); diff --git a/sdks/ts/tests/users.test.ts b/sdks/ts/tests/users.test.ts index 4a528859c..7e1065539 100644 --- a/sdks/ts/tests/users.test.ts +++ b/sdks/ts/tests/users.test.ts @@ -20,7 +20,7 @@ const mockUserUpdate = { describe("User API", () => { let client: Client; - let testUser: Common_ResourceCreatedResponse; + let testUser: any; beforeAll(() => { client = setupClient();