diff --git a/package.json b/package.json index 423c922..b89890c 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "axios-retry": "^3.9.1", "dotenv": "^16.4.5", "moment-timezone": "^0.5.45", - "openai": "^4.60.0", + "openai": "^4.69.0", "semantic-release": "^21.1.2", "ts-node": "^10.9.2", "uuid": "^9.0.1" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1387aea..bc1b664 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,8 +27,8 @@ importers: specifier: ^0.5.45 version: 0.5.45 openai: - specifier: ^4.60.0 - version: 4.60.0(zod@3.23.8) + specifier: ^4.69.0 + version: 4.69.0(zod@3.23.8) semantic-release: specifier: ^21.1.2 version: 21.1.2(typescript@5.6.2) @@ -56,10 +56,10 @@ importers: version: 17.8.1 '@langchain/core': specifier: ^0.1.63 - version: 0.1.63(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)))(openai@4.60.0(zod@3.23.8)) + version: 0.1.63(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)))(openai@4.69.0(zod@3.23.8)) '@langchain/openai': specifier: ^0.0.14 - version: 0.0.14(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8))) + version: 0.0.14(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8))) '@tsconfig/recommended': specifier: ^1.0.7 version: 1.0.7 @@ -95,7 +95,7 @@ importers: version: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2)) langchain: specifier: ^0.1.37 - version: 0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)) + version: 0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)) lint-staged: specifier: ^14.0.1 version: 14.0.1 @@ -1461,9 +1461,6 @@ packages: '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} - '@types/qs@6.9.15': - resolution: {integrity: sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==} - '@types/retry@0.12.0': resolution: {integrity: sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==} @@ -1769,10 +1766,6 @@ packages: resolution: {integrity: sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==} engines: {node: '>=6'} - call-bind@1.0.7: - resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} - engines: {node: '>= 0.4'} - callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} @@ -2077,10 +2070,6 @@ packages: defaults@1.0.4: resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} - define-data-property@1.1.4: - resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} - engines: {node: '>= 0.4'} - del@6.1.1: resolution: {integrity: sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg==} engines: {node: '>=10'} @@ -2166,14 +2155,6 @@ packages: error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} - es-define-property@1.0.0: - resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} - engines: {node: '>= 0.4'} - - es-errors@1.3.0: - resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} - engines: {node: '>= 0.4'} - escalade@3.2.0: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} @@ -2225,6 +2206,7 @@ packages: eslint@8.57.0: resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true espree@9.6.1: @@ -2436,10 +2418,6 @@ packages: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} - get-intrinsic@1.2.4: - resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} - engines: {node: '>= 0.4'} - get-package-type@0.1.0: resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} engines: {node: '>=8.0.0'} @@ -2508,9 +2486,6 @@ packages: resolution: {integrity: sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw==} engines: {node: '>=18'} - gopd@1.0.1: - resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} - graceful-fs@4.2.10: resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} @@ -2537,17 +2512,6 @@ packages: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} - has-property-descriptors@1.0.2: - resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} - - has-proto@1.0.3: - resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} - engines: {node: '>= 0.4'} - - has-symbols@1.0.3: - resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} - engines: {node: '>= 0.4'} - hasown@2.0.2: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} @@ -3686,10 +3650,6 @@ packages: resolution: {integrity: sha512-1MQz1Ed8z2yckoBeSfkQHHO9K1yDRxxtotKSJ9yvcTUUxSvfvzEq5GwBrjjHEpMlq/k5gvXdmJ1SbYxWtpNoVg==} engines: {node: '>=8'} - object-inspect@1.13.2: - resolution: {integrity: sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==} - engines: {node: '>= 0.4'} - once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} @@ -3701,8 +3661,8 @@ packages: resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} engines: {node: '>=12'} - openai@4.60.0: - resolution: {integrity: sha512-U/wNmrUPdfsvU1GrKRP5mY5YHR3ev6vtdfNID6Sauz+oquWD8r+cXPL1xiUlYniosPKajy33muVHhGS/9/t6KA==} + openai@4.69.0: + resolution: {integrity: sha512-S3hOHSkk609KqwgH+7dwFrSvO3Gm3Nk0YWGyPHNscoMH/Y2tH1qunMi7gtZnLbUv4/N1elqCp6bDior2401kCQ==} hasBin: true peerDependencies: zod: ^3.23.8 @@ -3929,10 +3889,6 @@ packages: pure-rand@6.1.0: resolution: {integrity: sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==} - qs@6.13.0: - resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==} - engines: {node: '>=0.6'} - queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -4122,10 +4078,6 @@ packages: engines: {node: '>=10'} hasBin: true - set-function-length@1.2.2: - resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} - engines: {node: '>= 0.4'} - shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -4134,10 +4086,6 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} - side-channel@1.0.6: - resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} - engines: {node: '>= 0.4'} - signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} @@ -5858,13 +5806,13 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 - '@langchain/community@0.0.57(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)))(lodash@4.17.21)(openai@4.60.0(zod@3.23.8))': + '@langchain/community@0.0.57(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)))(lodash@4.17.21)(openai@4.69.0(zod@3.23.8))': dependencies: - '@langchain/core': 0.1.63(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)))(openai@4.60.0(zod@3.23.8)) - '@langchain/openai': 0.0.34(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8))) + '@langchain/core': 0.1.63(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)))(openai@4.69.0(zod@3.23.8)) + '@langchain/openai': 0.0.34(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8))) expr-eval: 2.0.2 flat: 5.0.2 - langsmith: 0.1.55(@langchain/core@0.1.63(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)))(openai@4.60.0(zod@3.23.8)))(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)))(openai@4.60.0(zod@3.23.8)) + langsmith: 0.1.55(@langchain/core@0.1.63(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)))(openai@4.69.0(zod@3.23.8)))(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)))(openai@4.69.0(zod@3.23.8)) uuid: 9.0.1 zod: 3.23.8 zod-to-json-schema: 3.23.3(zod@3.23.8) @@ -5875,13 +5823,13 @@ snapshots: - langchain - openai - '@langchain/core@0.1.63(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)))(openai@4.60.0(zod@3.23.8))': + '@langchain/core@0.1.63(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)))(openai@4.69.0(zod@3.23.8))': dependencies: ansi-styles: 5.2.0 camelcase: 6.3.0 decamelize: 1.2.0 js-tiktoken: 1.0.14 - langsmith: 0.1.55(@langchain/core@0.1.63(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)))(openai@4.60.0(zod@3.23.8)))(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)))(openai@4.60.0(zod@3.23.8)) + langsmith: 0.1.55(@langchain/core@0.1.63(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)))(openai@4.69.0(zod@3.23.8)))(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)))(openai@4.69.0(zod@3.23.8)) ml-distance: 4.0.1 mustache: 4.2.0 p-queue: 6.6.2 @@ -5893,13 +5841,13 @@ snapshots: - langchain - openai - '@langchain/core@0.2.32(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)))(openai@4.60.0(zod@3.23.8))': + '@langchain/core@0.2.32(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)))(openai@4.69.0(zod@3.23.8))': dependencies: ansi-styles: 5.2.0 camelcase: 6.3.0 decamelize: 1.2.0 js-tiktoken: 1.0.14 - langsmith: 0.1.55(@langchain/core@0.2.32(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)))(openai@4.60.0(zod@3.23.8)))(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)))(openai@4.60.0(zod@3.23.8)) + langsmith: 0.1.55(@langchain/core@0.2.32(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)))(openai@4.69.0(zod@3.23.8)))(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)))(openai@4.69.0(zod@3.23.8)) mustache: 4.2.0 p-queue: 6.6.2 p-retry: 4.6.2 @@ -5910,31 +5858,31 @@ snapshots: - langchain - openai - '@langchain/openai@0.0.14(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)))': + '@langchain/openai@0.0.14(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)))': dependencies: - '@langchain/core': 0.1.63(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)))(openai@4.60.0(zod@3.23.8)) + '@langchain/core': 0.1.63(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)))(openai@4.69.0(zod@3.23.8)) js-tiktoken: 1.0.14 - openai: 4.60.0(zod@3.23.8) + openai: 4.69.0(zod@3.23.8) zod: 3.23.8 zod-to-json-schema: 3.23.3(zod@3.23.8) transitivePeerDependencies: - encoding - langchain - '@langchain/openai@0.0.34(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)))': + '@langchain/openai@0.0.34(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)))': dependencies: - '@langchain/core': 0.1.63(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)))(openai@4.60.0(zod@3.23.8)) + '@langchain/core': 0.1.63(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)))(openai@4.69.0(zod@3.23.8)) js-tiktoken: 1.0.14 - openai: 4.60.0(zod@3.23.8) + openai: 4.69.0(zod@3.23.8) zod: 3.23.8 zod-to-json-schema: 3.23.3(zod@3.23.8) transitivePeerDependencies: - encoding - langchain - '@langchain/textsplitters@0.0.3(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)))(openai@4.60.0(zod@3.23.8))': + '@langchain/textsplitters@0.0.3(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)))(openai@4.69.0(zod@3.23.8))': dependencies: - '@langchain/core': 0.2.32(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)))(openai@4.60.0(zod@3.23.8)) + '@langchain/core': 0.2.32(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)))(openai@4.69.0(zod@3.23.8)) js-tiktoken: 1.0.14 transitivePeerDependencies: - langchain @@ -6214,8 +6162,6 @@ snapshots: '@types/normalize-package-data@2.4.4': {} - '@types/qs@6.9.15': {} - '@types/retry@0.12.0': {} '@types/semver@7.5.8': {} @@ -6577,14 +6523,6 @@ snapshots: cachedir@2.3.0: {} - call-bind@1.0.7: - dependencies: - es-define-property: 1.0.0 - es-errors: 1.3.0 - function-bind: 1.1.2 - get-intrinsic: 1.2.4 - set-function-length: 1.2.2 - callsites@3.1.0: {} camelcase-keys@6.2.2: @@ -6883,12 +6821,6 @@ snapshots: dependencies: clone: 1.0.4 - define-data-property@1.1.4: - dependencies: - es-define-property: 1.0.0 - es-errors: 1.3.0 - gopd: 1.0.1 - del@6.1.1: dependencies: globby: 11.1.0 @@ -6963,12 +6895,6 @@ snapshots: dependencies: is-arrayish: 0.2.1 - es-define-property@1.0.0: - dependencies: - get-intrinsic: 1.2.4 - - es-errors@1.3.0: {} - escalade@3.2.0: {} escape-string-regexp@1.0.5: {} @@ -7274,14 +7200,6 @@ snapshots: get-caller-file@2.0.5: {} - get-intrinsic@1.2.4: - dependencies: - es-errors: 1.3.0 - function-bind: 1.1.2 - has-proto: 1.0.3 - has-symbols: 1.0.3 - hasown: 2.0.2 - get-package-type@0.1.0: {} get-stream@6.0.1: {} @@ -7371,10 +7289,6 @@ snapshots: slash: 5.1.0 unicorn-magic: 0.1.0 - gopd@1.0.1: - dependencies: - get-intrinsic: 1.2.4 - graceful-fs@4.2.10: {} graceful-fs@4.2.11: {} @@ -7396,14 +7310,6 @@ snapshots: has-flag@4.0.0: {} - has-property-descriptors@1.0.2: - dependencies: - es-define-property: 1.0.0 - - has-proto@1.0.3: {} - - has-symbols@1.0.3: {} - hasown@2.0.2: dependencies: function-bind: 1.1.2 @@ -8001,19 +7907,19 @@ snapshots: kleur@3.0.3: {} - langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)): + langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)): dependencies: '@anthropic-ai/sdk': 0.9.1 - '@langchain/community': 0.0.57(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)))(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)) - '@langchain/core': 0.1.63(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)))(openai@4.60.0(zod@3.23.8)) - '@langchain/openai': 0.0.34(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8))) - '@langchain/textsplitters': 0.0.3(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)))(openai@4.60.0(zod@3.23.8)) + '@langchain/community': 0.0.57(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)))(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)) + '@langchain/core': 0.1.63(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)))(openai@4.69.0(zod@3.23.8)) + '@langchain/openai': 0.0.34(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8))) + '@langchain/textsplitters': 0.0.3(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)))(openai@4.69.0(zod@3.23.8)) binary-extensions: 2.3.0 js-tiktoken: 1.0.14 js-yaml: 4.1.0 jsonpointer: 5.0.1 langchainhub: 0.0.11 - langsmith: 0.1.55(@langchain/core@0.1.63(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)))(openai@4.60.0(zod@3.23.8)))(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)))(openai@4.60.0(zod@3.23.8)) + langsmith: 0.1.55(@langchain/core@0.1.63(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)))(openai@4.69.0(zod@3.23.8)))(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)))(openai@4.69.0(zod@3.23.8)) ml-distance: 4.0.1 openapi-types: 12.1.3 p-retry: 4.6.2 @@ -8099,7 +8005,7 @@ snapshots: langchainhub@0.0.11: {} - langsmith@0.1.55(@langchain/core@0.1.63(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)))(openai@4.60.0(zod@3.23.8)))(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)))(openai@4.60.0(zod@3.23.8)): + langsmith@0.1.55(@langchain/core@0.1.63(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)))(openai@4.69.0(zod@3.23.8)))(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)))(openai@4.69.0(zod@3.23.8)): dependencies: '@types/uuid': 10.0.0 commander: 10.0.1 @@ -8108,11 +8014,11 @@ snapshots: semver: 7.6.3 uuid: 10.0.0 optionalDependencies: - '@langchain/core': 0.1.63(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)))(openai@4.60.0(zod@3.23.8)) - langchain: 0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)) - openai: 4.60.0(zod@3.23.8) + '@langchain/core': 0.1.63(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)))(openai@4.69.0(zod@3.23.8)) + langchain: 0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)) + openai: 4.69.0(zod@3.23.8) - langsmith@0.1.55(@langchain/core@0.2.32(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)))(openai@4.60.0(zod@3.23.8)))(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)))(openai@4.60.0(zod@3.23.8)): + langsmith@0.1.55(@langchain/core@0.2.32(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)))(openai@4.69.0(zod@3.23.8)))(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)))(openai@4.69.0(zod@3.23.8)): dependencies: '@types/uuid': 10.0.0 commander: 10.0.1 @@ -8121,9 +8027,9 @@ snapshots: semver: 7.6.3 uuid: 10.0.0 optionalDependencies: - '@langchain/core': 0.2.32(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)))(openai@4.60.0(zod@3.23.8)) - langchain: 0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.60.0(zod@3.23.8)) - openai: 4.60.0(zod@3.23.8) + '@langchain/core': 0.2.32(langchain@0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)))(openai@4.69.0(zod@3.23.8)) + langchain: 0.1.37(axios@1.7.7)(handlebars@4.7.8)(ignore@5.3.2)(lodash@4.17.21)(openai@4.69.0(zod@3.23.8)) + openai: 4.69.0(zod@3.23.8) leven@3.1.0: {} @@ -8449,8 +8355,6 @@ snapshots: num-sort@2.1.0: {} - object-inspect@1.13.2: {} - once@1.4.0: dependencies: wrappy: 1.0.2 @@ -8463,17 +8367,15 @@ snapshots: dependencies: mimic-fn: 4.0.0 - openai@4.60.0(zod@3.23.8): + openai@4.69.0(zod@3.23.8): dependencies: '@types/node': 18.19.50 '@types/node-fetch': 2.6.11 - '@types/qs': 6.9.15 abort-controller: 3.0.0 agentkeepalive: 4.5.0 form-data-encoder: 1.7.2 formdata-node: 4.4.1 node-fetch: 2.7.0 - qs: 6.13.0 optionalDependencies: zod: 3.23.8 transitivePeerDependencies: @@ -8666,10 +8568,6 @@ snapshots: pure-rand@6.1.0: {} - qs@6.13.0: - dependencies: - side-channel: 1.0.6 - queue-microtask@1.2.3: {} quick-lru@4.0.1: {} @@ -8898,28 +8796,12 @@ snapshots: semver@7.6.3: {} - set-function-length@1.2.2: - dependencies: - define-data-property: 1.1.4 - es-errors: 1.3.0 - function-bind: 1.1.2 - get-intrinsic: 1.2.4 - gopd: 1.0.1 - has-property-descriptors: 1.0.2 - shebang-command@2.0.0: dependencies: shebang-regex: 3.0.0 shebang-regex@3.0.0: {} - side-channel@1.0.6: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - get-intrinsic: 1.2.4 - object-inspect: 1.13.2 - signal-exit@3.0.7: {} signal-exit@4.1.0: {} diff --git a/src/utils/wrappers/OpenAIWrapper.ts b/src/utils/wrappers/OpenAIWrapper.ts index 6c8007b..37e3044 100644 --- a/src/utils/wrappers/OpenAIWrapper.ts +++ b/src/utils/wrappers/OpenAIWrapper.ts @@ -25,6 +25,15 @@ export class OpenAIWrapper { */ static wrapMethod any>(method: T, thisArg: any): T { return ((...args: Parameters): ReturnType => { + try { + if (args?.[1]?.headers?.['X-Stainless-Helper-Method'] === 'beta.chat.completions.parse') { + console.log('PAREA AI: Tracing is currently disabled for beta.chat.completions.parse'); + return method.apply(thisArg, args); + } + } catch (e) { + return method.apply(thisArg, args); + } + return this.traceManager.runInContext(() => { const traceDisabled = process.env.PAREA_TRACE_ENABLED === 'false'; const parentTrace = this.traceManager.getCurrentTrace();